Earlier today I set you these three puzzles by the Japanese setter Tadao Kitazawa,
1. The Pet Hotel
In the Pet Hotel, the rooms are numbered 1 to 5, in that order. Each room can accommodate one animal, and has its own light. At night, an animal who is nervous leaves the light on. An animal who is not nervous turns the light off. Each of the rooms 1 to 5 are always occupied by either a dog or a cat, and everyone checks out after a night.
a) On Saturday night, a dog is nervous if and only if there are cats in both adjacent rooms. A cat is nervous if and only if there is a dog in at least one adjacent room. It is observed that four rooms remain lit. How many cats are there at the Pet Hotel?
b) On Sunday night, a dog is nervous if and only if there are other dogs in both adjacent rooms. A cat is nervous if and only if there is another cat in at least one adjacent room. It is observed that only one room remains lit. How many cats are there at the Pet Hotel?
Solution a) 3 cats b) 2 cats
a) Consider three cases. Case 1, only room 3 is dark. Suppose there is cat in this room. Thus rooms 2 and 4 must both have cats. These two cats are nervous, thus 1 and 5 have dogs. Neither of these dogs are nervous, thus 1 and 5 would be dark, which contradicts the premise of Case 1. Suppose room 3 has a dog. Then at least one of 2 and 4 has a dog. This dog cannot be nervous, so would switch off the light, again leading to contradiction.
Case 2, either room 2 or 4 is dark. Let’s say it’s 2. Suppose there is a cat in this room. Thus 1 and 3 must have cats. But if this is the case, then the cat in 1 is not nervous, leading to contradiction. Suppose there is a dog in 2. Then either 1 or 3 has a dog, but this dog will not be nervous, leading to contradiction. If we started with 4, the same logic applies.
Case 3, either room 1 or 5 is dark. Let’s say it’s 1. Suppose there is a cat in this room. Then there is a cat in 2, which means there is a dog in 3 and a cat in 4. Room 5 can have a cat or a dog, but either way it is not nervous and would switch off the light. So suppose there is a dog in 1. If room 2 has a dog, it won’t be nervous, so the light goes off and we get a contradiction. So room 2 has a cat. If room 3 has a dog, then room 4 must have a cat, and then whatever is in room 5 will turn off the light. Contradiction.
So, suppose 1 has a dog. Room 2 must be a cat, since a dog in this room would not be nervous. If room 3 has a dog, it is only nervous if room 4 is a cat, which will be nervous, but that means whoever is in room 5 is not nervous, which leads to a contradiction. Thus room 3 has a cat, room 4 has a dog and room 5 a cat. This works, and is our solution – 3 cats.
b) Using a similar process as above you will find a solution when the lit room is 3 (which gives one solution of cat/dog/dog/dog/cat). Thus 2 cats.
2. Shaken, not bumped
Among six children, each handshake is between a boy and a girl. Each of four children shakes hands with exactly two others. Each of the other two shakes hands with exactly three others. Do these two children shake hands with each other?
Solution: Yes. First, work out how many boys and how many girls there are in the group. There can’t be just one boy, since that would mean that only that boy can shake hands with more than one person (since handshakes are between boys and girls), and we know everyone shakes hands with more than one person. If there are exactly two boys, then the boys would be the children shaking hands with three others, and the four girls would each be shaking hands with two others. But this would mean that each girl shakes both boys’ hands, meaning that the boys are each shaking four peoples hands, which contradicts the question. Thus there are at least three boys. Repeating the above argument for girls, we deduce there are at least three girls. We conclude the group has three boys and three girls.
Now let’s work out whether the two children shaking hands with exactly three others are of the same gender. Case 1 Let’s say they are, and let’s say they are girls. Then each would shake hands with each boy, and each boy would already have their two allocated handshakes. The third girl will have no handshakes, so this doesn’t work.
Case 2 The two children are of opposite gender. If they are, they must shake hands with each other. Here’s one way to make it workIf A, B, C are girls, and X, Y Z are boys, then there are handshakes between AX, AY, AZ, BX, CX, BY, CZ.
3. I should be so lucky
Three girls, Akari, Sakura and Yui, are each given a positive whole number, which they keep secret from each other. They are all told the sum of the numbers is 12. A girl is considered “lucky” if she has the highest number. It is possible that one, two or all three girls are “lucky”.
Akari says: “I don’t know who is lucky.”
Sakura says: “I still don’t know who is lucky.”
Yui says: “I still don’t know who is lucky.”
Akari says: “Now I know who is lucky!”
Who is lucky?
Solution: Sakura and Yui are lucky.
If Akari doesn’t know she is lucky, we can deduce that her number is at most 5. That’s because if she had 6 she would know that only she is lucky, since it would be impossible for the others to have 6 or above.
Likewise, we can deduce that both Sakura and Yui also have at most 5. Once everyone has spoken once, all three girls know that none of them has a number above 5.
They know that all the numbers add up to 12. There are ten possible combinations of numbers 5 or below that add up to 12:
A S Y
5 5 2
5 2 5
2 5 5
5 4 3
5 3 4
4 5 3
4 3 5
3 5 4
3 4 5
4 4 4
We can eliminate the first case, since if that was the case, Yui would have known that the other two were lucky. There are three other cases when Akari has 5, three when she has 4, two when she has 3, and one when she has 2. Since she is able to deduce who is lucky, she must have 2. (Since if she had any other number she would not be sure exactly who was lucky). Thus she has 2, the others have 5, and both Sakura and Yui are lucky.
I hope you enjoyed these puzzles. I’ll be back in two weeks.
Thanks to Tadao Kitazawa for today’s puzzles. His book Arithmetical, Geometrical and Combinatorial Puzzles from Japan is packed with puzzles like the ones above.
I set a puzzle here every two weeks on a Monday. I’m always on the look-out for great puzzles. If you would like to suggest one, email me.
I’m the author of several books of puzzles, most recently the Language Lover’s Puzzle Book. I also give school talks about maths and puzzles (online and in person). If your school is interested please get in touch.