# Challenge Math Challenge - April 2019

#### QuantumQuest

Gold Member
Hmm.. I assumed the procedure was:

(a) line-up
(b) look at the hats
(c) step up or not step up

That is the way to have any prisoners walking up or not by 10:00.
I suggest reading again the question carefully. I also cannot understand this

Say that prisoners 1, 2, 3, 4, 5 have the black hat, and prisoners 6, 7, 8, 9, 10, 11, 12 have a white hat. Then prisoners 1..5 all see N=4 black hats, and prisoners 6..12 all see N=5 black hats. Therefore, 1..5 all will step up at 10:05, and 6..12 will step up at 10:00. Problem will always be solved by 10:00 or 10:05. No need to wait for 10:00+5*N.

#### fbs7

I suggest reading again the question carefully. I also cannot understand this
But that's exactly what @SpinFlop said, and that was accepted as a solution, that is, line up at 10:00, look at the hats, decide, then step or up not step immediately, ie at 10:00:

"Suppose only 1 hat is black. BHP will see all white hats and be able to deduce that his hat must be black.
This prisoner steps forward immediately, ie: 10:00 "

#### QuantumQuest

Gold Member
But that's exactly what @SpinFlop said, and that was called a solution:

"Suppose only 1 hat is black. BHP will see all white hats and be able to deduce that his hat must be black.
This prisoner steps forward immediately, ie: 10:00 "
What @SpinFlop wrote (after his first correction) was correct . Is what I just asked you to clarify the same thing with what you quote from @SpinFlop? Let me explain in order to be sure that I will be clear: What you quote from SpinFlop says that if there is just one black hat then before the first line-up the prisoner who has it will see only white hats, so he'll deduce that his hat is the only black hat as there is at least one black hat according to the data of the question. So, in the first line-up i.e. at 10:00, he will step up.

As a second point, @SpinFlop has added things in the solution afterwards which I have already quoted and asked for clarification.

Last edited:

#### QuantumQuest

Gold Member
Some clarifications about Question $1$ are in order, as I see that there are issues of misunderstanding / misinterpretation of the wording of the question, although I think that it is clear enough:

The 12 prisoners will get one hat each by the warden which can be either black or white. The prisoners will get informed that there will be at least one hat of each color. They will be able to see everyone else's hat except their own. Also, there will be no sort of communication among prisoners. So, before the first line-up, the only way for a prisoner to know how many black hats are there in total, is to see that all the others hats are white because then the only black hat will be his own hat, as there is at least one black hat as per the wording of the question. So, in the first line-up at $10:00\space\space a.m$ he will step forward.

Now, if before the first line-up there are more than one black hats, this means that no prisoner steps forward during the first line-up because none of them can be certain about the color of his hat. But, during the second line-up, both prisoners who see one black hat can step forward: since no prisoner stepped forward during the first line up, they know that there are at least two black hats. So, if a prisoner sees just one black hat, he can conclude that the second black hat is his own hat. Now, what about the prisoners who see two black hats? They obviously can't be certain about the color of their hats. So, they'll stay in line - assuming they're smart enough ;).

Now, to express it more generally, I would prefer to express it this way: Suppose there are $n$ prisoners and $b$ black hats, $1\leq b \leq 11$. During the first $b - 1$ line-ups, no prisoner will step forward. Now, on the $b$th line-up, each prisoner seeing $b - 1$ black hats will be able to step forward. We can conclude this using the same reasoning as above: as the previous line-up did not stop the procedure then he knows that there are at least $b$ black hats. Seeing $b − 1$ on the other prisoners means that there are exactly $b$ black hats, one of which is his own hat. The $n - b$ prisoners with white hats should stay in line as they cannot deduce what is the color of their hats.

#### fbs7

A variation with the argument of using the 10:00 to get information about whether there is a single black hat around.

Say there are 5 black hats. So each prisoner will see either 4 or 5 black hats. Therefore, each prisoner will know that no other prisoners can see 0 black hats. Therefore there is no benefit in using the 10:00 lineup expecting the prisoner that see no black hats to step forward.

I suspect there is a way to save one lineup in case the prisoners see 4 black hats or more, but the proper optimization evades me.

Last edited:

#### pinball1970

Gold Member
1 black and 11 whites is fine. Black sees all whites and knows he must be black.

2 black and black one observes that black 2 has not stepped forward even though everyone else is black. Therefore he must also be black, steps forward. Black 2 works this out and steps forward.

Does that make sense? Worse case scenario is 6, 6? Edit quantum quest already stated this and extended

#### fbs7

What's the size of the triangles being added on each iteration? that is

(a) as large as possible
(b)/(c) same size, adding only on edges or on edges and vertices too
(d) smaller (as half size, third size, etc...)

I'm putting my bet that the problem means (c), as that looks prettier and mathematicians like pretty geometric shapes.

#### QuantumQuest

