Tuesday, April 26, 2011

Gettingpregnant Games

C-The problem of the 30 hats

I cachis ... for once rightly 424 other people also do not touch me the draw. On Saturday, I commented as "The Country" and the Royal English Mathematical Society, which had prepared a competition with recreational math problems for people to contest. I've caught later and learned in the sixth problem.
At first, I thought a simple solution for 5 minutes and I explained if someone wanted to participate because it was not my intention, since my only entertainment worth me and bite me (what I pick?).
The problem came later, in bed, my mind said "Nanai" and had to optimize the solution. The link to the problem and the solution is here But now I explain, if you're curious, as I came to the solution and more stupid that I lost sleep. This is what I wrote to "The Country":
The number of prisoners who are being saved with this strategy is safe. 29
Let X be the number of hats, white hats from 1 to 29. 29
When an odd number, no difference in parity between X and 29-X.
The strategy will be to target the 30 th state if X is even and black if odd.
Prisoners 1 to 29 °, with the information of 30 degrees, know whether X is even or odd. The prisoner ith (i = 1 ,..., 29) counts the number of white hats, both it looks like those who said his teammates back in the queue position (except the 30 th). If the parity of X-hat {i} is different from X, the prisoner's hat color is white ith to maintain the parity of X. If the parity of X-hat {i} is the same as that of X, then the hat color is black i-th.

The process to achieve this was as follows (the 29 prisoners arrive at 3:35 in the morning and could not get it out of the head): -15
prisoners saved: I started with the most logical if the prisoner said the 30 º predominant color among the predecessors, it was ensured that 15 prisoners were saved.
-20 Prisoners saved: If the inmate 30 º for white if the color of 28 º and 29 º are the same black and otherwise, both the 28 th and 29 th will know their color as the 29 th know the color of the 28 th and vice versa. -25
saved prisoners: prisoners are used 26 º to 30 º to define the number of white hats from 1 to 25 ° in binary form (white = 0, black = 1). With 5 prisoners can be set from 0 to 31, which is required to get 25 or less. As the top 25 know the color of the remaining 24 would be saved.
-26, 27, 28 and 29 prisoners saved: I realized that not necessary to put into binary integer as doing it for white caps modules was also possible to determine with accuracy, so I reduced the number of inmates that defined the number of white caps in binary form up to modulo 2.

If you see the solution, almost the Trace. I thought, foolishly, I thought I was going to play because my solution was very original and possibly be out there in a book of riddles. As you will say now that it is very easy to say "I knew" the solution ahead, I pledge to put the solution and the process as I reached it, the next challenge. Sure
now become very difficult and make the most of the ridiculous, and everyone I copy the solution and earn books at my expense. We must not be greedy and share my ideas for others to gain (fantasma! !!!).

0 comments:

Post a Comment