# Leaping frog Game

• Sep 23rd 2006, 03:38 AM
Natasha1
Leaping frog Game
I wandered if anyone could give me as much as possible info on the task I need to investigate at:

http://maths.fallibroome.cheshire.sch.uk/leapfrog.swf

I have worked out that frog 3 blue frogs and 3 green frogs it will take me 15 moves.

I have worked out that frog 3 blue frogs and 4 green frogs it will take me 19 moves.

I have worked out that frog 4 blue frogs and 4 green frogs it will take me 24 moves.

I have worked out that frog 4 blue frogs and 5 green frogs it will take me 29 moves.

I have worked out that frog 5 blue frogs and 5 green frogs it will take me 35 moves.

If n represents the number of frogs in a team then:

For:
n = 1 we have 3 = n * 3 moves
n= 2 we have 8 = n * 4 moves
n = 3 we have 15 = n * 5 moves
n = 4 we have 24 = n * 6 moves
n = 5 we have 35 = n * 7 moves
n = 6 we have 48 = n * 8 moves

Or more generally if there are n frogs on each side, then the minimum number of moves will be n*(n+2)

This formula does not work if the number of frogs in each team is uneven

If n represents the number of frogs in a team and m the number of frogs in the other then:

For:
n = 1 and m = 6 we have 13 = 1 * 6 + 1 + 6 moves
n = 4 and m = 3 we have 19 = 4 * 3 + 4 + 3 moves
n = 2 and m = 1 we have 5 = 2 * 1 + 2 + 1 moves
n = 5 and m = 6 we have 41 = 5 * 6 + 5 + 6 moves
n = 5 and m = 5 we have 35 = 5 * 5 + 5 + 5 moves

So if there are n frogs on one side and m on the other, then the minimum number of moves will be n*m+n+m

Other patterns notices but I can't explain why (please help!)

- For each frog extra that one team has, there will be a repetition of the jumps and slides. The string of jumps and slides is also symmetric.
- If there are the same number of frogs in each team, then each frog will have to move n+1 times.
• Sep 23rd 2006, 05:48 AM
Soroban
Hello, Natasha!

Edit: my formula was wrong . . . I've corrected it.

This is a classic peg-jumping puzzle. .I worked on this many years ago.

Traditionally, there is an equal number of pegs (frogs) on each side.

If there are n pegs on each of the two sides,
. . the number of moves is: .(n+1)&#178; - 1
. . and there is a lovely pattern to the moves.

Example: n = 3. .There are 3 blue pegs and 3 green pegs.

Number the seven positions (not the pegs):
Code:

```    B  B  B  _  G  G  G     1  2  3  4  5  6  7```

Now move the pegs in the following positions:
Code:

```                  4                 /               3  →  5                         \           2  ←  4  ←  6         /       1  →  3  →  5  →  7                             /           2  ←  4  ←  6             \               3  →  5                     /                   4```

The first "4" means "move the peg in position #4".
. . Of course, there is no peg to move in position #4.
I included that initial "4" only to complete the diamond pattern.

Then it says: move 3, move 5, move 6, . . .
. . For each move, there is exactly one possible move.

Try it . . . With a little practice, you can solve it at dazzling speed.

• Sep 23rd 2006, 07:31 AM
Natasha1
Thanks Soroban,

But surely the general form cannot be n&#178; - 1 as this would give 8 (for n = 3) and the answer is 15 moves
• Sep 23rd 2006, 07:48 AM
classicstrings
Quote:

Originally Posted by Natasha1
Thanks Soroban,

But surely the general form cannot be n&#178; - 1 as this would give 8 (for n = 3) and the answer is 15 moves

It's actually 3^2 + 3 + 3

Or generally MN + M + N where M = no. of frogs on one side, N = number on other side.

In the first case, M = 3 = N

So you get 15!

Which is what you have already...

The Frog Puzzle: A Solution

Toads And Frogs puzzle