Vous êtes sur la page 1sur 7

Frogs and Lilies Report

By: Shivam Kogar Class: Y9


Extended ADE
Introduction
This report investigates the Frogs game, which is a mathematical online computer
program where the player must swap all the red frogs with the green frogs; the
photo shown above is the starting point of the game. At the end of each round, the
positions of the frogs should be reversed. Frogs can only hop onto a vacant adjacent
lily or hop over one frog of a different colour onto a vacant lily. By the end of this
report, the problem of finding the minimum number of moves for 64 frogs on each
side of the lily pads with 8 vacant lilies in between them should be solved.

Strategy
There is only one possible number of moves to each arrangement of the frog game,
seeing that the following strategy is the only one that works as it does not block any
frogs. The Frogs problem can be solved through making the frogs of each colour
alternate, seeing that if two frogs of the same colour are placed consecutively, the
frogs of the other colour cannot jump over them. This causes for the player to be
stuck as they have blocked some of the frogs from reaching the other side. The
application of this strategy is evident in the game screenshot below:

Fig. 1: Screenshot of alternating frogs strategy

One Frog on Each Side


To begin approaching the original problem, data will be collected for the minimum
moves when there is 1 frog on each side as the number of vacant lilies in between
each frogs increase. The image below depicts the game where there is one frog on
each side and a variable number of lily pads in between (in this case there are 4
vacant lilies).

2
Fig. 2: Screenshot of the frogs game with one frog on each side and 4 lily pads
in between

Fig. 3: table of the number of moves as the number of lilies increase


Vacant lilies (𝑙) Minimum moves (𝑚)
1 3
2 5
3 7
4 9
5 11
6 13
7 15

Observations
 the increase in 𝑚 is linear
∆𝑚
 calculating ∆𝑙 gives 𝑎, the coefficient of 𝑙 in a formula represented in the form
𝑚 = 𝑎𝑙 + 𝑏, given that 𝑚 is the number of moves, 𝑙 is the number of vacant
lilies and 𝑎 and 𝑏 are numbers which are constant since the number of frogs
∆𝑚
are constant; Seeing that ∆𝑙 = 2 and that 𝑚 − 2𝑙 = 1, 𝑚 can be made the
subject and the formula can be found: 𝑚 = 2𝑙 + 1.

Prediction
It can be predicted that the number of moves in a scenario with 1 frog on each side
and 10 lilies is 21, seeing that as 𝑚 = 2𝑙 + 1, if 𝑙 = 10 then
𝑚 = 2 × 10 + 1
𝑚 = 20 + 1
𝑚 = 21

3
Testing the prediction
After playing the game in a scenario with 10 vacant lilies and 1 frog on each side, it
can be confirmed that the number of moves is indeed 21. This verifies the formula.

Now, the relationship between the number of vacant lilies and the number of frogs
on each side will be represented in a table of collected data values. The formulae
discovered in the form 𝑚 = 𝑎𝑙 + 𝑏 were derived using the same method as for Fig. 3.

Fig. 4: table of the minimum moves as the number of lilies and frogs increase
Number of vacant 1 2 3 4 5 6 Formula (𝑚 =
lilies (𝑙) vacant vacant vacant vacant vacant vacant 𝑎𝑙 + 𝑏)
lily lilies lilies lilies lilies lilies
Number 1 frog 3 5 7 9 11 13 𝑚 = 2𝑙 + 1
of frogs on each
on each side
side (𝑓) 2 frogs 8 12 16 20 24 28 𝑚 = 4𝑙 + 4
on each
side
3 frogs 15 21 27 33 39 45 𝑚 = 6𝑙 + 9
on each
side
4 frogs 24 32 40 48 56 64 𝑚 = 8𝑙 + 16
on each
side
5 frogs 35 45 55 65 75 85 𝑚 = 10𝑙 + 25
on each
side

Observations
 Each sequence of data (rows and columns) had a unique formula
o each row had a linear formula, which the last column of the table
depicted. These linear aspects of the table help solve for 𝑎 in terms of
𝑓 in finding a general formula. It was noticed that in each row, 𝑎 was
equal to twice the number of frogs on each side (i.e. in the first row, 𝑎
was 2, in the second row 𝑎 was 4). This gives us 𝑎 = 2𝑓.
o All 𝑏 values {1, 4, 9, 16, 25} had the evident pattern of each of the
numbers being the square of the number of frogs on each side. It can
be assumed using this pattern that 𝑏 = 𝑓 2

It was found that 𝑎 and 𝑏 values in a formula in the form 𝑚 = 𝑎𝑙 + 𝑏 can be written
in terms of 𝑓; 𝑎 = 2𝑓 and 𝑏 = 𝑓 2 . Carefully reflecting on the patterns in the formulae
for each row allowed for the deduction of the rule:

General formula
𝑚 = 2𝑓𝑙 + 𝑓 2

4
Prediction
Using the formula, it can be predicted that if there are 10 frogs on each side and 2
vacant lilies, the game will require 140 moves before success, as:
𝑚 = 2 × 10 × 2 + 102
𝑚 = 40 + 100
𝑚 = 140

Testing the prediction


Seeing that the computerized version of the game does not allow for 10 frogs on
each side, a homemade model of the game was used.
After testing out the prediction, it was confirmed that the solution to the problem
with 10 frogs on each side and 2 vacant lilies was indeed 140 moves. Now that the
formula has been verified, it will be looked into further by using visuals to describe
the correlation between the number of frogs and the number of moves.