Gold Member
Say there are 5 black hats. So each prisoner will see either 4 or 5 black hats. Therefore, each prisoner will know that no other prisoners can see 0 black hats. Therefore there is no benefit in using the 10:00 lineup expecting the prisoner that see no black hats to step forward.
Say that there is only one black hat. Is there no benefit in using the 10:00 line up? If there are are more than one black hats then more line-ups are needed. I suggest reading my post #44.

#### QuantumQuest

Gold Member
What's the size of the triangles being added on each iteration? that is

(a) as large as possible
(b)/(c) same size, adding only on edges or on edges and vertices too
(d) smaller (as half size, third size, etc...)

I'm putting my bet that the problem means (c), as that looks prettier and mathematicians like pretty geometric shapes.
The size of the triangles added to each iteration is the same as the initial equilateral triangle. On each iteration a new triangle is added on each free edge.

Last edited:

#### fbs7

Say that there is only one black hat. Is there no benefit in using the 10:00 line up? If there are are more than one black hats then more line-ups are needed. I suggest reading my post #44.
Correct, if the prisoners see 0, 1 or 2 black hats, then the lineup for 0 black hats is needed.

But if there are 5 black hats or more, then the smallest number of black hats any prisoner will see is 4 black hats. So once a prisoner sees 4 black hats or more, he'll know not a single prisoner will think that other prisoners are seeing 0, 1 or 2 black hats. If there's no chance that any prisoner is seeing 0, 1 or 2 black hats, then the lineup for 0 black hats will result in no information, therefore can be skipped. That is, if I see 4 black hats or more, then I know up front that nobody will step up on the 0 black hats lineup.

So I suspect there may be an optimized logic with fewer lineups once a prisoner sees some N number of black hats, but I can't get my head on how that would be.

#### QuantumQuest

Gold Member
Correct, if the prisoners see 0, 1 or 2 black hats, then the lineup for 0 black hats is needed.

But if there are 5 black hats or more, then the smallest number of black hats any prisoner will see is 4 black hats. So once a prisoner sees 4 black hats or more, he'll know not a single prisoner will think that other prisoners are seeing 0, 1 or 2 black hats. If there's no chance that any prisoner is seeing 0, 1 or 2 black hats, then the lineup for 0 black hats will result in no information, therefore can be skipped. That is, if I see 4 black hats or more, then I know up front that nobody will step up on the 0 black hats lineup.

So I suspect there may be an optimized logic with fewer lineups once a prisoner sees some N number of black hats, but I can't get my head on how that would be.
Let me get things straight. First, it is not known to the prisoners in advance how many black hats will be or who will have it. So, there will be 1 to 11 black hats. It is the warden's decision exactly how many will be and to whom. But any solution must account for all the posibilities and not for specific cases.
Second, the number of line-ups is already decided by the warden and it is an integral part of the test. How can we change the number of line ups?

Last edited:

#### fbs7

The size of the triangles added to each iteration is the same as the initial equilateral triangle. On each iteration a new triangle is added on each free edge.
Alright, starting trying my hand at Padawan-Level #3:

The orientation of the triangles is irrelevant; in this example, first set of triangles (call i=0) is brown, second set of triangles (call i=1) is red, i=2 is orange, i=3 is yellow, i=4 is green, i=5 is blue. The number of triangles on each iteration (call $T_i$) is {1, 3, 6, 9, 12, 15, ...}, to it seems that $T_0 = 1, T_i = 3*i$, and the total number of triangles in iteration n is $T_0 + T_1 + ... + T_n = 1 + 3 + 6 + ... + 3*n = 1 + \frac{3}{2}*n*(n+1)$:

But how to prove that - not easy!!! All kinds of coordinate transformation didn't help much, and trilinear coordinates proved to be a pain to prove anything; after 4 hours on this I'm no closer on finding a proof!

How to prove that each iteration $i$ will add exactly $3$ triangles to the scene... grrr... maddening I can't find that proof! Little tip anyone?

#### fbs7

Let me get things straight. First, it is not known to the prisoners in advance neither how many black hats will be nor who will have it. So, there will be 1 to 11 black hats. It is the warden's decision exactly how many will be and to whom. But any solution must account for all the posibilities and not for specific cases.
Second, the number of line-ups is already decided by the warden and it is an integral part of the test. How can we change the number of line ups?
The prisoners will not know in advance, but once a prisoner lines up and sees say 7 black hats, he knows that no other prisoner will see less than 6 black hats; and those that see 6 black hats will know that no other prisoner will see less than 5 black hats. Therefore, those prisoners that see 7 black hats and those that see 6 black hats will all come to the same conclusion, which is that no prisoners are seeing 0 black hats.

Therefore, there's no point in using the 10:00 lineup to test the hypothesis that some prisoner will move up because they see 0 black hats, as that hypothesis is impossible.

So, once the prisoners see 6 black hats or 7 black hats, then they can use the 10:00 lineup to say test a different hypothesis, like that some prisoner is seeing 1 black hat. Therefore the prisoner's action on the 10:00 lineup can be to test a possible hypothesis, not an impossible one.

