Five prisoners, two men and three women were made to sit around a pentagonal table. The warden comes and places a fruit on each one’s head such that the prisoners do not know the type of fruit on their heads but they can see the fruits on the head of the others.
They were told that the fruits are either apple or orange and there are at least two fruits of each types.
Then how many of them can deduce the exact fruit on their heads if they are not allowed to communicate with each other?
Let’s assume that the five prisoners are seated in the pentagonal table in such a way that one of the men (M1) sits at one of the vertices of the pentagon and the other man (M2) sits at another vertex. Let’s also assume that the three women (W1, W2, W3) sit at the remaining vertices. Without loss of generality, let’s assume that the fruits placed on their heads are labelled as F1, F2, F3, F4, and F5.
Since there are at least two fruits of each type, we can assume that there are either two apples and three oranges or three apples and two oranges. Let’s consider each of these cases separately:
Case 1: Two apples and three oranges
In this case, we can assume that M1 and W1 have apples on their heads, and the other three prisoners have oranges on their heads. M1 can see that M2, W2, and W3 have oranges on their heads, which means he cannot have an orange on his head. Therefore, M1 must have an apple on his head. Similarly, W1 can see that M2, W2, and W3 have oranges on their heads, which means she cannot have an orange on her head. Therefore, W1 must have an apple on her head. Now, M2, W2, and W3 can see that M1 and W1 have apples on their heads, which means they must have oranges on their heads. Therefore, all five prisoners can deduce the exact fruit on their heads.
Case 2: Three apples and two oranges
In this case, we can assume that M1, W1, and W2 have apples on their heads, and the other two prisoners have oranges on their heads. M1 can see that M2 and W3 have oranges on their heads, which means he cannot have an orange on his head. Therefore, M1 must have an apple on his head. Similarly, W1 can see that M2 and W3 have oranges on their heads, which means she cannot have an orange on her head. Therefore, W1 must have an apple on her head. Now, W2 can see that M2 and W3 have oranges on their heads, which means she cannot have an orange on her head. Therefore, W2 must have an apple on her head. However, neither M2 nor W3 can deduce the exact fruit on their heads, since they can see one apple and one orange on the remaining prisoners.
Therefore, only three out of the five prisoners (M1, W1, and W2) can deduce the exact fruit on their heads.