Escape From Evil's Room

An evil wizard places 10 people in a room and forces them to play the following game.

He places on each person’s head either a red hat or a blue hat independently with probability 1 2 \dfrac{1}{2} . Each person can see the colors of the hats of all other 9 people, but not the color of his own hat. Simultaneously , each person must say a real number.

They win if

  • The sum of the numbers they say is strictly positive and there are an even number of red hats, or
  • The sum of the numbers they say is strictly negative and there are an odd number of red hats.

If these 10 people can decide on a strategy beforehand, find their maximum probability of success, and let this value be denoted as P P .

Submit your answer as 1 0 4 × P \left\lfloor 10^4\times P\right\rfloor .

Notation : \lfloor \cdot \rfloor denotes the floor function .


The answer is 9990.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

We consider general case with n n people.

We first show that the people can win with probability 1 1 2 n 1 -\dfrac{1}{2^n} . To do this, A person simply says the number ( 1 ) r . n r (-1)^r.n^r where r r is the number of red hats she sees. Now, if there are n r n - r blue hats and r r red hats, then n r n - r people see r r red hats and r r people see r 1 r - 1 red hats. Thus, the sum of the numbers said will be

( 1 ) r ( ( n r ) . n r r n r 1 ) = ( 1 ) r n r 1 ( n 2 r ( n + 1 ) ) (-1)^r\left((n - r) . n^r - r · n^{r-1}\right)=(-1)^r n^{r-1}(n^2-r(n+1))

Since n 2 > r ( n + 1 ) n^2 > r(n+ 1) if r < n r < n the people will win as long as the hats aren’t all red, which is an event with probability 1 2 n \dfrac{1}{2^n} .

Now, we must show that there is no strategy that does any better. Note that there are 2 n 2^n possible events (each person gets 1 of 2 possible hat colors) and each strategy works for some subset of them. Thus, all we must show is that there is no strategy that works in all cases. So suppose there is. For each event E E , let r ( E ) r(E) denote the number of red hats, E i E_i denote the number that the i i ’th person says under the winning strategy, and S ( E ) S(E) denote the sum of the E i E_i . Since the strategy always works, we must have ( 1 ) r ( E ) S ( E ) (-1)^{r(E)}S(E) is always positive.

Let us consider the sum E ( 1 ) r ( E ) S ( E ) \displaystyle \sum_{E}(-1)^{r(E)}S(E) . Note that this can be rewritten as

i = 1 n E ( 1 ) E r ( E ) E i \sum_{i=1}^n\sum_{E} (-1)^E{r(E)}E_i

Now, fix some i i . Let E E' denote the event E E but with the i i ’th person receiving the opposite hat coloring. Then r ( E ) = r ( E ) ± 1 r(E) = r(E')\pm1 and E i = E i E_i = E'_i since the colors that person i i sees are the same for E E and E E' . Thus,

( 1 ) r ( E ) E i + ( 1 ) r ( E ) E i = 0 (-1)^{r(E)}E_i + (-1)^{r(E')}E'_i=0

Since the map E E E \rightarrow E' pairs of all events, we must have that E ( 1 ) E r ( E ) E i = 0 \displaystyle \sum_{E} (-1)^E{r(E)}E_i=0 , and thus E ( 1 ) r ( E ) S ( E ) = 0 \displaystyle \sum_{E}(-1)^{r(E)}S(E)=0 .

This is a contradiction, which completes the proof.

So the answer is 1 0 4 P = 1 0 4 ( 1 1 2 10 ) = 9990 \left\lfloor 10^4*P\right\rfloor=\left\lfloor 10^4\left(1-\dfrac{1}{2^{10}}\right)\right\rfloor=\boxed{9990} .

Your answer is 99902. And I don't see why P = 1 can't be achieved with a good strategy.

Siva Bathula - 5 years, 3 months ago

Log in to reply

Thanks sir, I've updated this problem!

Khang Nguyen Thanh - 5 years, 3 months ago

Log in to reply

I think P = 1 can be achieved with a good strategy. There are ten people and each says the number of red hats they see, until the 10th person. Let a 1, a 2, a 3, ... be the number of red hats seen by person 1 person 2 so on. The first person as soon as he says a number, the rest 9 persons can deduce their own hat, which is |a 1 - a n - a 1r|, n being the nth person and |a 1 - a n| is the absolute value of the difference and a 1r is the boolean operator of 1st person's hat for red. 1st person's hat is 1, if he wears a red hat, as seen by all the others or 0 if he doesn't wear a red hat. So the total number of red hats must be T r = a 1 + |a 1-a n - a 1r|, for n >1. This can be either odd or even. So if this value T r is odd, then the strategy is that everyone except the last person say the number of red hats that they see, so that until then the sum is positive and the last person says a negative number which makes the total sum negative. If T r is even, then the strategy is that everyone including the last person says the number of red hats they see.

Siva Bathula - 5 years, 3 months ago

I thing getting p=1 is very simple 1. the first person should say a positive or negative no. according to how many red hats he see 2. the second person after listening to his answer should understand how many red caps he see 3. now the second person will look at the first person's hat and will know what exactly its the no. of red hats 4. he can alter the answer if the first person is wrong and everyon else will just speak noumbers so that the sign of the sum is the same as sum of first and second persons no.

Arth Singh - 5 years, 3 months ago

Log in to reply

Each person say a real number simultaneously (not orderly ).

Khang Nguyen Thanh - 5 years, 3 months ago

Log in to reply

I missed that part, where they say 'simultaneously'. Did you add that afterwards? Or was it part of the problem statement from the beginning?

Siva Bathula - 5 years, 3 months ago

Log in to reply

@Siva Bathula The word simultaneously was always in the question.

I have bolded it to make it clearer.

Calvin Lin Staff - 5 years, 3 months ago

Log in to reply

@Calvin Lin Yep, otherwise the question wouldn't have made sense.

Siva Bathula - 5 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...