It's not a matter of changing the number of lineups, but of using the 10:00 lineup to test a different hypothesis and avoid spending time confirming a hypothesis that all prisoners know is impossible once the prisoners see a minimum number of black hats.

Last edited:

#### QuantumQuest

Gold Member
The prisoners will not know in advance, but once a prisoner lines up and sees say 7 black hats, he knows that no other prisoner will see less than 6 black hats; and those that see 6 black hats will know that no other prisoner will see less than 5 black hats. Therefore, those prisoners that see 7 black hats and those that see 6 black hats will all come to the same conclusion, which is that no prisoners are seeing 0 black hats.

Therefore, there's no point in using the 10:00 lineup to test the hypothesis that some prisoner will move up because they see 0 black hats, as that hypothesis is impossible.

So, once the prisoners see 6 black hats or 7 black hats, then they can use the 10:00 lineup to say test a different hypothesis, like that some prisoner is seeing 1 black hat. Therefore the prisoner's action on the 10:00 lineup can be to test a possible hypothesis, not an impossible one.

It's not a matter of changing the number of lineups, but of using the 10:00 lineup to test a different hypothesis and avoid spending time confirming a hypothesis that all prisoners know is impossible once the prisoners see a minimum number of black hats.
Do the prisoners know in advance how many black hats are there? What if there is just one? Or two? Or three? Again, I'll state the obvious: there must be the first line-up where if there is just one black hat which the prisoner having it will know before this line-up, then he'll step forward. If none steps forward then we go to the second line-up etc. Prisoners cannot avoid any line-up and at the same time they need to use the outcome of the previous line-up - except the case that there is just one black hat, in order to deduce what is the correct thing to do. I cannot explain this in more simple terms.

Last edited:

#### QuantumQuest

Gold Member
and the total number of triangles in iteration n is $T_0 + T_1 + ... + T_n = 1 + 3 + 6 + ... + 3*n = 1 + \frac{3}{2}*n*(n+1)$:
This is not correct.

How to prove that each iteration $i$ will add exactly $3$ triangles to the scene...
Be careful here. Check it again.

#### fbs7

Do the prisoners know in advance how many black hats are there? What if there is just one? Or two? Or three? Again, I'll state the obvious: there must be the first line-up where if there is just one black hat which the prisoner having it will know before this line-up, then he'll step forward. If none steps forward then we go to the second line-up etc. Prisoners cannot avoid any line-up and at the same time they need to use the outcome of the previous line-up - except the case that there is just one black hat, in order to deduce what is the correct thing to do. I cannot explain this in more simple terms.
Alright; my last attempt at this: why is this not a solution?

(a) If the prisoner sees 0, 2, 4, 6, 8, 10 black hats then he steps up at 10:00
(b) If the prisoner sees 1, 3, 5, 7, 9, 11 black hats then he steps up at 10:05

#### QuantumQuest

Gold Member
Alright; my last attempt at this: why is this not a solution?

(a) If the prisoner sees 0, 2, 4, 6, 8, 10 black hats then he steps up at 10:00
(b) If the prisoner sees 1, 3, 5, 7, 9, 11 black hats then he steps up at 10:05
If you read post #44 carefully it's not difficult to understand it.

#### fbs7

I think I'm going to answer my own question. If the prisoners are killed immediately if even one walks up incorrectly even once, then the post above is not a solution, as there's 50% chance they will walk up with the wrong solution by 10:00. But, if they can walk up incorrectly at 10:00, then are not killed, then the walkup at 10:05 will be correct, and that will be a solution.

Therefore I suppose there is a rule to the problem, which is that the prisoners can only walk up once, at some time, that must be the right solution or they will all die immediately.

I didn't understand that rule from the writeups, so I tried to find shorter solutions with a smaller number of walkups, even if some of those walkups could be incorrect. The shortest one I could find in that form is the one above.

So, is it true that if the prisoners walk up incorrectly once they are killed?

Last edited:

#### SpinFlop

This isn't true, unfortunately. A continuous function with smaller and smaller "spikes" can be integrable on $[0,\infty)$ and yet fail to have a limit at infinity.
Could you give an example of (or clarify) this? Given that you speak of 'smaller and smaller spikes', this lead me to believe that the limit at infinity is still zero, such as in the classic example of a sine wave in an exponentially decaying envelope:
$$\lim_{n \rightarrow \infty}e^{-x}sin(x) = 0$$

#### Infrared

Gold Member
I mean that the spikes get narrower, not shorter. For example, on the interval $[n,n+1]$ (say for $n>0$), let the graph of $f$ be a triangle with vertices $(n,0),(n+2^{-n},1),(n+2\cdot 2^{-n},0)$ and zero on the rest of the interval.

Then $\int_n^{n+1}f=\frac{1}{2}\cdot 2\cdot 2^{-n}=2^{-n}$, so $\int_1^\infty f=\sum_{n=1}^\infty 2^{-n}=1$

"Math Challenge - April 2019"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving