# Miss Toad and her frogs

Miss Toad owns a lot of frogs. These frogs are all looking the same, but they can be either mad or nicely.

If a mad frog is in a room with 3 nicely frogs, then he turns red, because he is ashamed.

If a nicely frog is in a room with 3 mad frogs, then he also turns mad.

For test purposes, Miss Toad puts 3 frogs in a room.

Then she places the 4th frog also there, waits a moment, and takes away the first frog. Then she places the 5th frog also there, waits a moment, and takes away the second frog. And so on.
When she's placing the 2012th frog, it's the first time a frog in the room turns red.

Which of the following frogs could be mad from the beginning?

A) 1 and 2011.

B) 2 and 2010.

C) 3 and 2009.

D) 4 and 2012.

E) 2 and 2011.

F) I hate this riddle.

• First thought: oh, this looks easy! After ten minutes: definitely option F. – Rand al'Thor Jun 24 at 15:55
• Great puzzle! In the end it is easy, but only once you look at it in the right way. – Rand al'Thor Jun 24 at 16:36
• Thank you very much !!!! – Matti Jun 24 at 19:00

## Initial information, re-parsed

We have a sequence of length 2012, in which each term is either N (nicely) or A (always mad) or C (mad converted from nicely). Among terms 2009, 2010, 2011, 2012, three are N and the fourth is not, and that's never happened with any previous set of four consecutive terms.

## Important deductions

If any term is C, then

it is part of a sequence of four consecutive mad (not N) terms, so everything afterwards will also be mad. This contradicts what happens at the 2012th term, so C never occurs. For the same reason, we can never have three consecutive mad terms.

If we have three consecutive N, then

everything before and after must be N until the red incident at 2012. That's not compatible with any of the five stated options, so let's rule it out.

Now we know that every sequence of four consecutive terms (up to 2009, 2010, 2011, 2012) must contain

two N, two A.

That means there's a pattern of invariance, namely

every term is the same as the one four before it. So 2009, 2010, 2011 are the same as 1, 2, 3, and at most one of these three is mad; while 2012 is the opposite of 2008, which is the same as 4.

Among the options given, that leaves only

option B as the correct answer.

1. If 2012 is not N, then

2012 is A, and every term before it must be N (otherwise we'd have had a red incident before). So option D is impossible.

2. If 2011 is not N, then

2011 is A and 2009, 2010, 2012 are N, so 2008 can't be N, so 2007 can't be N, so 2006 must be N, so 2005 must be N.

05 06 07 08 09 10 11 12
N N mad mad N N mad N

This pattern must keep on repeating all the way back, so everything congruent to 1 or 2 modulo 4 is nicely while everything congruent to 0 or 3 modulo 4 is mad (therefore A). In particular, 1 and 2 are N, so options A and E are impossible.

3. If 2010 is not N, then

2010 is A and 2009, 2011, 2012 are N, so 2008 can't be N, so 2007 must be N, so 2006 can't be N, so 2005 must be N.

05 06 07 08 09 10 11 12
N mad N mad N mad N N

This pattern must keep on repeating all the way back, so everything odd is nicely while everything even is mad (therefore A). In particular, 2 is A, so option B is possible.

4. If 2009 is not N, then

2009 is mad and 2010, 2011, 2012 are N, so 2008 can't be N, so 2007 must be N, so 2006 must be N, so 2005 can't be N.

05 06 07 08 09 10 11 12
mad N N mad mad N N N

This pattern must keep on repeating all the way back, so everything congruent to 2 or 3 modulo 4 is nicely while everything congruent to 0 or 1 modulo 4 is mad (therefore A). In particular, 3 is N, so option C is impossible.

Option B is the only one which can be true.

• I was looking at your "If we have three consecutive N, then" - I think you need to say before as well as after. – Chris Jun 25 at 12:56
• @Chris Yep, thanks. – Rand al'Thor Jun 25 at 13:16

This is a more graphical answer with 1's for mad frogs and 0's for nice frogs.

Here are the four possibilities for 2009, 2010, 2011 and 2012

1000

0100

0010

0001

No we can go backward bit by bit for every sequences, using the two given rules and the knowledge that an ashamed frog never happened before. We see that there is a recurring pattern for each possibilities.

1001 1001 1001 1000

0101 0101 0101 0100

0011 0011 0011 0010

0000 0000 0000 0001

Since 1, 2, 3, 4 are (respectively) one of these pattern

because 2012/4 = round number

We can observe that

only option B is a possibility (line 2).

• Nice! I wanted to use a simple 1s-and-0s thing from the beginning, but opted for letters instead when I realised there are two types of mad frog. Once you know one of those types never occurs, this is a great way to show the solution. – Rand al'Thor Jun 25 at 12:36