<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: How Many of a Hundred Hatted Prisoners Can Save Themselves from the King?</title>
	<atom:link href="http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/feed/" rel="self" type="application/rss+xml" />
	<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/</link>
	<description>Chinese, Linguistics, Science, Cultural Observations and whatever else I feel like writing about</description>
	<pubDate>Thu, 21 Aug 2008 09:07:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Amit Hosley</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-141853</link>
		<dc:creator>Amit Hosley</dc:creator>
		<pubDate>Thu, 22 May 2008 21:11:36 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-141853</guid>
		<description>Answer is 99. The first can shout the color of Even Number of caps in front of him and then rest can calculate the correct colour of there ball. e.g. if the next person has even number of same colour in front of him then he has othe rcolour otherwise same. and rest can also make the calculations as they can hear all the answers.</description>
		<content:encoded><![CDATA[<p>Answer is 99. The first can shout the color of Even Number of caps in front of him and then rest can calculate the correct colour of there ball. e.g. if the next person has even number of same colour in front of him then he has othe rcolour otherwise same. and rest can also make the calculations as they can hear all the answers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Secruss</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-140207</link>
		<dc:creator>Secruss</dc:creator>
		<pubDate>Mon, 12 May 2008 17:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-140207</guid>
		<description>What Ben said.</description>
		<content:encoded><![CDATA[<p>What Ben said.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xalem</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-109494</link>
		<dc:creator>Xalem</dc:creator>
		<pubDate>Tue, 04 Dec 2007 05:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-109494</guid>
		<description>The strategy where every second player calls out the color of the hat in front of them is simple and 1/2 of the prisoners are safe.  With a simple twist, 2/3 of the prisoners can be safe. (Only every third prisoner will risk death) The first prisoner calls out blue if the two hats in front of him match and red if the two hats in front of him differ.  Then, when the first prisoner calls blue, the second prisoner calls the color of prisoner number three, and prisoner number three repeats that color.  When number one calls red, prisoner 2 calls the opposite of prisoner 3, and prisoner 3 calls the opposite of prisoner 2.  Then start over with the next set of three prisoners.  

We can extend this to protect ever longer groups of prisoners.  The first in any odd sized group (3,5,7,...) needs only determine whether the group (minus him) is composed of adding odd red hats and odd blue hats,or even red hats and even blue hats.  Call blue for evens, red for odds.  The rest add up what they see and what they hear and call red or blue based on whatever will make sure the result is parity (blue0 or not parity (red).  

It would be possible to pick an arbitrarily large group (and only have one prisoner take a risk) but because people are human and all this calculating can lead to errors which would be catastrophic, I would tend to keep the groups small.  But, now we have a strategy that matches whatever size of group feels they can handle the quick math.</description>
		<content:encoded><![CDATA[<p>The strategy where every second player calls out the color of the hat in front of them is simple and 1/2 of the prisoners are safe.  With a simple twist, 2/3 of the prisoners can be safe. (Only every third prisoner will risk death) The first prisoner calls out blue if the two hats in front of him match and red if the two hats in front of him differ.  Then, when the first prisoner calls blue, the second prisoner calls the color of prisoner number three, and prisoner number three repeats that color.  When number one calls red, prisoner 2 calls the opposite of prisoner 3, and prisoner 3 calls the opposite of prisoner 2.  Then start over with the next set of three prisoners.  </p>
<p>We can extend this to protect ever longer groups of prisoners.  The first in any odd sized group (3,5,7,&#8230;) needs only determine whether the group (minus him) is composed of adding odd red hats and odd blue hats,or even red hats and even blue hats.  Call blue for evens, red for odds.  The rest add up what they see and what they hear and call red or blue based on whatever will make sure the result is parity (blue0 or not parity (red).  </p>
<p>It would be possible to pick an arbitrarily large group (and only have one prisoner take a risk) but because people are human and all this calculating can lead to errors which would be catastrophic, I would tend to keep the groups small.  But, now we have a strategy that matches whatever size of group feels they can handle the quick math.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Ball</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-109178</link>
		<dc:creator>Matt Ball</dc:creator>
		<pubDate>Sat, 01 Dec 2007 18:16:42 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-109178</guid>
		<description>The most diabolical part of this puzzle is that the first prisoner can choose to kill everyone without changing his chances of survival.  Each subsequent prisoner can only kill the remaining prisoners by killing himself. :)

There's also an interesting moral dilemma if the first prisoner finds out the color of his hat accidentally, and determines that he must either kill himself so that the other 99 live, or he lives and the other 99 die...

Then there's the practical problem of trusting each prisoner to do this kind of math correctly.  If you performed this experiment with real people, at least a couple would mess up the calculation, causing strings of deaths until someone messes up again and corrects the sequence.

In practice, the safest thing is probably to have each odd prisoner state the hat color of the even-numbered prisoner directly in front, and each even-numbered prisoner state the previously stated color.  In this way, 50 prisoners will assuredly live, and the other 50 would live half the time (expect 75 to live), and the complexity of the solution fits into even the simplest mind! :)</description>
		<content:encoded><![CDATA[<p>The most diabolical part of this puzzle is that the first prisoner can choose to kill everyone without changing his chances of survival.  Each subsequent prisoner can only kill the remaining prisoners by killing himself. <img src='http://toshuo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There&#8217;s also an interesting moral dilemma if the first prisoner finds out the color of his hat accidentally, and determines that he must either kill himself so that the other 99 live, or he lives and the other 99 die&#8230;</p>
<p>Then there&#8217;s the practical problem of trusting each prisoner to do this kind of math correctly.  If you performed this experiment with real people, at least a couple would mess up the calculation, causing strings of deaths until someone messes up again and corrects the sequence.</p>
<p>In practice, the safest thing is probably to have each odd prisoner state the hat color of the even-numbered prisoner directly in front, and each even-numbered prisoner state the previously stated color.  In this way, 50 prisoners will assuredly live, and the other 50 would live half the time (expect 75 to live), and the complexity of the solution fits into even the simplest mind! <img src='http://toshuo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quinten</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108909</link>
		<dc:creator>Quinten</dc:creator>
		<pubDate>Thu, 29 Nov 2007 21:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108909</guid>
		<description>Sriram: the number of hats of each color &lt;i&gt;is&lt;/i&gt; secret. But, every person knows the number of hats &lt;i&gt;in front of him&lt;/i&gt; of each color. Each person also knows what each person behind him has said. It does not matter that the sum of the hats is 100.

If (the number of people behind who called blue) + (the number of people ahead who have blue hats) is even, then your hat is blue, otherwise it's red. I am still having trouble explaining why this seems to work, but here are some more samples:
&lt;code&gt;
b b b b
0 1 2 3
0: 0 + 3: red
1: 0 + 2: blue
2: 1 + 1: blue
3: 2 + 0: blue

r r r r
0 1 2 3
0: 0 + 0: blue
1: 1 + 0: red
2: 1 + 0: red
3: 1 + 0: red

r r b b
0 1 2 3
0: 0 + 2: blue
1: 1 + 2: red
2: 1 + 1: blue
3: 2 + 0: blue

b b r r
0 1 2 3
0: 0 + 1: red
1: 0 + 0: blue
2: 1 + 0: red
3: 1 + 0: red
&lt;/code&gt;

There are a couple patterns.</description>
		<content:encoded><![CDATA[<p>Sriram: the number of hats of each color <i>is</i> secret. But, every person knows the number of hats <i>in front of him</i> of each color. Each person also knows what each person behind him has said. It does not matter that the sum of the hats is 100.</p>
<p>If (the number of people behind who called blue) + (the number of people ahead who have blue hats) is even, then your hat is blue, otherwise it&#8217;s red. I am still having trouble explaining why this seems to work, but here are some more samples:<br />
<pre><code>
b b b b
0 1 2 3
0: 0 + 3: red
1: 0 + 2: blue
2: 1 + 1: blue
3: 2 + 0: blue

r r r r
0 1 2 3
0: 0 + 0: blue
1: 1 + 0: red
2: 1 + 0: red
3: 1 + 0: red

r r b b
0 1 2 3
0: 0 + 2: blue
1: 1 + 2: red
2: 1 + 1: blue
3: 2 + 0: blue

b b r r
0 1 2 3
0: 0 + 1: red
1: 0 + 0: blue
2: 1 + 0: red
3: 1 + 0: red
</code></pre></p>
<p>There are a couple patterns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sriram</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108891</link>
		<dc:creator>Sriram</dc:creator>
		<pubDate>Thu, 29 Nov 2007 18:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108891</guid>
		<description>Have I misread the puzzle - it explicitly states that the number of hata of each colour is secret.  Therefore the only known fact is that the sum of the counts of the red and blue hats is 100, or...?</description>
		<content:encoded><![CDATA[<p>Have I misread the puzzle - it explicitly states that the number of hata of each colour is secret.  Therefore the only known fact is that the sum of the counts of the red and blue hats is 100, or&#8230;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108844</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 29 Nov 2007 11:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108844</guid>
		<description>Yeah.  I called that a bit quick.  By realizing that he had to look at even vs. odd, he was 98% of the way there, but his solution didn't quite make it.</description>
		<content:encoded><![CDATA[<p>Yeah.  I called that a bit quick.  By realizing that he had to look at even vs. odd, he was 98% of the way there, but his solution didn&#8217;t quite make it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajat Kala</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108812</link>
		<dc:creator>Rajat Kala</dc:creator>
		<pubDate>Thu, 29 Nov 2007 07:41:58 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108812</guid>
		<description>Dude, what are you guy talking about.... haha...
The real answer is: the maximum guys that has to die is 7 (taking the worst senario), the minimum is 0.

:) think......</description>
		<content:encoded><![CDATA[<p>Dude, what are you guy talking about&#8230;. haha&#8230;<br />
The real answer is: the maximum guys that has to die is 7 (taking the worst senario), the minimum is 0.</p>
<p> <img src='http://toshuo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> think&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TH</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108809</link>
		<dc:creator>TH</dc:creator>
		<pubDate>Thu, 29 Nov 2007 07:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108809</guid>
		<description>Eric's solution is basically calculating parity http://en.wikipedia.org/wiki/Parity_bit</description>
		<content:encoded><![CDATA[<p>Eric&#8217;s solution is basically calculating parity <a href="http://en.wikipedia.org/wiki/Parity_bit" rel="nofollow">http://en.wikipedia.org/wiki/Parity_bit</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gtp</title>
		<link>http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108798</link>
		<dc:creator>gtp</dc:creator>
		<pubDate>Thu, 29 Nov 2007 07:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://toshuo.com/2007/how-many-of-a-hundred-hatted-prisoners-can-save-themselves-from-the-king/#comment-108798</guid>
		<description>Eric's solution misses a step: The prisoners have to listen to the blue calls behind them and for each one swap the reference call from odd to even and visa versa.</description>
		<content:encoded><![CDATA[<p>Eric&#8217;s solution misses a step: The prisoners have to listen to the blue calls behind them and for each one swap the reference call from odd to even and visa versa.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
