<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Big Red Bits &#187; puzzles</title>
	<atom:link href="http://www.bigredbits.com/archives/category/puzzles/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bigredbits.com</link>
	<description>Theory, Distributed Systems, and Other Random Bits</description>
	<lastBuildDate>Thu, 29 Sep 2011 07:13:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Three interesting puzzles</title>
		<link>http://www.bigredbits.com/archives/678</link>
		<comments>http://www.bigredbits.com/archives/678#comments</comments>
		<pubDate>Thu, 29 Sep 2011 06:12:42 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[puzzles]]></category>
		<category><![CDATA[theory]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=678</guid>
		<description><![CDATA[Here are three puzzles I got from 3 different people recently. The first I got from Charles, who got it from a problem set of the Brazilian Programming Competition. Puzzle #1: Given and a vector of in-degrees and out-degrees and for , find if there is a simple directed graph on nodes with those in [...]]]></description>
			<content:encoded><![CDATA[<p>Here are three puzzles I got from 3 different people recently. The first I got from Charles, who got it from a problem set of the Brazilian Programming Competition.</p>
<blockquote><p><strong>Puzzle #1:</strong> Given <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=T&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> and a vector of in-degrees and out-degrees <img src='http://s.wordpress.com/latex.php?latex=%5Ctext%7Bin%7D_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='\text{in}_i' title='\text{in}_i' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Ctext%7Bout%7D_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='\text{out}_i' title='\text{out}_i' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=i%3D1..n&#038;bg=T&#038;fg=000000&#038;s=0' alt='i=1..n' title='i=1..n' class='latex' />, find if there is a simple directed graph on <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=T&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> nodes with those in and out-degrees in time <img src='http://s.wordpress.com/latex.php?latex=O%28n%20%5Clog%20n%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='O(n \log n)' title='O(n \log n)' class='latex' />. By a simple directed graph, I mean at most one edge between each pair <img src='http://s.wordpress.com/latex.php?latex=%28i%2Cj%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(i,j)' title='(i,j)' class='latex' />, allowing self loops <img src='http://s.wordpress.com/latex.php?latex=%28i%2Ci%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(i,i)' title='(i,i)' class='latex' />.</p></blockquote>
<p>Solving this problem in time <img src='http://s.wordpress.com/latex.php?latex=O%28n%5E3%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='O(n^3)' title='O(n^3)' class='latex' /> is easy using a max-flow computation &#8211; simply consider a bipartite graph with and edge <img src='http://s.wordpress.com/latex.php?latex=%28i%2Cj%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(i,j)' title='(i,j)' class='latex' /> between each pair with capacity <img src='http://s.wordpress.com/latex.php?latex=1&#038;bg=T&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' />. Add a source and connect to each node in the left size with capacity <img src='http://s.wordpress.com/latex.php?latex=%5Ctext%7Bin%7D_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='\text{in}_i' title='\text{in}_i' class='latex' /> and add also a sink in the natural way, compute max-flow and check if it is <img src='http://s.wordpress.com/latex.php?latex=%5Csum_i%20%5Ctext%7Bin%7D_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sum_i \text{in}_i' title='\sum_i \text{in}_i' class='latex' />. But it turns out we can do it in a lot more efficient way. The solution I thought works in time <img src='http://s.wordpress.com/latex.php?latex=O%28n%20%5Clog%20n%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='O(n \log n)' title='O(n \log n)' class='latex' /> but maybe there is a linear solution out there. If you know of one, I am curious.</p>
<p>The second puzzle was given to me by Hyung-Chan An:</p>
<blockquote><p><strong>Puzzle #2:</strong> There is grid of size <img src='http://s.wordpress.com/latex.php?latex=n%20%5Ctimes%20m&#038;bg=T&#038;fg=000000&#038;s=0' alt='n \times m' title='n \times m' class='latex' /> formed by rigid bars. Some cells of the grid have a rigid bar in the diagonal, making that whole square rigid. The question is to decide, given a grid and the location of the diagonal bars if the entire structure is rigid or not. By rigid I mean, being able to be deformed.</p></blockquote>
<p style="text-align: left;"><a rel="attachment wp-att-679" href="http://www.bigredbits.com/archives/678/post_fig_1"><img class="aligncenter size-full wp-image-679" title="post_fig_1" src="http://www.bigredbits.com/wp-content/uploads/2011/09/post_fig_1.png" alt="" width="544" height="186" /></a></p>
<p style="text-align: left;">We thought right away in a linear algebraic formulation: look at each node and create a variable for each of the 4 angles around it. Now, write linear equations saying that some variables sum to 360, since they are around one node. Equations saying that some variable must be 90 (because it is in a rigid cell). Now, for the variables internal to each square, write that opposite angles must be equal (since all the edges are of equal length) and then you have a linear system of type <img src='http://s.wordpress.com/latex.php?latex=Ax%20%3D%20b&#038;bg=T&#038;fg=000000&#038;s=0' alt='Ax = b' title='Ax = b' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=T&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' /> are the variables (angles). Now, we need to check if this system admits more then one solution. We know a trivial solution to it, which is all variable is 90. So, we just need to check if the matrix <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' /> has full rank.</p>
<p style="text-align: left;">It turns out this problem has a much more beautiful and elegant solution and it is totally combinatorial &#8211; it is based on verifying that a certain bipartite graph is connected. You can read more about this solution in <a href="http://www.jstor.org/pss/2100966">Bracing rectangular frameworks. I</a> by (Bolker and Crapo 1979). A cute idea is to use the the following more general linear system (which works for rigidity in any number of dimensions). Consider a rigid bar from point <img src='http://s.wordpress.com/latex.php?latex=p_a%20%5Cin%20%5Cmathbb%7BR%7D%5En&#038;bg=T&#038;fg=000000&#038;s=0' alt='p_a \in \mathbb{R}^n' title='p_a \in \mathbb{R}^n' class='latex' /> to point <img src='http://s.wordpress.com/latex.php?latex=p_b%20%5Cin%20%5Cmathbb%7BR%7D%5En&#038;bg=T&#038;fg=000000&#038;s=0' alt='p_b \in \mathbb{R}^n' title='p_b \in \mathbb{R}^n' class='latex' />. If the structure is not rigid, then there is a movement it can make: let <img src='http://s.wordpress.com/latex.php?latex=v_a&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_a' title='v_a' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=v_b&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_b' title='v_b' class='latex' /> be the instantaneous velocities of points <img src='http://s.wordpress.com/latex.php?latex=a&#038;bg=T&#038;fg=000000&#038;s=0' alt='a' title='a' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=b&#038;bg=T&#038;fg=000000&#038;s=0' alt='b' title='b' class='latex' />. If <img src='http://s.wordpress.com/latex.php?latex=p_a%28t%29%2C%20p_b%28t%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='p_a(t), p_b(t)' title='p_a(t), p_b(t)' class='latex' /> are the movements of points <img src='http://s.wordpress.com/latex.php?latex=a%2Cb&#038;bg=T&#038;fg=000000&#038;s=0' alt='a,b' title='a,b' class='latex' />, then it must hold that: <img src='http://s.wordpress.com/latex.php?latex=%5CVert%20p_a%28t%29%20-%20p_b%28t%29%20%5CVert%20%3D%20%5CVert%20p_a%280%29%20-%20p_b%280%29%20%5CVert&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Vert p_a(t) - p_b(t) \Vert = \Vert p_a(0) - p_b(0) \Vert' title='\Vert p_a(t) - p_b(t) \Vert = \Vert p_a(0) - p_b(0) \Vert' class='latex' />, so taking derivatives we have:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%28p_a%280%29%20-%20p_b%280%29%29%20%5Ccdot%20%28v_a%20-%20v_b%29%20%3D%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='(p_a(0) - p_b(0)) \cdot (v_a - v_b) = 0' title='(p_a(0) - p_b(0)) \cdot (v_a - v_b) = 0' class='latex' /></p>
<p style="text-align: left;">This is a linear system in the velocities. Now, our job is to check if there are non zero velocities, which again is to check that the matrix of the linear system is or is not full-rank.  An interesting thing is that if we look at this question for the grid above, this matrix will be the matrix of a combinatorial problem! So we can simply check if it has full rank by solving the combinatorial problem. Look at the paper for more details.</p>
<p style="text-align: left;">The third puzzle I found in the amazing website called <a href="http://www.cs.cmu.edu/puzzle/">The Puzzle Toad</a>, which is CMU&#8217;s puzzle website:</p>
<blockquote>
<p style="text-align: left;"><strong>Puzzle #3:</strong> There is a game played between Arthur and Merlin. There is a table with <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=T&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> lamps disposed in a circle, initially some are on and some are off. In each timestep, Arthur writes down the position of the lamps that are off. Then Merlin (in an adversarial way) rotates the table. The Arthur&#8217;s servant goes and flips (on &#8211;&gt; off, off &#8211;&gt; on) the lamps whose position Arthur wrote down (notice now he won&#8217;t be flipping the correct lamps, since Merlin rotated the table. if Arthur wrote lamp 1 and Merlin rotated the table by 3 positions, the servant will actually be flipping lamp 4. The question is: given <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=T&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> and an initial position of the table, is there a strategy for Merlin  such that Arthur never manages to turn all the lamps on.</p>
</blockquote>
<p style="text-align: left;">See <a href="http://www.cs.cmu.edu/puzzle/puzzle2.html">here</a> for a better description and a link to the solution. For <img src='http://s.wordpress.com/latex.php?latex=n%20%3D%202%5Ek&#038;bg=T&#038;fg=000000&#038;s=0' alt='n = 2^k' title='n = 2^k' class='latex' /> no matter what Merlin does, Arthur always manages to turn on all the lamps eventually, where eventually means in <img src='http://s.wordpress.com/latex.php?latex=O%28n%5E2%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='O(n^2)' title='O(n^2)' class='latex' /> time. The solution is a very pretty (and simple) algebraic argument. I found this problem really nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/678/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do we believe the Axiom of Choice ?</title>
		<link>http://www.bigredbits.com/archives/353</link>
		<comments>http://www.bigredbits.com/archives/353#comments</comments>
		<pubDate>Sun, 10 Apr 2011 20:17:32 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[puzzles]]></category>
		<category><![CDATA[theory]]></category>
		<category><![CDATA[measure theory; puzzles]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=353</guid>
		<description><![CDATA[Continuing on my series of posts from Israel, I&#8217;d like to share some exciting puzzle that I heard today from Omer Tamuz. I&#8217;ve learned before about the Axiom of Choice in a Measure Theory class, but never saw a so striking and counter-intuitive application of it. Ok, you might say the Banach–Tarski paradox is a [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on my series of posts from Israel, I&#8217;d like to share some exciting puzzle that I heard today from Omer Tamuz. I&#8217;ve learned before about the <a href="http://en.wikipedia.org/wiki/Axiom_of_choice">Axiom of Choice</a> in a Measure Theory class, but never saw a so striking and counter-intuitive application of it. Ok, you might say the <a href="http://en.wikipedia.org/wiki/Tarski_Banach_paradox">Banach–Tarski paradox</a> is a pehaps better example &#8211; but since it&#8217;s proof is so complicated, it is not as striking as seeing how a simple application of it can generate un-intuitive results. First, let me present two puzzles:</p>
<blockquote><p><strong>Puzzle #0:</strong> There are <img src='http://s.wordpress.com/latex.php?latex=n%2B1&#038;bg=T&#038;fg=000000&#038;s=0' alt='n+1' title='n+1' class='latex' /> people in a line, and each has a <img src='http://s.wordpress.com/latex.php?latex=0%2F1&#038;bg=T&#038;fg=000000&#038;s=0' alt='0/1' title='0/1' class='latex' /> number on his hat. Each player can look to the numbers of the players in front of him. So, if <img src='http://s.wordpress.com/latex.php?latex=x_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_i' title='x_i' class='latex' /> is the number of player <img src='http://s.wordpress.com/latex.php?latex=i&#038;bg=T&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' />, then player <img src='http://s.wordpress.com/latex.php?latex=i&#038;bg=T&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' /> knows <img src='http://s.wordpress.com/latex.php?latex=x_%7Bi%2B1%7D%2C%5Chdots%2Cx_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_{i+1},\hdots,x_n' title='x_{i+1},\hdots,x_n' class='latex' />. Now, from <img src='http://s.wordpress.com/latex.php?latex=i%20%3D%200%20%5Chdots%20n&#038;bg=T&#038;fg=000000&#038;s=0' alt='i = 0 \hdots n' title='i = 0 \hdots n' class='latex' /> the players will say his own number. Is there a protocol such that players <img src='http://s.wordpress.com/latex.php?latex=1%2C%5Chdots%2Cn&#038;bg=T&#038;fg=000000&#038;s=0' alt='1,\hdots,n' title='1,\hdots,n' class='latex' /> will get their own number right? (Notice that they hear what the players before him said).</p></blockquote>
<blockquote><p><strong>Puzzle #1:</strong> Consider the same puzzle with an <strong>infinite</strong> number of players. I.e. there are <img src='http://s.wordpress.com/latex.php?latex=x_i%3B%20i%20%5Cin%20%5Cmathbb%7BZ%7D_%2B&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_i; i \in \mathbb{Z}_+' title='x_i; i \in \mathbb{Z}_+' class='latex' /> and player <img src='http://s.wordpress.com/latex.php?latex=i&#038;bg=T&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' /> knows <img src='http://s.wordpress.com/latex.php?latex=x_j&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_j' title='x_j' class='latex' /> for all <img src='http://s.wordpress.com/latex.php?latex=j%20%3E%20i&#038;bg=T&#038;fg=000000&#038;s=0' alt='j &gt; i' title='j &gt; i' class='latex' />. Show a protocol for all players, except the first to get the answer right?</p></blockquote>
<blockquote><p><strong>Puzzle #2:</strong> Still the same setting, but now players don&#8217;t hear what the previous player said. Is there a protocol such that only a finite number of players get it wrong ? (notice that it needs to be finite, not bounded).</p></blockquote>
<p>Puzzle #0 is very easy and the answer is simply <strong>parity check</strong>. Player <img src='http://s.wordpress.com/latex.php?latex=0&#038;bg=T&#038;fg=000000&#038;s=0' alt='0' title='0' class='latex' /> could  simply declares <img src='http://s.wordpress.com/latex.php?latex=y%20%3D%20x_1%20%5Cotimes%5Chdots%20%5Cotimes%20x_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='y = x_1 \otimes\hdots \otimes x_n' title='y = x_1 \otimes\hdots \otimes x_n' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=%5Cotimes&#038;bg=T&#038;fg=000000&#038;s=0' alt='\otimes' title='\otimes' class='latex' /> stands for XOR. Now, player <img src='http://s.wordpress.com/latex.php?latex=1&#038;bg=T&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' /> can for example reconstruct <img src='http://s.wordpress.com/latex.php?latex=x_1&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_1' title='x_1' class='latex' /> by <img src='http://s.wordpress.com/latex.php?latex=y%20%5Cotimes%20x_2%20%5Cotimes%20%5Chdots%20%5Cotimes%20x_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='y \otimes x_2 \otimes \hdots \otimes x_n' title='y \otimes x_2 \otimes \hdots \otimes x_n' class='latex' />. Now, player <img src='http://s.wordpress.com/latex.php?latex=2&#038;bg=T&#038;fg=000000&#038;s=0' alt='2' title='2' class='latex' /> can do the same computation and figure out <img src='http://s.wordpress.com/latex.php?latex=x_1&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_1' title='x_1' class='latex' />. Now, he can calculate <img src='http://s.wordpress.com/latex.php?latex=x_2%20%3D%20y%20%5Cotimes%20x_1%20%5Cotimes%20x_2%20%5Cotimes%20%5Chdots%20%5Cotimes%20x_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_2 = y \otimes x_1 \otimes x_2 \otimes \hdots \otimes x_n' title='x_2 = y \otimes x_1 \otimes x_2 \otimes \hdots \otimes x_n' class='latex' /> and so on&#8230; When we move to an infinite number of players, however, we can&#8217;t do that anymore because taking the XOR of an infinite number of bits is not well defined. However, we can still can solve Puzzles #1 and #2 if we believe and are willing to accept the Axiom of Choice.</p>
<blockquote><p><strong>Axiom of Choice: </strong>Given a family of sets <img src='http://s.wordpress.com/latex.php?latex=%5C%7B%20S_i%20%5C%7D_%7Bi%20%5Cin%20I%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\{ S_i \}_{i \in I}' title='\{ S_i \}_{i \in I}' class='latex' /> there is a set <img src='http://s.wordpress.com/latex.php?latex=%5C%7Bx_i%3B%20i%20%5Cin%20I%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\{x_i; i \in I\}' title='\{x_i; i \in I\}' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=x_i%20%5Cin%20S_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_i \in S_i' title='x_i \in S_i' class='latex' />, i.e. a set that takes a <em>representative</em> from each element in the family.</p></blockquote>
<p>It is used, for example to show that there is no measure <img src='http://s.wordpress.com/latex.php?latex=%5Cmu%20%3A%202%5E%7B%5B0%2C1%29%7D%20%5Crightarrow%20%5Cmathbb%7BR%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu : 2^{[0,1)} \rightarrow \mathbb{R}' title='\mu : 2^{[0,1)} \rightarrow \mathbb{R}' class='latex' /> that is shift invariant (say under addition modulo <img src='http://s.wordpress.com/latex.php?latex=1&#038;bg=T&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' />) and <img src='http://s.wordpress.com/latex.php?latex=%5Cmu%28%5B0%2C1%29%29%20%3D%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu([0,1)) = 1' title='\mu([0,1)) = 1' class='latex' />. The proof goes the following way: define the following equivalence relation on <img src='http://s.wordpress.com/latex.php?latex=%5B0%2C1%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='[0,1)' title='[0,1)' class='latex' />: <img src='http://s.wordpress.com/latex.php?latex=x%20%5Csim%20y&#038;bg=T&#038;fg=000000&#038;s=0' alt='x \sim y' title='x \sim y' class='latex' /> if <img src='http://s.wordpress.com/latex.php?latex=x%20-%20y%20%5Cin%20%5Cmathbb%7BQ%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='x - y \in \mathbb{Q}' title='x - y \in \mathbb{Q}' class='latex' />. Now, consider the family of all the equivalence classes and invoke the Axiom of Choice. Let <img src='http://s.wordpress.com/latex.php?latex=K&#038;bg=T&#038;fg=000000&#038;s=0' alt='K' title='K' class='latex' /> be the set obtained. Now, we can write the interval as a disjoint union:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5B0%2C1%29%20%3D%20%5Ccup_%7Bx%20%5Cin%20%5Cmathbb%7BQ%7D%7D%20%28K%2Bx%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='[0,1) = \cup_{x \in \mathbb{Q}} (K+x)' title='[0,1) = \cup_{x \in \mathbb{Q}} (K+x)' class='latex' /></p>
<p style="text-align: left;">where all operations are modulo <img src='http://s.wordpress.com/latex.php?latex=1&#038;bg=T&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=K%2Bx%20%3D%20%5C%7By%2Bx%3B%20y%20%5Cin%20K%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='K+x = \{y+x; y \in K\}' title='K+x = \{y+x; y \in K\}' class='latex' />. Since it is an enumerable union, if such a measure existed, then: <img src='http://s.wordpress.com/latex.php?latex=%5Cmu%28%5B0%2C1%29%29%20%3D%20%5Csum_%7Bx%20%5Cin%20%5Cmathbb%7BQ%7D%7D%20%5Cmu%28K%2Bx%29%20%3D%20%5Csum_%7Bx%20%5Cin%20%5Cmathbb%7BQ%7D%7D%20%5Cmu%28K%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu([0,1)) = \sum_{x \in \mathbb{Q}} \mu(K+x) = \sum_{x \in \mathbb{Q}} \mu(K)' title='\mu([0,1)) = \sum_{x \in \mathbb{Q}} \mu(K+x) = \sum_{x \in \mathbb{Q}} \mu(K)' class='latex' /> which is either <img src='http://s.wordpress.com/latex.php?latex=0&#038;bg=T&#038;fg=000000&#038;s=0' alt='0' title='0' class='latex' /> if <img src='http://s.wordpress.com/latex.php?latex=%5Cmu%28K%29%20%3D%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu(K) = 0' title='\mu(K) = 0' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=%5Cinfty&#038;bg=T&#038;fg=000000&#038;s=0' alt='\infty' title='\infty' class='latex' /> if <img src='http://s.wordpress.com/latex.php?latex=%5Cmu%28K%29%20%3E0&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu(K) &gt;0' title='\mu(K) &gt;0' class='latex' />.</p>
<p style="text-align: left;">This is kinda surprising, but more surprising is how we can use the exact same technique to solve the puzzles: first, let&#8217;s solve Puzzle #2: let <img src='http://s.wordpress.com/latex.php?latex=S&#038;bg=T&#038;fg=000000&#038;s=0' alt='S' title='S' class='latex' /> be the set of all infinite <img src='http://s.wordpress.com/latex.php?latex=%5C%7B0%2C1%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\{0,1\}' title='\{0,1\}' class='latex' />-strings and consider the equivalence relation on <img src='http://s.wordpress.com/latex.php?latex=S&#038;bg=T&#038;fg=000000&#038;s=0' alt='S' title='S' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=x%20%5Csim%20y&#038;bg=T&#038;fg=000000&#038;s=0' alt='x \sim y' title='x \sim y' class='latex' /> if the strings differ in a finite number of positions. Now, invoke the axiom of choice in the equivalence classes and let <img src='http://s.wordpress.com/latex.php?latex=S_0&#038;bg=T&#038;fg=000000&#038;s=0' alt='S_0' title='S_0' class='latex' /> be the set of representatives. Now, if <img src='http://s.wordpress.com/latex.php?latex=F&#038;bg=T&#038;fg=000000&#038;s=0' alt='F' title='F' class='latex' /> is the set of all strings with finite number of <img src='http://s.wordpress.com/latex.php?latex=1&#038;bg=T&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' />&#8216;s and <img src='http://s.wordpress.com/latex.php?latex=%5Cotimes&#038;bg=T&#038;fg=000000&#038;s=0' alt='\otimes' title='\otimes' class='latex' /> the operation such that <img src='http://s.wordpress.com/latex.php?latex=z%20%3D%20x%20%5Cotimes%20z&#038;bg=T&#038;fg=000000&#038;s=0' alt='z = x \otimes z' title='z = x \otimes z' class='latex' /> if <img src='http://s.wordpress.com/latex.php?latex=z_i%20%3D%20x_i%20%5Cotimes%20y_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='z_i = x_i \otimes y_i' title='z_i = x_i \otimes y_i' class='latex' />. We can therefore write:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=S%20%3D%20%5Ccup_%7Bx%20%5Cin%20F%7D%20%28S_o%20%5Cotimes%20x%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='S = \cup_{x \in F} (S_o \otimes x)' title='S = \cup_{x \in F} (S_o \otimes x)' class='latex' /></p>
<p style="text-align: left;">Now, a protocol the players could use is to look ahead and since they are seeing an infinite number of bits, they can figure out which equivalence class from <img src='http://s.wordpress.com/latex.php?latex=S%2F%5Csim&#038;bg=T&#038;fg=000000&#038;s=0' alt='S/\sim' title='S/\sim' class='latex' /> they the entire string is. Now, they take <img src='http://s.wordpress.com/latex.php?latex=y%20%5Cin%20S_0&#038;bg=T&#038;fg=000000&#038;s=0' alt='y \in S_0' title='y \in S_0' class='latex' /> the representative of this class and guess <img src='http://s.wordpress.com/latex.php?latex=y_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='y_i' title='y_i' class='latex' />. Notice that <img src='http://s.wordpress.com/latex.php?latex=y&#038;bg=T&#038;fg=000000&#038;s=0' alt='y' title='y' class='latex' /> will differ from the real string by at most a finite number of bits.</p>
<p style="text-align: left;">Now, to solve puzzle #1, the player <img src='http://s.wordpress.com/latex.php?latex=0&#038;bg=T&#038;fg=000000&#038;s=0' alt='0' title='0' class='latex' /> simply looks at <img src='http://s.wordpress.com/latex.php?latex=x%20%3D%20x_1%20x_2%20%5Chdots&#038;bg=T&#038;fg=000000&#038;s=0' alt='x = x_1 x_2 \hdots' title='x = x_1 x_2 \hdots' class='latex' /> and figure out the equivalence class he is and let <img src='http://s.wordpress.com/latex.php?latex=y%20%5Cin%20S_0&#038;bg=T&#038;fg=000000&#038;s=0' alt='y \in S_0' title='y \in S_0' class='latex' /> be the representative of this class. Now, since <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=T&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=y&#038;bg=T&#038;fg=000000&#038;s=0' alt='y' title='y' class='latex' /> differ by a finite number of bits, he can simply calculate XOR of <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=T&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=y&#038;bg=T&#038;fg=000000&#038;s=0' alt='y' title='y' class='latex' /> (now, since it is a finite number of them, XOR is well defined) and announce it. With this trick, it just becomes like Puzzle #0.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/353/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Probability Puzzles</title>
		<link>http://www.bigredbits.com/archives/278</link>
		<comments>http://www.bigredbits.com/archives/278#comments</comments>
		<pubDate>Wed, 17 Feb 2010 02:54:53 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[puzzles]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=278</guid>
		<description><![CDATA[Today in a dinner with Thanh, Hu and Joel I heard about a paradox I haven&#8217;t heard so far. Probability is full of cute problems that challenge our understanding of the basic concepts. The most famous of them is the Monty Hall Problem, which asks: You are on a TV game show and there are [...]]]></description>
			<content:encoded><![CDATA[<p>Today in a dinner with Thanh, Hu and Joel I heard about a paradox I haven&#8217;t heard so far. Probability is full of cute problems that challenge our understanding of the basic concepts. The most famous of them is the <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Monty_Hall_problem">Monty Hall Problem</a>, which asks:</p>
<blockquote><p>You are on a TV game show and there are <img src='http://s.wordpress.com/latex.php?latex=%7B3%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{3}' title='{3}' class='latex' /> doors &#8211; one of them contains a prize, say a car and the other two door contain things you don&#8217;t care about, say goats. You choose a door. Then the TV host, who knows where the prize is, opens one door you haven&#8217;t chosen and that he knows has a goat. Then he asks if you want to stick to the door you have chosen or if you want to change to the other door. What should you do?</p></blockquote>
<p>Probably you&#8217;ve already came across this question in some moment of your life and the answer is that changing doors would double your probability of getting the price. There are several ways of convincing your intuitions:</p>
<ul>
<li> Do the math: when you chose the door, there were three options so the prize is in the door you chose with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B3%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{3}}' title='{\frac{1}{3}}' class='latex' /> probability and in the other door with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B2%7D%7B3%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{2}{3}}' title='{\frac{2}{3}}' class='latex' /> (note that the presenter can always open some door with a goat, so conditioning on that event doesn&#8217;t give you any new information).</li>
<li> Do the actual experiment (computationally) as done <a class="snap_noshots" href="http://igor-nav.livejournal.com/16784.html">here</a>. One can always ask a friend to help, get some goats and perform the actual experiment.</li>
<li> To convince yourself that &#8220;it doesn&#8217;t matter&#8221; is not correct, think <img src='http://s.wordpress.com/latex.php?latex=%7B100%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{100}' title='{100}' class='latex' /> doors. You choose one and the TV host open <img src='http://s.wordpress.com/latex.php?latex=%7B98%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{98}' title='{98}' class='latex' /> of them and asks if you want to change or stick with your first choice. Wouldn&#8217;t you change?</li>
</ul>
<p>I&#8217;ve seen TV shows where this happened and I acknowledge that other things may be involved: there might be behavioral and psychologic issues associated with the Monty Hall problem &#8211; and possibly those would interest <a class="snap_noshots" href="http://www.amazon.com/Predictably-Irrational-Revised-Intl-Decisions/dp/0062018205/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1266295712&amp;sr=8-2">Dan Ariely</a>, whose book I began reading today &#8211; and looks quite fun. But the problem they told me about today in dinner was another: <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Two_envelope_problem">the envelope problem</a>:</p>
<blockquote><p>There are two envelopes and you are told that in one of them there is twice the amount that there is in the other. You choose one of the envelopes at random and open it: it contains <img src='http://s.wordpress.com/latex.php?latex=%7B100%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{100}' title='{100}' class='latex' /> bucks. Now, you don&#8217;t know if the other envelope has <img src='http://s.wordpress.com/latex.php?latex=%7B50%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{50}' title='{50}' class='latex' /> bucks or <img src='http://s.wordpress.com/latex.php?latex=%7B200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{200}' title='{200}' class='latex' /> bucks. Then someone asks you if you wanted to pay <img src='http://s.wordpress.com/latex.php?latex=%7B10%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{10}' title='{10}' class='latex' /> bucks and change to the other envelope. Should you change?</p></blockquote>
<p>Now, consider two different solutions to this problem: the first is fallacious and the second is correct:</p>
<ol>
<li> If I don&#8217;t change, I get <img src='http://s.wordpress.com/latex.php?latex=%7B100%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{100}' title='{100}' class='latex' /> bucks, if I change I pay a penalty of <img src='http://s.wordpress.com/latex.php?latex=%7B10%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{10}' title='{10}' class='latex' /> and I get either <img src='http://s.wordpress.com/latex.php?latex=%7B50%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{50}' title='{50}' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=%7B200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{200}' title='{200}' class='latex' /> with equal probability, so my expected prize if I change is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B200%2B50%7D%7B2%7D-10%20%3D%20115%20%3E%20100%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{200+50}{2}-10 = 115 &gt; 100}' title='{\frac{200+50}{2}-10 = 115 &gt; 100}' class='latex' />, so I should change.</li>
<li> I know there is one envelope with <img src='http://s.wordpress.com/latex.php?latex=%7Bx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x}' title='{x}' class='latex' /> and one with <img src='http://s.wordpress.com/latex.php?latex=%7B2x%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{2x}' title='{2x}' class='latex' />, then my expected prize if I don&#8217;t change is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bx%20%2B%202x%7D%7B2%7D%20%3D%20%5Cfrac%7B3%7D%7B2%7Dx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{x + 2x}{2} = \frac{3}{2}x}' title='{\frac{x + 2x}{2} = \frac{3}{2}x}' class='latex' />. If I change, my expected prize is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bx%20%2B%202x%7D%7B2%7D%20-%2010%20%3C%20%5Cfrac%7B3%7D%7B2%7Dx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{x + 2x}{2} - 10 &lt; \frac{3}{2}x}' title='{\frac{x + 2x}{2} - 10 &lt; \frac{3}{2}x}' class='latex' />, so I should not change.</li>
</ol>
<p>The fallacy in the first argument is perceiving a probability distribution where there is no one. Either the other envelope contains <img src='http://s.wordpress.com/latex.php?latex=%7B50%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{50}' title='{50}' class='latex' /> bucks or it contains <img src='http://s.wordpress.com/latex.php?latex=%7B200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{200}' title='{200}' class='latex' /> bucks &#8211; we just don&#8217;t know, but there is no probability distribution there &#8211; it is a deterministic choice by the game designer. Most of those paradoxes are a result of either an ill-defined probability space, as <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Bertrand%27s_paradox_%28probability%29">Bertrand&#8217;s Paradox</a> or a wrong comprehension of the probability space, as in Monty Hall or in several paradoxes exploring the same idea as: <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Three_Prisoners_problem">Three Prisioners</a>, <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Sleeping_Beauty_problem">Sleeping Beauty</a>, <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Boy_or_Girl_paradox">Boy or Girl Paradox</a>, &#8230;</p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-280" title="73a_humpty-dumpty" src="http://www.bigredbits.com/wp-content/uploads/2010/02/73a_humpty-dumpty-300x184.jpg" alt="73a_humpty-dumpty" width="300" height="184" /></p>
<p>There was very recently a thrilling discussion about a variant on the envelope paradox in the <a class="snap_noshots" href="http://blag.xkcd.com/">xkcd blag </a> &#8211; which is the blog accompaning that <a class="snap_noshots" href="http://xkcd.com/">amazing webcomic</a>. There was a recent blog post with <a class="snap_noshots" href="http://blog.xkcd.com/2010/02/09/math-puzzle/">a very intriguing problem</a>. A better idea is to go there and read the discussion, but if you are not doing so, let me summarize it here. The problem is:</p>
<blockquote><p>There are two envelopes containing each of them a distinct real number. You pick one envelope at random, open it and see the number, then you are asked to guess if the number in the other envelope is larger or smaller then the previous one. Can you guess correctly with more than <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> probability?</p>
<p>A related problem is: given that you are playing the envelope game and there are number <img src='http://s.wordpress.com/latex.php?latex=%7BA%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A}' title='{A}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7BB%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{B}' title='{B}' class='latex' /> (with <img src='http://s.wordpress.com/latex.php?latex=%7BA%20%3C%20B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A &lt; B}' title='{A &lt; B}' class='latex' />). You pick one envelope at random and then you are able to look at the content of the first envelope you open and then decide to switch or not. Is there a strategy that gives you expected earnings greater than <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7BA%2BB%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{A+B}{2}}' title='{\frac{A+B}{2}}' class='latex' /> ?</p></blockquote>
<p>The very unexpected answers is <strong>yes</strong> !!! The strategy that Randall presents in the blog and there is a <a class="snap_noshots" href="http://www.iwr.uni-heidelberg.de/groups/ngg/People/winckler/PU/p008.html">link to the source here</a> is: let <img src='http://s.wordpress.com/latex.php?latex=%7BX%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X}' title='{X}' class='latex' /> be a random variable on <img src='http://s.wordpress.com/latex.php?latex=%7B%7B%5Cmathbb%20R%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{{\mathbb R}}' title='{{\mathbb R}}' class='latex' /> such that for each <img src='http://s.wordpress.com/latex.php?latex=%7Ba%3Cb%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{a&lt;b}' title='{a&lt;b}' class='latex' /> we have <img src='http://s.wordpress.com/latex.php?latex=%7BP%28a%20%3C%20X%20%3C%20b%29%20%3E%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{P(a &lt; X &lt; b) &gt; 0}' title='{P(a &lt; X &lt; b) &gt; 0}' class='latex' />, for example, the normal distribution or the logistic distribution.</p>
<p>Sample <img src='http://s.wordpress.com/latex.php?latex=%7BX%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X}' title='{X}' class='latex' /> then open the envelope and find a number <img src='http://s.wordpress.com/latex.php?latex=%7BS%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S}' title='{S}' class='latex' /> now, if <img src='http://s.wordpress.com/latex.php?latex=%7BX%20%3C%20S%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X &lt; S}' title='{X &lt; S}' class='latex' /> say the other number is lower and if <img src='http://s.wordpress.com/latex.php?latex=%7BX%20%3E%20S%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X &gt; S}' title='{X &gt; S}' class='latex' /> say the other number is higher. You get it right with probability</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%20P%28%5Ctext%7Bpicked%20%7DA%29%20P%28X%20%3E%20A%29%20%2B%20P%28%5Ctext%7Bpicked%20%7DB%29%20P%28X%20%3C%20B%29%20%3D%20%5Cfrac%7B1%7D%7B2%7D%20%281%20%2B%20P%28A%20%3C%20X%20%3C%20B%29%29%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle  P(\text{picked }A) P(X &gt; A) + P(\text{picked }B) P(X &lt; B) = \frac{1}{2} (1 + P(A &lt; X &lt; B)) ' title='\displaystyle  P(\text{picked }A) P(X &gt; A) + P(\text{picked }B) P(X &lt; B) = \frac{1}{2} (1 + P(A &lt; X &lt; B)) ' class='latex' /></p>
<p>which is impressive. If you follow your guess, your expected earning <img src='http://s.wordpress.com/latex.php?latex=%7BY%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Y}' title='{Y}' class='latex' /> is:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cbegin%7Baligned%7D%20%26P%28%5Ctext%7Bpicked%20%7DA%29%20%5Cmathop%7B%5Cmathbb%20E%7D%5BY%20%5Cvert%20%5Ctext%7Bpicked%20%7DA%5D%20%2B%20P%28%5Ctext%7Bpicked%20%7DB%29%20%5Cmathop%7B%5Cmathbb%20E%7D%5BY%20%5Cvert%20%5Ctext%7Bpicked%20%7DB%5D%20%3D%20%5C%5C%20%26%20%3D%20%5Cfrac%7B1%7D%7B2%7D%20%5BP%28X%3CA%29%20A%20%2B%20P%28X%3EA%29%20B%5D%20%2B%20%5Cfrac%7B1%7D%7B2%7D%20%5BP%28X%3CB%29%20B%20%2B%20P%28X%3EB%29%20A%5D%20%5C%5C%20%26%3D%20%5Cfrac%7B1%7D%7B2%7D%5BA%20%5BP%28X%3CA%29%20%2B%20P%28X%3EB%29%5D%20%2B%20B%20%5BP%28X%3EA%29%20%2B%20P%28X%3CB%29%5D%5D%20%3E%20%5Cfrac%7BA%2BB%7D%7B2%7D%20%5C%5C%20%5Cend%7Baligned%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \begin{aligned} &amp;P(\text{picked }A) \mathop{\mathbb E}[Y \vert \text{picked }A] + P(\text{picked }B) \mathop{\mathbb E}[Y \vert \text{picked }B] = \\ &amp; = \frac{1}{2} [P(X&lt;A) A + P(X&gt;A) B] + \frac{1}{2} [P(X&lt;B) B + P(X&gt;B) A] \\ &amp;= \frac{1}{2}[A [P(X&lt;A) + P(X&gt;B)] + B [P(X&gt;A) + P(X&lt;B)]] &gt; \frac{A+B}{2} \\ \end{aligned}' title='\displaystyle \begin{aligned} &amp;P(\text{picked }A) \mathop{\mathbb E}[Y \vert \text{picked }A] + P(\text{picked }B) \mathop{\mathbb E}[Y \vert \text{picked }B] = \\ &amp; = \frac{1}{2} [P(X&lt;A) A + P(X&gt;A) B] + \frac{1}{2} [P(X&lt;B) B + P(X&gt;B) A] \\ &amp;= \frac{1}{2}[A [P(X&lt;A) + P(X&gt;B)] + B [P(X&gt;A) + P(X&lt;B)]] &gt; \frac{A+B}{2} \\ \end{aligned}' class='latex' /></p>
<p>The xkcd pointed to this cool <a class="snap_noshots" href="http://www.iwr.uni-heidelberg.de/groups/ngg/People/winckler/PU/">archive of puzzles and riddles</a>. I was also told that the <a class="snap_noshots" href="http://forums.xkcd.com/viewforum.php?f=3&amp;sid=0a47f2eeadd72be7890309b1c685c503">xkcd puzzle forum</a> is also a source of excellent puzzles, as this:</p>
<blockquote><p>You are the most eligible bachelor in the kingdom, and as such the King has invited you to his castle so that you may choose one of his three daughters to marry. The eldest princess is honest and always tells the truth. The youngest princess is dishonest and always lies. The middle princess is mischievous and tells the truth sometimes and lies the rest of the time. As you will be forever married to one of the princesses, you want to marry the eldest (truth-teller) or the youngest (liar) because at least you know where you stand with them. The problem is that you cannot tell which sister is which just by their appearance, and the King will only grant you ONE yes or no question which you may only address to ONE of the sisters. What yes or no question can you ask which will ensure you do not marry the middle sister?</p></blockquote>
<p>copied from <a class="snap_noshots" href="http://forums.xkcd.com/viewtopic.php?f=3&amp;t=87">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/278/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More about hats and auctions</title>
		<link>http://www.bigredbits.com/archives/218</link>
		<comments>http://www.bigredbits.com/archives/218#comments</comments>
		<pubDate>Thu, 29 Oct 2009 05:41:52 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[puzzles]]></category>
		<category><![CDATA[theory]]></category>
		<category><![CDATA[coding theory]]></category>
		<category><![CDATA[mechanism design]]></category>
		<category><![CDATA[profit maximization]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=218</guid>
		<description><![CDATA[In my last post about hats, I told I&#8217;ll soon post another version with some more problems, which I ended up not doing and would talk a bit more about those kind of problems. I ended up not doing, but here are a few nice problems: Those people are again a room, each with a [...]]]></description>
			<content:encoded><![CDATA[<p>In <a class="snap_noshots" href="http://www.bigredbits.com/?p=161">my last post about hats</a>, I told I&#8217;ll soon post another version with some more problems, which I ended up not doing and would talk a bit more about those kind of problems. I ended up not doing, but here are a few nice problems:</p>
<blockquote><p>Those <img src='http://s.wordpress.com/latex.php?latex=%7Bn%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n}' title='{n}' class='latex' /> people are again a room, each with a hat which is either black or white (picked with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> at random) and they can see the color of the other people&#8217;s hats but they can&#8217;t see their own color. They write in a piece of paper either &#8220;BLACK&#8221; or &#8220;WHITE&#8221;. The whole team wins if all of them get their colors right. The whole team loses, if at least one writes the wrong color. Before entering the room and getting the hats, they can strategyze. What is a strategy that makes them win with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> probability?</p></blockquote>
<p>If they all choose their colors at random, the probability of winning is very small: <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%5En%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2^n}}' title='{\frac{1}{2^n}}' class='latex' />. So we should try to correlate them somehow. The solution is again related with error correcting codes. We can think of the hats as a string of bits. How to correct one bit if it is lost? The simple engineering solution is to add a parity check. We append to the string <img src='http://s.wordpress.com/latex.php?latex=%7Bx_0%2C%20x_1%2C%20%5Chdots%2C%20x_n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_0, x_1, \hdots, x_n}' title='{x_0, x_1, \hdots, x_n}' class='latex' /> a bit <img src='http://s.wordpress.com/latex.php?latex=%7By%20%3D%20%5Csum_i%20x_i%20%5Cmod%202%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{y = \sum_i x_i \mod 2}' title='{y = \sum_i x_i \mod 2}' class='latex' />. So, if bit <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> is lost, we know it is <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%20%3D%20%28y%20%2B%20%5Csum_%7Bj%20%5Cneq%20i%7D%20x_j%29%20%5Cmod%202%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i = (y + \sum_{j \neq i} x_j) \mod 2}' title='{x_i = (y + \sum_{j \neq i} x_j) \mod 2}' class='latex' />. We can use this idea to solve the puzzle above: if hats are places with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> probability, the parity check will be <img src='http://s.wordpress.com/latex.php?latex=%7B0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{0}' title='{0}' class='latex' /> with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1}' title='{1}' class='latex' /> with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' />. They can decide before hand that everyone will use <img src='http://s.wordpress.com/latex.php?latex=%7By%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{y = 0}' title='{y = 0}' class='latex' /> and with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> they are right and everyone gets his hat color right. Now, let&#8217;s extend this problem in some ways:</p>
<blockquote><p>The same problem, but there are <img src='http://s.wordpress.com/latex.php?latex=%7Bk%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{k}' title='{k}' class='latex' /> hat colors, they are choosen independently with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7Bk%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{k}}' title='{\frac{1}{k}}' class='latex' /> and they win if everyone gets his color right. Find a strategy that wins with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7Bk%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{k}}' title='{\frac{1}{k}}' class='latex' />.</p></blockquote>
<blockquote><p>There are again <img src='http://s.wordpress.com/latex.php?latex=%7Bk%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{k}' title='{k}' class='latex' /> hat colors, they are choosen independently with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7Bk%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{k}}' title='{\frac{1}{k}}' class='latex' /> and they win if at least a fraction <img src='http://s.wordpress.com/latex.php?latex=%7Bf%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f}' title='{f}' class='latex' /> (<img src='http://s.wordpress.com/latex.php?latex=%7B0%20%3C%20f%20%3C%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{0 &lt; f &lt; 1}' title='{0 &lt; f &lt; 1}' class='latex' />) of the people guesses the right color. Find a strategy that wins with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7Bfk%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{fk}}' title='{\frac{1}{fk}}' class='latex' />.</p></blockquote>
<blockquote><p>Again to the problem where we just have BLACK and WHITE colors, they are chosen with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> and everyone needs to find the right color to win, can you prove that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> is the best one can do? And what about the two other problems above?</p></blockquote>
<p>The first two use variations of the parity check idea in the solution. For the second case, given any strategy of the players, for each string <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20%5C%7B0%2C1%5C%7D%5En%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in \{0,1\}^n}' title='{x \in \{0,1\}^n}' class='latex' /> they have probability <img src='http://s.wordpress.com/latex.php?latex=%7Bp_x%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_x}' title='{p_x}' class='latex' />. Therefore the total probability of winning is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%5En%7D%5Csum_%7Bx%20%5Cin%20%5C%7B0%2C1%5C%7D%5En%7D%20p_x%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x}' title='{\frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x}' class='latex' />. Let <img src='http://s.wordpress.com/latex.php?latex=%7Bx%27%20%3D%20%281-x_1%2C%20x_2%2C%20%5Chdots%2C%20x_n%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x&#039; = (1-x_1, x_2, \hdots, x_n)}' title='{x&#039; = (1-x_1, x_2, \hdots, x_n)}' class='latex' />, i.e., the same input but with the bit <img src='http://s.wordpress.com/latex.php?latex=%7B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1}' title='{1}' class='latex' /> flipped. Notice that the answer of player <img src='http://s.wordpress.com/latex.php?latex=%7B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1}' title='{1}' class='latex' /> is the same (or at least has the same probabilities) in both <img src='http://s.wordpress.com/latex.php?latex=%7Bx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x}' title='{x}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bx%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x&#039;}' title='{x&#039;}' class='latex' />, since he can&#8217;t distinguish between <img src='http://s.wordpress.com/latex.php?latex=%7Bx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x}' title='{x}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bx%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x&#039;}' title='{x&#039;}' class='latex' />. Therefore, <img src='http://s.wordpress.com/latex.php?latex=%7Bp_%7Bx%7D%20%2B%20p_%7Bx%27%7D%20%5Cleq%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_{x} + p_{x&#039;} \leq 1}' title='{p_{x} + p_{x&#039;} \leq 1}' class='latex' />. So,</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%202%20%5Cfrac%7B1%7D%7B2%5En%7D%5Csum_%7Bx%20%5Cin%20%5C%7B0%2C1%5C%7D%5En%7D%20p_x%20%3D%20%5Cfrac%7B1%7D%7B2%5En%7D%5Csum_%7Bx%20%5Cin%20%5C%7B0%2C1%5C%7D%5En%7D%20p_x%20%2B%20%5Cfrac%7B1%7D%7B2%5En%7D%5Csum_%7Bx%20%5Cin%20%5C%7B0%2C1%5C%7D%5En%7D%20p_x%27%20%5Cleq%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle 2 \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x = \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x + \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x&#039; \leq 1' title='\displaystyle 2 \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x = \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x + \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x&#039; \leq 1' class='latex' /></p>
<p>. This way, no strategy can have more than <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> probability of winning.</p>
<p>Another variation of it:</p>
<blockquote><p>Suppose now we have two colors BLACK and WHITE and the hats are drawn from one distribution <img src='http://s.wordpress.com/latex.php?latex=%7BD%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{D}' title='{D}' class='latex' />, i.e., we have a probability distribution over <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20%5C%7B0%2C1%5C%7D%5En%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in \{0,1\}^n}' title='{x \in \{0,1\}^n}' class='latex' /> and we draw the colors from that distribution. Notice that now the hats are not uncorrelated. How to win again with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> (to win, everyone needs the right answer).</p></blockquote>
<p>I like a lot those hat problems. A friend of mine just pointed out to me that there is a <a class="snap_noshots" href="http://www.cs.cornell.edu/~rdk/papers/Hats.pdf">very nice paper by Bobby Kleinberg</a> generalizing several aspects of hat problems, for example, when players have limited visibility of other players hats.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-163" title="hats1" src="http://www.bigredbits.com/wp-content/uploads/2009/10/hats1.png" alt="hats1" width="420" height="70" /></p>
<p>I began being interested by this sort of problem after reading the <a class="snap_noshots" href="www.ece.northwestern.edu/~hartline/papers/auctions-STOC-05.ps">Derandomization of Auctions</a> paper. Hat guessing games are not just a good model for error correcting codes, but they are also a good model for truthful auctions. Consider an auction with a set <img src='http://s.wordpress.com/latex.php?latex=%7BN%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{N}' title='{N}' class='latex' /> single parameter agents, i.e., an auction where each player gives one bid <img src='http://s.wordpress.com/latex.php?latex=%7Bb_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_i}' title='{b_i}' class='latex' /> indicating how much he is willing to pay to win. We have a set of constraints: <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BX%7D%20%5Csubseteq%202%5EN%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{X} \subseteq 2^N}' title='{\mathcal{X} \subseteq 2^N}' class='latex' /> of all feasible allocations. Based on the bids <img src='http://s.wordpress.com/latex.php?latex=%7B%28b_i%29_%7Bi%20%5Cin%20N%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(b_i)_{i \in N}}' title='{(b_i)_{i \in N}}' class='latex' /> we choose an allocation <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Cin%20%5Cmathcal%7BX%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \in \mathcal{X}}' title='{S \in \mathcal{X}}' class='latex' /> and we charge payments to the bidders. An example of a problem like this is the Digital Goods Auction, where <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BX%7D%20%3D%202%5EN%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{X} = 2^N}' title='{\mathcal{X} = 2^N}' class='latex' />.</p>
<p>In <a class="snap_noshots" href="http://www.bigredbits.com/?p=151">this blog post</a>, I discussed the concept of truthful auction. If an auction is randomized, an universal truthful auction is an auction that is truthful even if all the random bits in the mechanism are revealed to the bidders. Consider the Digital Goods Auction. We can characterize universal truthful digital goods auction as bid-independent auctions. A bid-independent auction is given by function <img src='http://s.wordpress.com/latex.php?latex=%7Bf_i%28b_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_i(b_{-i})}' title='{f_i(b_{-i})}' class='latex' />, which associated for each <img src='http://s.wordpress.com/latex.php?latex=%7Bb_%7B-i%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_{-i}}' title='{b_{-i}}' class='latex' /> a random variable <img src='http://s.wordpress.com/latex.php?latex=%7Bf_i%28b_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_i(b_{-i})}' title='{f_i(b_{-i})}' class='latex' />. In that auction, we offer the service to player <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> at price <img src='http://s.wordpress.com/latex.php?latex=%7Bf_i%28b_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_i(b_{-i})}' title='{f_i(b_{-i})}' class='latex' />. If <img src='http://s.wordpress.com/latex.php?latex=%7Bb_i%20%5Cgeq%20f_i%28b_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_i \geq f_i(b_{-i})}' title='{b_i \geq f_i(b_{-i})}' class='latex' /> we allocate to <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> and charge him <img src='http://s.wordpress.com/latex.php?latex=%7Bf_i%28b_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_i(b_{-i})}' title='{f_i(b_{-i})}' class='latex' />. Otherwise, we don&#8217;t allocate and we charge nothing.</p>
<p>It is not hard to see that all universal truthful mechanisms are like that: if <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%28b_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i(b_i)}' title='{x_i(b_i)}' class='latex' /> is the probability that player <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> gets the item bidding <img src='http://s.wordpress.com/latex.php?latex=%7Bb_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_i}' title='{b_i}' class='latex' /> let <img src='http://s.wordpress.com/latex.php?latex=%7BU%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{U}' title='{U}' class='latex' /> be an uniform random variable on <img src='http://s.wordpress.com/latex.php?latex=%7B%5B0%2C1%5D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{[0,1]}' title='{[0,1]}' class='latex' /> and define <img src='http://s.wordpress.com/latex.php?latex=%7Bf_i%28b_%7B-i%7D%29%20%3D%20x_i%5E%7B-1%7D%28U%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_i(b_{-i}) = x_i^{-1}(U)}' title='{f_i(b_{-i}) = x_i^{-1}(U)}' class='latex' />. Notice that here <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%28.%29%20%3D%20x_i%28.%2C%20b_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i(.) = x_i(., b_{-i})}' title='{x_i(.) = x_i(., b_{-i})}' class='latex' />, but we are inverting with respect to <img src='http://s.wordpress.com/latex.php?latex=%7Bb_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_i}' title='{b_i}' class='latex' />. It is a simple exercise to prove that.</p>
<p>With this characterization, universal truthful auctions suddenly look very much like hat guessing games: we need to design a function that looks at everyone else&#8217;s bid but not on our own and in some sense, &#8220;guesses&#8221; what we probably have and with that calculated the price we offer. It would be great to be able to design a function that returns <img src='http://s.wordpress.com/latex.php?latex=%7Bf%28b_%7B-i%7D%29%20%3D%20b_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f(b_{-i}) = b_i}' title='{f(b_{-i}) = b_i}' class='latex' />. That is unfortunately impossible. But how to approximate <img src='http://s.wordpress.com/latex.php?latex=%7Bb_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_i}' title='{b_i}' class='latex' /> nicely? Some papers, like the <a class="snap_noshots" href="www.ece.northwestern.edu/~hartline/papers/auctions-STOC-05.ps">Derandomization of Auctions</a> and <a class="snap_noshots" href="www.avglab.com/andrew/pub/soda03.ps">Competitiveness via Consensus</a> use this idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/218/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hats, codes and puzzles</title>
		<link>http://www.bigredbits.com/archives/161</link>
		<comments>http://www.bigredbits.com/archives/161#comments</comments>
		<pubDate>Sat, 03 Oct 2009 22:51:16 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[puzzles]]></category>
		<category><![CDATA[coding theory]]></category>
		<category><![CDATA[game theory]]></category>
		<category><![CDATA[mechanism design]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=161</guid>
		<description><![CDATA[When I was a child someone told me the following problem: A king promised to marry his daughter to the most intelligent man. Three princes came to claim her hand and he tryed the following logic experiment with them: The princes are gathered into a room and seated in a line, one behind the other, [...]]]></description>
			<content:encoded><![CDATA[<p>When I was a child someone told me the following problem:</p>
<blockquote><p>A king promised to marry his daughter to the most intelligent man. Three princes came to claim her hand and he tryed the following logic experiment with them: The princes are gathered into a room and seated in a line, one behind the other, and are shown 2 black hats and 3 white hats. They are blindfolded, and 1 hat is placed on each of their heads, with the remaining hats hidden in a different room. The first one to deduce his hat color will marry the princess. If some prince claims his hat color incorrectly he dies.</p>
<p>The prince who is seated behind removes his blindfold, sees the two hats in front of him and says nothing. Then the prince in the middle removes his blindfold after that and he can see the hat of the prince in front of him. He also says nothing. Noticing the other princes said nothing, the prince seated in the first whole, without even removing his blindfold, gives the correct answer? The question is: what is the color he said?</p></blockquote>
<p>This is a simple logical puzzle: we just write all the possibilities and start ruling them out given that the other princes didn&#8217;t answer and in the end we can find the color of his hat. I remember that this puzzle surprised me a lot as a kid. A found it extremly cool by then, what made me want to read books about logic problems. After that, I had a lot of fun reading the books by <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Raymond_Smullyan">Raymond Smullyan</a>. I usually would read the problems, think something like: there can&#8217;t ba a solution to that. Then go to school with the problem in mind and spend the day thinking about that. Here is a problem I liked a lot:</p>
<blockquote><p>There is one prisoner and there are two doors: each has one guardian. One door leads to an exit and one door leads to death. The prisioner can choose one door to open. One guardian speaks only the truth and one guardian always lies. But you don&#8217;t know which door is which, which guardian is which and who guards each door. You are allowed to choose one guardian and make him one Yes/No question, and then you need to choose a door. What is the right question to ask?</p></blockquote>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-163" title="hats1" src="http://www.bigredbits.com/wp-content/uploads/2009/10/hats1.png" alt="hats1" width="420" height="70" /></p>
<p>But my goal is not to talk about logic puzzles, but about Hat problems. There are a lot of variations of the problems above: in all of them a person is allowed to see the other hats but not his own hat and we need to &#8220;guess&#8221; which is the color of our hat. If we think carefully, we will see that this is a very general kind of problem in computer science: (i) the whole goal of learning theory is to predict one thing from a lot of other things you observe; (ii) in error correcting code, we should guess one bit from all the others, or from some subset of the others; (iii) in universal truthful mechanisms, we need to make a price offer to one player that just depends on all other players bids. I&#8217;ll come back to this example in a later post, since it is what made me interested in those kinds of problems, but for now, let&#8217;s look at one puzzle I was told about by <a class="snap_noshots" href="http://pages.cs.wisc.edu/~dmalec/">David Malec</a> at EC&#8217;09:</p>
<blockquote><p>There are black and white hats and <img src='http://s.wordpress.com/latex.php?latex=%7B3%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{3}' title='{3}' class='latex' /> people: for each of them we choose one color independently at random with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' />. Now, they can look at each others hats but not at their own hat. Then they need to write in a piece of paper either &#8220;PASS&#8221; or one color. If all pass or if someone has a wrong color, the whole team loses (this is a team game) and if at lest one person gets the color right and no one gets wrong, the whole team wins. Create a strategy for the team to win with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B3%7D%7B4%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{3}{4}}' title='{\frac{3}{4}}' class='latex' /> probability.</p></blockquote>
<p>To win with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' /> probability is easy: one person will always write &#8220;BLACK&#8221; and the others &#8220;PASS&#8221;. A better strategy is the following: if one person sees two hats of equal color, he writes the opposite color, otherwise, he passes. It is easy to see the team wins except in the case where all hats are the same color, what happens with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B4%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{4}}' title='{\frac{1}{4}}' class='latex' /> probability. We would like to extend this to a more general setting:</p>
<blockquote><p>There are black and white hats and <img src='http://s.wordpress.com/latex.php?latex=%7B2%5Ek%20-%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{2^k - 1}' title='{2^k - 1}' class='latex' /> people: for each of them we choose one color independently at random with probability <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7B1%7D%7B2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{1}{2}}' title='{\frac{1}{2}}' class='latex' />. Now, they can look at each others hats but not at their own hat. Then they need to write in a piece of paper either &#8220;PASS&#8221; or one color. If all pass or if someone has a wrong color, the whole team loses (this is a team game) and if at lest one person gets the color right and no one gets wrong, the whole team wins. Create a strategy for the team to win with <img src='http://s.wordpress.com/latex.php?latex=%7B1-%5Cfrac%7B1%7D%7B2%5Ek%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1-\frac{1}{2^k}}' title='{1-\frac{1}{2^k}}' class='latex' /> probability.</p></blockquote>
<p>It is a tricky question on how to extend the above solution in that case. A detailed solution can be found <a class="snap_noshots" href="www.math.ksu.edu/~dbski/hats.pdf">here</a>. The idea is quite ingenious, so I&#8217;ll sketch here. It envolves Error Correcting Code, in that case, the Hamming Code. Let <img src='http://s.wordpress.com/latex.php?latex=%7BF%20%3D%20%5C%7B0%2C1%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{F = \{0,1\}}' title='{F = \{0,1\}}' class='latex' /> with sum and product modulo <img src='http://s.wordpress.com/latex.php?latex=%7B2%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{2}' title='{2}' class='latex' />. Let <img src='http://s.wordpress.com/latex.php?latex=%7Bw_1%2C%20%5Chdots%2C%202%5E%7B2%5Ek-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{w_1, \hdots, 2^{2^k-1}}' title='{w_1, \hdots, 2^{2^k-1}}' class='latex' /> be the non-zero vector of <img src='http://s.wordpress.com/latex.php?latex=%7BF%5Ek%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{F^k}' title='{F^k}' class='latex' /> and the following linear map:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cbegin%7Baligned%7D%20%5Cphi%3A%20F%5E%7B2%5Ek-1%7D%20%5Crightarrow%20F%5Ek%20%5C%5C%20%28a_1%2C%5Chdots%2C%20a_%7B2%5Ek-1%7D%29%20%5Cmapsto%20%5Csum_i%20a_i%20w_i%20%5Cend%7Baligned%7D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \begin{aligned} \phi: F^{2^k-1} \rightarrow F^k \\ (a_1,\hdots, a_{2^k-1}) \mapsto \sum_i a_i w_i \end{aligned} ' title='\displaystyle \begin{aligned} \phi: F^{2^k-1} \rightarrow F^k \\ (a_1,\hdots, a_{2^k-1}) \mapsto \sum_i a_i w_i \end{aligned} ' class='latex' /></p>
<p>Let <img src='http://s.wordpress.com/latex.php?latex=%7BH%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{H}' title='{H}' class='latex' /> be the kernel of that application. Then, it is not hard to see that <img src='http://s.wordpress.com/latex.php?latex=%7BH%2C%20H%2Be_1%2C%20%5Chdots%2C%20H%2Be_%7B2%5Ek-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{H, H+e_1, \hdots, H+e_{2^k-1}}' title='{H, H+e_1, \hdots, H+e_{2^k-1}}' class='latex' /> is a partition of <img src='http://s.wordpress.com/latex.php?latex=%7BF%5E%7B2%5Ek-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{F^{2^k-1}}' title='{F^{2^k-1}}' class='latex' /> and also that because of that fact, for each <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20F%5E%7B2%5Ek-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in F^{2^k-1}}' title='{x \in F^{2^k-1}}' class='latex' /> either <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20H%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in H}' title='{x \in H}' class='latex' /> or exists a unique <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> s.t. <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%2B%20e_i%20%5Cin%20H%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x + e_i \in H}' title='{x + e_i \in H}' class='latex' />. This gives an algorithm for just one player to guess his correct color. Let <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20F%5E%7B2%5Ek-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in F^{2^k-1}}' title='{x \in F^{2^k-1}}' class='latex' /> be the color vector of the hats. Player <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> sees this vector as:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%28x_1%2C%20%5Chdots%2C%20x_%7Bi-1%7D%2C%20%3F%2C%20x_%7Bi%2B1%7D%2C%20%5Chdots%2C%20x_n%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle (x_1, \hdots, x_{i-1}, ?, x_{i+1}, \hdots, x_n)' title='\displaystyle (x_1, \hdots, x_{i-1}, ?, x_{i+1}, \hdots, x_n)' class='latex' /></p>
<p>which can be <img src='http://s.wordpress.com/latex.php?latex=%7B%28x_1%2C%20%5Chdots%2C%20x_%7Bi-1%7D%2C%200%2C%20x_%7Bi%2B1%7D%2C%20%5Chdots%2C%20x_n%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(x_1, \hdots, x_{i-1}, 0, x_{i+1}, \hdots, x_n)}' title='{(x_1, \hdots, x_{i-1}, 0, x_{i+1}, \hdots, x_n)}' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=%7B%28x_1%2C%20%5Chdots%2C%20x_%7Bi-1%7D%2C%201%2C%20x_%7Bi%2B1%7D%2C%20%5Chdots%2C%20x_n%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(x_1, \hdots, x_{i-1}, 1, x_{i+1}, \hdots, x_n)}' title='{(x_1, \hdots, x_{i-1}, 1, x_{i+1}, \hdots, x_n)}' class='latex' />. The strategy is: if either one of those vector is in <img src='http://s.wordpress.com/latex.php?latex=%7BH%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{H}' title='{H}' class='latex' />, write the color corresponding to the other vector. If both are out of <img src='http://s.wordpress.com/latex.php?latex=%7BH%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{H}' title='{H}' class='latex' />, pass. The team wins iff <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cnotin%20H%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \notin H}' title='{x \notin H}' class='latex' />, what happens with <img src='http://s.wordpress.com/latex.php?latex=%7B1%20-%20%5Cfrac%7B1%7D%7B2%5Ek%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1 - \frac{1}{2^k}}' title='{1 - \frac{1}{2^k}}' class='latex' /> probability. Is is an easy and fun exercise to prove those facts. Or you can refer to the solution I just wrote.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-164" title="hats2" src="http://www.bigredbits.com/wp-content/uploads/2009/10/hats2.png" alt="hats2" width="502" height="95" /></p>
<p>Now, we can complicate it a bit more: we can add other colors and other distributions. But I wanted to move to a different problem: the paper <a href="http://www.ece.northwestern.edu/~hartline/papers/auctions-STOC-05.ps">Derandomization of Auctions</a> showed me an impressive thing: we can use coding theory to derandomize algorithms. To illustrate their ideas, they propose the following problem:</p>
<blockquote><p><strong>Color guessing problem:</strong> There are <img src='http://s.wordpress.com/latex.php?latex=%7Bn%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n}' title='{n}' class='latex' /> people wearing hats of <img src='http://s.wordpress.com/latex.php?latex=%7Bk%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{k}' title='{k}' class='latex' /> different colors. If each person can see everyone else&#8217;s hats but not his or her own. Each person needs to guess the color of his own hat. We want a <strong>deterministic</strong> guessing algorithm that <img src='http://s.wordpress.com/latex.php?latex=%7B1%2Fk%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1/k}' title='{1/k}' class='latex' /> fraction of each color class is guessed correctly.</p></blockquote>
<p>The problem is very easy if we have a source of random bits. Each person guesses some color at random. It seems very complicated to do that without random bits. Surprisingly, we will solve that using a flow computation:</p>
<p>Let <img src='http://s.wordpress.com/latex.php?latex=%7Bc%20%3D%20%28c_1%2C%20%5Chdots%2C%20c_n%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c = (c_1, \hdots, c_n)}' title='{c = (c_1, \hdots, c_n)}' class='latex' /> be an array of colors <img src='http://s.wordpress.com/latex.php?latex=%7Bc_%7B-i%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c_{-i}}' title='{c_{-i}}' class='latex' /> the array with color <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> removed. Consider the following flow network: nodes <img src='http://s.wordpress.com/latex.php?latex=%7Bs%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{s}' title='{s}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bt%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t}' title='{t}' class='latex' /> (source and sink), nodes <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> for each <img src='http://s.wordpress.com/latex.php?latex=%7Bc_%7B-i%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c_{-i}}' title='{c_{-i}}' class='latex' />. There are <img src='http://s.wordpress.com/latex.php?latex=%7Bn%20%5Ccdot%20k%5E%7Bn-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n \cdot k^{n-1}}' title='{n \cdot k^{n-1}}' class='latex' /> such nodes. Consider also nodes in the form <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c})}' title='{u_{\gamma, c})}' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cgamma%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\gamma}' title='{\gamma}' class='latex' /> is a color (<img src='http://s.wordpress.com/latex.php?latex=%7B1%2C%20%5Chdots%2C%20k%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1, \hdots, k}' title='{1, \hdots, k}' class='latex' />) and <img src='http://s.wordpress.com/latex.php?latex=%7Bc%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c}' title='{c}' class='latex' /> is a color vector. There are <img src='http://s.wordpress.com/latex.php?latex=%7Bk%5E%7Bn%2B1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{k^{n+1}}' title='{k^{n+1}}' class='latex' /> such nodes.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-165" title="hats_net" src="http://www.bigredbits.com/wp-content/uploads/2009/10/hats_net.png" alt="hats_net" width="408" height="325" /></p>
<p>We have edges from <img src='http://s.wordpress.com/latex.php?latex=%7Bs%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{s}' title='{s}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> for all nodes of that kind. And we have edges from <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c})}' title='{u_{\gamma, c})}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bt%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t}' title='{t}' class='latex' />. Now, if <img src='http://s.wordpress.com/latex.php?latex=%7Bc%20%3D%20%28%5Cgamma%2C%20c_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c = (\gamma, c_{-i})}' title='{c = (\gamma, c_{-i})}' class='latex' />, i.e., if <img src='http://s.wordpress.com/latex.php?latex=%7Bc_%7B-i%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c_{-i}}' title='{c_{-i}}' class='latex' /> completed in the <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' />-th coordinate with <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cgamma%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\gamma}' title='{\gamma}' class='latex' /> generates <img src='http://s.wordpress.com/latex.php?latex=%7Bc%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c}' title='{c}' class='latex' />, then add an edge from <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c})}' title='{u_{\gamma, c})}' class='latex' />.</p>
<p>Consider the following flow: add <img src='http://s.wordpress.com/latex.php?latex=%7B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1}' title='{1}' class='latex' /> unit of flow from <img src='http://s.wordpress.com/latex.php?latex=%7Bs%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{s}' title='{s}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> and from <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> split that flow in pieces of size <img src='http://s.wordpress.com/latex.php?latex=%7B1%2Fk%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1/k}' title='{1/k}' class='latex' /> and send each to <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c}}' title='{u_{\gamma, c}}' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=%7Bc%20%3D%20%28%5Cgamma%2C%20c_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c = (\gamma, c_{-i})}' title='{c = (\gamma, c_{-i})}' class='latex' />. Now, each node <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c_{-i}}}' title='{u_{\gamma, c_{-i}}}' class='latex' /> receives <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bn_%5Cgamma%28c%29%7D%7B%5Cgamma%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{n_\gamma(c)}{\gamma}}' title='{\frac{n_\gamma(c)}{\gamma}}' class='latex' /> flow, where <img src='http://s.wordpress.com/latex.php?latex=%7Bn_%7B%5Cgamma%7D%28c%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n_{\gamma}(c)}' title='{n_{\gamma}(c)}' class='latex' /> is the number of occurencies of <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cgamma%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\gamma}' title='{\gamma}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7Bc%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c}' title='{c}' class='latex' />. Send all that flow to <img src='http://s.wordpress.com/latex.php?latex=%7Bt%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t}' title='{t}' class='latex' />.</p>
<p>We can think of that flow as the guessing procedure. When we see <img src='http://s.wordpress.com/latex.php?latex=%7Bc_%7B-i%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c_{-i}}' title='{c_{-i}}' class='latex' /> we choose the guess independently at random and this way, each <img src='http://s.wordpress.com/latex.php?latex=%7Bc%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c}' title='{c}' class='latex' /> receives in expectation <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bn_%5Cgamma%28c%29%7D%7B%5Cgamma%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{n_\gamma(c)}{\gamma}}' title='{\frac{n_\gamma(c)}{\gamma}}' class='latex' /> guesses <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cgamma%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\gamma}' title='{\gamma}' class='latex' />. Notice that an integral flow in that graph represents a deterministic guessing procedure: so all we need is an integral flow so that the flow from <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c}}' title='{u_{\gamma, c}}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bt%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t}' title='{t}' class='latex' /> is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Clfloor%20n_%5Cgamma%20%28c%29%20%2F%20k%20%5Crfloor%20%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\lfloor n_\gamma (c) / k \rfloor }' title='{\lfloor n_\gamma (c) / k \rfloor }' class='latex' />. The flow received is from nodes of the type: <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> and that means that bidder <img src='http://s.wordpress.com/latex.php?latex=%7Bi%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i}' title='{i}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7Bc%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c}' title='{c}' class='latex' />, looking at the other hats will correctly choose <img src='http://s.wordpress.com/latex.php?latex=%7Bc_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{c_i}' title='{c_i}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Clfloor%20n_%5Cgamma%20%28c%29%20%2F%20k%20%5Crfloor%20%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\lfloor n_\gamma (c) / k \rfloor }' title='{\lfloor n_\gamma (c) / k \rfloor }' class='latex' /> times.</p>
<p>Now, define the capacities this way: for all edges from <img src='http://s.wordpress.com/latex.php?latex=%7Bs%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{s}' title='{s}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> and from <img src='http://s.wordpress.com/latex.php?latex=%7Bv_%7Bc_%7B-i%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_{c_{-i}}}' title='{v_{c_{-i}}}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c}}' title='{u_{\gamma, c}}' class='latex' /> have capacity <img src='http://s.wordpress.com/latex.php?latex=%7B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{1}' title='{1}' class='latex' /> and from <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7B%5Cgamma%2C%20c%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{\gamma, c}}' title='{u_{\gamma, c}}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bt%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t}' title='{t}' class='latex' /> capacity <img src='http://s.wordpress.com/latex.php?latex=%7B%5Clfloor%20n_%5Cgamma%20%28c%29%20%2F%20k%20%5Crfloor%20%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\lfloor n_\gamma (c) / k \rfloor }' title='{\lfloor n_\gamma (c) / k \rfloor }' class='latex' />. There is an integral flow that saturates all edges from <img src='http://s.wordpress.com/latex.php?latex=%7Bu%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u}' title='{u}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7Bt%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t}' title='{t}' class='latex' />, because of the fractional flow showed. So, the solution gives us a deterministic decision procedure.</p>
<p>In the next blog post, I&#8217;ll try to show the result in the <a href="http://www.ece.northwestern.edu/~hartline/papers/auctions-STOC-05.ps">Derandomization of Auctions</a> that relates that to competitive auctions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/161/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Prisioners and boxes</title>
		<link>http://www.bigredbits.com/archives/54</link>
		<comments>http://www.bigredbits.com/archives/54#comments</comments>
		<pubDate>Mon, 13 Jul 2009 23:45:17 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[puzzles]]></category>
		<category><![CDATA[logic]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=54</guid>
		<description><![CDATA[In EC, Sean, one of my friends from UBC, told me an interesting puzzle. I liked both the problem and the solution a lot and since the solution has a lot of interesting ideas, I felt like writing about it. EC also reminded me that puzzles are fun and that I should use a bit [...]]]></description>
			<content:encoded><![CDATA[<p>In EC, Sean, one of my friends from UBC, told me an interesting puzzle. I liked both the problem and the solution a lot and since the solution has a lot of interesting ideas, I felt like writing about it. EC also reminded me that puzzles are fun and that I should use a bit more of my time solving those nice math problems. The problem is like that:</p>
<blockquote><p>There were 100 prisoners and 3 different rooms, say A, B and C. In the beginning they are all in room A. In room B there are 100 boxes, each one containing the name of a different prisoner. One at a time, the prisoners are brought from A to B and in B they can open 50 boxes. Then they are brought to room C. (They cannot change the state of room B, so it is the same of having 100 identical copies of room B and bringing each prisoner to one of the rooms. They cannot leave signals in the room). If each prisoner finds his owns name, they are all freed. They only think they can do is to agree on a certain strategy while they are all in room A and then follow that strategy. If they don&#8217;t succeed, the names are randomly rearranged and they can try again the next day. Find a strategy for them so that they succeed in less than one week (in expectation).</p></blockquote>
<p>A few things I need to drawn your attention to: (i) it is purely a math puzzle, there are no word-games. If something is obscure, it was my fault and it was not intentional, (ii) the fact that names were rearranged in boxes <strong>randomly</strong> is very important. The solution doesn&#8217;t work if the distribution is adversarial. (iii) if each of them pick 50 boxes at random, than each prisioner has <img src='http://s.wordpress.com/latex.php?latex=1%2F2&#038;bg=T&#038;fg=000000&#038;s=0' alt='1/2' title='1/2' class='latex' /> probability of succeeding, so they take <img src='http://s.wordpress.com/latex.php?latex=2%5E%7B100%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='2^{100}' title='2^{100}' class='latex' /> days in expectation, what is a lot. How to reduce it to about seven days?</p>
<p style="text-align: center;"><strong>Structure of random permutations</strong></p>
<p>The solution has to do with the structure of a permutation drawn at random. Consider one of the <img src='http://s.wordpress.com/latex.php?latex=n%21&#038;bg=T&#038;fg=000000&#038;s=0' alt='n!' title='n!' class='latex' /> permutation is sampled uniform at random. We can write each permutation as a product of disjoint cycles. For example, the permutation <img src='http://s.wordpress.com/latex.php?latex=%5Csigma%20%3D%20%5Cbegin%7Bpmatrix%7D%201%262%263%264%265%266%5C%5C4%265%266%263%262%261%20%5Cend%7Bpmatrix%7D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sigma = \begin{pmatrix} 1&amp;2&amp;3&amp;4&amp;5&amp;6\\4&amp;5&amp;6&amp;3&amp;2&amp;1 \end{pmatrix} ' title='\sigma = \begin{pmatrix} 1&amp;2&amp;3&amp;4&amp;5&amp;6\\4&amp;5&amp;6&amp;3&amp;2&amp;1 \end{pmatrix} ' class='latex' /> can be written as a product of two disjoint cycles: <img src='http://s.wordpress.com/latex.php?latex=%5Csigma%20%3D%20%28%201%2C4%2C3%2C6%20%29%20%282%2C5%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sigma = ( 1,4,3,6 ) (2,5)' title='\sigma = ( 1,4,3,6 ) (2,5)' class='latex' />. In the language of boxes and prisoners, it is: box <img src='http://s.wordpress.com/latex.php?latex=a_1&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_1' title='a_1' class='latex' /> contains the name of prisoner <img src='http://s.wordpress.com/latex.php?latex=a_2&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_2' title='a_2' class='latex' />, then box <img src='http://s.wordpress.com/latex.php?latex=a_2&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_2' title='a_2' class='latex' /> contains the name of prisoner <img src='http://s.wordpress.com/latex.php?latex=a_3&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_3' title='a_3' class='latex' /> and so on, until box <img src='http://s.wordpress.com/latex.php?latex=a_k&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_k' title='a_k' class='latex' /> contains name of prisoner <img src='http://s.wordpress.com/latex.php?latex=a_1&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_1' title='a_1' class='latex' />. This is the cycle <img src='http://s.wordpress.com/latex.php?latex=%28a_1%2C%20a_2%2C%20%5Chdots%2C%20a_k%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(a_1, a_2, \hdots, a_k)' title='(a_1, a_2, \hdots, a_k)' class='latex' />. If  all the cycles have length smaller than <img src='http://s.wordpress.com/latex.php?latex=n%2F2&#038;bg=T&#038;fg=000000&#038;s=0' alt='n/2' title='n/2' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=T&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> is the number of prisoners, then there is a simple strategy: we can consider that each prisoner corresponds to one box a priori (say prisoners have number <img src='http://s.wordpress.com/latex.php?latex=1%2C%20%5Chdots%2C%20n&#038;bg=T&#038;fg=000000&#038;s=0' alt='1, \hdots, n' title='1, \hdots, n' class='latex' /> and boxes also have numbers <img src='http://s.wordpress.com/latex.php?latex=1%2C%20%5Chdots%2C%20n&#038;bg=T&#038;fg=000000&#038;s=0' alt='1, \hdots, n' title='1, \hdots, n' class='latex' />. The permutation  is define by the function <img src='http://s.wordpress.com/latex.php?latex=%5Csigma&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sigma' title='\sigma' class='latex' /> from the box number to the number of the prisoner whose name is inside the box. Now, prisoner <img src='http://s.wordpress.com/latex.php?latex=k&#038;bg=T&#038;fg=000000&#038;s=0' alt='k' title='k' class='latex' /> opens box <img src='http://s.wordpress.com/latex.php?latex=k&#038;bg=T&#038;fg=000000&#038;s=0' alt='k' title='k' class='latex' />, reads the name of the prisoner inside the box and the box with that number, then he looks at the number of the prisoner inside that other box and continues following the cycle.</p>
<p>The probability of success is the same of the probability that a permutation <img src='http://s.wordpress.com/latex.php?latex=%5Cpi&#038;bg=T&#038;fg=000000&#038;s=0' alt='\pi' title='\pi' class='latex' /> drawn at random has no cycle of size greater than <img src='http://s.wordpress.com/latex.php?latex=n%2F2&#038;bg=T&#038;fg=000000&#038;s=0' alt='n/2' title='n/2' class='latex' />. Let $\phi_p$ be the probability that a random permutation has a cycle of length <img src='http://s.wordpress.com/latex.php?latex=p&#038;bg=T&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=p%20%3E%20n%2F2&#038;bg=T&#038;fg=000000&#038;s=0' alt='p &gt; n/2' title='p &gt; n/2' class='latex' />. This is a simple exercise of combinatorics: we can have <img src='http://s.wordpress.com/latex.php?latex=%5Cbegin%7Bpmatrix%7D%20n%20%5C%5C%20p%20%5Cend%7Bpmatrix%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\begin{pmatrix} n \\ p \end{pmatrix}' title='\begin{pmatrix} n \\ p \end{pmatrix}' class='latex' /> ways of picking the <img src='http://s.wordpress.com/latex.php?latex=p&#038;bg=T&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' /> elements that will form the <img src='http://s.wordpress.com/latex.php?latex=p&#038;bg=T&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' />-cycle. There are <img src='http://s.wordpress.com/latex.php?latex=%28n-p%29%21&#038;bg=T&#038;fg=000000&#038;s=0' alt='(n-p)!' title='(n-p)!' class='latex' /> permutations for the remaining <img src='http://s.wordpress.com/latex.php?latex=n-p&#038;bg=T&#038;fg=000000&#038;s=0' alt='n-p' title='n-p' class='latex' /> elements and <img src='http://s.wordpress.com/latex.php?latex=%28p-1%29%21&#038;bg=T&#038;fg=000000&#038;s=0' alt='(p-1)!' title='(p-1)!' class='latex' /> cycles that can be formed with those <img src='http://s.wordpress.com/latex.php?latex=p&#038;bg=T&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' /> elements. So, we have:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cphi_p%20%3D%20%5Cfrac%7B1%7D%7Bn%21%7D%20%20%5Cbegin%7Bpmatrix%7D%20n%20%5C%5C%20p%20%5Cend%7Bpmatrix%7D%20%28n-p%29%21%20%28p-1%29%21%20%3D%20%5Cfrac%7B1%7D%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \phi_p = \frac{1}{n!}  \begin{pmatrix} n \\ p \end{pmatrix} (n-p)! (p-1)! = \frac{1}{p}' title='\displaystyle \phi_p = \frac{1}{n!}  \begin{pmatrix} n \\ p \end{pmatrix} (n-p)! (p-1)! = \frac{1}{p}' class='latex' /></p>
<p>And therefore the probability of having a cycle with length more than <img src='http://s.wordpress.com/latex.php?latex=n%2F2&#038;bg=T&#038;fg=000000&#038;s=0' alt='n/2' title='n/2' class='latex' /> is <img src='http://s.wordpress.com/latex.php?latex=%5Csum_%7Bp%3D1%2Bn%2F2%7D%5En%20%5Cfrac%7B1%7D%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sum_{p=1+n/2}^n \frac{1}{p}' title='\sum_{p=1+n/2}^n \frac{1}{p}' class='latex' />. For <img src='http://s.wordpress.com/latex.php?latex=n%20%3D%20100&#038;bg=T&#038;fg=000000&#038;s=0' alt='n = 100' title='n = 100' class='latex' />, we get about <img src='http://s.wordpress.com/latex.php?latex=0.68&#038;bg=T&#038;fg=000000&#038;s=0' alt='0.68' title='0.68' class='latex' />, therefore the expected time before one permutation with no cycle larger than <img src='http://s.wordpress.com/latex.php?latex=n%2F2&#038;bg=T&#038;fg=000000&#038;s=0' alt='n/2' title='n/2' class='latex' /> appears is <img src='http://s.wordpress.com/latex.php?latex=%5Cfrac%7B1%7D%7B1-0.68%7D%20%5Capprox%203.3&#038;bg=T&#038;fg=000000&#038;s=0' alt='\frac{1}{1-0.68} \approx 3.3' title='\frac{1}{1-0.68} \approx 3.3' class='latex' /> days. Much less than one week, actually!</p>
<p style="text-align: center;">
<p style="text-align: center;"><strong>Structure and Randomness</strong></p>
<p style="text-align: left;">The solution to this puzzle explores the structure in randomness. A lot of work in computer science is based on looking at the structure (or expected structure) of a randomly chosen object. A very elegant kind of proof consists in creating a random process that generates object and prove that some object exists because is happens with positive probability. One simple, yet very beautiful example, is the following theorem: given any logic expression in <a href="http://en.wikipedia.org/wiki/Conjunctive_normal_form">3-CNF</a> form, i.e., one expression of the kind:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cbigwedge_i%20%28a_%7Bi1%7D%20%5Cvee%20a_%7Bi2%7D%20%5Cvee%20a_%7Bi3%7D%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \bigwedge_i (a_{i1} \vee a_{i2} \vee a_{i3})' title='\displaystyle \bigwedge_i (a_{i1} \vee a_{i2} \vee a_{i3})' class='latex' /></p>
<p style="text-align: left;">where <img src='http://s.wordpress.com/latex.php?latex=a_%7Bij%7D%20%5Cin%20%5C%7B%20x_i%2C%20%5Ctilde%20x_i%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_{ij} \in \{ x_i, \tilde x_i\}' title='a_{ij} \in \{ x_i, \tilde x_i\}' class='latex' />, there is an assignment of <img src='http://s.wordpress.com/latex.php?latex=x_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_i' title='x_i' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%5C%7B0%2C1%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\{0,1\}' title='\{0,1\}' class='latex' /> that satisfies <img src='http://s.wordpress.com/latex.php?latex=7%2F8&#038;bg=T&#038;fg=000000&#038;s=0' alt='7/8' title='7/8' class='latex' /> of the clauses. Even though the statement of this result has no probability in it, the proof is probabilitic. Consider a random assignment to the variables. Then each clause is satisfied with probability <img src='http://s.wordpress.com/latex.php?latex=7%2F8&#038;bg=T&#038;fg=000000&#038;s=0' alt='7/8' title='7/8' class='latex' />. Because of linearity of expectation, the expected number of satisfied clauses is <img src='http://s.wordpress.com/latex.php?latex=7%2F8&#038;bg=T&#038;fg=000000&#038;s=0' alt='7/8' title='7/8' class='latex' /> of the total. Since this is the expected number of satisfied clauses, there must be at least one assignments satisfying more than <img src='http://s.wordpress.com/latex.php?latex=7%2F8&#038;bg=T&#038;fg=000000&#038;s=0' alt='7/8' title='7/8' class='latex' />.</p>
<p style="text-align: left;">This kind of proof is called the <a href="http://en.wikipedia.org/wiki/Probabilistic_method">probabilistic method</a>. There are also a lot of other cool things exploring randomness in computer science, in design of algorithms, criptography, complexity theory, &#8230; Recently I read a <a href="http://rjlipton.wordpress.com/2009/04/27/how-to-solve-pnp/">nice blog post by Lipton</a>, he discusses ways he would try to solve the P vs NP problem. One comment I found really interesting and exciting (but that I don&#8217;t quite understand yet) is that we could, maybe, separate the SAT-3 instances in &#8220;random&#8221; and &#8220;structured&#8221; instances and try to use different methods exploring randomness or structure in each of them.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 295px; width: 1px; height: 1px;"><span><span style="font-family: courier;"></p>
<pre>\left(\begin{array}{ccc}1&amp;2&amp;3\\3&amp;2&amp;1\end{array}\ri  ght)</pre>
<p></span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/54/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
