The University of Melbourne
Mathematics & Statistics Research Competition 2024
Intermediate Booklet Question 10—Leaky Tap
Ru Li
Darwin Middle School
7/29/2024
0
Contents
Introduction ................................................................................................................................ 2
1. Methodology and procedures ................................................................................................. 2
2. With the normal double-spouted cups .................................................................................... 4
2.1 For certain leaky time ...................................................................................................... 4
2.1.1 Application of Excel ................................................................................................. 4
2.1.2 Python application for 2 days leaky .......................................................................... 7
2.2 Deduction of formula for 𝑉𝑖, 𝑗(𝑡) .................................................................................. 10
3. Introduction of special siphon cup ....................................................................................... 15
3.1 Special siphon priciple and cup ..................................................................................... 15
3.2 Introduction of one siphon cup ..................................................................................... 16
3.2.1 Impact of siphon cup position in the cup tower on the leaky process .................... 16
3.2.2 Impact on the number of filled cups ....................................................................... 19
3.3 Effect of the number of siphon cups on the system ....................................................... 21
Conclusion: .............................................................................................................................. 21
Reference ................................................................................................................................. 22
1
Introduction
To begin with, this is a leaky tap question where water leaks from the tap and drops down at a
certain speed into a tower of identical double-spouted cups placed below. Due to the
relationship that when the cups are filled fully up, the excessed water will be distributed evenly
to the ones under, an interesting phenomenon would occur - even though some cups are located
in the same roll, but it is filled in varied speeds which will take different amount of time.
Through in-depth understanding, it can be discovered that this phenomenon will cause the cups
near the centre to be the earliest that is fill up, it will also affect the number of rolls (the more
towards the centre, the more rolls there will be filled with water while the ones placed on the
sides are still empty).
This question is challenging as the amounts of rolls and columns are not provided, they will
increase as the time modifies. To solve this problem, it begins with speed and time. For instance,
speed of water from top roll to fill bottom cup, the time it will take to fill up the cup could then
be calculated. After that filling the cup, the extra water will drop into the cups located in the
roll below. However, while conducting this method over and over for several times then
realised that there are too many factors needed to be considered and it is hard to be written out
in a mathematical way. As a solution, it will be worked out from a volumetric perspective,
which means using volume instead of speed and/or time.
1. Methodology and procedures
Let’s begin with some basic understanding of how exact the dripping process work: There is a
tower of identical double-spouted cups of volume 1 cubic unit. This tower has infinitely many
rows, with each row having one more cup than the one above it. The cups are arranged in a
triangular pattern with the spouts facing left and right (Figure 1). At the top of the tower, a
leaky tap starts to drip into the top cup. When a cup is full, the overflowing liquid begins to
drip into the 2 cups directly below it. At first, the tap drips at a rate of 0.004 cubic units per
second.
2
Figure 1: Schematic of the cup tower.
As described in introduction, the volume of the water will be considered as the variable V in
the whole process. The process of how to calculate is shown in the diagram below. Firstly,
suppose that there are V amount of water overall, the water is now all dropped into the first
cup. As the volume that each cup could hold has been set - it could only hold 1 cubic metre of
water, the extra overflow water will be equally distributed into the two cups below it.
Figure 2 Water filling process within different rolls
3
2. With the normal double-spouted cups
2.1 For certain leaky time
In this section, the time is provided which means there should only result in one solution.
Questions:
If the tap drips at a rate of 0.004 cubic units per second.
After 2 full days, how many cups have been filled?
What is the volume of liquid in each cup at the bottom-most row of non-empty cups?
First of all, water volume calculation which leaked in time period provided
Water volume (V)=drip rate* time= 0.04*2*24*3600=691.2 cubic units
Then analyse and calculate the distribution of the water. Two methods will be applied in this
section, which are EXCEL + equations and coding using Python.
2.1.1 Application of Excel
The distribution of water was calculated using EXCEL tables and formulas, and the results are
shown in Figure 3 and 4. This process was implemented in full accordance with the method
shown in Figure 2. By observing the enlarged part of the figure, it can be found that the pattern
of distribution is not always the same. In the middle part of the cup tower, the amount of water
shows a downward trend with the increase of the number of layers, but near the edge, there is
also a trend of rising first and then falling (as shown in Figure 4). Such varied changes increase
the difficulty of summarizing the formula equations in the future.
After analysing layer by layer according to the law of water leakage, the water filling situation
of all cups with water can be directly obtained, as shown in Figure 3. It reveals that after two
days of water drops, the amount of water in the water-filled cups appears symmetrically in the
entire cup tower, and the left and right sides and the bottom are not filled with water. The largest
non-empty water cup column appears in the middle and upper position.
In summary, we found that after 2 Days of leaking, there are 74 rows and 25 columns cups
filled with water. The count function of Excel spreadsheet is used here, and the application
results are shown in table 1. Among them, 661 cups are completely filled with water (full), and
74 cups contain water but are not full filled. Therefore, there are a total of 735 cups with water
in two days.
4
Table 1 The Excel function and results for 2 days.
Type Excel function Criteria Number
Full of water countif (range, criteria ) “>=1” 661
No-empty countif (range, criteria ) “>0” 735
Not fully filled 74
Figure 3 also reveals that at the bottom-most row there are four non-empty cups and the water
in them are 0.0244, 0.4418,0.4418 and 0.0244 separately with symmetry feature.
Figure 3 The non-empty cups distribution for 2 days drop
5
Figure4 Water distribution for two days and the methodology application
6
2.1.2 Python application for 2 days leaky
This process can also be performed through Python programming technology. The main idea
is similar with Section 1, but several variables need to be defined and implemented.
Explanation of the coding (steps)
(1) Definition of the input water
𝑡𝑜𝑡𝑎𝑙_𝑤𝑎𝑡𝑒𝑟 = 0.004 ∗ 2 ∗ 24 ∗ 60 ∗ 60 (For 2 days)
(2) The full cups initialization
Initialized using defaultdict(float), the default water volume of all cups is 0.
(3) Queue initialization
The queue is used for breadth-first search, starting from the top and processing each cup in turn
(4) Main loop
Take the current cup (row, col) from the queue.
If the water volume is greater than or equal to 1, handle the overflow:
▪ Calculate the overflow water volume overflow.
▪ Set the water volume of the current cup to 1.
▪ Half of the overflow water volume flows into the two cups in the next row.
▪ Add two new cups to the que ue.
(5) Return result:
Return full_cups Returns the number of filled cups.
The procedure used is illustrated in Figure 5. The results obtained by the program are the same
as the Excel spreadsheet, which is, 661 cups are full filled with water.
7
Figure 5 The coding for filled cups during the leaky process
To calculate the exact volume of liquid in each cup at the bottom-most row of non-empty cups,
another coding program was applied.
During the process, for each cup in each row the water volume was checked. If the water
volume is greater than or equal to 1, calculate the overflow and update the cups in the next row.
Half of the overflow is distributed to the left and right cups in the lower row. Use
min(current_row[col], 1) to ensure that the current cup does not exceed.
Returns the water distribution of the last row. If “last_row_water_distribution” is empty, output
"No non-empty cups found in the last row." to ensure that cups with water are processed and
displayed correctly.
8
Figure 6 The coding for non-empty cups in last row.
After running the program, the results are displayed below. Which was: Row 73 (the number
of rows starts from 0) and the no-empty values are 0.022414726027096266,
0.441789503198342, 0.441789503198342 and 0.022414726027096266 respectively and the
same as from previous excel calculation.
9
Figure 7 The results for non-empty cups calculations
2.2 Deduction of formula for 𝑽𝒊,𝒋 (𝒕)
In order to derive a general formula for the dripping time and the amount of water added to
each cup, we first studied with different time periods. The water filling time is selected as
t=1day, t=2 days and t=3 days. As mentioned earlier, the row and column of the cup water
filling are not given, but it does not affect the existence of the cup tower. Through the
observation of a standard cup tower, it is found that the number of columns (j) is equal to the
sum of the current row number (i) plus the number of rows in the previous layer, that is,
𝑗 = 𝑖 + (𝑖 − 1), 𝑖, 𝑗 ≥ 1
This is a large number. The total number of cups in the cup tower is:
𝑁 = 𝑖(𝑖 + 1)/2
Taking the amount of water drops in a day as an example, the number of cup in the tower, the
number of cups filled with water and the number of cups that are not empty, etc. found that the
number of empty cups is much greater than the number of cups filled with water, as shown in
Figure 5. In a cup tower with 47 rows and 93 columns, there are 1128 cups in total, of which
only 319 cups are filled with water, 47 cups are not filled with water, and 762 cups are empty
cups. The cups in the middle part of the picture are fully filled with water, the cups shaded
10
green are cup with water but not full filled, and the orange cups are empty cups (majority).
Figure8 The cups distributions in the cups tower for 1 day
From this, it was found that 𝑉 , (𝑡) has three cases: equal to 0, equal to 1 and a certain value,
and this value is the value of the cup that is not fully filled. It can be observed that no matter
how many days the water is filled, the value of the column will never change as much as the
row, that is, the final result will have some horizontal extension, but more vertical extension.
Figure 9 also illustrates this problem for the case of filling the water cup that has been dripping
for 3 days.
11
Figure 9 Water distribution for three days
As mentioned above, the increase of row number is larger than the column increase. A trend
of the change is shown in figure 10. The slope for row number keeps increasing from 1day to
3days, while the column number only has a slight change.
12
Figure 10 Change of row and column of the with water cups
Table2 Details for cups number for 1day, 2days and 3 days
Days Row Column Cups Column filled No empty No water
tower non-empty
1 47 93 1128 19 319 366 762
2 74 147 2775 25 661 735 2040
3 97 97 4753 29 996 1085 3668
Since the process of filling water is very complicated, it is a complex problem to derive a
formula to express the amount of water in the cup in the [Link] row and [Link] column of the tower,
because the amount of water in each cup depends on the overflow of all the cups above it. The
amount of water could be expressed recursively and try to discover a general formula. It is
expressed as follows:
The water volume of the top cup (row 0, col 0):𝑉(0,0, 𝑡) = 𝑟 × 𝑡
Where r is the drop water rate.
For the cup in row i and column j, the amount of water in it comes from the amount of water
overflowing from the cups in row i−1 and column j−1 and row i−1 and column j. So, a recursive
formula can be deducted in the following.
Considering the complexity of this recursive formula, it is difficult to find it manually, so
programming technology is used again to display what is being discovered, as shown below.
13
Recursive formula:
The min function in the formula takes the smaller of two values. In this formula, it ensures
that the amount of water in each cup does not exceed its maximum capacity (1 cubic unit).
Figure 11 Coding for the calculation of the water in row i and col j
Taking row=15, col=4 as an example, we analyze the water filling for 3 days and find that the
result calculated by the program is 34.535, which is consistent with the result in Figure 9. This
further proves that the water filling situation of each cup can be obtained through the
calculation of this program.
Figure 12 Water in cups from program calculation
14
3. Introduction of special siphon cup
The introduction of the siphon cup does have an important impact on the water distribution of
the entire system. The working mechanism of the siphon cup and its role will be gradually
analysed in the entire system.
3.1 Special siphon principle and siphon cup
Siphon principle: Siphon is a phenomenon that uses the liquid's own gravity and atmospheric
pressure difference to achieve the flow of liquid from high to low. It usually relies on a curved
tube to transfer liquid through both ends of the tube. When the liquid flows in the tube, it can
overcome the effect of gravity and flow from a high container to a low container, displayed
below in figure13.
Figure 13 Schematic diagram of siphon phenomenon
Siphon cup: A siphon cup is a specially designed cup. When the liquid in the cup reaches a
certain level, the siphon device inside the cup will start and quickly discharge the liquid to
another location. In this process, the siphon cup can automatically adjust the flow of liquid so
that it automatically empties when it reaches a predetermined liquid level.
Working principle:
Liquid accumulation: The siphon cup starts to accumulate liquid like an ordinary cup.
When the liquid in the cup reaches a certain level (such as 0.7 cubic units), the siphon
mechanism starts.
15
Siphon start: Once the liquid reaches the set level, the siphon starts to work, and the
liquid is quickly discharged through the pipe to the container below the siphon cup.
Emptying and refilling: The siphon process quickly discharges the liquid until the liquid
level drops below the set level (such as 0.7 cubic units). Subsequently, the siphon
process stops, and the siphon cup starts to accumulate liquid again, preparing for the
next siphon cycle.
The siphon phenomenon is widely used in daily life and industrial production, such as drainage
systems, pumps, etc. Especially in agricultural irrigation systems, siphon cups can ensure that
the water level is at a certain height and automatically adjust the irrigation amount to prevent
over-irrigation or waste of water resources. In the following, the impact of the introduction of
this cup in the cup tower will be discussed.
3.2 Introduction of one siphon cup
As mentioned above, once the water volume of the siphon cup reaches 0.7 cubic units, it will
begin to drain at a rate of 0.5 cubic units per second until the cup is empty and accumulates
water to 0.7 cubic units. The drained water will flow directly into the cups in the two rows
below it. After the drainage is completed, the siphon cup starts to fill up again and repeat the
above process.
3.2.1 Impact of siphon cup position in the cup tower on the leaky process
In the case of a siphon cup, some water will be transferred faster from the top to the cups further
down. After the siphon cup is filled, it will quickly drain the excess water. This accelerated
water flow will affect the two rows of cups below it and will also affect the entire cup tower.
For this question, it is believed that the placement of the position has a great impact on the
entire water filling process. It can be divided into two aspects. One is that the cup is placed at
a higher position (vertical), or the cup is placed in the central position(horizontal)
For vertical direction, there are Top, middle layer and bottom positions.
Top siphon cup: If the siphon cup is at the top of the tower, the water it drains will
immediately affect the two layers of cups below, and then the water will continue to
overflow downward. Because the siphon cup drains periodically, this rapid and large
amount of water will cause the cups at the bottom of the tower to fill up earlier than
without the siphon cup.
16
Middle layer siphon cup: If the siphon cup is located in the middle layer, its impact on
the system is mainly concentrated on the several layers of cups below it. Although the
impact range is not as large as the siphon cup at the top of the tower, it will still
significantly change the water distribution.
Bottom siphon cup: If the siphon cup is located at the bottom of the tower, its impact is
minimal because drainage will only affect a few layers of cups without significantly
changing the water distribution in the upper layers.
As shown in Figure 14, the impact of placing the siphon cup at a higher position (a) or a lower
position on other cups. Analysis shows that when the siphon cup is at a higher position, the
water it discharges will quickly flow to the multiple cups below, which will cause the multiple
cups below to fill up with water faster, causing these cups to overflow earlier, further
accelerating the transfer of water to lower positions. When the siphon cup is at a lower position,
its impact is limited to the fewer cups below it, as shown in Figure 14 (b), but it will still
accelerate the transfer of water in these cups.
Figure14 The comparison of influence in different vertical direction
Figure 15 shows the impact of different horizontal positions of the siphon cup on the entire
system, that is, placing the siphon cup near the centre line usually has a greater impact than
placing it near the edge.
Here are the specific reasons:
(1) Wider water flow distribution path:
17
Close to the centre line: When the siphon cup is placed near the centre line, the
discharged water will be dispersed to more cups below, covering a wider area. This
means that more cups will be affected by the drainage of the siphon cup, thereby
accelerating the water distribution in the entire system.
Close to the edge: If the siphon cup is close to the edge, the discharged water will mainly
affect the cups near the edge, the water flow path is shorter, and the impact range is
smaller.
(2) Symmetry:
Close to the centre line: After the water is discharged from the siphon cup at the centre
line position, it can be symmetrically distributed to the cups on the left and right sides,
making the water flow distribution more uniform and balanced.
Close to the edge: At the edge, the water flow can only spread to one side, resulting in
uneven distribution and less impact on the system.
At the same time, it can be concluded from the previous analysis that during the water filling
process, the cups with water are not strictly arranged according to the cup tower. Instead, the
amount of water is far less than that in the cup tower. This will further reduce the impact of
adding siphon cups away from the centre.
Figure15 The comparison of influence in different horizontal direction
18
3.2.2 Impact on the number of filled cups
The introduction of the siphon cup can have a significant effect on the total number of filled
cups, especially when the siphon cup is at the top of the tower. Here are some possible effects
and reasons:
(1) Earlier filling of lower cups:
The siphon cup drains periodically, transferring a large amount of water quickly to the
cups below. This causes the lower cups to fill earlier, increasing the total number of
filled cups.
(2) Fluctuation transfer:
The drainage of the siphon cup causes fluctuations in the water volume, which are
transferred from layer to layer, resulting in more dramatic changes in the water volume
in the lower cups. Although these fluctuations gradually weaken, they will cause more
cups to be filled at certain moments.
(3) Faster overall water distribution:
Because the siphon cup can drain water quickly to the cups below, the overall
distribution of water in the tower is accelerated. This means that more water reaches
the lower cups faster, increasing the number of filled cups.
To quantify these effects, we can calculate the total number of cups filled and the number of
cups with water in the simulation. Figure 16 shows the program code. Figure 17(a) shows the
result of placing the siphon cup at (0, 0). When water filling of three days was taken as an
example. The number of filled cups is 998, and the number of non-empty cups is 1095. Figure
17(b) shows the result of placing the siphon cup at (2, 0). The number of filled cups is 996, and
the number of non-empty cups is 1093. Compared with the results in table 2 both the number
of filled cups and the number of non-empty cups are increased.
19
Figure16 The coding to introduction of one siphon cup
(a) Position (0,0) (b)Position (2,0)
Figure 17 The water filled results with one siphon cup
20
3.3 Effect of the number of siphon cups on the system
Replacing more original cups with siphon cups will significantly change the water distribution
and cup filling process. there are four main effects for introduction of more siphon cups.
(1) Rapid water transfer
As the number of siphon cups increases, water will be transferred from the upper cups
to the lower cups faster. Since the siphon cups drain at a faster rate, this will cause the
lower cups to fill earlier than without the siphon cups.
(2) Accelerated water distribution
Multiple siphon cups work together to speed up the distribution of water throughout
the system. This means that the total water distribution will be more even, but it will
also reach the lower cups faster.
(3) Increased periodic fluctuations
Each siphon cup has its own drainage cycle. This causes periodic fluctuations in water
volume. As the number of siphon cups increases, this fluctuation will be transmitted in
more layers and more cups, resulting in more complex and variable changes in water
volume.
(4) Effect on the number of filled cups
Increasing the number of siphon cups will cause more cups to fill earlier because water
will be transferred to the lower cups faster.
Conclusion:
This question is about a leaky water problem. Finding the distribution law of water volume is
the key to this question, and how to find the recursive formula and perform calculations also
runs through this question. With the help of Excel and Python software, some relevant and
useful conclusions were finally obtained.
In a cup tower, the number of cups filled with water will gradually increase with time,
but the increase in the vertical direction is faster than the increase in the horizontal
direction.
By calculating the dripping time of two days, 661 cups are filled, 74 cups contain water
but are not full, and four cups at the bottom are filled with water. The water injection
amount is 0.0244, 0.4418, 0.4418 and 0.0244 respectively.
21
The water content formula of the cups in row i and column j is obtained by analysis.
This is a recursive formula, which is difficult to calculate manually, so computer
technology is sought; The number of cups filled and not filled in a given time is realized
through python programming, and the water content calculation results of the cups in
row i and column j are obtained. The reliability of the program is verified by comparing
it with the results of Excel software.
The introduction of the siphon cup accelerates the water distribution process, especially
when it is close to the top of the tower and the midline, the impact on the system is the
greatest.
In practical applications, the position of the siphon cup can be adjusted to optimize the
water distribution so that the system achieves the best effect.
Through this study, we not only understand the water distribution law of the simple drip model,
but also recognize the potential application of siphon cups in complex systems. Future research
can further optimize the design and location of siphon cups to more effectively control water
distribution and utilization.
Reference
1. [Link]. (n.d.). Siphon | UCSC Physics Demonstration
Room. [online] Available at: [Link]
5b6b-demos/fluids-pressure-and-heat/pythagorean-cup/siphon-2/ [Accessed
28 Jul. 2024].
2. Davidson Institute of Science Education. (2014). The Amazing Self-Emptying Cup
(Pythagoras’ Cup). [online] Available at:
[Link]
pythagoras-cup.
22