Archive: September 18, 2008

<<< September 16, 2008

Home

September 21, 2008 >>>


still codin'

Thursday,  09/18/08  11:25 PM

I'm still sequestered, coding away on my little project, desperately trying to get it done...  progress is being made, but too slowly...  anyway I'm still alive and I'll be back on the air one way or another on Sunday :)  And tomorrow afternoon I'm driving up to Napa Valley so I can compete in the Knoxville Double on Saturday.  Whew.


I did want to give you the answer to Nick's spiffy puzzle... 

It is possible for only the back prisoner to die, no matter how many prisoners there are, and him only 50% of the time.  The back one computes the “parity” of all the hats in front of him, and he says one color if there are an even number of hats of a certain color, else the opposite.  {For example, he says "black" if there are an even number of black hats, else "red".}  He might have that color hat, and live, or the opposite color, and die; no way for him to know.  But now the second guy sees all the hats in front of him, so he can figure out his color using the “parity” given to him by the back guy.  {For example if he sees an even number of black hats, and the back guy said "black", then his hat is red.}  So #2 says his color and lives.  The third prisoner hears what second one said, and sees all the hats in front of him, so he can figure out his color using the “parity” from the first guy.  {For example if he sees an even number of black hats, and #2 said "black", and the back guy said "black", then his hat must be black also.}  So #3 says his color and lives.  And so on...  Each prisoner can figure out his color from what the ones behind said and what he can see of the ones in front of him, plus the back guy's parity bit.

Pretty cool, eh?

Cheers :)

 

 
 

Return to the archive.