Year 3 to Year 6: Junior Frogs
This challenge is based on the game Frogs which you may have seen before.
There are two green frogs and two brown toads:
A frog or toad can jump over one other creature onto an empty lilypad or it can slide onto an empty lilypad which is immediately next to it. Only one creature, at a time, is allowed on each lilypad.
Now the idea is for the frogs and toads to change places. So, the frogs will end up on the side where the toads started and the toads will end up where the frogs began.
The challenge is to do this in as few slides and jumps as possible.
Two frogs and two toads:
To keep this simple, let’s assign a letter to each of our adventurous amphibians: from left to right, their names are A, B, C and D. At the start, you are able to move any of the 4 amphibians. It doesn’t matter whether you move a toad or a frog first, because the layout is symmetrical. Let’s say we move a frog first. Imagine a situation where A jumps over B , we’d be in a right mess because no amphibian would be able to move anymore. So this means we have to slide B onto the lily pad directly beside it. Now, we can either move A, which would bring us back to the situation mentioned at the beginning, or we could, more sensibly, make C jump over B. Just to recap, our current position is A, C, B, (space), D.
At this point we can either move B or D. We’ll have to think ahead. Say we move B onto the vacant lily pad. Now we could move either A or D. However, both these moves would bring us to a dead end and a serious congestion. This means we will have to slide D onto the lily pad beside it. From here, the only thing we can do is make B jump over D. Now we can move either A or D. Moving D would bring us to a congestion that just won’t do, so we are obliged to jump A over C. There is only one move we can make at this point: sliding C onto the left-most lily pad. After this, there still is only one possible move: jumping D over A. From here on it’s quite obvious: just slide A nicely in beside B, and we’ve exchanged the positions of the frogs and toads.
This is not the only solution: the exact reflection of what I’ve just explained, where the toad moves first, is the other answer. Altogether, this has taken 8moves in total, according to the NRICH interactivity. Each amphibiotic species made exactly two slides and two jumps. I can be sure that this is the lowest possible number of moves because I have worked this out systematically. However, I have found that solving this puzzle in more than 8 moves is impossible; from several trials I have discovered that doing it in 8 moves is the only solution. This means that 8 moves is also the highest as well as lowest possible number of moves for two frogs and two toads.
Three Frogs and Three Toads:
Once again, let’s give each amphibian a letter: from left to right, A, B, and C, which are the frogs, and D, E, and F, which are toads. To keep things consistent, I’ll start with frogs again, although, again, the puzzle layout is symmetrical. The first part of this puzzle is similar to the previous one, but I’ll explain that bit again anyway; firstly, we want to move one of the frogs, so that’s either B or C. B will bring us into a mess, so we have to move C. Moving B at this point won’t be a good idea, and neither will moving A, so we’ll settle with jumping D over C. Sliding C onto the empty lily pad will bring a congestion later on so the best idea is to move E. If we slide F, it won’t do any good, so let’s make C hop over E. Moving E one lily pad along will lead to congestion so B should jump over D. If we move D over, it will lead to trouble, so we should move A onto the vacant lily pad. We now have an alternating pattern of frogs and toads, which is a good sign. From here it should be quite straightforward; the only thing we can do now is jump D over A. Moving A forward will lead to congestion (I apologise that I keep using that word, but it suits the situation best!) so I would jump E over B. In a similar pattern, let’s jump F over C, and then move C onto the empty lily pad. After that we should jump B over F, and then jump A into the space that B just left. Now we should slide E in beside D, jump F over A and then move A into the spare slot.
This time the outcome is quite different: the interactivity states that frogs made four slides and four jumps, and that toads made two slides and five jumps. This means that toads made fewer moves than frogs. The total number of moves is 15. I tried this again starting with the toads, and this time the frogs made two slides and five jumps, and the toads made four of each. I can be assured that this is the shortest possible number of moves because I worked it out systematically and always chose the one move that would work. I think the key is to make an alternating pattern of frogs and toads, and from then on it’s easy.
I worked out the smallest number of moves for one frog and one toad, as well as four frogs and four toads, to see if there was a pattern and whether I could come up with a formula.
Here are my results:
1 of each type of amphibian, 3 moves
2 of each type of amphibian, 8 moves
3 of each type of amphibian, 15 moves
4 of each type of amphibian, 24 moves.
I noticed that the number of moves is the number of each type of amphibian multiplied by itself plus 2. Now, that’s a bit of a mouthful, so here’s the formula that I came up with: n(n+2) or n²+2n.