In interpreting this formula through visuals, it was initially attempted to use a two-
dimensional graph where the 𝑥 axis represents the number of frogs and the 𝑦 axis
represents the number of moves. Each curved line represents the increasing
number of moves as the number of frogs increase. The numbers of lilies increase for
each line.

Fig. 5: Graph of the number of moves as the number of frogs increase.

Inferences
 Looking at this graph, it is deduced that as the number of lilies increase, the
slope or rate of increase of the number of moves increases.
 As the number of lilies increase the curvature of the line becomes
increasingly linear

5
Explanation of the formula
After observing the patterns in the data and trying to find how it could be connected
to the game, it was realized that:
𝑓 2 represents the number of moves wherein a frog jumps over another frog of a
different colour, and therefore the number of red frogs times the number of green
frogs. If there are 𝑓 frogs on each side, each frog has to jump over 𝑓 frogs of the
opposite colour to reach the other end. So the first frog has to jump 𝑓 times to get to
the other end, the second frog has to jump 𝑓 times to get to the other end and so on.
So each frog has to jump 𝑓 times, and the number of frogs equals 𝑓. Therefore, the
total number of jumps over another frog is 𝑓 + 𝑓 + 𝑓 + ⋯ 𝑓 times, which equals
𝑓 × 𝑓 which leads us to 𝑓 2 .

In contrast, 2𝑓𝑙 represents the number of times frogs jump directly to vacant lilies
(i.e. without jumping over another frog). When there are 𝑓 frogs on each side, 𝑓𝑙
moves will grant the number of direct jumps for one colour of frogs. An example will
be used to explain this: if there are 3 frogs on each side and 1 vacant lily, the frogs
will jump a total of 3 times on each side to occupy the 1 vacant lily. In turn, if there
were 4 vacant lilies, the frogs will jump 4𝑓 times to occupy the 4 vacant lilies as they
try to reach the other side. In the formula, the coefficient of 𝑓𝑙 is 2 because twice of
𝑓𝑙 is the number of direct jumps for frogs from both sides. Therefore in the formula
2𝑓 represents the summed number of frogs on either side.

Solving the original problem


The original problem mentioned at the beginning of this report will now be solved.
The problem was finding the minimum number moves for when there are 64 frogs
on each side of the lily pads with 8 vacant lilies in between them. Substituting these
into the general formula would yield the correct answer:

𝑚 = 2 × 64 × 8 + 642
𝑚 = 128 × 8 + 64 × 64
𝑚 = 1024 + 4096
𝑚 = 5120
The solution is: it will require exactly 5120 moves to reverse the position of the
frogs when there are 64 frogs on each side and 8 vacant lily pads in between.

Extension
To extend the investigation, the minimum number of moves where there are
variable vacant lily pads and any number of green frogs and any number of red frogs
will be looked in to. As shown in the explanation of the formula above, 2𝑓 denotes
the number of red and green frogs combined. This can be denoted as 𝑟 + 𝑔, where 𝑟
equals the number of red frogs and 𝑔 equals the number of green frogs. This number
multiplied by the number of lilies would grant the 2𝑓𝑙 value in the formula. Seeing
that 𝑓 2 is equal to the number of red frogs multiplied by the number of green, this
can be denoted as 𝑟𝑔. Therefore, the formula in terms of 𝑟, 𝑔 and 𝑙 would be:
𝑚 = 𝑙(𝑟 + 𝑔) + 𝑟𝑔
𝑚 = 𝑙𝑟 + 𝑙𝑔 + 𝑟𝑔

6
This formula is very similar to the formula derived in the earlier sections of the
investigation as it simply substitutes the 2𝑓 with 𝑟 + 𝑔 and 𝑓 2 with 𝑟𝑔. Reasoning
for why these values are equal is in the Explanation of the formula paragraph.
In order to verify this formula, it will be tested:

Fig. 6: table of the number of moves where here are various combinations of
red and green frogs and variable vacant lilies (data values obtained using the
formula in page 6)
Number of vacant 1 vacant lily 2 vacant lilies 3 vacant lilies 4 vacant lilies
lilies (𝑙)
Combina 3 green 1 × 3+1 2 × 3+2 × 2 3 × 3+3 × 2 4 × 3+4 × 2
-tions of frogs, 2 × 2+2 × 3 +2 × 3 +2 × 3 +2 × 3
red and red frogs = 3 + 2 + 6 =6+4+6 =9+6+6 = 12 + 8 + 6
green = 11 = 16 = 21 = 26
frogs on
each side 6 green 13 20 27 34
(𝑓) frogs, 1
red frogs
5 green 35 45 55 65
frogs, 5
red frogs
4 green 29 38 47 56
frogs, 5
red frogs
After playing the game, the formula can be verified seeing that the same values were
obtained playing the game as using the formula.

Conclusion
To conclude, the report investigated the frog game and mainly inquired into three
different scenarios: when there was 1 frog on each side and variable lilies, variable
frogs and variable lilies, and finally, variable red frogs, variable green frogs and
variable lilies. The first formula consisted of 1 independent variable, leading to a
linear formula. The second had two independent variables, this time leading to a
quadratic formula. The third was rather peculiar, as it could neither be described as
quadratic nor linear as it could not be represented on a graph as it had 3
independent variables and 1 dependent variable; 3 axes are insufficient to graph
these. Each scenario was inquired to using both an algebraic and practical approach.
Each scenario was assigned an algebraic formula, which was verified as well as
explained and justified. The original problem of a scenario with 64 frogs on each
side and 8 vacant lilies was solved using a formula that was both verified and
justified.

Vous aimerez peut-être aussi