<?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</title>
	<atom:link href="http://www.bigredbits.com/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-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.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>Bayesian updates and the Lake Wobegon effect</title>
		<link>http://www.bigredbits.com/archives/643</link>
		<comments>http://www.bigredbits.com/archives/643#comments</comments>
		<pubDate>Mon, 26 Sep 2011 01:48:27 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=643</guid>
		<description><![CDATA[We seem to have a good mathematical understanding of Bayesian updates, but somehow a very poor understanding of its practical implications. There are many situations in practice that we easily perceive as irrational, one of the most famous is the so called Lake Wobegon effect, named after the fictional town in Minnesota, where &#8220;all the women are [...]]]></description>
				<content:encoded><![CDATA[<p>We seem to have a good mathematical understanding of Bayesian updates, but somehow a very poor understanding of its practical implications. There are many situations in practice that we easily perceive as irrational, one of the most famous is the so called <a href="http://en.wikipedia.org/wiki/Illusory_superiority">Lake Wobegon effect</a>, named after the <a href="http://en.wikipedia.org/wiki/Lake_Wobegon">fictional town in Minnesota</a>, where &#8220;all the women are strong, all the men are good looking, and all the children are above average&#8221;. It is described as a cognitive bias where individuals tend to overestimate their own capabilities. In fact, when drivers are asked to rate their own skilled compared to the average in three groups: low-skilled, medium-skilled and high-skilled, most rate themselves above the average.</p>
<p>In fact, the behavioral economics literate is full of examples like this where the observed data is far from what you would expect to observe if all agents were rational &#8211; and those are normally attributed to cognitive biases. I was always a bit suspicious of such arguments: it was never clear if agents were simply not being rational or whether their true objective wasn&#8217;t being captured by the model. I always thought the second was a lot more likely.</p>
<p>One of the main problems of the irrationality argument is that they ignore the fact that agents live in a world where its states are not completely observed. In a beautiful paper in Econometrica called &#8220;<a href="http://www2.um.edu.uy/dubraj/documentos/Apparentfinal.pdf">Apparent Overconfidence</a>&#8220;, Benoit and Dubra argue that:</p>
<blockquote><p>&#8220;But the simple truism that most people cannot be better than the median does not imply that most people cannot rationally rate themselves above the median.&#8221;</p></blockquote>
<p>The authors show that it is possible to reverse engineer a signaling scheme such that the data is mostly consistent with the observation. Let me try to give a simple example they give in the introduction: consider that each driver has one of three types of skill: low, medium or high: <img src='http://s.wordpress.com/latex.php?latex=%5C%7BL%2CM%2CH%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\{L,M,H\}' title='\{L,M,H\}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28L%29%20%3D%20%5Cmathbb%7BP%7D%28M%29%20%3D%20%5Cmathbb%7BP%7D%28H%29%20%3D%20%5Cfrac%7B1%7D%7B3%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(L) = \mathbb{P}(M) = \mathbb{P}(H) = \frac{1}{3}' title='\mathbb{P}(L) = \mathbb{P}(M) = \mathbb{P}(H) = \frac{1}{3}' class='latex' />. However, they can&#8217;t observe this. They can only observe some sample of their driving. Let&#8217;s say for simplicity that they can observe a signal <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' /> that says if they caused an accident or not. Assume also that the larger that skill of a driver, the higher it is his probability of causing an accident, say:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28A%20%5Cvert%20L%29%20%3D%20%5Cfrac%7B47%7D%7B80%7D%2C%20%5Cmathbb%7BP%7D%28A%20%5Cvert%20L%29%20%3D%20%5Cfrac%7B9%7D%7B16%7D%2C%20%5Cmathbb%7BP%7D%28A%20%5Cvert%20L%29%20%3D%20%5Cfrac%7B1%7D%7B20%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(A \vert L) = \frac{47}{80}, \mathbb{P}(A \vert L) = \frac{9}{16}, \mathbb{P}(A \vert L) = \frac{1}{20}' title='\mathbb{P}(A \vert L) = \frac{47}{80}, \mathbb{P}(A \vert L) = \frac{9}{16}, \mathbb{P}(A \vert L) = \frac{1}{20}' class='latex' /></p>
<p style="text-align: left;">Before observing <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' /> each driver things of himself as having probability $\frac{1}{3}$ of having each type of skill. Now, after observing <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' />, they update their belief according to Bayes rule, i.e.,</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28s%20%5Cvert%20A%29%20%3D%20%5Cfrac%7B%20%5Cmathbb%7BP%7D%28A%20%5Cvert%20s%29%20%20%20%5Cmathbb%7BP%7D%28s%29%20%20%7D%7B%20%5Csum_%7Bs%27%7D%20%20%5Cmathbb%7BP%7D%28A%20%5Cvert%20s%27%29%20%20%20%5Cmathbb%7BP%7D%28s%27%29%20%20%7D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(s \vert A) = \frac{ \mathbb{P}(A \vert s)   \mathbb{P}(s)  }{ \sum_{s&#039;}  \mathbb{P}(A \vert s&#039;)   \mathbb{P}(s&#039;)  } ' title='\mathbb{P}(s \vert A) = \frac{ \mathbb{P}(A \vert s)   \mathbb{P}(s)  }{ \sum_{s&#039;}  \mathbb{P}(A \vert s&#039;)   \mathbb{P}(s&#039;)  } ' class='latex' /></p>
<p style="text-align: left;">doing the calculations, we have that <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28A%29%20%3D%20%5Cfrac%7B2%7D%7B5%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(A) = \frac{2}{5}' title='\mathbb{P}(A) = \frac{2}{5}' class='latex' /> and for the <img src='http://s.wordpress.com/latex.php?latex=%5Cfrac%7B3%7D%7B5%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\frac{3}{5}' title='\frac{3}{5}' class='latex' /> of the drivers that didn&#8217;t suffer an accident, they&#8217;ll evaluate <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28L%20%5Cvert%20%5Cneg%20A%29%20%3D%20%5Cfrac%7B11%7D%7B48%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(L \vert \neg A) = \frac{11}{48}' title='\mathbb{P}(L \vert \neg A) = \frac{11}{48}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28M%20%5Cvert%20%5Cneg%20A%29%20%3D%20%5Cfrac%7B35%7D%7B144%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(M \vert \neg A) = \frac{35}{144}' title='\mathbb{P}(M \vert \neg A) = \frac{35}{144}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28H%20%5Cvert%20%5Cneg%20A%29%20%3D%20%5Cfrac%7B19%7D%7B36%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(H \vert \neg A) = \frac{19}{36}' title='\mathbb{P}(H \vert \neg A) = \frac{19}{36}' class='latex' />, so:</p>
<div id="_mcePaste" style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%28H%20%5Cvert%20%5Cneg%20A%29%20%3E%20%5Cmathbb%7BP%7D%28L%20%5Ccup%20M%20%5Cvert%20%5Cneg%20A%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}(H \vert \neg A) &gt; \mathbb{P}(L \cup M \vert \neg A)' title='\mathbb{P}(H \vert \neg A) &gt; \mathbb{P}(L \cup M \vert \neg A)' class='latex' /></div>
<p>and therefore will report high-skill. Notice this is totally consistent with rational Bayesian-updaters. The main question in the paper is: &#8220;when it is possible to reverse engineer a signaling scheme ?&#8221;. More formally, let <img src='http://s.wordpress.com/latex.php?latex=%5CTheta&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Theta' title='\Theta' class='latex' /> be a set of types of users and let <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%20%5Csim%20H%20%5Cin%20%5CDelta%28%5CTheta%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\theta \sim H \in \Delta(\Theta)' title='\theta \sim H \in \Delta(\Theta)' class='latex' />, i.e., <img src='http://s.wordpress.com/latex.php?latex=H&#038;bg=T&#038;fg=000000&#038;s=0' alt='H' title='H' class='latex' /> is a distribution on the types which is common knowledge. Now, if we ask agents to report their type, their report is some <img src='http://s.wordpress.com/latex.php?latex=H%27%20%5Cin%20%5CDelta%28%5CTheta%29%2C%20H%27%20%5Cneq%20H&#038;bg=T&#038;fg=000000&#038;s=0' alt='H&#039; \in \Delta(\Theta), H&#039; \neq H' title='H&#039; \in \Delta(\Theta), H&#039; \neq H' class='latex' />. Is there a signaling scheme <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' /> which can be interpreted as a random variable correlated with <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=T&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=H%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='H&#039;' title='H&#039;' class='latex' /> is the distribution rational Bayesian updaters would report based on what they observed from <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' /> ? The authors give necessary and sufficient condition on when this is possible given <img src='http://s.wordpress.com/latex.php?latex=H%2CH%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='H,H&#039;' title='H,H&#039;' class='latex' />.</p>
<p style="text-align: center;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p style="text-align: left;">A note also related to the Lake Wobegon effect: I started reading a very nice book by Duncan Watts called &#8220;<a href="http://www.amazon.com/Everything-Obvious-Once-Know-Answer/dp/0385531680/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1317001355&amp;sr=1-1">Everything Is Obvious: *Once You Know the Answer</a>&#8221; about traps of the common-sense. The discussion is different then above, but it also talks about the dangers of applying our usual common sense, which is very useful to our daily life, to scientific results. I highly recommend reading the intro of the book, which is open in Amazon. He gives examples of social phenomena where, once you are told them, you think: &#8220;oh yeah, this is obvious&#8221;. But then if you were told the exact opposite (in fact, he begins the example by telling you the opposite from the observed in data), you&#8217;d also think &#8220;yes, yes, this is obvious&#8221; and come up with very natural explanations. His point is that common sense is very useful to explaining data observations, specially observations of social data. On the other hand, it is performs very poorly on predicting how the data will look like before actually seeing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/643/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restaurants in Jerusalem</title>
		<link>http://www.bigredbits.com/archives/599</link>
		<comments>http://www.bigredbits.com/archives/599#comments</comments>
		<pubDate>Tue, 31 May 2011 09:31:50 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=599</guid>
		<description><![CDATA[The Algorithmic Game Theory Semester in Jerusalem has been amazing &#8211; made a lot of good friends and learned many interesting things. Now, ready to go back to the US, I feel I should share a bit about nice places to go in Jerusalem. Together with Vasilis Syrgkanis, I decided to compile a list of [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">The <a href="http://www.cs.huji.ac.il/conferences/agt-semester/people.php">Algorithmic Game Theory Semester</a> in <a href="http://en.wikipedia.org/wiki/Jerusalem">Jerusalem</a> has been amazing &#8211; made a lot of good friends and learned many interesting things. Now, ready to go back to the US, I feel I should share a bit about nice places to go in Jerusalem. Together with <a href="http://www.cs.cornell.edu/~vasilis/">Vasilis Syrgkanis</a>, I decided to compile a list of good restaurants, cafes, &#8230; specially a list of places open in shabbat (which is quite useful for the visitor).</p>
<p style="text-align: left;"><strong>My Favourite Restaurants</strong></p>
<ul>
<li><a href="http://www.2eat.co.il/eng/machne-yuda/">Machne-yuda</a> : Next to the <a href="http://en.wikipedia.org/wiki/Mahane_Yehuda">Mahane Yehuda market</a>, the restaurant menu changes everyday (with a couple of dishes which are always there). The food is whatever is in that day in the market. Everything was perfect both times I went. I strongly recommend the polenta and the black risotto. We took almost 1 month to make a reservation and eventually we got one. Eventually we learned a nice trick &#8211; if you arrive there very late (say aroud midnight), it is not impossible to get a table (we got one in the bar right away, arriving at 11:30pm). Elisa Celis suggested this place, and I think Omer Reingold suggested it to her.</li>
<li><a href="http://www.chakra-rest.com/AboutEng.aspx">Chakra</a> : There is a tasting menu that is amazing. It is around 160 NIS, but worth every cent. It started with chicken livers, salads, calamari, ceviche, shrimp (the shrimp was awesome), fish kebab and mussels. After the fish part ended, they brought us many meat dishes, like a beef strogonoff (I am still puzzled by how soft the meat was), lamb chops and beef kebab. It ended with a simple, yet perfect, chocolate dessert and ice-cream with tahina. Thanks to Shahar Dobzinski and Sigal Oren for the suggestion.</li>
<li>Carousella: It is a small restaurant in the corner of the street I used to live in Jerusalem (it is located in the corner of Azza and Metudela in Rehavia). It is a vegetarian French/Israeli restaurant and has my favorite shakshouka in town &#8211; it is actually a mix o <a href="http://en.wikipedia.org/wiki/Shakshouka">shakshouka</a> and <a href="http://en.wikipedia.org/wiki/Ratatouille">ratatouille</a>. I also like very much their risotto. We used to have breakfast/brunch there quite a lot &#8211; usually getting either the shakshouka or the musli. The house cake is definitely recommended too&#8230; It is my favourite place to work (they have wifi and a nice record player and a huge collection of records). Thanks to Omer Tamuz for this suggestion.</li>
</ul>
<p><strong>Hummus Places</strong></p>
<ul>
<li>Lina: It is known as the best hummus in the city (some claim the best hummus in the world). It is located in the Via Dolorosa and not hard to find. Arriving in the Via Dolorosa, you can just ask directions and everyone knows. Everything is recommended.</li>
<li><a href="http://www.gojerusalem.com/discover/item_563/From-Gaza-to-Berlin">From Gaza to Berlin</a>: is a small and super cheap restaurant in Rehavia &#8211; their hummus is very tasty (specially the hummus with meat), the kubbeh soup is very nice and their falafel is famous around here.</li>
<li><a href="http://www.gojerusalem.com/discover/item_448/Marvad-Haksamim-Emek-Refaim">Marvad Haksamim</a> (The Magic Carpet): a very nice arabic place &#8211; great bread, hummus, &#8230;  The soups are very good (I tried the lentil and the kubeh soup) and the meat is usually good as well. I tried the chopped livers and the kebab. The Mixed Jerusalem Grill is a famous plate, I guess.</li>
</ul>
<p><strong>Places to eat/work on shabbat:</strong> on Saturday and Friday night most of the things in the city are closed, so it is good to know some places to go:</p>
<ul>
<li><a href="http://maps.google.com/maps/place?cid=10965397664033307606&amp;q=restobar&amp;hl=en&amp;sll=32.048018,34.937554&amp;sspn=0.546879,0.564476&amp;ie=UTF8&amp;ll=32.560704,33.700562&amp;spn=0,0&amp;z=9">Restobar</a>: good food and generally open</li>
<li><a href="http://maps.google.com/maps/place?cid=7169989799078614900&amp;q=zuni&amp;hl=en&amp;sll=31.782098,35.222784&amp;sspn=0.015039,0.010627&amp;ie=UTF8&amp;ll=31.790163,35.203457&amp;spn=0,0&amp;z=15">Zuni</a>: very nice and open 24 hours a day, 7 days a week. Has every type of meal (brunch, lunch, coffee, drinks), served all the time. Good for working too&#8230;</li>
<li><a href="http://www.monas.co.il/en.html">Mona</a>: a very cool American/Israeli restaurant inside a former art school. Food is very good and has also a very nice bar.</li>
<li><a href="http://maps.google.com/maps/place?cid=17307252824416707487&amp;q=spaghettim&amp;hl=en&amp;sll=31.779659,35.220148&amp;sspn=1.053374,0.895184&amp;ie=UTF8&amp;ll=32.805745,32.750244&amp;spn=0,0&amp;z=8">Spaguettim</a>: nice location, wifi, good coffee and snacks. I never tried the food, though.</li>
<li>many places on Hillel Street: for example the <a href="http://www.gojerusalem.com/discover/item_504/Iwo-Meat-Burger-">Iwo Meat Burger</a> (a pretty good non-kosher burger place), the pizza place next to it and a couple of bars nearby</li>
</ul>
<p><strong>In the old city</strong></p>
<ul>
<li>Cheese pie: I don&#8217;t know how to give an exact location, but this should help you: very near to the Church of the Holy Sepulcher in the Old City, you can find the Coptic Patriarchate. Try to locate the stairs leading to the Patriarchate and before going up, there is a place that sells only one thing: a cheese pie. There is a big marble table and a man with a bowl of dough, some cheese and syrup. He prepares everything in front of you and then puts it in the oven. It takes around 20 minutes. It is very impressive.</li>
<li><a href="http://www.gojerusalem.com/discover/item_61/Armenian-Tavern">Armenian Tavern</a>: a very beautiful place hidden in the old city. Food is nice  (the lemonade is very refreshing and tastes great) but the better thing is the feeling that you are dining inside a museum.</li>
</ul>
<p><strong>Hotel Bars and Cafes</strong></p>
<ul>
<li><a href="http://www.mamillahotel.com/">Mamilla Terrace</a>: the restaurant in the terrace of Mamilla Hotel is pretty nice and has a good view of the old city. It is a good place to go for drinks as well. It is closed (I think) on shabbat.</li>
<li><a href="http://www.notredamecenter.org/index.phtml">Notre Dame Terrace</a>: the Notre Dame hotel has also a great view to the Temple Mount and pretty nice food. It is very relaxing to sit there and look the old city. There is another restaurant in the hotel called La Rotisserie, which I very much appreciated. It is also open on shabbat.</li>
</ul>
<p><strong>In Tel Aviv</strong></p>
<ul>
<li><a href="http://www.telavivguide.net/Restaurants/Reasonable_Restaurants/Raphael_Restau-Bistro_2005091122/">Raphael</a>: inside the Dan Hotel and overlooking the sea. Most of the times I went to Tel Aviv I ended up eating there.</li>
<li><a href="http://maps.google.com/maps/place?cid=13539005368885765189&amp;q=tel+aviv+boya&amp;hl=en&amp;sll=32.097239,34.775617&amp;sspn=0.06838,0.006295&amp;ie=UTF8&amp;ll=32.140008,34.698429&amp;spn=0,0&amp;z=13">Boya</a>: Thanks to Lior Seeman for this suggestion. We had many small dishes (something like tapas) and all were amazing. I think it was my favourite place in Tel Aviv.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/599/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MHR, Regular Distributions and Myerson&#8217;s Lemma</title>
		<link>http://www.bigredbits.com/archives/539</link>
		<comments>http://www.bigredbits.com/archives/539#comments</comments>
		<pubDate>Mon, 30 May 2011 10:46:08 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[profit maximization]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=539</guid>
		<description><![CDATA[Monotone Hazard Rate (MHR) distributions and its superclass regular distributions keep appearing in the Mechanism Design literature and this is due to a very good reason: they are the class of distributions for which Myerson&#8217;s Optimal Auction is simple and natural. Let&#8217;s brief discuss some properties of those distributions. First, two definitions: Hazard rate of [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Monotone Hazard Rate</strong> (MHR) distributions and its superclass <strong>regular distributions</strong> keep appearing in the Mechanism Design literature and this is due to a very good reason: they are the class of distributions for which <a href="http://www.econ.yale.edu/~dirkb/teach/521b-08-09/reading/1981%20optimal%20auction.pdf">Myerson&#8217;s Optimal Auction</a> is simple and natural. Let&#8217;s brief discuss some properties of those distributions. First, two definitions:</p>
<ol>
<li>Hazard rate of a distribution <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' /> : <img src='http://s.wordpress.com/latex.php?latex=h%28z%29%20%3D%20%5Cfrac%7Bf%28z%29%7D%7B1-F%28z%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='h(z) = \frac{f(z)}{1-F(z)}' title='h(z) = \frac{f(z)}{1-F(z)}' class='latex' /></li>
<li>Myerson virtual value of a distribution <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' /> : <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29%20%3D%20z%20-%20%5Cfrac%7B1-F%28z%29%7D%7Bf%28z%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z) = z - \frac{1-F(z)}{f(z)}' title='\phi(z) = z - \frac{1-F(z)}{f(z)}' class='latex' /></li>
</ol>
<p>We can interpret the hazard rate in the following way: think of <img src='http://s.wordpress.com/latex.php?latex=T%20%5Csim%20f&#038;bg=T&#038;fg=000000&#038;s=0' alt='T \sim f' title='T \sim f' class='latex' /> as a random variable that indicates the time that a light bulb will take to extinguish. If we are in time <img src='http://s.wordpress.com/latex.php?latex=t&#038;bg=T&#038;fg=000000&#038;s=0' alt='t' title='t' class='latex' /> and the light bulb hasn&#8217;t extinguished so far, what is the probability it will extinguish in the next <img src='http://s.wordpress.com/latex.php?latex=%5Cdelta&#038;bg=T&#038;fg=000000&#038;s=0' alt='\delta' title='\delta' class='latex' /> time:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%5BT%20%5Cleq%20t%2B%5Cdelta%20%5Cvert%20T%20%3E%20t%5D%20%5Capprox%20%5Cfrac%7Bf%28t%29%20%5Cdelta%7D%7B1-F%28t%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}[T \leq t+\delta \vert T &gt; t] \approx \frac{f(t) \delta}{1-F(t)}' title='\mathbb{P}[T \leq t+\delta \vert T &gt; t] \approx \frac{f(t) \delta}{1-F(t)}' class='latex' /></p>
<p style="text-align: left;">We say that a distribution is monotone hazard rate, if <img src='http://s.wordpress.com/latex.php?latex=h%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='h(z)' title='h(z)' class='latex' /> is non-decreasing. This is very natural for light bulbs, for example. Many of the distributions that we are used to are MHR, for example, uniform, exponential and normal. The way that I like to think about MHR distributions is the following: if some distribution has hazard rate <img src='http://s.wordpress.com/latex.php?latex=h%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='h(z)' title='h(z)' class='latex' />, then it means that <img src='http://s.wordpress.com/latex.php?latex=F%27%28z%29%20%3D%20%281-F%28z%29%29%20h%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='F&#039;(z) = (1-F(z)) h(z)' title='F&#039;(z) = (1-F(z)) h(z)' class='latex' />. If we define <img src='http://s.wordpress.com/latex.php?latex=G%28z%29%20%3D%201-F%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='G(z) = 1-F(z)' title='G(z) = 1-F(z)' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%28log%20G%28z%29%29%27%20%3D%20%5Cfrac%7BG%27%28z%29%7D%7BG%28z%29%7D%20%3D%20-h%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(log G(z))&#039; = \frac{G&#039;(z)}{G(z)} = -h(z)' title='(log G(z))&#039; = \frac{G&#039;(z)}{G(z)} = -h(z)' class='latex' />, so:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=F%28z%29%20%3D%201-%5Ctext%7Bexp%7D%28-%5Cint_0%5Ez%20h%28u%29%20du%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='F(z) = 1-\text{exp}(-\int_0^z h(u) du)' title='F(z) = 1-\text{exp}(-\int_0^z h(u) du)' class='latex' /></p>
<p style="text-align: left;">From this characterization, it is simple to see that the extremal distributions for this class, i.e. the distributions that are in the edge of being MHR and non-MHR are constant hazard rate, which correspond to the exponential distribution <img src='http://s.wordpress.com/latex.php?latex=F%28z%29%20%3D%201-e%5E%7B-%5Clambda%20z%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='F(z) = 1-e^{-\lambda z}' title='F(z) = 1-e^{-\lambda z}' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=z%20%5Cin%20%5B0%2C%5Cinfty%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='z \in [0,\infty)' title='z \in [0,\infty)' class='latex' />. They way I like to think about those distributions is that whenever you are able to prove something about the exponential distribution, then you can prove a similar statement about MHR distributions. Consider those three examples:</p>
<p style="text-align: left;"><strong>Example 1: </strong><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%5B%5Cphi%28z%29%20%5Cgeq%200%5D%20%5Cgeq%20%5Cfrac%7B1%7D%7Be%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}[\phi(z) \geq 0] \geq \frac{1}{e}' title='\mathbb{P}[\phi(z) \geq 0] \geq \frac{1}{e}' class='latex' /> for MHR distributions. This fact is straightforward for the exponential distribution. For the exponential distribution <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29%20%3D%20z-%5Clambda%5E%7B-1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z) = z-\lambda^{-1}' title='\phi(z) = z-\lambda^{-1}' class='latex' /> and therefore</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BP%7D%5B%5Cphi%28z%29%20%5Cgeq%200%5D%20%5Cgeq%20%5Cmathbb%7BP%7D%5Bz%20%3E%20%5Clambda%5E%7B-1%7D%5D%20%3D%201-F%28%5Clambda%5E%7B-1%7D%29%20%3D%20e%5E%7B-1%7D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{P}[\phi(z) \geq 0] \geq \mathbb{P}[z &gt; \lambda^{-1}] = 1-F(\lambda^{-1}) = e^{-1} ' title='\mathbb{P}[\phi(z) \geq 0] \geq \mathbb{P}[z &gt; \lambda^{-1}] = 1-F(\lambda^{-1}) = e^{-1} ' class='latex' /></p>
<p style="text-align: left;">but the proof for MHR is equally simple: Let <img src='http://s.wordpress.com/latex.php?latex=r%20%3D%20%5Cinf%20%5C%7Bz%3B%20%5Cphi%28z%29%20%5Cgeq%200%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='r = \inf \{z; \phi(z) \geq 0\}' title='r = \inf \{z; \phi(z) \geq 0\}' class='latex' />, therefore <img src='http://s.wordpress.com/latex.php?latex=r%20h%28r%29%20%5Cleq%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='r h(r) \leq 1' title='r h(r) \leq 1' class='latex' />.<br />
<img src='http://s.wordpress.com/latex.php?latex=P%5C%7B%20%5Cphi%28v%29%20%5Cgeq%200%5C%7D%20%3D%20P%5C%7B%20v%20%5Cgeq%20r%20%5C%7D%20%3D%201%20-%20F%28r%29%20%3D%20e%5E%7B-%5Cint_0%5Er%20h%28u%29%20du%7D%20%5Cgeq%20e%5E%7B-r%20h%28r%29%7D%20%5Cgeq%20e%5E%7B-1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='P\{ \phi(v) \geq 0\} = P\{ v \geq r \} = 1 - F(r) = e^{-\int_0^r h(u) du} \geq e^{-r h(r)} \geq e^{-1}' title='P\{ \phi(v) \geq 0\} = P\{ v \geq r \} = 1 - F(r) = e^{-\int_0^r h(u) du} \geq e^{-r h(r)} \geq e^{-1}' class='latex' /></p>
<p><strong>Example 2</strong>: Given <img src='http://s.wordpress.com/latex.php?latex=z_1%2C%20z_2%20%5Csim%20f&#038;bg=T&#038;fg=000000&#038;s=0' alt='z_1, z_2 \sim f' title='z_1, z_2 \sim f' class='latex' /> iid where <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 MHR and <img src='http://s.wordpress.com/latex.php?latex=v_1%20%3D%20%5Cmax%20%5C%7Bz_1%2C%20z_2%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_1 = \max \{z_1, z_2\}' title='v_1 = \max \{z_1, z_2\}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=v_2%20%3D%20%5Cmin%20%5C%7Bz_1%2C%20z_2%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_2 = \min \{z_1, z_2\}' title='v_2 = \min \{z_1, z_2\}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5Bv_2%5D%20%5Cgeq%20%5Cfrac%7B1%7D%7B3%7D%20%5Cmathbb%7BE%7D%5Bv_1%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[v_2] \geq \frac{1}{3} \mathbb{E}[v_1]' title='\mathbb{E}[v_2] \geq \frac{1}{3} \mathbb{E}[v_1]' class='latex' />. The proof for the exponential distribution is trivial, and in fact, this is tight for the exponential, the trick is to use the convexity of <img src='http://s.wordpress.com/latex.php?latex=z%20%5Cmapsto%20%5Cint_0%5Ez%20h%28u%29%20du&#038;bg=T&#038;fg=000000&#038;s=0' alt='z \mapsto \int_0^z h(u) du' title='z \mapsto \int_0^z h(u) du' class='latex' />. We use that <img src='http://s.wordpress.com/latex.php?latex=%5Cint_0%5E%7B2z%7D%20h%20%5Cgeq%202%20%5Cint_0%5Ez%20h&#038;bg=T&#038;fg=000000&#038;s=0' alt='\int_0^{2z} h \geq 2 \int_0^z h' title='\int_0^{2z} h \geq 2 \int_0^z h' class='latex' /> in the following way:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%20%5Bv_2%5D%20%3D%20%5Cint_0%5E%5Cinfty%20%281%20-%20F%28z%29%29%5E2%20dz%20%3D%20%5Cint_0%5E%5Cinfty%20e%5E%7B-2%20%5Cint_0%5Ez%20h%7D%20dz%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E} [v_2] = \int_0^\infty (1 - F(z))^2 dz = \int_0^\infty e^{-2 \int_0^z h} dz ' title='\mathbb{E} [v_2] = \int_0^\infty (1 - F(z))^2 dz = \int_0^\infty e^{-2 \int_0^z h} dz ' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cgeq%20%5Cint_0%5E%5Cinfty%20e%5E%7B-%5Cint_0%5E%7B2z%7D%20h%7D%20dz%3D%20%5Cfrac%7B1%7D%7B2%7D%20%5Cint_0%5E%5Cinfty%201%20-%20F%28z%29%20dz%20%3D%20%5Cfrac%7B1%7D%7B2%7D%20%5Cmathbb%7BE%7D%20%5Bz%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\geq \int_0^\infty e^{-\int_0^{2z} h} dz= \frac{1}{2} \int_0^\infty 1 - F(z) dz = \frac{1}{2} \mathbb{E} [z]' title='\geq \int_0^\infty e^{-\int_0^{2z} h} dz= \frac{1}{2} \int_0^\infty 1 - F(z) dz = \frac{1}{2} \mathbb{E} [z]' class='latex' /></p>
<p>Since <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%20%5Bv_1%20%2B%20v_2%5D%20%3D%20%5Cmathbb%7BE%7D%20%5Bz_1%20%2B%20z_2%5D%20%3D%202%20%5Cmathbb%7BE%7D%20%5Bz%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E} [v_1 + v_2] = \mathbb{E} [z_1 + z_2] = 2 \mathbb{E} [z]' title='\mathbb{E} [v_1 + v_2] = \mathbb{E} [z_1 + z_2] = 2 \mathbb{E} [z]' class='latex' />, we have that <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5Bv_1%5D%20%3D%202%20%5Cmathbb%7BE%7D%5Bz%5D%20-%20%5Cmathbb%7BE%7D%5Bv_2%5D%20%5Cleq%20%5Cfrac%7B3%7D%7B2%7D%20%5Cmathbb%7BE%7D%5Bz%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[v_1] = 2 \mathbb{E}[z] - \mathbb{E}[v_2] \leq \frac{3}{2} \mathbb{E}[z]' title='\mathbb{E}[v_1] = 2 \mathbb{E}[z] - \mathbb{E}[v_2] \leq \frac{3}{2} \mathbb{E}[z]' class='latex' />. This way, we get: <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5Bv_2%5D%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%5Cmathbb%7BE%7D%5Bz%5D%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%20%5Ccdot%20%5Cfrac%7B2%7D%7B3%7D%20%5Cmathbb%7BE%7D%5Bv_1%5D%20%3D%20%5Cfrac%7B1%7D%7B3%7D%20%5Cmathbb%7BE%7D%5Bv_1%5D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[v_2] \geq \frac{1}{2}\mathbb{E}[z] \geq \frac{1}{2} \cdot \frac{2}{3} \mathbb{E}[v_1] = \frac{1}{3} \mathbb{E}[v_1] ' title='\mathbb{E}[v_2] \geq \frac{1}{2}\mathbb{E}[z] \geq \frac{1}{2} \cdot \frac{2}{3} \mathbb{E}[v_1] = \frac{1}{3} \mathbb{E}[v_1] ' class='latex' /></p>
<p><strong>Example 3: </strong>For MHR distributions, there is a simple lemma that relates the virtual value and the real value and this lemma is quite useful in various settings: let <img src='http://s.wordpress.com/latex.php?latex=r%20%3D%20%5Cinf%20%5C%7Bz%3B%20%5Cphi%28z%29%20%3E%200%20%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='r = \inf \{z; \phi(z) &gt; 0 \}' title='r = \inf \{z; \phi(z) &gt; 0 \}' class='latex' />, then for <img src='http://s.wordpress.com/latex.php?latex=z%20%5Cgeq%20r&#038;bg=T&#038;fg=000000&#038;s=0' alt='z \geq r' title='z \geq r' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29%20%5Cgeq%20z%20-%20r&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z) \geq z - r' title='\phi(z) \geq z - r' class='latex' />. Again, this is tight for exponential distribution. The proof is quite trivial:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=x%20-%20%5Cphi%28x%29%20%3D%20%5Cfrac%7B1-F%28x%29%7D%7Bf%28x%29%7D%20%5Cleq%20%5Cfrac%7B1-F%28r%29%7D%7Bf%28r%29%7D%20%3D%20r&#038;bg=T&#038;fg=000000&#038;s=0' alt='x - \phi(x) = \frac{1-F(x)}{f(x)} \leq \frac{1-F(r)}{f(r)} = r' title='x - \phi(x) = \frac{1-F(x)}{f(x)} \leq \frac{1-F(r)}{f(r)} = r' class='latex' /></p>
<p>Now, MHR distributions are a subclass of regular distributions, which are the distributions for which Myerson&#8217;s virtual value <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z)' title='\phi(z)' class='latex' /> is a monotone function. I usually find harder to think about regular distributions than to think about MHR (in fact, I don&#8217;t know so many examples that are regular, but not MHR. Here is one, though, called the <em>equal-revenue-distribution</em>. Consider <img src='http://s.wordpress.com/latex.php?latex=z%20%5Cin%20%5B1%2C%20%5Cinfty%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='z \in [1, \infty)' title='z \in [1, \infty)' class='latex' /> distributed according to <img src='http://s.wordpress.com/latex.php?latex=f%28z%29%20%3D%201%2Fz%5E2&#038;bg=T&#038;fg=000000&#038;s=0' alt='f(z) = 1/z^2' title='f(z) = 1/z^2' class='latex' />. The cumulative distribution is given by <img src='http://s.wordpress.com/latex.php?latex=F%28z%29%20%3D%201-1%2Fz&#038;bg=T&#038;fg=000000&#038;s=0' alt='F(z) = 1-1/z' title='F(z) = 1-1/z' class='latex' />. The interesting thing of this distribution is that posted prices get the same revenue regardless of the price. For example, if we post any price <img src='http://s.wordpress.com/latex.php?latex=r%20%5Cin%20%5B1%2C%5Cinfty%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='r \in [1,\infty)' title='r \in [1,\infty)' class='latex' />, then a customer with valuations <img src='http://s.wordpress.com/latex.php?latex=z%20%5Csim%20f&#038;bg=T&#038;fg=000000&#038;s=0' alt='z \sim f' title='z \sim f' class='latex' /> buys the item if <img src='http://s.wordpress.com/latex.php?latex=z%20%3E%20r&#038;bg=T&#038;fg=000000&#038;s=0' alt='z &gt; r' title='z &gt; r' class='latex' /> by price <img src='http://s.wordpress.com/latex.php?latex=r&#038;bg=T&#038;fg=000000&#038;s=0' alt='r' title='r' class='latex' />, getting  revenue is <img src='http://s.wordpress.com/latex.php?latex=r%20%281-F%28r%29%29%20%3D%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='r (1-F(r)) = 1' title='r (1-F(r)) = 1' class='latex' />. This can be expressed by the fact that <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29%20%3D%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z) = 0' title='\phi(z) = 0' class='latex' />. I was a bit puzzled by this fact, because of Myerson&#8217;s Lemma:</p>
<blockquote>
<p style="text-align: left;"><strong>Myerson Lemma: </strong>If a mechanism sells to some player that has valuation <img src='http://s.wordpress.com/latex.php?latex=v%20%5Csim%20f&#038;bg=T&#038;fg=000000&#038;s=0' alt='v \sim f' title='v \sim f' class='latex' /> with probability <img src='http://s.wordpress.com/latex.php?latex=x%28v%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='x(v)' title='x(v)' class='latex' /> when he has value <img src='http://s.wordpress.com/latex.php?latex=v&#038;bg=T&#038;fg=000000&#038;s=0' alt='v' title='v' class='latex' />, then the revenue is <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%20%5Bx%28v%29%20%5Cphi%28v%29%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E} [x(v) \phi(v)]' title='\mathbb{E} [x(v) \phi(v)]' class='latex' />.</p>
</blockquote>
<p style="text-align: left;">And it seemed that the auctioneers was doomed to get zero revenue, since <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29%20%3D%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z) = 0' title='\phi(z) = 0' class='latex' />. For example, suppose we fix some price <img src='http://s.wordpress.com/latex.php?latex=r&#038;bg=T&#038;fg=000000&#038;s=0' alt='r' title='r' class='latex' /> and we sell the item if <img src='http://s.wordpress.com/latex.php?latex=v%20%5Cgeq%20r&#038;bg=T&#038;fg=000000&#038;s=0' alt='v \geq r' title='v \geq r' class='latex' /> by price <img src='http://s.wordpress.com/latex.php?latex=r&#038;bg=T&#038;fg=000000&#038;s=0' alt='r' title='r' class='latex' />. Then it seems that Myerson&#8217;s Lemma should go through by a derivation like that (for this special case, although the general proof is quite similar):</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%20%5Bx%28v%29%20%5Cphi%28v%29%5D%20%3D%20%5Cint_r%5E%5Cinfty%20%5Cphi%28z%29%20f%28z%29%20dz%20%3D%20%5Cint_r%5E%5Cinfty%20z%20f%28z%29%20-%20%281-F%28z%29%29%20dz%20%3D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E} [x(v) \phi(v)] = \int_r^\infty \phi(z) f(z) dz = \int_r^\infty z f(z) - (1-F(z)) dz = ' title='\mathbb{E} [x(v) \phi(v)] = \int_r^\infty \phi(z) f(z) dz = \int_r^\infty z f(z) - (1-F(z)) dz = ' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%3D%20%5Cint_r%5E%5Cinfty%20%5B%20z%20f%28z%29%20-%20%5Cint_z%5E%5Cinfty%20f%28u%29%20du%20%5D%20dz%20%3D%20%5Cint_r%5E%5Cinfty%20z%20f%28z%29%20dz%20-%20%5Cint_r%5E%5Cinfty%20%5Cint_r%5Eu%20f%28u%29%20dz%20du%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='= \int_r^\infty [ z f(z) - \int_z^\infty f(u) du ] dz = \int_r^\infty z f(z) dz - \int_r^\infty \int_r^u f(u) dz du ' title='= \int_r^\infty [ z f(z) - \int_z^\infty f(u) du ] dz = \int_r^\infty z f(z) dz - \int_r^\infty \int_r^u f(u) dz du ' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%3D%20r%20%281-F%28r%29%29%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='= r (1-F(r)) ' title='= r (1-F(r)) ' class='latex' /></p>
<p style="text-align: left;">but those don&#8217;t seem to match, since one side is zero and the other is 1. The mistake we did above is classic, which is to calculate <img src='http://s.wordpress.com/latex.php?latex=%5Cinfty%20-%20%5Cinfty&#038;bg=T&#038;fg=000000&#038;s=0' alt='\infty - \infty' title='\infty - \infty' class='latex' />. We wrote:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5B%5Cphi%28v%29%5D%20%3D%20%5Cint_r%5E%5Cinfty%20z%20f%28z%29%20dz%20-%20%5Cint_r%5E%5Cinfty%201-F%28z%29%20dz&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[\phi(v)] = \int_r^\infty z f(z) dz - \int_r^\infty 1-F(z) dz' title='\mathbb{E}[\phi(v)] = \int_r^\infty z f(z) dz - \int_r^\infty 1-F(z) dz' class='latex' /></p>
<p style="text-align: left;">but both are infinity! This made me realize that Myerson&#8217;s Lemma needs the condition that <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5Bz%5D%20%3C%20%5Cinfty&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[z] &lt; \infty' title='\mathbb{E}[z] &lt; \infty' class='latex' />, which is quite a natural a distribution over valuations of a good. So, one of the bugs of the the equal-revenue-distribution is that <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5Bz%5D%20%3D%20%5Cinfty&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[z] = \infty' title='\mathbb{E}[z] = \infty' class='latex' />. A family that is close to this, but doesn&#8217;t suffer this bug is: <img src='http://s.wordpress.com/latex.php?latex=f%28z%29%20%3D%20%5Cfrac%7B%5Calpha-1%7D%7Bz%5E%5Calpha%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='f(z) = \frac{\alpha-1}{z^\alpha}' title='f(z) = \frac{\alpha-1}{z^\alpha}' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=z%20%5Cin%20%5B1%2C%5Cinfty%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='z \in [1,\infty)' title='z \in [1,\infty)' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=F%28z%29%20%3D%201%20-%20z%5E%7B1-%5Calpha%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='F(z) = 1 - z^{1-\alpha}' title='F(z) = 1 - z^{1-\alpha}' class='latex' />. For <img src='http://s.wordpress.com/latex.php?latex=%5Calpha%20%3E%202&#038;bg=T&#038;fg=000000&#038;s=0' alt='\alpha &gt; 2' title='\alpha &gt; 2' class='latex' /> we have <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbb%7BE%7D%5Bv%5D%20%3C%20%5Cinfty&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathbb{E}[v] &lt; \infty' title='\mathbb{E}[v] &lt; \infty' class='latex' />, then we get <img src='http://s.wordpress.com/latex.php?latex=%5Cphi%28z%29%20%3D%20%5Cfrac%7B%5Calpha-2%7D%7B%5Calpha-1%7D%20z&#038;bg=T&#038;fg=000000&#038;s=0' alt='\phi(z) = \frac{\alpha-2}{\alpha-1} z' title='\phi(z) = \frac{\alpha-2}{\alpha-1} z' class='latex' />.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/539/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bimatrix games</title>
		<link>http://www.bigredbits.com/archives/491</link>
		<comments>http://www.bigredbits.com/archives/491#comments</comments>
		<pubDate>Wed, 25 May 2011 16:02:17 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[game theory]]></category>
		<category><![CDATA[linear algebra]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=491</guid>
		<description><![CDATA[This week in Israel is the Workshop on Innovations in Algorithmic Game Theory, which has been a collection of amazing talks and I thought of blogging about something new I learned here. First, Paul Goldberg gave an amazing talk about the Lemke-Howson algorithm and Homotopy Methods. Later, during the poster session Jugal Garg presented the [...]]]></description>
				<content:encoded><![CDATA[<p>This week in Israel is the <a href="http://www.cs.huji.ac.il/conferences/agt-semester/iagt2011/schedule.php">Workshop on Innovations in Algorithmic Game Theory</a>, which has been a collection of amazing talks and I thought of blogging about something new I learned here. First, Paul Goldberg gave an amazing talk about the <a href="http://arxiv.org/abs/1006.5352">Lemke-Howson algorithm and Homotopy Methods</a>. Later, during the poster session Jugal Garg presented the impressive work on an <a href="http://arxiv.org/abs/1010.3083">exact algorithm for finding Nash equilibria in rank 1 bimatrix games</a>. Both have in common the use of homotopy, which I found I quite cool idea &#8211; and has been present in Game Theory for a while, but I didn&#8217;t know about. They also have to do with improving the understanding we have on the <a href="http://www.stanford.edu/~saberi/lecture4.pdf">Lemke-Howson Algorithm</a> &#8211; a (potentially exponential time) algorithm to find Nash equilibrium in 2-person bi-matrix games, but that seems to work pretty well in practice. As always, I though that blogging about it would be a good idea in order to understand those concepts well.</p>
<p><strong>Bimatrix Game and How to compute equilibrium</strong></p>
<p>Bimatrix game is the simplest class of games studied. Basically it is a <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' /> player game, 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' /> strategies for 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' /> and <img src='http://s.wordpress.com/latex.php?latex=m&#038;bg=T&#038;fg=000000&#038;s=0' alt='m' title='m' class='latex' /> strategies for player 2 which is represented by a pair of <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' /> matrices <img src='http://s.wordpress.com/latex.php?latex=%28A%2CB%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(A,B)' title='(A,B)' class='latex' />. Let <img src='http://s.wordpress.com/latex.php?latex=x%20%5Cin%20%5Cmathbb%7BR%7D_%2B%5En%2C%20%5CVert%20x%20%5CVert_1%20%3D%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='x \in \mathbb{R}_+^n, \Vert x \Vert_1 = 1' title='x \in \mathbb{R}_+^n, \Vert x \Vert_1 = 1' class='latex' /> represent a probability distribution that 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' /> assigns to his strategies and <img src='http://s.wordpress.com/latex.php?latex=y%20%5Cin%20%5Cmathbb%7BR%7D_%2B%5Em%2C%20%5CVert%20y%20%5CVert_1%20%3D%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='y \in \mathbb{R}_+^m, \Vert y \Vert_1 = 1' title='y \in \mathbb{R}_+^m, \Vert y \Vert_1 = 1' class='latex' /> be the same for 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' />. This way, the players experience utilities:</p>
<p style="text-align: center;"><img style="display: inline;" title=" u_1 (x,y) = x^t A y,  u_2(x,y) = x^t B y" src="http://www.codecogs.com/gif.latex?%20u_1%20%28x,y%29%20=%20x%5Et%20A%20y,%C2%A0%20u_2%28x,y%29%20=%20x%5Et%20B%20y" alt="[; u_1 (x,y) = x^t A y,  u_2(x,y) = x^t B y;]" /></p>
<p>The best understood class of those games is the one where <img src='http://s.wordpress.com/latex.php?latex=A%2BB%20%3D%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='A+B = 0' title='A+B = 0' class='latex' />, called zero-sum games. For this class, computing a Nash equilibrium is very easy and it is given by the famous min-max theorem: 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' /> finds <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' /> maximizing <img src='http://s.wordpress.com/latex.php?latex=%5Cmin_j%20%28x%5Et%20A%20e_j%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\min_j (x^t A e_j)' title='\min_j (x^t A e_j)' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=e_j&#038;bg=T&#038;fg=000000&#038;s=0' alt='e_j' title='e_j' class='latex' /> is the <img src='http://s.wordpress.com/latex.php?latex=j&#038;bg=T&#038;fg=000000&#038;s=0' alt='j' title='j' class='latex' />-th unit vector. Similarly 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' /> finds <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' /> maximizing <img src='http://s.wordpress.com/latex.php?latex=%5Cmin_i%20%28e_i%5Et%20B%20y%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\min_i (e_i^t B y)' title='\min_i (e_i^t B y)' class='latex' />. Then the pair of strategies obtained is a Nash equilibrium &#8211; and this verifying that is not hard.</p>
<p>When <img src='http://s.wordpress.com/latex.php?latex=A%2BB%20%5Cneq%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='A+B \neq 0' title='A+B \neq 0' class='latex' />, the problems gets a lot more complicated. Proving that equilibrium exist can be done using various fixed point theorems, as <a href="http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem">Brouwer</a> or <a href="http://en.wikipedia.org/wiki/Kakutani_theorem">Kakutani</a>. There is a very simple exponential time algorithm for finding it and the key observation is the following, if <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(x,y)' title='(x,y)' class='latex' /> is a Nash equilibrium then:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cforall%20i%3A%20x_i%20%3D%200%20%5Ctext%7B%20or%20%7D%20%5Cforall%20i%27%3A%20e_i%5Et%20A%20y%20%5Cgeq%20e_%7Bi%27%7D%5Et%20A%20y&#038;bg=T&#038;fg=000000&#038;s=0' alt='\forall i: x_i = 0 \text{ or } \forall i&#039;: e_i^t A y \geq e_{i&#039;}^t A y' title='\forall i: x_i = 0 \text{ or } \forall i&#039;: e_i^t A y \geq e_{i&#039;}^t A y' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cforall%20j%3A%20y_j%20%3D%200%20%5Ctext%7B%20or%20%7D%20%5Cforall%20j%27%3A%20x%5Et%20B%20e_j%20%5Cgeq%20x%5Et%20B%20e_%7Bj%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\forall j: y_j = 0 \text{ or } \forall j&#039;: x^t B e_j \geq x^t B e_{j&#039;}' title='\forall j: y_j = 0 \text{ or } \forall j&#039;: x^t B e_j \geq x^t B e_{j&#039;}' class='latex' /></p>
<p style="text-align: left;">which means that each strategy for 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' /> is either in the support or is a best response. Proving that is trivial (if some strategy is in the support and is not a best response, then reducing the probability we play it is an improving deviation). Therefore if we just guess the support 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 the support of <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' /> we just need to find some strategies with this support satisfying the inequalities above. This can be done using a simple LP. This is clearly not very efficient, since it involves solving <img src='http://s.wordpress.com/latex.php?latex=2%5E%7Bn%2Bm%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='2^{n+m}' title='2^{n+m}' class='latex' /> LPs. A still exponential, but a lot more practical method, is:</p>
<p style="text-align: left;"><strong>Lemke-Howson Algorithm</strong></p>
<p style="text-align: left;">A good overview of the L-H algorithm can be found in <a href="http://www.stanford.edu/~saberi/lecture4.pdf">those lecture notes</a> or in a more detailed version in third chapter of the <a href="http://www.cambridge.org/us/knowledge/isbn/item1174320/?site_locale=en_US">AGT book</a> (a pdf  can be found in <a href="http://theory.stanford.edu/~tim/">Tim&#8217;s website</a>). Here I&#8217;ll present a quick overview. The main idea is to define the <strong>best-response polytopes</strong> <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' /> and <img src='http://s.wordpress.com/latex.php?latex=Q&#038;bg=T&#038;fg=000000&#038;s=0' alt='Q' title='Q' class='latex' />:</p>
<p style="text-align: center;"><img style="display: inline;" title=" P = \{(x,v) \in \mathbb{R}^{n+1} \vert x_i \geq 0, x^t B e_j \leq v; \textbf{1}^t x = 1 \}" src="http://www.codecogs.com/gif.latex?%20P%20=%20%5C%7B%28x,v%29%20%5Cin%20%5Cmathbb%7BR%7D%5E%7Bn+1%7D%20%5Cvert%20x_i%20%5Cgeq%200,%20x%5Et%20B%20e_j%20%5Cleq%20v;%20%5Ctextbf%7B1%7D%5Et%20x%20=%201%20%5C%7D" alt="[; P = \{(x,v) \in \mathbb{R}^{n+1} \vert x_i \geq 0, x^t B e_j \leq v; \textbf{1}^t x = 1 \};]" /></p>
<p style="text-align: center;"><img style="display: inline;" title=" Q = \{(y,u) \in \mathbb{R}^{m+1} \vert e_i^t A y \leq u, y_j \geq 0; \textbf{1}^t y = 1 \} " src="http://www.codecogs.com/gif.latex?%20Q%20=%20%5C%7B%28y,u%29%20%5Cin%20%5Cmathbb%7BR%7D%5E%7Bm+1%7D%20%5Cvert%20e_i%5Et%20A%20y%20%5Cleq%20u,%20y_j%20%5Cgeq%200;%20%5Ctextbf%7B1%7D%5Et%20y%20=%201%20%5C%7D" alt="[; Q = \{(y,u) \in \mathbb{R}^{m+1} \vert e_i^t A y \leq u, y_j \geq 0; \textbf{1}^t y = 1 \} ;]" /></p>
<p style="text-align: left;">The intuition is that a point <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cv%29%20%5Cin%20P&#038;bg=T&#038;fg=000000&#038;s=0' alt='(x,v) \in P' title='(x,v) \in P' class='latex' /> represents the fact that the payoff <img src='http://s.wordpress.com/latex.php?latex=v&#038;bg=T&#038;fg=000000&#038;s=0' alt='v' title='v' class='latex' /> of 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' /> when 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' /> plays <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' /> is at least <img src='http://s.wordpress.com/latex.php?latex=v&#038;bg=T&#038;fg=000000&#038;s=0' alt='v' title='v' class='latex' />. We could re-write as <img src='http://s.wordpress.com/latex.php?latex=v%20%5Cgeq%20%5Cmax_j%20x%5Et%20B%20e_j&#038;bg=T&#038;fg=000000&#038;s=0' alt='v \geq \max_j x^t B e_j' title='v \geq \max_j x^t B e_j' class='latex' />.</p>
<p style="text-align: left;">Each of the polytopes has <img src='http://s.wordpress.com/latex.php?latex=m%2Bn&#038;bg=T&#038;fg=000000&#038;s=0' alt='m+n' title='m+n' class='latex' /> inequalities and <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' /> equality. Given <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' /> we define <img src='http://s.wordpress.com/latex.php?latex=L%28x%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='L(x)' title='L(x)' class='latex' /> as the indices of the tight inequalities in <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' /> and similarly we define <img src='http://s.wordpress.com/latex.php?latex=L%28y%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='L(y)' title='L(y)' class='latex' /> as the indices of the tight inequalities in <img src='http://s.wordpress.com/latex.php?latex=Q&#038;bg=T&#038;fg=000000&#038;s=0' alt='Q' title='Q' class='latex' />. The theorem in the previous section can be rephrased as:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(x,y)' title='(x,y)' class='latex' /> is Nash equilibrium iff <img src='http://s.wordpress.com/latex.php?latex=L%28x%29%20%5Ccup%20L%28y%29%20%3D%20%5C%7B1%2C%202%2C%20%5Chdots%2C%20n%2Bm%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='L(x) \cup L(y) = \{1, 2, \hdots, n+m\}' title='L(x) \cup L(y) = \{1, 2, \hdots, n+m\}' class='latex' /></p>
<p style="text-align: left;">So we need to look at points in the polytope below that are <strong>fully-labeled</strong>. And the way that this is done in L-H is quite ingenious &#8211; it is a similar idea that is used by the <a href="http://en.wikipedia.org/wiki/Simplex_algorithm">Simplex Method</a> &#8211; walking through the vertices of the polytope looking for the desired vertex. In order to do it, let&#8217;s define another polytope:</p>
<p style="text-align: center;"><img style="display: inline;" title="P' = \{x \in \mathbb{R}^n \vert x_i \geq 0, x^t B e_j \leq 1\} " src="http://www.codecogs.com/gif.latex?P%27%20=%20%5C%7Bx%20%5Cin%20%5Cmathbb%7BR%7D%5En%20%5Cvert%20x_i%20%5Cgeq%200,%20x%5Et%20B%20e_j%20%5Cleq%201%5C%7D" alt="[;P' = \{x \in \mathbb{R}^n \vert x_i \geq 0, x^t B e_j \leq 1\} ;]" /></p>
<p style="text-align: center;"><img style="display: inline;" title="Q' = \{y \in \mathbb{R}^m \vert e_i^t A y \leq 1, y_j \geq 0\} " src="http://www.codecogs.com/gif.latex?Q%27%20=%20%5C%7By%20%5Cin%20%5Cmathbb%7BR%7D%5Em%20%5Cvert%20e_i%5Et%20A%20y%20%5Cleq%201,%20y_j%20%5Cgeq%200%5C%7D" alt="[;Q' = \{y \in \mathbb{R}^m \vert e_i^t A y \leq 1, y_j \geq 0\} ;]" /></p>
<p style="text-align: left;">Note that there is a clear bijection between <img src='http://s.wordpress.com/latex.php?latex=P%27%20%5Csetminus%200%20%5Cleftrightarrow%20P&#038;bg=T&#038;fg=000000&#038;s=0' alt='P&#039; \setminus 0 \leftrightarrow P' title='P&#039; \setminus 0 \leftrightarrow P' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=Q%27%20%5Csetminus%200%20%5Cleftrightarrow%20Q&#038;bg=T&#038;fg=000000&#038;s=0' alt='Q&#039; \setminus 0 \leftrightarrow Q' title='Q&#039; \setminus 0 \leftrightarrow Q' class='latex' />. This is a projective transformation given by <img src='http://s.wordpress.com/latex.php?latex=x%20%5Cmapsto%20%28%5Cfrac%7Bx%7D%7B%5CVert%20x%20%5CVert_1%7D%2C%5CVert%20x%20%5CVert_1%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='x \mapsto (\frac{x}{\Vert x \Vert_1},\Vert x \Vert_1)' title='x \mapsto (\frac{x}{\Vert x \Vert_1},\Vert x \Vert_1)' class='latex' />. Notice that the labels are preserved by this transformation and the vertex and edges of the polytope are mapped almost 1-1 (except the vertex <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' />). Notice a couple of details:</p>
<p style="text-align: left;"><strong>1.</strong> A vertex in <img src='http://s.wordpress.com/latex.php?latex=x%20%5Cin%20P%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='x \in P&#039;' title='x \in P&#039;' class='latex' /> corresponds to a point 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' /> labels. A vertex in <img src='http://s.wordpress.com/latex.php?latex=y%20%5Cin%20Q%27%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='y \in Q&#039;&#039;' title='y \in Q&#039;&#039;' class='latex' /> corresponds to a point with <img src='http://s.wordpress.com/latex.php?latex=m&#038;bg=T&#038;fg=000000&#038;s=0' alt='m' title='m' class='latex' /> labels.</p>
<p style="text-align: left;"><strong>2. </strong>The point <img src='http://s.wordpress.com/latex.php?latex=%280%2C0%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(0,0)' title='(0,0)' class='latex' /> corresponds to a fully-labeled point of <img src='http://s.wordpress.com/latex.php?latex=P%27%20%5Ctimes%20Q%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='P&#039; \times Q&#039;' title='P&#039; \times Q&#039;' class='latex' />, unfortunately this is the only fully-labeled point that doesn&#8217;t correspond to a Nash equilibrium.</p>
<p style="text-align: left;"><strong>3. </strong>By taking an edge of the polytope (which is define by <img src='http://s.wordpress.com/latex.php?latex=n-1&#038;bg=T&#038;fg=000000&#038;s=0' alt='n-1' title='n-1' class='latex' /> labels in <img src='http://s.wordpress.com/latex.php?latex=P%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='P&#039;' title='P&#039;' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=m-1&#038;bg=T&#038;fg=000000&#038;s=0' alt='m-1' title='m-1' class='latex' /> labels in <img src='http://s.wordpress.com/latex.php?latex=Q%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='Q&#039;' title='Q&#039;' class='latex' />. We can move between two nodes that are almost fully labeled.</p>
<p style="text-align: left;">The idea is to consider the set of nodes that are almost fully-labeled: fix some label <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' /> and consider all the nodes such that <img src='http://s.wordpress.com/latex.php?latex=L%28x%29%20%5Ccup%20L%28y%29%20%5Csupseteq%20%5C%7B1%20..%20k-1%2C%20k%2B1%20..%20n%2Bm%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='L(x) \cup L(y) \supseteq \{1 .. k-1, k+1 .. n+m\}' title='L(x) \cup L(y) \supseteq \{1 .. k-1, k+1 .. n+m\}' class='latex' />. Those points are either <img src='http://s.wordpress.com/latex.php?latex=%280%2C0%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(0,0)' title='(0,0)' class='latex' />, a Nash equilibrium or they have one duplicated label, since <img src='http://s.wordpress.com/latex.php?latex=%5Cvert%20L%28x%29%20%5Cvert%20%2B%20%5Cvert%20L%28y%29%20%5Cvert%20%3D%20n%2Bm&#038;bg=T&#038;fg=000000&#038;s=0' alt='\vert L(x) \vert + \vert L(y) \vert = n+m' title='\vert L(x) \vert + \vert L(y) \vert = n+m' class='latex' />. An edge is composed of <img src='http://s.wordpress.com/latex.php?latex=n%2Bm-1&#038;bg=T&#038;fg=000000&#038;s=0' alt='n+m-1' title='n+m-1' class='latex' /> labels (no duplicated labels). So, one almost fully-labeled point that is not a Nash or <img src='http://s.wordpress.com/latex.php?latex=%280%2C0%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(0,0)' title='(0,0)' class='latex' /> is only connected to two other vertices via an edge (which correspond to dropping one of the duplicated labels and following the corresponding edge).</p>
<p style="text-align: left;">This gives us a topology of the space of Nash equilibria. This tells us a couple of facts: (1) we can find a Nash equilibrium by starting in <img src='http://s.wordpress.com/latex.php?latex=%280%2C0%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='(0,0)' title='(0,0)' class='latex' /> and following the L-H path. In the end of the path, we must find a Nash equilibrium. (ii) If the polytope is not degenerate, then there is an odd number of Nash equilibria and they are connected by L-H edges in the following way:</p>
<p style="text-align: left;"><a rel="attachment wp-att-526" href="http://www.bigredbits.com/archives/491/lh_path"><img class="aligncenter size-full wp-image-526" title="LH_path" src="http://www.bigredbits.com/wp-content/uploads/2011/05/LH_path.png" alt="" width="330" height="244" /></a>where the blue dots are the Nash equilibria, the white dots are the almost fully-labeled points and the edges are the L-H edges. The number of Nash equilibria are odd by a simple parity argument.</p>
<p style="text-align: left;">The classic way in which simplex-like methods walk through the vertices of a polytope is by <a href="http://en.wikipedia.org/wiki/Pivot_element">pivoting</a>. The same way we can implement Lemke-Howson. For an explanation on the implementation, please look at the chapter 3 of the AGT book.</p>
<p style="text-align: left;">One can ask if we could modify the L-H path following to go through the path faster. Recently, <a href="http://arxiv.org/abs/1006.5352">Goldberg, Papadimitriou and Savani</a> proved that finding the Nash equilibrium that L-H outputs is <strong>PSPACE</strong>-complete. So, in principle, finding this specific equilibrium, seems harder than finding any Nash, which is PPAD-complete.</p>
<p style="text-align: left;">My current plan is on some other blog posts on Bimatrix games. I wanted to discuss two things: first the homotopy methods and homotopy fixed-point-theorems (which is the heart of the two papers mentioned above) and about new techniques for solving zero-matrix where the strategy space is exponential.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/491/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DP and the Erdős–Rényi model</title>
		<link>http://www.bigredbits.com/archives/443</link>
		<comments>http://www.bigredbits.com/archives/443#comments</comments>
		<pubDate>Mon, 16 May 2011 21:41:28 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=443</guid>
		<description><![CDATA[Yesterday I was in a pub with Vasilis Syrgkanis and Elisa Celis and we were discussing about how to calculate the expected size of a connected component in , the Erdős–Rényi model. is the classical random graph obtained by considering nodes and adding each edge independently with probability . A lot is known about its [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday I was in a pub with <a href="http://www.cs.cornell.edu/~vasilis/">Vasilis Syrgkanis</a> and <a href="http://www.cs.washington.edu/homes/ecelis/other.html">Elisa Celis</a> and we were discussing about how to calculate the expected size of a connected component in <img src='http://s.wordpress.com/latex.php?latex=G%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='G(n,p)' title='G(n,p)' class='latex' />, the <a href="http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model">Erdős–Rényi model</a>. <img src='http://s.wordpress.com/latex.php?latex=G%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='G(n,p)' title='G(n,p)' class='latex' /> is the classical random graph obtained by considering <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 and adding each 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' /> independently with probability <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' />. A lot is known about its properties, which very interestingly change qualitatively as the value of <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' /> changes relativeto <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' />. For example, for <img src='http://s.wordpress.com/latex.php?latex=p%20%3C%5Cfrac%7B1%7D%7Bn%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='p &lt;\frac{1}{n}' title='p &lt;\frac{1}{n}' class='latex' /> then there is no component greater than <img src='http://s.wordpress.com/latex.php?latex=O%28%5Clog%20n%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='O(\log n)' title='O(\log n)' class='latex' /> with high probability. When <img src='http://s.wordpress.com/latex.php?latex=p%20%3D%20%5Cfrac%7Bc%7D%7Bn%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='p = \frac{c}{n}' title='p = \frac{c}{n}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=c%3E1&#038;bg=T&#038;fg=000000&#038;s=0' alt='c&gt;1' title='c&gt;1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=n%20%5Crightarrow%20%5Cinfty&#038;bg=T&#038;fg=000000&#038;s=0' alt='n \rightarrow \infty' title='n \rightarrow \infty' class='latex' />, then the graph has a giant component. All those phenomena are very well studied in the context of probabilistic combinatorics and also in social networks. I remember learning about them in Jon Kleinberg&#8217;s <a href="http://www.cs.cornell.edu/Courses/cs6850/2011sp/">Structure of Information Networks</a> class.</p>
<p style="text-align: center;"><a rel="attachment wp-att-447" href="http://www.bigredbits.com/archives/443/pic1"><img class="aligncenter size-full wp-image-447" title="pic1" src="http://www.bigredbits.com/wp-content/uploads/2011/05/pic1.png" alt="" width="444" height="234" /></a></p>
<p>So, coming back to our conversation, we were thinking on how to calculate the size of a connected component. Fix some node <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=G%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='G(n,p)' title='G(n,p)' class='latex' /> &#8211; it doesn&#8217;t matter which node, since all nodes are equivalent before we start tossing the random coins. Now, let <img src='http://s.wordpress.com/latex.php?latex=C_u&#038;bg=T&#038;fg=000000&#038;s=0' alt='C_u' title='C_u' class='latex' /> be the size of the connected component of node <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' />. The question is how to calculate <img src='http://s.wordpress.com/latex.php?latex=C%28n%2Cp%29%20%3D%20%5Cmathbb%7BE%7D%20%5BC_u%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='C(n,p) = \mathbb{E} [C_u]' title='C(n,p) = \mathbb{E} [C_u]' class='latex' />.</p>
<p>Recently I&#8217;ve been learning MATLAB (actually, I am learning <a href="http://www.gnu.org/software/octave/">Octave</a>, but it is the same) and I am very amazed by it and impressed about why I haven&#8217;t learned it before. It is a programming language that somehow knows exactly how mathematicians think and the syntax is very intuitive. All the operations that you think of performing when doing mathematics, they have implemented. Not that you can&#8217;t do that in C++ or Python, in fact, I&#8217;ve been doing that all my life, but in Octave, things are so simple. So, I thought this was a nice opportunity for playing a bit with it.</p>
<p>We can calculate <img src='http://s.wordpress.com/latex.php?latex=C%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='C(n,p)' title='C(n,p)' class='latex' /> using a dynamic programming algorithm in time <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' /> &#8211; well, maybe we can do it more efficiently, but the DP I thought was the following: let&#8217;s calculate <img src='http://s.wordpress.com/latex.php?latex=%5Cmathcal%7BC%7D%28n%2Cs%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathcal{C}(n,s,p)' title='\mathcal{C}(n,s,p)' class='latex' /> where it is the expected size of the <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' />-connected component of a random graph 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' /> nodes where the edges between  <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> and other nodes have probability <img src='http://s.wordpress.com/latex.php?latex=p%27%20%3D%201%20-%20%281-p%29%5Es&#038;bg=T&#038;fg=000000&#038;s=0' alt='p&#039; = 1 - (1-p)^s' title='p&#039; = 1 - (1-p)^s' class='latex' /> and an edge between <img src='http://s.wordpress.com/latex.php?latex=v_1&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_1' title='v_1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=v_2&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_2' title='v_2' class='latex' /> have probability <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' />. What we want to compute is <img src='http://s.wordpress.com/latex.php?latex=C%28n%2Cp%29%20%3D%20%5Cmathcal%7BC%7D%28n%2C1%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='C(n,p) = \mathcal{C}(n,1,p)' title='C(n,p) = \mathcal{C}(n,1,p)' class='latex' />.</p>
<p style="text-align: left;"><a rel="attachment wp-att-454" href="http://www.bigredbits.com/archives/443/pic2"><img class="aligncenter size-full wp-image-454" title="pic2" src="http://www.bigredbits.com/wp-content/uploads/2011/05/pic2.png" alt="" width="338" height="187" /></a>What we can do is to use the <a href="http://en.wikipedia.org/wiki/Principle_of_deferred_decision">Principle of Deferred Decisions</a>,  and toss the coins for the <img src='http://s.wordpress.com/latex.php?latex=n-1&#038;bg=T&#038;fg=000000&#038;s=0' alt='n-1' title='n-1' class='latex' /> edges between <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> and the other nodes. With probability <img src='http://s.wordpress.com/latex.php?latex=bin%28k%2Cn%2Cp%27%29%20%3D%20%7Bn%20%5Cchoose%20k%7D%20%28p%27%29%5Ek%20%281-%27p%29%5E%7Bn-k%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='bin(k,n,p&#039;) = {n \choose k} (p&#039;)^k (1-&#039;p)^{n-k}' title='bin(k,n,p&#039;) = {n \choose k} (p&#039;)^k (1-&#039;p)^{n-k}' class='latex' />, there are <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' /> edges between <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> and the other nodes, say nodes <img src='http://s.wordpress.com/latex.php?latex=w_1%2C%20%5Chdots%2C%20w_k&#038;bg=T&#038;fg=000000&#038;s=0' alt='w_1, \hdots, w_k' title='w_1, \hdots, w_k' class='latex' />. If we collapse those nodes to <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> we end up with a graph of <img src='http://s.wordpress.com/latex.php?latex=n-k&#038;bg=T&#038;fg=000000&#038;s=0' alt='n-k' title='n-k' class='latex' /> nodes and the problem is equivalent to <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' /> plus the size of the connected component of <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> in the collapsed graph.</p>
<p style="text-align: left;"><a rel="attachment wp-att-462" href="http://www.bigredbits.com/archives/443/pic3"><img class="aligncenter size-full wp-image-462" title="pic3" src="http://www.bigredbits.com/wp-content/uploads/2011/05/pic3.png" alt="" width="489" height="238" /></a>One difference, however is that the probability that the collapsed node <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=T&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> is connected to a node <img src='http://s.wordpress.com/latex.php?latex=v&#038;bg=T&#038;fg=000000&#038;s=0' alt='v' title='v' class='latex' /> of the <img src='http://s.wordpress.com/latex.php?latex=n-1-k&#038;bg=T&#038;fg=000000&#038;s=0' alt='n-1-k' title='n-1-k' class='latex' /> nodes is the probability that at least one of <img src='http://s.wordpress.com/latex.php?latex=w_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='w_i' title='w_i' class='latex' /> is connected to <img src='http://s.wordpress.com/latex.php?latex=v&#038;bg=T&#038;fg=000000&#038;s=0' alt='v' title='v' class='latex' />, which is <img src='http://s.wordpress.com/latex.php?latex=1-%281-p%29%5Ek&#038;bg=T&#038;fg=000000&#038;s=0' alt='1-(1-p)^k' title='1-(1-p)^k' class='latex' />. In this way, we can write:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cmathcal%7BC%7D%28n%2Cs%2Cp%29%20%3D%201%20%5Ccdot%20bin%280%2Cn-1%2Cp%27%29%20%2B%20%5Csum_%7Bk%3D1%7D%5E%7Bn-1%7D%20bin%28k%2Cn-1%2Cp%27%29%20%5B%20k%20%2B%20%20%5Cmathcal%7BC%7D%28n-k%2Ck%2Cp%29%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mathcal{C}(n,s,p) = 1 \cdot bin(0,n-1,p&#039;) + \sum_{k=1}^{n-1} bin(k,n-1,p&#039;) [ k +  \mathcal{C}(n-k,k,p)]' title='\mathcal{C}(n,s,p) = 1 \cdot bin(0,n-1,p&#039;) + \sum_{k=1}^{n-1} bin(k,n-1,p&#039;) [ k +  \mathcal{C}(n-k,k,p)]' class='latex' /></p>
<p style="text-align: left;">where <img src='http://s.wordpress.com/latex.php?latex=p%27%20%3D%201-%281-p%29%5Es&#038;bg=T&#038;fg=000000&#038;s=0' alt='p&#039; = 1-(1-p)^s' title='p&#039; = 1-(1-p)^s' class='latex' />. Now, we can calculate <img src='http://s.wordpress.com/latex.php?latex=C%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='C(n,p)' title='C(n,p)' class='latex' /> by using DP, simply by filling an <img src='http://s.wordpress.com/latex.php?latex=n%20%5Ctimes%20n&#038;bg=T&#038;fg=000000&#038;s=0' alt='n \times n' title='n \times n' class='latex' /> table. In Octave, we can do it this way:</p>
<pre><code>
<strong>function</strong> component = C(N,p)
  C_table = zeros(N,N);
  <strong>for</strong> n = 1:N <strong>for</strong> s =1:N
    C_table(n,s) = binopdf(0,n-1,1-((1-p)^s)) ;
    <strong>for</strong> k = 1:n-1
      C_table(n,s) += binopdf(k,n-1,1-((1-p)^s)) * (k + C_table(n-k,k));
    <strong>end</strong>
  <strong>end end</strong>
  component = C_table(N,1);
<strong>endfunction</strong>
</code>
</pre>
<p style="text-align: left;">And in fact we can call <img src='http://s.wordpress.com/latex.php?latex=C%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='C(n,p)' title='C(n,p)' class='latex' /> for say <img src='http://s.wordpress.com/latex.php?latex=n%20%3D%20200&#038;bg=T&#038;fg=000000&#038;s=0' alt='n = 200' title='n = 200' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=p%20%3D%200.01%20..%200.3&#038;bg=T&#038;fg=000000&#038;s=0' alt='p = 0.01 .. 0.3' title='p = 0.01 .. 0.3' class='latex' /> and see how <img src='http://s.wordpress.com/latex.php?latex=C%28n%2Cp%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='C(n,p)' title='C(n,p)' class='latex' /> varies. This allows us, for example, to observe the sharp transition that happens before the giant component is formed. The plot we get is:</p>
<p style="text-align: left;"><a rel="attachment wp-att-481" href="http://www.bigredbits.com/archives/443/component_size"><a rel="attachment wp-att-484" href="http://www.bigredbits.com/archives/443/pic4"><img class="aligncenter size-full wp-image-484" title="pic4" src="http://www.bigredbits.com/wp-content/uploads/2011/05/pic4.png" alt="" width="233" height="279" /></a><br />
</a></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">
<h1 id="firstHeading" class="firstHeading">Erdős–Rényi model</h1>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/443/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reasoning about Knowledge</title>
		<link>http://www.bigredbits.com/archives/382</link>
		<comments>http://www.bigredbits.com/archives/382#comments</comments>
		<pubDate>Sat, 16 Apr 2011 20:52:42 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[knowledge]]></category>
		<category><![CDATA[logic]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=382</guid>
		<description><![CDATA[Last week, I went to Petra in Jordan together with Vasilis Syrgkanis and in the road we kept discussing about the Blue-Eyed Islanders Puzzle, posted by Terry Tao on his blog. It is a nice puzzle because it allows us to reflect on how to think about knowledge and how to make statements like &#8220;A [...]]]></description>
				<content:encoded><![CDATA[<p>Last week, I went to Petra in Jordan together with <a href="http://www.cs.cornell.edu/~vasilis/">Vasilis Syrgkanis</a> and in the road we kept discussing about the <a href="http://terrytao.wordpress.com/2011/04/07/the-blue-eyed-islanders-puzzle-repost/">Blue-Eyed Islanders Puzzle</a>, posted by Terry Tao on his blog. It is a nice puzzle because it allows us to reflect on how to think about knowledge and how to make statements like &#8220;A knows that B knows that C doesn&#8217;t know fact F&#8221;. My goal in this post is not to discuss about the <a href="http://terrytao.wordpress.com/2011/04/07/the-blue-eyed-islanders-puzzle-repost/">puzzle</a> itself, but about a framework that allows us to think about it in a structured way. Nevertheless, I strongly recommend the puzzle, first because it is a lot of fun, and second, because it gives a great non-trivial example to think about this kind of thing. But first, a photo from Petra:</p>
<p><a rel="attachment wp-att-383" href="http://www.bigredbits.com/archives/382/img_20110409_142559"><img class="aligncenter size-large wp-image-383" title="IMG_20110409_142559" src="http://www.bigredbits.com/wp-content/uploads/2011/04/IMG_20110409_142559-1024x768.jpg" alt="" width="636" height="476" /></a></p>
<p>And then some references:</p>
<ul>
<li>Classic: &#8220;<a href="http://www.ma.huji.ac.il/raumann/pdf/Agreeing%20to%20Disagree.pdf">Agreeing to Disagree</a>&#8221; (Robert Aumann)</li>
<li>Survey:  &#8220;<a href="http://cowles.econ.yale.edu/~gean/art/p0882.pdf">Common Knowledge</a>&#8221; (John Geanakoplos)</li>
<li>Book: &#8220;<a href="http://www.amazon.com/Reasoning-About-Knowledge-Ronald-Fagin/dp/0262562006/ref=sr_1_1?ie=UTF8&amp;qid=1302982140&amp;sr=8-1">Reasoning about Knowledge</a>&#8221; (Fagin, Halpern, Moses, Vardi)</li>
</ul>
<p>I first read Aumann&#8217;s classic, which is a very beautiful and short paper &#8212; but where I got most intuition (and fun) was reading Chapter 2 of Reasoning About Knowledge.  So, I&#8217;ll show here something in between of what Chapter 2 presents and what Geanakoplos&#8217; survey presents (which is also an amazing source).</p>
<p>We want to reason about the world and the first thing we need is a set <img src='http://s.wordpress.com/latex.php?latex=%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Omega' title='\Omega' class='latex' /> representing all possible states the world can take. Each <img src='http://s.wordpress.com/latex.php?latex=%5Comega%20%5Cin%20%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega \in \Omega' title='\omega \in \Omega' class='latex' /> is called a state of the world and completely described the world we are trying to reason about. To illustrate the example, consider the situation where there are <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' /> people in a room and each person has a number <img src='http://s.wordpress.com/latex.php?latex=x_i%20%5Cin%20%5C%7B0%2C1%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='x_i \in \{0,1\}' title='x_i \in \{0,1\}' class='latex' /> in his head. Person <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' /> can see the number of everyone else, except his. We want to reason about this situation, so a good way to describe the world is to simply define <img src='http://s.wordpress.com/latex.php?latex=%5COmega%20%3D%20%5C%7B0%2C1%5C%7D%5En&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Omega = \{0,1\}^n' title='\Omega = \{0,1\}^n' class='latex' /> of all <img src='http://s.wordpress.com/latex.php?latex=0%2C1&#038;bg=T&#038;fg=000000&#038;s=0' alt='0,1' title='0,1' class='latex' />-strings. We define an event to be simply a subset of the possible states of the world, i.e., some set <img src='http://s.wordpress.com/latex.php?latex=E%20%5Csubseteq%20%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='E \subseteq \Omega' title='E \subseteq \Omega' class='latex' />. For example, the even that 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' /> has number <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' /> in his head is simply: <img src='http://s.wordpress.com/latex.php?latex=E%20%3D%20%5C%7B%20x%20%5Cin%20%5COmega%3B%20x_1%20%3D%200%20%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='E = \{ x \in \Omega; x_1 = 0 \}' title='E = \{ x \in \Omega; x_1 = 0 \}' class='latex' />. We could also think about the event <img src='http://s.wordpress.com/latex.php?latex=E%27&#038;bg=T&#038;fg=000000&#038;s=0' alt='E&#039;' title='E&#039;' class='latex' /> that the sum of the numbers is odd, which would be: <img src='http://s.wordpress.com/latex.php?latex=E%27%20%3D%20%5C%7B%20x%20%5Cin%20%5COmega%3B%20%5Csum_i%20x_i%20%5Ctext%7B%20mod%20%7D%202%20%3D%201%20%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='E&#039; = \{ x \in \Omega; \sum_i x_i \text{ mod } 2 = 1 \}' title='E&#039; = \{ x \in \Omega; \sum_i x_i \text{ mod } 2 = 1 \}' class='latex' />. Now, we need to define what it means for some person to know some event.</p>
<p>For each person <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' />, his knowledge structure is defined by a partition <img src='http://s.wordpress.com/latex.php?latex=P_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i' title='P_i' class='latex' /> of  <img src='http://s.wordpress.com/latex.php?latex=%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Omega' title='\Omega' class='latex' />. The rough intuition is that 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' /> is unable to distinguish two elements <img src='http://s.wordpress.com/latex.php?latex=%5Comega_1%2C%20%5Comega_2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega_1, \omega_2' title='\omega_1, \omega_2' class='latex' /> in the same cell of partition <img src='http://s.wordpress.com/latex.php?latex=P_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i' title='P_i' class='latex' />. For each <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=P_i%28%5Comega%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i(\omega)' title='P_i(\omega)' class='latex' /> is the cell of partition <img src='http://s.wordpress.com/latex.php?latex=P_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i' title='P_i' class='latex' /> containing <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' /> . The way I see knowledge representation is that if <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' /> is the true state of the world, then person <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 that the true state of the world is some element in <img src='http://s.wordpress.com/latex.php?latex=P_i%28%5Comega%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i(\omega)' title='P_i(\omega)' class='latex' />.</p>
<blockquote><p><strong>Definition:</strong> We say that person <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 event <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' /> on the state of the world <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' /> is <img src='http://s.wordpress.com/latex.php?latex=P_i%28%5Comega%29%20%5Csubseteq%20E&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i(\omega) \subseteq E' title='P_i(\omega) \subseteq E' class='latex' />. Therefore, if person <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 event <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' />, the world must be in some state <img src='http://s.wordpress.com/latex.php?latex=K_i%28E%29%20%3A%3D%20%5C%7B%5Comega%20%5Cin%20%5COmega%3B%20P_i%28%5Comega%29%20%5Csubseteq%20E%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i(E) := \{\omega \in \Omega; P_i(\omega) \subseteq E\}' title='K_i(E) := \{\omega \in \Omega; P_i(\omega) \subseteq E\}' class='latex' />.</p></blockquote>
<p>Above we define the knowledge operator <img src='http://s.wordpress.com/latex.php?latex=K_i%28%5Ccdot%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i(\cdot)' title='K_i(\cdot)' class='latex' />. Below, there is a picture in which we represent its action:</p>
<p><a rel="attachment wp-att-414" href="http://www.bigredbits.com/archives/382/knowledge_operator"><img class="aligncenter size-full wp-image-414" title="knowledge_operator" src="http://www.bigredbits.com/wp-content/uploads/2011/04/knowledge_operator.png" alt="" width="613" height="226" /></a>Now, this allows us to represent the fact that person <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' /> knows that person <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' /> knows of event <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' /> as the event <img src='http://s.wordpress.com/latex.php?latex=K_1%28K_2%28E%29%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_1(K_2(E))' title='K_1(K_2(E))' class='latex' />. Now, the fact the person <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' /> knows that person <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' /> doesn&#8217;t know that person <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' /> knows event <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' /> can be represented as: <img src='http://s.wordpress.com/latex.php?latex=K_1%28%5Cneg%20K_2%28K_1%28E%29%29%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_1(\neg K_2(K_1(E)))' title='K_1(\neg K_2(K_1(E)))' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=%5Cneg%20E%20%3A%3D%20%5COmega%20%5Csetminus%20E&#038;bg=T&#038;fg=000000&#038;s=0' alt='\neg E := \Omega \setminus E' title='\neg E := \Omega \setminus E' class='latex' />.</p>
<p>An equivalent and axiomatic way of defining the knowledge operator is by defining it as an operator <img src='http://s.wordpress.com/latex.php?latex=K_i%3A%202%5E%5COmega%20%5Crightarrow%202%5E%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i: 2^\Omega \rightarrow 2^\Omega' title='K_i: 2^\Omega \rightarrow 2^\Omega' class='latex' /> such that:</p>
<ol>
<li><img src='http://s.wordpress.com/latex.php?latex=K_i%28%5COmega%29%20%3D%20%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i(\Omega) = \Omega' title='K_i(\Omega) = \Omega' class='latex' /></li>
<li><img src='http://s.wordpress.com/latex.php?latex=K_i%28A%29%20%5Ccap%20K_i%28B%29%20%3D%20K_i%28A%20%5Ccap%20B%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i(A) \cap K_i(B) = K_i(A \cap B)' title='K_i(A) \cap K_i(B) = K_i(A \cap B)' class='latex' /></li>
<li><img src='http://s.wordpress.com/latex.php?latex=K_i%28A%29%20%5Csubseteq%20A&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i(A) \subseteq A' title='K_i(A) \subseteq A' class='latex' /></li>
<li><img src='http://s.wordpress.com/latex.php?latex=K_i%28K_i%28A%29%29%20%3D%20K_i%28A%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='K_i(K_i(A)) = K_i(A)' title='K_i(K_i(A)) = K_i(A)' class='latex' /></li>
<li><img src='http://s.wordpress.com/latex.php?latex=%5Cneg%20K_i%28A%29%20%3D%20K_i%28%5Cneg%20K_i%28A%29%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\neg K_i(A) = K_i(\neg K_i(A))' title='\neg K_i(A) = K_i(\neg K_i(A))' class='latex' /></li>
</ol>
<p>Notice that axioms 1-4 define exactly a <a href="http://en.wikipedia.org/wiki/Topological_space">topology</a> and together with 5 it is a topology that is closed under complement. The last two properties are more interesting: they say that if 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 something, then he knows that he knows and if the doesn&#8217;t know something, he knows that he doesn&#8217;t know. Aumann goes ahead and defines the notion of common knowledge:</p>
<blockquote><p><strong>Definition:</strong> We say that an event <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' /> is common knowledge at <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' /> if for any <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' /> and for any sequence <img src='http://s.wordpress.com/latex.php?latex=i%281%29%2C%20%5Chdots%2C%20i%28k%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='i(1), \hdots, i(k)' title='i(1), \hdots, i(k)' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=i%28j%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='i(j)' title='i(j)' class='latex' /> are players, then <img src='http://s.wordpress.com/latex.php?latex=%5Comega%20%5Cin%20K_%7Bi%281%29%7D%20K_%7Bi%282%29%7D%20%5Chdots%20K_%7Bi%28k%29%7D%20E&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega \in K_{i(1)} K_{i(2)} \hdots K_{i(k)} E' title='\omega \in K_{i(1)} K_{i(2)} \hdots K_{i(k)} E' class='latex' />.</p></blockquote>
<p>Suppose that <img src='http://s.wordpress.com/latex.php?latex=P%27%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='P&#039; ' title='P&#039; ' class='latex' /> is a partition that is a simultaneous coarsening of <img src='http://s.wordpress.com/latex.php?latex=P_1%2C%20%5Chdots%2C%20P_k&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_1, \hdots, P_k' title='P_1, \hdots, P_k' class='latex' />, then for all cells <img src='http://s.wordpress.com/latex.php?latex=C&#038;bg=T&#038;fg=000000&#038;s=0' alt='C' title='C' class='latex' /> of this partition, either <img src='http://s.wordpress.com/latex.php?latex=C&#038;bg=T&#038;fg=000000&#038;s=0' alt='C' title='C' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=%5Cneg%20C&#038;bg=T&#038;fg=000000&#038;s=0' alt='\neg C' title='\neg C' class='latex' /> is common knowledge.</p>
<p>An alternative representation is to represent $\Omega$ as nodes in a graph and add an edge between <img src='http://s.wordpress.com/latex.php?latex=%5Comega_1&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega_1' title='\omega_1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Comega_2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega_2' title='\omega_2' class='latex' /> labeled with <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' /> if they are in the same cell of <img src='http://s.wordpress.com/latex.php?latex=P_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i' title='P_i' class='latex' />. Now, given the true state of the world <img src='http://s.wordpress.com/latex.php?latex=%5Comega%20%5Cin%20%5COmega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega \in \Omega' title='\omega \in \Omega' class='latex' />, one can easily calculate the smallest event <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' /> such that <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=E&#038;bg=T&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' />: this is exactly the states that are reached from <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' /> just following edges labeled with <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' />, which is easily recognizable as <img src='http://s.wordpress.com/latex.php?latex=P_i%28%5Comega%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='P_i(\omega)' title='P_i(\omega)' class='latex' />.</p>
<p>Now, what is the smallest set that <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' /> knows that <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' /> knows ? Those are the elements that we can arrive from a path following first an edge labeled <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 then an edge labeled <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' />. Extending this reasoning, it is easy to see that the smallest set that is common knowledge at <img src='http://s.wordpress.com/latex.php?latex=%5Comega&#038;bg=T&#038;fg=000000&#038;s=0' alt='\omega' title='\omega' class='latex' /> are all the elements reachable from some path in this graph.</p>
<p>More about knowledge representation and reasoning about knowledge in future posts. In any case, I can&#8217;t recommend enough the references above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/382/feed</wfw:commentRss>
		<slash:comments>2</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>Submodular Allocation Problem</title>
		<link>http://www.bigredbits.com/archives/293</link>
		<comments>http://www.bigredbits.com/archives/293#comments</comments>
		<pubDate>Wed, 06 Apr 2011 21:18:55 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[submodular]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=293</guid>
		<description><![CDATA[I am in Israel for the Algorithmic Game Theory Semester in the Center for the Study of Rationality. It is great to both explore Jerusalem and learn about games and algorithms. I think it is a great opportunity to start blogging again. To start, I decided to write about simple and beautiful algorithm by Lehman, [...]]]></description>
				<content:encoded><![CDATA[<p>I am in Israel for the Algorithmic Game Theory Semester in the <a href="http://www.ratio.huji.ac.il/">Center for the Study of Rationality</a>. It is great to both explore Jerusalem and learn about games and algorithms. I think it is a great opportunity to start blogging again. To start, I decided to write about simple and beautiful algorithm by <a href="http://www.cs.huji.ac.il/~noam/submodular.pdf">Lehman, Lehman and Nisan</a> on the allocation problem when players have submodular valuations.</p>
<p><a rel="attachment wp-att-298" href="http://www.bigredbits.com/archives/293/img_20110402_183321"></a><a rel="attachment wp-att-315" href="http://www.bigredbits.com/archives/293/img_20110402_183321-2"><img class="aligncenter size-large wp-image-315" title="IMG_20110402_183321" src="http://www.bigredbits.com/wp-content/uploads/2011/04/IMG_20110402_1833211-1024x768.jpg" alt="" width="514" height="384" /></a></p>
<p>Consider a set of <img src='http://s.wordpress.com/latex.php?latex=m&#038;bg=T&#038;fg=000000&#038;s=0' alt='m' title='m' class='latex' /> items and <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' /> agents. Each agent has a monotone <a href="http://en.wikipedia.org/wiki/Submodular">submodular</a> <img src='http://s.wordpress.com/latex.php?latex=v_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_i' title='v_i' class='latex' /> valuation over the items,  i.e., <img src='http://s.wordpress.com/latex.php?latex=v_i%3A2%5E%7B%5Bm%5D%7D%20%5Crightarrow%20%5Cmathbb%7BR%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_i:2^{[m]} \rightarrow \mathbb{R}' title='v_i:2^{[m]} \rightarrow \mathbb{R}' class='latex' /> s.t. <img src='http://s.wordpress.com/latex.php?latex=v_i%28S%29%20%2B%20v_i%28T%29%20%5Cgeq%20v_i%28S%20%5Ccap%20T%29%20%2B%20v_i%28S%20%5Ccup%20T%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_i(S) + v_i(T) \geq v_i(S \cap T) + v_i(S \cup T)' title='v_i(S) + v_i(T) \geq v_i(S \cap T) + v_i(S \cup T)' class='latex' /> for any subsets <img src='http://s.wordpress.com/latex.php?latex=S%2CT&#038;bg=T&#038;fg=000000&#038;s=0' alt='S,T' title='S,T' class='latex' /> of <img src='http://s.wordpress.com/latex.php?latex=%5Bm%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='[m]' title='[m]' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=f%28S%29%20%5Cleq%20f%28T%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='f(S) \leq f(T)' title='f(S) \leq f(T)' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=S%20%5Csubseteq&#038;bg=T&#038;fg=000000&#038;s=0' alt='S \subseteq' title='S \subseteq' class='latex' /> T. Now, the goal is to partition the items in <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' /> sets <img src='http://s.wordpress.com/latex.php?latex=S_1%2C%20%5Chdots%2C%20S_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='S_1, \hdots, S_n' title='S_1, \hdots, S_n' class='latex' /> in order to maximize <img src='http://s.wordpress.com/latex.php?latex=%5Csum_i%20v_i%28S_i%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sum_i v_i(S_i)' title='\sum_i v_i(S_i)' class='latex' />.</p>
<p style="text-align: center;">
<p>This problem is clearly NP-hard (for example, we can reduce from Maximum Coverage or any similar problem), but is has a very simples Greedy Approximation. The approximation goes as follows: start with all sets being empty, i.e., start with <img src='http://s.wordpress.com/latex.php?latex=S_i%20%3D%20%5Cemptyset%2C%20%5Cforall%20i&#038;bg=T&#038;fg=000000&#038;s=0' alt='S_i = \emptyset, \forall i' title='S_i = \emptyset, \forall i' class='latex' /> then for each item <img src='http://s.wordpress.com/latex.php?latex=j&#038;bg=T&#038;fg=000000&#038;s=0' alt='j' title='j' class='latex' />, find the 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' /> with maximum <img src='http://s.wordpress.com/latex.php?latex=v_i%28j%20%5Cvert%20S_i%29%20%3D%20v_i%28S_i%20%5Ccup%20%5C%7Bj%5C%7D%29%20-%20v_i%28S_i%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_i(j \vert S_i) = v_i(S_i \cup \{j\}) - v_i(S_i)' title='v_i(j \vert S_i) = v_i(S_i \cup \{j\}) - v_i(S_i)' class='latex' /> and add <img src='http://s.wordpress.com/latex.php?latex=j&#038;bg=T&#038;fg=000000&#038;s=0' alt='j' title='j' class='latex' /> to this player. This is a <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' />-approximation algorithm. The proof is simple:</p>
<p>Let <img src='http://s.wordpress.com/latex.php?latex=S_1%2C%20%5Chdots%2C%20S_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='S_1, \hdots, S_n' title='S_1, \hdots, S_n' class='latex' /> be the sets returned by the algorithm and <img src='http://s.wordpress.com/latex.php?latex=O_1%2C%20%5Chdots%2C%20O_n&#038;bg=T&#038;fg=000000&#038;s=0' alt='O_1, \hdots, O_n' title='O_1, \hdots, O_n' class='latex' /> the optimal solution. Let also <img src='http://s.wordpress.com/latex.php?latex=S_i%5E%7B%3Cj%7D%20%3D%20S_i%20%5Ccap%20%5C%7B1%2C%202%2C%20%5Chdots%2C%20j-1%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='S_i^{&lt;j} = S_i \cap \{1, 2, \hdots, j-1\}' title='S_i^{&lt;j} = S_i \cap \{1, 2, \hdots, j-1\}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=O_i%5E%7B%3Cj%7D%20%3D%20O_i%20%5Ccap%20%5C%7B1%2C%202%2C%20%5Chdots%2C%20j-1%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='O_i^{&lt;j} = O_i \cap \{1, 2, \hdots, j-1\}' title='O_i^{&lt;j} = O_i \cap \{1, 2, \hdots, j-1\}' class='latex' />. We can write:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Csum_i%20v_i%28S_i%29%20%3D%20%5Csum_i%20%5Csum_%7Bj%20%5Cin%20S_i%7D%20v_i%28j%20%5Cvert%20S_i%5E%7B%3Cj%7D%29%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sum_i v_i(S_i) = \sum_i \sum_{j \in S_i} v_i(j \vert S_i^{&lt;j}) ' title='\sum_i v_i(S_i) = \sum_i \sum_{j \in S_i} v_i(j \vert S_i^{&lt;j}) ' class='latex' /></p>
<p style="text-align: left;">if we added <img src='http://s.wordpress.com/latex.php?latex=j&#038;bg=T&#038;fg=000000&#038;s=0' alt='j' title='j' class='latex' /> to set <img src='http://s.wordpress.com/latex.php?latex=S_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='S_i' title='S_i' class='latex' /> it means that <img src='http://s.wordpress.com/latex.php?latex=v_i%28j%20%5Cvert%20S_i%5E%7B%3Cj%7D%29%20%5Cgeq%20v_k%28j%20%5Cvert%20S_k%5E%7B%3Cj%7D%29%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='v_i(j \vert S_i^{&lt;j}) \geq v_k(j \vert S_k^{&lt;j}) ' title='v_i(j \vert S_i^{&lt;j}) \geq v_k(j \vert S_k^{&lt;j}) ' class='latex' /> by the Greedy rule. Therefore we can write:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Csum_i%20v_i%28S_i%29%20%5Cgeq%20%5Csum_k%20%5Csum_%7Bj%20%5Cin%20O_k%7D%20v_k%28j%20%5Cvert%20S_k%5E%7B%3Cj%7D%29%20%5Cgeq%20%5Csum_k%20%5Csum_%7Bj%20%5Cin%20O_k%7D%20v_k%28j%20%5Cvert%20S_k%5E%7B%3Cj%7D%20%5Ccup%20O_k%5E%7B%3Cj%7D%29%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\sum_i v_i(S_i) \geq \sum_k \sum_{j \in O_k} v_k(j \vert S_k^{&lt;j}) \geq \sum_k \sum_{j \in O_k} v_k(j \vert S_k^{&lt;j} \cup O_k^{&lt;j}) ' title='\sum_i v_i(S_i) \geq \sum_k \sum_{j \in O_k} v_k(j \vert S_k^{&lt;j}) \geq \sum_k \sum_{j \in O_k} v_k(j \vert S_k^{&lt;j} \cup O_k^{&lt;j}) ' class='latex' /></p>
<p style="text-align: left;">where the first inequality follows from the Greedy rule and the second follows from submodularity. Now, we can simply write:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cbegin%7Baligned%7D%20%5Csum_i%20v_i%28S_i%29%20%26%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_i%20%5Csum_%7Bj%20%5Cin%20S_i%7D%20v_i%28j%20%5Cvert%20S_i%5E%7B%3Cj%7D%29%20%2B%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_k%20%5Csum_%7Bj%20%5Cin%20O_k%7D%20%20v_k%28j%20%5Cvert%20S_k%5E%7B%3Cj%7D%20%5Ccup%20O_k%5E%7B%3Cj%7D%29%20%5C%5C%20%26%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_i%20%5Csum_%7Bj%20%5Cin%20S_i%7D%20v_i%28j%20%5Cvert%20S_i%5E%7B%3Cj%7D%20%20%5Ccup%20O_i%5E%7B%3Cj%7D%29%20%2B%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_k%20%5Csum_%7Bj%20%5Cin%20O_k%7D%20%20v_k%28j%20%5Cvert%20%20S_k%5E%7B%3Cj%7D%20%5Ccup%20O_k%5E%7B%3Cj%7D%29%20%5C%5C%20%26%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_i%20%5Csum_%7Bj%20%5Cin%20S_i%20%5Ccup%20O_i%7D%20v_i%28j%20%5Cvert%20S_i%5E%7B%3Cj%7D%20%5Ccup%20O_i%5E%7B%3Cj%7D%29%20%5C%5C%20%26%20%3D%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_i%20v_i%28S_i%20%5Ccup%20O_i%29%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%20%5Csum_i%20v_i%28O_i%29%20%5Cend%7Baligned%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\begin{aligned} \sum_i v_i(S_i) &amp; \geq \frac{1}{2} \sum_i \sum_{j \in S_i} v_i(j \vert S_i^{&lt;j}) + \frac{1}{2} \sum_k \sum_{j \in O_k}  v_k(j \vert S_k^{&lt;j} \cup O_k^{&lt;j}) \\ &amp; \geq \frac{1}{2} \sum_i \sum_{j \in S_i} v_i(j \vert S_i^{&lt;j}  \cup O_i^{&lt;j}) + \frac{1}{2} \sum_k \sum_{j \in O_k}  v_k(j \vert  S_k^{&lt;j} \cup O_k^{&lt;j}) \\ &amp; \geq \frac{1}{2} \sum_i \sum_{j \in S_i \cup O_i} v_i(j \vert S_i^{&lt;j} \cup O_i^{&lt;j}) \\ &amp; = \frac{1}{2} \sum_i v_i(S_i \cup O_i) \geq \frac{1}{2} \sum_i v_i(O_i) \end{aligned}' title='\begin{aligned} \sum_i v_i(S_i) &amp; \geq \frac{1}{2} \sum_i \sum_{j \in S_i} v_i(j \vert S_i^{&lt;j}) + \frac{1}{2} \sum_k \sum_{j \in O_k}  v_k(j \vert S_k^{&lt;j} \cup O_k^{&lt;j}) \\ &amp; \geq \frac{1}{2} \sum_i \sum_{j \in S_i} v_i(j \vert S_i^{&lt;j}  \cup O_i^{&lt;j}) + \frac{1}{2} \sum_k \sum_{j \in O_k}  v_k(j \vert  S_k^{&lt;j} \cup O_k^{&lt;j}) \\ &amp; \geq \frac{1}{2} \sum_i \sum_{j \in S_i \cup O_i} v_i(j \vert S_i^{&lt;j} \cup O_i^{&lt;j}) \\ &amp; = \frac{1}{2} \sum_i v_i(S_i \cup O_i) \geq \frac{1}{2} \sum_i v_i(O_i) \end{aligned}' class='latex' /></p>
<p style="text-align: left;">An improved algorithm was given by <a href="http://sites.google.com/site/dobzin/papers/xos.ps?attredirects=0">Dobzinski and Shapira</a> achieving an <img src='http://s.wordpress.com/latex.php?latex=1%20-%5Cfrac%7B1%7D%7Be%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='1 -\frac{1}{e}' title='1 -\frac{1}{e}' class='latex' /> approximation using demand queries &#8211; that are used as a separation oracle for a suitable linear program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/293/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Erlang or Stackless Python</title>
		<link>http://www.bigredbits.com/archives/286</link>
		<comments>http://www.bigredbits.com/archives/286#comments</comments>
		<pubDate>Mon, 31 May 2010 23:33:36 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Systems]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=286</guid>
		<description><![CDATA[I recently wrote a simple, event-driven, simulation framework to allow me to quickly prototype and test distributed protocols. Unfortunately it did not scale in the number of messages simulated. So I am planning to re-implement it. To keep with the spirit of rapid prototyping, I want to use a dynamically typed language. My final two [...]]]></description>
				<content:encoded><![CDATA[<p>I recently wrote a simple, event-driven, simulation framework to allow me to quickly prototype and test distributed protocols. Unfortunately it did not scale in the number of messages simulated. So I am planning to re-implement it.</p>
<p>To keep with the spirit of rapid prototyping, I want to use a dynamically typed language. My final two candidates are <a href="http://www.erlang.org/">Erlang</a> and <a href="http://www.stackless.com/">Stackless Python</a> (or rather <a href="http://codespeak.net/pypy/dist/pypy/doc/stackless.html">PyPy</a>). There certainly is a lot of buzz around Erlang these days: My advisor is very enthusiastic about it, and after reading through the tutorial and dummy protocols, I can see why. On the other hand, Stackless Python has the familiar syntax and the huge library of modules.</p>
<p>I read through many posts comparing the two and I finally decided to stick with Python for now. I will code up the framework (hopefully this week) and report back on my findings. However, I am personally still interested in coding something in Erlang, so who knows <img src='http://www.bigredbits.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/286/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>Walrasian Equilibrium I</title>
		<link>http://www.bigredbits.com/archives/274</link>
		<comments>http://www.bigredbits.com/archives/274#comments</comments>
		<pubDate>Tue, 16 Feb 2010 04:32:53 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[equilibrium theory]]></category>
		<category><![CDATA[game theory]]></category>
		<category><![CDATA[market design]]></category>
		<category><![CDATA[microeconomics]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=274</guid>
		<description><![CDATA[Currently I&#8217;ve been trying to understand more about the dynamics of markets and basic concepts of microeconomic theory and, as always, writing a blog post will help me to keep my ideas clear. First, why are markets interesting from a computer scientist/mathematician point of view? Markets are multi-objective optimization problems: one can think of the [...]]]></description>
				<content:encoded><![CDATA[<p>Currently I&#8217;ve been trying to understand more about the dynamics of markets and basic concepts of <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Microeconomic">microeconomic theory</a> and, as always, writing a blog post will help me to keep my ideas clear. First, why are markets interesting from a computer scientist/mathematician point of view?</p>
<ul>
<li> Markets are multi-objective optimization problems: one can think of the possible state of a market some point in a space of possible <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%3D%20%28x_1%2C%20%5Chdots%2C%20x_N%29%20%5Cin%20%5COmega%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x = (x_1, \hdots, x_N) \in \Omega}' title='{x = (x_1, \hdots, x_N) \in \Omega}' class='latex' />. Each player of the market controls one variable, say <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i}' title='{x_i}' class='latex' /> and is interested in maximizing one objective function <img src='http://s.wordpress.com/latex.php?latex=%7Bf_i%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_i(x)}' title='{f_i(x)}' class='latex' />. So, 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' /> is trying to set <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%20%3D%20%5Ctext%7Bargmax%7D_%7Bx_i%7D%20f_i%28x_i%2C%20x_%7B-i%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i = \text{argmax}_{x_i} f_i(x_i, x_{-i})}' title='{x_i = \text{argmax}_{x_i} f_i(x_i, x_{-i})}' class='latex' />.</li>
<li> Markets are a computational model: one can think of a market as a way of performing a certain computation &#8211; as extracting some kind of information, as a <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Prediction_market">prediction market</a>, <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Stock_exchange">stock exchanges</a>, &#8230; If we think of it as a computational device, we are asking the same questions: given those preferences which are implicit functions to each of the agents, calculate &#8220;fair&#8221; prices of items.</li>
<li> Markets are distributed systems where each part of the system has a selfish interest.</li>
</ul>
<p>A market is composed by a set <img src='http://s.wordpress.com/latex.php?latex=%7BL%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{L}' title='{L}' class='latex' /> of commodities, <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' /> of consumers and <img src='http://s.wordpress.com/latex.php?latex=%7BJ%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{J}' title='{J}' class='latex' /> of producers. Now, we describe how to characterize each of them:</p>
<ul>
<li> Each <strong>consumer</strong> is defined by a set <img src='http://s.wordpress.com/latex.php?latex=%7BX_i%20%5Csubseteq%20%7B%5Cmathbb%20R%7D%5EL%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X_i \subseteq {\mathbb R}^L}' title='{X_i \subseteq {\mathbb R}^L}' class='latex' /> of commodities combinations he is interested (typically we take <img src='http://s.wordpress.com/latex.php?latex=%7BX_i%20%3D%20%7B%5Cmathbb%20R%7D%5EL_%2B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X_i = {\mathbb R}^L_+}' title='{X_i = {\mathbb R}^L_+}' class='latex' />) and an utility function <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%20%3A%20X_i%20%5Crightarrow%20%7B%5Cmathbb%20R%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i : X_i \rightarrow {\mathbb R}}' title='{u_i : X_i \rightarrow {\mathbb R}}' class='latex' /> expressing his interest for this bundle of commodities. Consumer <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' /> will try to maximize <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28%5Ccdot%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(\cdot)}' title='{u_i(\cdot)}' class='latex' /> in a further restricted <img src='http://s.wordpress.com/latex.php?latex=%7BX_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X_i}' title='{X_i}' class='latex' />.</li>
<li> Each <strong>producer</strong> is define by a set <img src='http://s.wordpress.com/latex.php?latex=%7BY_j%20%5Csubset%20%7B%5Cmathbb%20R%7D%5EL%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Y_j \subset {\mathbb R}^L}' title='{Y_j \subset {\mathbb R}^L}' class='latex' /> it has the capacity to produce.</li>
<li> <strong>Endowments</strong>: Each consumer comes to the market with an initial endowment <img src='http://s.wordpress.com/latex.php?latex=%7B%5Comega_i%20%5Cin%20%7B%5Cmathbb%20R%7D%5EL%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\omega_i \in {\mathbb R}^L}' title='{\omega_i \in {\mathbb R}^L}' class='latex' />, so for <img src='http://s.wordpress.com/latex.php?latex=%7Bj%20%5Cin%20L%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{j \in L}' title='{j \in L}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Comega_%7Bij%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\omega_{ij}}' title='{\omega_{ij}}' class='latex' /> is the amount of commodity <img src='http://s.wordpress.com/latex.php?latex=%7Bj%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{j}' title='{j}' class='latex' /> that consumer <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' /> originally has. The initial total endowment of the market is given by <img src='http://s.wordpress.com/latex.php?latex=%7B%5Coverline%7B%5Comega%7D%20%3D%20%5Csum_%7Bi%20%5Cin%20I%7D%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\overline{\omega} = \sum_{i \in I} \omega_i}' title='{\overline{\omega} = \sum_{i \in I} \omega_i}' class='latex' />, which is a vector indicating how much of each commodity originally exists in the market.</li>
<li> <strong>Shares</strong>: consumers have shares in the companies, so for <img src='http://s.wordpress.com/latex.php?latex=%7Bi%20%5Cin%20I%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i \in I}' title='{i \in I}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7Bj%20%5Cin%20J%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{j \in J}' title='{j \in J}' class='latex' />, consumer <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' /> has <img src='http://s.wordpress.com/latex.php?latex=%7B%5Ctheta_%7Bij%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\theta_{ij}}' title='{\theta_{ij}}' class='latex' /> shares of company <img src='http://s.wordpress.com/latex.php?latex=%7Bj%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{j}' title='{j}' class='latex' />, such that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20%5Ctheta_%7Bij%7D%20%3D%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i \theta_{ij} = 1}' title='{\sum_i \theta_{ij} = 1}' class='latex' />.</li>
</ul>
<p>Something very crucial is missing in this picture: a way to compare commodities and something that makes exchanges possible: the answer to that is to attribute <strong>prices</strong> to the items. How to attribute prices to the items so that the market works fine? A price vector is a vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%7B%5Cmathbb%20R%7D%5EL_%2B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in {\mathbb R}^L_+}' title='{p \in {\mathbb R}^L_+}' class='latex' />. Consider the following scenario after prices <img src='http://s.wordpress.com/latex.php?latex=%7Bp_%5Cell%2C%20%5Cell%20%5Cin%20L%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_\ell, \ell \in L}' title='{p_\ell, \ell \in L}' class='latex' /> are established to commodities:</p>
<ul>
<li> by producing <img src='http://s.wordpress.com/latex.php?latex=%7By_j%20%5Cin%20Y_j%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{y_j \in Y_j}' title='{y_j \in Y_j}' class='latex' />, company <img src='http://s.wordpress.com/latex.php?latex=%7Bj%20%5Cin%20J%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{j \in J}' title='{j \in J}' class='latex' /> gets profit <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Ccdot%20y_j%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \cdot y_j}' title='{p \cdot y_j}' class='latex' />, so each company will try to maximize its profit producing <img src='http://s.wordpress.com/latex.php?latex=%7By_j%5E%2A%20%5Cin%20%5Ctext%7Bargmax%7D_%7By_j%20%5Cin%20Y_j%7D%20p%20%5Ccdot%20y_j%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{y_j^* \in \text{argmax}_{y_j \in Y_j} p \cdot y_j}' title='{y_j^* \in \text{argmax}_{y_j \in Y_j} p \cdot y_j}' class='latex' />.</li>
<li> each consumer sells its initial endowment and gets the profit respective to the companies he owns. So, consumer <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 <img src='http://s.wordpress.com/latex.php?latex=%7Bw_i%20%3D%20p%20%5Ccdot%20%5Comega_i%20%2B%20%5Csum_%7Bj%20%5Cin%20J%7D%20%5Ctheta_%7Bij%7D%20p%20%5Ccdot%20y_j%5E%2A%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{w_i = p \cdot \omega_i + \sum_{j \in J} \theta_{ij} p \cdot y_j^*}' title='{w_i = p \cdot \omega_i + \sum_{j \in J} \theta_{ij} p \cdot y_j^*}' class='latex' />.</li>
<li> now consumer <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' /> uses the money he has to buy the best bundle he can afford, which is <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%5E%2A%20%3D%20%5Ctext%7Bargmax%7D%20%5C%7Bu_i%28x_i%29%3B%20x_i%20%5Cin%20X_i%2C%20p%20%5Ccdot%20x_i%20%5Cleq%20w_i%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i^* = \text{argmax} \{u_i(x_i); x_i \in X_i, p \cdot x_i \leq w_i\}}' title='{x_i^* = \text{argmax} \{u_i(x_i); x_i \in X_i, p \cdot x_i \leq w_i\}}' class='latex' />.</li>
</ul>
<p>The amount of commodities in the market must conserve, so that is possible only if we get:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Csum_%7Bi%20%5Cin%20I%7D%20x_i%5E%2A%20%3D%20%5Csum_%7Bi%20%5Cin%20I%7D%20%5Comega_i%20%2B%20%5Csum_%7Bj%20%5Cin%20J%7D%20y_j%5E%2A&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \sum_{i \in I} x_i^* = \sum_{i \in I} \omega_i + \sum_{j \in J} y_j^*' title='\displaystyle \sum_{i \in I} x_i^* = \sum_{i \in I} \omega_i + \sum_{j \in J} y_j^*' class='latex' />
<p>First, it is not clear if such a price vector exists. If it exists, is it unique? If this is an equilibrium, is it the best thing for the consumers? How those prices can be set in practice without a centralized authority? Can people lie? Below, let&#8217;s collect a couple of questions I&#8217;ll try to answer (yes, no or unknown) in this and the following posts.</p>
<p><strong>Question 1:</strong> Does a price vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cgeq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \geq 0}' title='{p \geq 0}' class='latex' /> always exist that generates an equilibrium?</p>
<p><strong>Question 2:</strong> If it exists, is it unique?</p>
<p><strong>Question 3:</strong> Can we describe an efficent method to find <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> ?</p>
<p><strong>Question 4:</strong> Is it the best thing for the consumers in the following sense: if <img src='http://s.wordpress.com/latex.php?latex=%7B%28x%5E%2A%2Cy%5E%2A%2Cp%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(x^*,y^*,p)}' title='{(x^*,y^*,p)}' class='latex' /> is an equilibrium, are there feasible <img src='http://s.wordpress.com/latex.php?latex=%7B%28x%2Cy%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(x,y)}' title='{(x,y)}' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%29%20%5Cgeq%20u_i%28x_i%5E%2A%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i) \geq u_i(x_i^*)}' title='{u_i(x_i) \geq u_i(x_i^*)}' class='latex' /> and for at least one consumer <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%29%20%3E%20u_i%28x_i%5E%2A%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i) &gt; u_i(x_i^*)}' title='{u_i(x_i) &gt; u_i(x_i^*)}' class='latex' />? (This is called Pareto improvement)</p>
<p><strong>Question 5:</strong> A central authority could use the knowledge about functions <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> and endowments <img src='http://s.wordpress.com/latex.php?latex=%7B%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\omega_i}' title='{\omega_i}' class='latex' /> to calculate the price vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> using some method. Can consumers <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' /> be better off by lieing about their utility and endowments?</p>
<p><strong>Question 6:</strong> How prices get defined without a central authority? Is there a dynamic/game-theoretical model to that?</p>
<p>For simplicity, let&#8217;s think of <strong>Exchange Economies</strong>, which are economies with no producers. Let&#8217;s define it formally:</p>
<blockquote><p><strong>Definition 1</strong> <em> An exchange economy is composed by a set of commodities <img src='http://s.wordpress.com/latex.php?latex=%7BL%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{L}' title='{L}' class='latex' /> and a set of consumers <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' /> each with an utility <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%20%3A%20X_i%20%5Crightarrow%20%7B%5Cmathbb%20R%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i : X_i \rightarrow {\mathbb R}}' title='{u_i : X_i \rightarrow {\mathbb R}}' class='latex' /> and an initial endowment <img src='http://s.wordpress.com/latex.php?latex=%7B%5Comega_i%20%5Cin%20%7B%5Cmathbb%20R%7D%5EL_%2B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\omega_i \in {\mathbb R}^L_+}' title='{\omega_i \in {\mathbb R}^L_+}' class='latex' />. </em></p></blockquote>
<blockquote><p><strong>Definition 2</strong> <em> A price vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%7B%5Cmathbb%20R%7D%5EL_%2B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in {\mathbb R}^L_+}' title='{p \in {\mathbb R}^L_+}' class='latex' /> is a Walrasian equilibrium for an exchange economy <img src='http://s.wordpress.com/latex.php?latex=%7B%28L%2C%20I%2C%20%5C%7BX_i%2C%20u_i%2C%20%5Comega_i%5C%7D_%7Bi%20%5Cin%20I%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(L, I, \{X_i, u_i, \omega_i\}_{i \in I})}' title='{(L, I, \{X_i, u_i, \omega_i\}_{i \in I})}' class='latex' /> if there is <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%5E%2A%20%5Cin%20X_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i^* \in X_i}' title='{x_i^* \in X_i}' class='latex' /> such that: </em></p>
<ol>
<li><em> <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%5E%2A%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i^*}' title='{x_i^*}' class='latex' /> s.t. <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%5E%2A%29%20%3D%20%5Cmax%20%5C%7Bu_i%28x_i%29%3B%20x_i%20%5Cin%20X_i%2C%20p%20%5Ccdot%20x_i%20%5Cleq%20p%20%5Ccdot%20%5Comega_i%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i^*) = \max \{u_i(x_i); x_i \in X_i, p \cdot x_i \leq p \cdot \omega_i\}}' title='{u_i(x_i^*) = \max \{u_i(x_i); x_i \in X_i, p \cdot x_i \leq p \cdot \omega_i\}}' class='latex' /> </em></li>
<li><em> <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20x_i%5E%2A%20%5Cleq%20%5Csum_i%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i x_i^* \leq \sum_i \omega_i}' title='{\sum_i x_i^* \leq \sum_i \omega_i}' class='latex' /> </em></li>
<li><em> <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Ccdot%20%28%5Csum_i%20x_i%5E%2A%20-%20%5Comega_i%29%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \cdot (\sum_i x_i^* - \omega_i)= 0}' title='{p \cdot (\sum_i x_i^* - \omega_i)= 0}' class='latex' /> </em></li>
</ol>
<p><em> </em></p></blockquote>
<p>The first condition says that each consumer is maximizing his utility given his prices, the second says that we can&#8217;t buy more commodities than what is available in the market and the third, called Walras&#8217; Law, says that if there is surplus of a certain product, it should have price zero. It is by far the most unnatural of those, but it can be easily justifiable in some circumnstances: suppose we say that utilities are non-satiated if for each <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%20%5Cin%20X_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i \in X_i}' title='{x_i \in X_i}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cepsilon%20%3E%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\epsilon &gt; 0}' title='{\epsilon &gt; 0}' class='latex' />, there is <img src='http://s.wordpress.com/latex.php?latex=%7Bx%27_i%20%5Cin%20X_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x&#039;_i \in X_i}' title='{x&#039;_i \in X_i}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7B%5CVert%20x_i%20-%20x%27_i%20%5CVert%20%3C%20%5Cepsilon%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Vert x_i - x&#039;_i \Vert &lt; \epsilon}' title='{\Vert x_i - x&#039;_i \Vert &lt; \epsilon}' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x%27_i%29%20%3E%20u_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x&#039;_i) &gt; u_i(x_i)}' title='{u_i(x&#039;_i) &gt; u_i(x_i)}' class='latex' />. If <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> are differentiable, that would mean <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cnabla%20u_i%20%5Cneq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\nabla u_i \neq 0}' title='{\nabla u_i \neq 0}' class='latex' />, for example a linear function <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%29%20%3D%20%5Csum_%5Cell%20u_%7Bi%5Cell%7D%20x_%7Bi%5Cell%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i) = \sum_\ell u_{i\ell} x_{i\ell}}' title='{u_i(x_i) = \sum_\ell u_{i\ell} x_{i\ell}}' class='latex' /> with some <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7Bi%5Cell%7D%20%3E%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{i\ell} &gt; 0}' title='{u_{i\ell} &gt; 0}' class='latex' />. In that case, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20%28p%20%5Ccdot%20x_i%5E%2A%20-%20p%20%5Ccdot%20%5Comega_i%29%20%3C%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i (p \cdot x_i^* - p \cdot \omega_i) &lt; 0}' title='{\sum_i (p \cdot x_i^* - p \cdot \omega_i) &lt; 0}' class='latex' /> and some player has money surplus and therefore he could increase his utility.</p>
<p>Now, we define for each price vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> the excess demand function <img src='http://s.wordpress.com/latex.php?latex=%7Bz_i%28p%29%20%3D%20x_i%28p%29%20-%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z_i(p) = x_i(p) - \omega_i}' title='{z_i(p) = x_i(p) - \omega_i}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%3D%20%5Csum_i%20z_i%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) = \sum_i z_i(p)}' title='{z(p) = \sum_i z_i(p)}' class='latex' />. Now, under non-satiated utilities, by the last argument, we have that <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> is an equilibrium vector iff <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%5Cleq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) \leq 0}' title='{z(p) \leq 0}' class='latex' />. Actually, if <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> are also strong monotone, i.e., <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%20%2B%20%5Cxi%29%20%5Cgeq%20u_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i + \xi) \geq u_i(x_i)}' title='{u_i(x_i + \xi) \geq u_i(x_i)}' class='latex' /> for each <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cxi%20%5Cgeq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\xi \geq 0}' title='{\xi \geq 0}' class='latex' />, then it becomes: <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> is an equilibrium iff <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) = 0}' title='{z(p) = 0}' class='latex' />, which means that the market clears:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Csum_i%20x_i%5E%2A%20%3D%20%5Csum_i%20%5Comega_i&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \sum_i x_i^* = \sum_i \omega_i' title='\displaystyle \sum_i x_i^* = \sum_i \omega_i' class='latex' />
<p>The question that is easier to answer is Question 4 and it is sometimes refered as the First Fundamental Theorem of Welfare Economics:</p>
<blockquote><p><strong>Theorem 3</strong> <em> Given non-satiated preferences, each equilibrium <img src='http://s.wordpress.com/latex.php?latex=%7B%28x%2Cp%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(x,p)}' title='{(x,p)}' class='latex' /> is Pareto, i.e. there is no other feasible allocation <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' /> such that for all <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' />, <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x%27_i%29%20%5Cgeq%20u_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x&#039;_i) \geq u_i(x_i)}' title='{u_i(x&#039;_i) \geq u_i(x_i)}' class='latex' /> with the inequality strict for at least one component. </em></p></blockquote>
<p><em>Proof:</em> Suppose there were, since <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x%27_i%29%20%5Cgeq%20u_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x&#039;_i) \geq u_i(x_i)}' title='{u_i(x&#039;_i) \geq u_i(x_i)}' class='latex' /> then <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Ccdot%20x%27_i%20%5Cgeq%20p%20%5Ccdot%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \cdot x&#039;_i \geq p \cdot \omega_i}' title='{p \cdot x&#039;_i \geq p \cdot \omega_i}' class='latex' />, because if <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Ccdot%20x%27_i%20%3C%20p%20%5Ccdot%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \cdot x&#039;_i &lt; p \cdot \omega_i}' title='{p \cdot x&#039;_i &lt; p \cdot \omega_i}' class='latex' /> then we could improve the utility of <img src='http://s.wordpress.com/latex.php?latex=%7Bx%27_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x&#039;_i}' title='{x&#039;_i}' class='latex' /> still within the budget, contradicting the optimality of <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i)}' title='{u_i(x_i)}' class='latex' /> for that budget. And clearly <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x%27_i%29%20%3E%20u_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x&#039;_i) &gt; u_i(x_i)}' title='{u_i(x&#039;_i) &gt; u_i(x_i)}' class='latex' /> implies <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Ccdot%20x%27_i%20%3E%20p%20%5Ccdot%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \cdot x&#039;_i &gt; p \cdot \omega_i}' title='{p \cdot x&#039;_i &gt; p \cdot \omega_i}' class='latex' />.</p>
<p>Summing over <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' />, we get <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20p%20x%27_i%20%3E%20%5Csum_i%20p%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i p x&#039;_i &gt; \sum_i p \omega_i}' title='{\sum_i p x&#039;_i &gt; \sum_i p \omega_i}' class='latex' />, what is a contradiction, because since <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' /> is feasible, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20x%27_i%20%5Cleq%20%5Csum_i%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i x&#039;_i \leq \sum_i \omega_i}' title='{\sum_i x&#039;_i \leq \sum_i \omega_i}' class='latex' /> and therefore <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20p%20%5Ccdot%20x%27_i%20%5Cleq%20%5Csum_i%20p%20%5Ccdot%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i p \cdot x&#039;_i \leq \sum_i p \cdot \omega_i}' title='{\sum_i p \cdot x&#039;_i \leq \sum_i p \cdot \omega_i}' class='latex' />. <img src='http://s.wordpress.com/latex.php?latex=%5CBox&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Box' title='\Box' class='latex' /></p>
<p>Now, let&#8217;s tackle Question 1. We assume linearly of utility: <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%29%20%3D%20%5Csum_%7B%5Cell%20%5Cin%20L%7D%20u_%7Bi%20%5Cell%7D%20x_%7Bi%20%5Cell%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i) = \sum_{\ell \in L} u_{i \ell} x_{i \ell}}' title='{u_i(x_i) = \sum_{\ell \in L} u_{i \ell} x_{i \ell}}' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7Bi%20%5Cell%7D%20%3E%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{i \ell} &gt; 0}' title='{u_{i \ell} &gt; 0}' class='latex' />. This gives us strong monotonicity and local nonsatiated preferences.</p>
<blockquote><p><strong>Theorem 4</strong> <em> Under linear utilities, there is always an equilibrium price vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' />. </em></p></blockquote>
<p>Consider the function <img src='http://s.wordpress.com/latex.php?latex=%7Bz%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z}' title='{z}' class='latex' /> defined above: <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%3D%20%5Csum_i%20%28x_i%28p%29%20-%20%5Comega_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) = \sum_i (x_i(p) - \omega_i)}' title='{z(p) = \sum_i (x_i(p) - \omega_i)}' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i(p)}' title='{x_i(p)}' class='latex' /> is the bundle of best possible utility. Now, since we are using linear utilities we can&#8217;t guarantee there will be only one such bundle, so instead of considering a function, consider <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i}' title='{x_i}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bz%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z}' title='{z}' class='latex' /> as being correspondences: <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%2C%20z%3A%20%7B%5Cmathbb%20R%7D%5EL_%2B%20%5Crightarrow%20%5Cmathcal%7BP%7D%28%7B%5Cmathbb%20R%7D%5EL%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i, z: {\mathbb R}^L_+ \rightarrow \mathcal{P}({\mathbb R}^L)}' title='{x_i, z: {\mathbb R}^L_+ \rightarrow \mathcal{P}({\mathbb R}^L)}' class='latex' />, i.e., <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%28p%29%20%5Csubseteq%20%7B%5Cmathbb%20R%7D%5EL_%2B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i(p) \subseteq {\mathbb R}^L_+}' title='{x_i(p) \subseteq {\mathbb R}^L_+}' class='latex' /> is the set of all allocations that maximize <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%28x_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i(x_i)}' title='{u_i(x_i)}' class='latex' /> subject to <img src='http://s.wordpress.com/latex.php?latex=%7Bp%5Ccdot%20x_i%20%5Cleq%20p%20%5Ccdot%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p\cdot x_i \leq p \cdot \omega_i}' title='{p\cdot x_i \leq p \cdot \omega_i}' class='latex' />. Since <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> are linear functionals, we can calculate <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i(p)}' title='{x_i(p)}' class='latex' /> by a Fractional Knapsack algorithm: we sort commodities <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cell%20%5Cin%20L%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\ell \in L}' title='{\ell \in L}' class='latex' /> by <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bp_%5Cell%7D%7Bu_%7Bi%5Cell%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{p_\ell}{u_{i\ell}}}' title='{\frac{p_\ell}{u_{i\ell}}}' class='latex' /> and start buying in the cost-benefit order (the ones that provide more utility per buck spent). Most of the time there will be just one solution, but in points where <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bp_%5Cell%7D%7Bu_%7Bi%5Cell%7D%7D%20%3D%20%5Cfrac%7Bp_k%7D%7Bu_%7Bi%20k%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{p_\ell}{u_{i\ell}} = \frac{p_k}{u_{i k}}}' title='{\frac{p_\ell}{u_{i\ell}} = \frac{p_k}{u_{i k}}}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i(p)}' title='{x_i(p)}' class='latex' /> might be a convex region. This correpondence is <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Hemicontinuous">upper hemicontinuous</a>, which is the correspondence analogue to continuity for functions. As Wikipedia defines:</p>
<blockquote><p><strong>Definition 5</strong> <em> A correspondence <img src='http://s.wordpress.com/latex.php?latex=%7B%5CGamma%20%3A%20A%20%5Crightarrow%20B%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Gamma : A \rightarrow B}' title='{\Gamma : A \rightarrow B}' class='latex' /> is said to be <strong>upper hemicontinuous</strong> at the point <img src='http://s.wordpress.com/latex.php?latex=%7Ba%20%5Cin%20A%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{a \in A}' title='{a \in A}' class='latex' /> if for any open neighbourhood <img src='http://s.wordpress.com/latex.php?latex=%7BV%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{V}' title='{V}' class='latex' /> of <img src='http://s.wordpress.com/latex.php?latex=%7B%5CGamma%28a%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Gamma(a)}' title='{\Gamma(a)}' class='latex' /> there exists a neighbourhood <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' /> of a such that <img src='http://s.wordpress.com/latex.php?latex=%7B%5CGamma%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Gamma(x)}' title='{\Gamma(x)}' class='latex' /> is a subset of <img src='http://s.wordpress.com/latex.php?latex=%7BV%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{V}' title='{V}' class='latex' /> for all <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' /> in <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' />. </em></p></blockquote>
<p>It is not hard to see that <img src='http://s.wordpress.com/latex.php?latex=%7Bz%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z}' title='{z}' class='latex' /> is upper hemicontinuous according to that definition. Our goal is to prove that there is one price vector <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> for which <img src='http://s.wordpress.com/latex.php?latex=%7B%5Coverline%7B%5Comega%7D%20%5Cin%20x_i%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\overline{\omega} \in x_i(p)}' title='{\overline{\omega} \in x_i(p)}' class='latex' /> or: <img src='http://s.wordpress.com/latex.php?latex=%7B0%20%5Cin%20z%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{0 \in z(p)}' title='{0 \in z(p)}' class='latex' />. To prove that we use <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Kakutani_fixed_point_theorem">Kakutani&#8217;s Fixed Point Theorem</a>. Before we go into that, we&#8217;ll explore some other properties of <img src='http://s.wordpress.com/latex.php?latex=%7Bz%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z}' title='{z}' class='latex' />:</p>
<ul>
<li> <strong>0-Homogeneous:</strong> <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28%5Calpha%20p%29%20%3D%20z%28p%29%2C%20%5Cforall%20%5Calpha%20%3E%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(\alpha p) = z(p), \forall \alpha &gt; 0}' title='{z(\alpha p) = z(p), \forall \alpha &gt; 0}' class='latex' /></li>
<li> <strong>Walras&#8217; Law:</strong> <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Ccdot%20z%28p%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \cdot z(p) = 0}' title='{p \cdot z(p) = 0}' class='latex' />. For any <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20%28x_i%20-%20%5Comega_i%29%20%5Cin%20z%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i (x_i - \omega_i) \in z(p)}' title='{\sum_i (x_i - \omega_i) \in z(p)}' class='latex' /> we know <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_i%20%28p%20%5Ccdot%20x_i%20-%20p%20%5Ccdot%20%5Comega_i%29%20%5Cleq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_i (p \cdot x_i - p \cdot \omega_i) \leq 0}' title='{\sum_i (p \cdot x_i - p \cdot \omega_i) \leq 0}' class='latex' /> by the definition of <img src='http://s.wordpress.com/latex.php?latex=%7Bx_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_i}' title='{x_i}' class='latex' />. So, if it not zero, some <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' /> has money surplus what is absurd given that preferences are strongly monotone.</li>
<li> <strong>Bounded:</strong> <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p)}' title='{z(p)}' class='latex' /> is bounded from below, i.e., <img src='http://s.wordpress.com/latex.php?latex=%7Bz_%5Cell%28p%29%20%5Cgeq%20-s%2C%20%5Cforall%20p%2C%20%5Cell%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z_\ell(p) \geq -s, \forall p, \ell}' title='{z_\ell(p) \geq -s, \forall p, \ell}' class='latex' /> for some <img src='http://s.wordpress.com/latex.php?latex=%7Bs%20%3E%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{s &gt; 0}' title='{s &gt; 0}' class='latex' />. Simply take <img src='http://s.wordpress.com/latex.php?latex=%7Bs%20%3D%20%5Cmax%20%5Comega_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{s = \max \omega_i}' title='{s = \max \omega_i}' class='latex' /></li>
<li> <strong>Boundary behavior:</strong> if <img src='http://s.wordpress.com/latex.php?latex=%7Bp%5Ek%20%5Crightarrow%20p%20%5Cneq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p^k \rightarrow p \neq 0}' title='{p^k \rightarrow p \neq 0}' class='latex' /> with <img src='http://s.wordpress.com/latex.php?latex=%7Bp_%5Cell%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_\ell = 0}' title='{p_\ell = 0}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%7Bz_%5Cell%28p%5Ek%29%20%5Crightarrow%20%5Cinfty%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z_\ell(p^k) \rightarrow \infty}' title='{z_\ell(p^k) \rightarrow \infty}' class='latex' />. That is clear from the fractional knapsack algorithm when one desirable item gets price zero.</li>
</ul>
<p>Now, we are in shape for applying Kakutani&#8217;s Fixed Point Theorem:</p>
<blockquote><p><strong>Theorem 6 (Kakutani, 1941)</strong> <em> If <img src='http://s.wordpress.com/latex.php?latex=%7Bf%3AA%20%5Crightarrow%20%5Cmathcal%7BP%7D%28A%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f:A \rightarrow \mathcal{P}(A)}' title='{f:A \rightarrow \mathcal{P}(A)}' class='latex' /> is an upper hemicontinuous correspondence such that <img src='http://s.wordpress.com/latex.php?latex=%7Bf%28a%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f(a)}' title='{f(a)}' class='latex' /> is a convex non-empty set for all <img src='http://s.wordpress.com/latex.php?latex=%7Ba%20%5Cin%20A%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{a \in A}' title='{a \in A}' class='latex' /> then <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' /> has a fixed point, i.e., <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cexists%20x%20%5Cin%20A%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\exists x \in A}' title='{\exists x \in A}' class='latex' /> s.t. <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20f%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in f(x)}' title='{x \in f(x)}' class='latex' />. </em></p></blockquote>
<p>Since prices are <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' />-homogeneous, consider the simplex <img src='http://s.wordpress.com/latex.php?latex=%7B%5CDelta%20%3D%20%5C%7Bp%20%5Cgeq%200%3B%20%5Csum_%5Cell%20p_%5Cell%20%3D%201%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Delta = \{p \geq 0; \sum_\ell p_\ell = 1\}}' title='{\Delta = \{p \geq 0; \sum_\ell p_\ell = 1\}}' class='latex' />, its relative interior <img src='http://s.wordpress.com/latex.php?latex=%7B%5CDelta%5E0%20%3D%20%5C%7Bp%20%3E%200%3B%20%5Csum_%5Cell%20p_%5Cell%20%3D%201%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Delta^0 = \{p &gt; 0; \sum_\ell p_\ell = 1\}}' title='{\Delta^0 = \{p &gt; 0; \sum_\ell p_\ell = 1\}}' class='latex' /> and the boundary <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cpartial%20%5CDelta%20%3D%20%5CDelta%20%5Csetminus%20%5CDelta%5E0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\partial \Delta = \Delta \setminus \Delta^0}' title='{\partial \Delta = \Delta \setminus \Delta^0}' class='latex' />. Now we define the following price correcting correspondence <img src='http://s.wordpress.com/latex.php?latex=%7Bf%3A%5CDelta%20%5Crightarrow%20%5Cmathcal%7BP%7D%28%5CDelta%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f:\Delta \rightarrow \mathcal{P}(\Delta)}' title='{f:\Delta \rightarrow \mathcal{P}(\Delta)}' class='latex' />.</p>
<p>If some price <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%5CDelta%5E0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in \Delta^0}' title='{p \in \Delta^0}' class='latex' /> is set, it generates demand <img src='http://s.wordpress.com/latex.php?latex=%7Bd%20%5Cin%20z%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{d \in z(p)}' title='{d \in z(p)}' class='latex' />. For that demand, the price that would maximize profit would be <img src='http://s.wordpress.com/latex.php?latex=%7Bq%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{q}' title='{q}' class='latex' />, i.e. <img src='http://s.wordpress.com/latex.php?latex=%7Bq%5Ccdot%20d%20%5Cgeq%20q%27%20%5Ccdot%20d%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{q\cdot d \geq q&#039; \cdot d}' title='{q\cdot d \geq q&#039; \cdot d}' class='latex' /> for all <img src='http://s.wordpress.com/latex.php?latex=%7Bq%27%20%5Cin%20%5CDelta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{q&#039; \in \Delta}' title='{q&#039; \in \Delta}' class='latex' />. It is natural to re-adjust the prices to <img src='http://s.wordpress.com/latex.php?latex=%7Bq%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{q}' title='{q}' class='latex' />. So we define for <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%5CDelta%5E0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in \Delta^0}' title='{p \in \Delta^0}' class='latex' />:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20f%28p%29%20%3D%20%5C%7Bq%20%5Cin%20%5CDelta%3B%20q%20%5Ctext%7B%20is%20a%20best%20response%20price%20to%20some%20%7D%20d%20%5Cin%20z%28p%29%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle f(p) = \{q \in \Delta; q \text{ is a best response price to some } d \in z(p)\}' title='\displaystyle f(p) = \{q \in \Delta; q \text{ is a best response price to some } d \in z(p)\}' class='latex' />
<p>and for <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%5Cpartial%20%5CDelta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in \partial \Delta}' title='{p \in \partial \Delta}' class='latex' />:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20f%28p%29%20%3D%20%5C%7Bq%20%5Cin%20%5CDelta%3B%20q%20%5Ccdot%20p%20%3D%200%5C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle f(p) = \{q \in \Delta; q \cdot p = 0\}' title='\displaystyle f(p) = \{q \in \Delta; q \cdot p = 0\}' class='latex' />
<p>Now, I claim that this correspondence satisfies the conditions in Kakutani&#8217;s Theorem. We skip a formal proof of this fact, but this is intuitive for the interior <img src='http://s.wordpress.com/latex.php?latex=%7B%5CDelta%5E0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Delta^0}' title='{\Delta^0}' class='latex' /> &#8211; let&#8217;s give the intuition why this is true as we approach the boundary: if <img src='http://s.wordpress.com/latex.php?latex=%7B%5CDelta%5E0%20%5Cni%20p%5Ek%20%5Crightarrow%20p%20%5Cin%20%5Cpartial%20%5CDelta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Delta^0 \ni p^k \rightarrow p \in \partial \Delta}' title='{\Delta^0 \ni p^k \rightarrow p \in \partial \Delta}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%7Bp%5Ek_%5Cell%20%5Crightarrow%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p^k_\ell \rightarrow 0}' title='{p^k_\ell \rightarrow 0}' class='latex' />, therefore the demans explodes: <img src='http://s.wordpress.com/latex.php?latex=%7Bz_%5Cell%28p%5Ek%29%20%5Crightarrow%20%5Cinfty%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z_\ell(p^k) \rightarrow \infty}' title='{z_\ell(p^k) \rightarrow \infty}' class='latex' /> and as a result the best thing to do is to set the prices of those commodities much higher than the rest. Therefore, the price of the commodities whose demand explode are positive while the prices of the commodities where the price doesn&#8217;t get value zero.</p>
<p>Now, after waiving our hands about the upper continuity of <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' />, we have by Kakutani&#8217;s Theorem a point <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%5CDelta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in \Delta}' title='{p \in \Delta}' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20f%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in f(p)}' title='{p \in f(p)}' class='latex' />. By the definition of <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' /> we must have <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%5CDelta%5E0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in \Delta^0}' title='{p \in \Delta^0}' class='latex' /> (because for <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cin%20%5Cpartial%20%5CDelta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \in \partial \Delta}' title='{p \in \partial \Delta}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20%5Cnotin%20f%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p \notin f(p)}' title='{p \notin f(p)}' class='latex' />. Now, I claim <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) = 0}' title='{z(p) = 0}' class='latex' />. In fact if <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%5Cneq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) \neq 0}' title='{z(p) \neq 0}' class='latex' />, still <img src='http://s.wordpress.com/latex.php?latex=%7Bp%20z%28p%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p z(p) = 0}' title='{p z(p) = 0}' class='latex' /> by Walras&#8217; Law. So, if <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%5Cneq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) \neq 0}' title='{z(p) \neq 0}' class='latex' /> then there is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cell%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\ell}' title='{\ell}' class='latex' /> with <img src='http://s.wordpress.com/latex.php?latex=%7Bz_%5Cell%20%28p%29%20%3C%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z_\ell (p) &lt; 0}' title='{z_\ell (p) &lt; 0}' class='latex' /> and therefore <img src='http://s.wordpress.com/latex.php?latex=%7Bq_%5Cell%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{q_\ell = 0}' title='{q_\ell = 0}' class='latex' /> for all <img src='http://s.wordpress.com/latex.php?latex=%7Bq%20%5Cin%20f%28p%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{q \in f(p)}' title='{q \in f(p)}' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=%7Bf%28p%29%20%5Csubseteq%20%5Cpartial%20%5CDelta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f(p) \subseteq \partial \Delta}' title='{f(p) \subseteq \partial \Delta}' class='latex' />. For this reason <img src='http://s.wordpress.com/latex.php?latex=%7Bz%28p%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{z(p) = 0}' title='{z(p) = 0}' class='latex' />.</p>
<p>In the next blog post (or serie of blog posts, let&#8217;s see) we discuss issues related to the other questions: uniqueness, dynamics, game-theoretical considerations, &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/274/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Perihelion</title>
		<link>http://www.bigredbits.com/archives/267</link>
		<comments>http://www.bigredbits.com/archives/267#comments</comments>
		<pubDate>Sun, 03 Jan 2010 04:43:46 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Comics]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=267</guid>
		<description><![CDATA[Happy Perihelion from the Big Red Bits team.]]></description>
				<content:encoded><![CDATA[<p>Happy <a href="http://en.wikipedia.org/wiki/Perihelion">Perihelion</a> from the Big Red Bits team.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-271" title="Happy Perihelion" src="http://www.bigredbits.com/wp-content/uploads/2010/01/perihelion_comic1.png" alt="Happy Perihelion" width="597" height="1233" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/267/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On Peer Review Blindness</title>
		<link>http://www.bigredbits.com/archives/260</link>
		<comments>http://www.bigredbits.com/archives/260#comments</comments>
		<pubDate>Sun, 22 Nov 2009 19:33:24 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Comics]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=260</guid>
		<description><![CDATA[This started as a joke over dinner with some friends (click on the picture for more legible fonts) Coming to think about it &#8230; why stop at quintuple blindness? how about automated reviewers or mixing reviewers from different eras? Ok, I&#8217;ll stop here]]></description>
				<content:encoded><![CDATA[<p>This started as a joke over dinner with some friends</p>
<p style="text-align: center;"><a href="http://www.bigredbits.com/wp-content/uploads/2009/11/peer_review_overload.jpg"><img class="size-full wp-image-261 aligncenter" title="Peer Review Overload" src="http://www.bigredbits.com/wp-content/uploads/2009/11/peer_review_overload_small.jpg" alt="Peer Review Overload" width="600" height="469" /></a><em>(click on the picture for more legible fonts)</em></p>
<p style="text-align: left;">Coming to think about it &#8230; why stop at quintuple blindness? how about automated reviewers or mixing reviewers from different eras? Ok, I&#8217;ll stop here <img src='http://www.bigredbits.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/260/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bounded Degree Spanning Tree and an Uncrossing Lemma</title>
		<link>http://www.bigredbits.com/archives/249</link>
		<comments>http://www.bigredbits.com/archives/249#comments</comments>
		<pubDate>Wed, 18 Nov 2009 04:07:18 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[approximation algorithms]]></category>
		<category><![CDATA[combinatorics]]></category>
		<category><![CDATA[iterated rounding]]></category>
		<category><![CDATA[linear algebra]]></category>
		<category><![CDATA[linear programming]]></category>
		<category><![CDATA[uncrossing]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=249</guid>
		<description><![CDATA[I&#8217;ve been reading about the Bounded Degree Spanning Tree problem and I thought of writing some of what I am learning here. It illustrates a beautiful techique called Iterated Rounding and uses the combinatorial idea of uncrossing. I&#8217;ll try to give a high-level idea of the argument and give references on the details. The first [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been reading about the Bounded Degree Spanning Tree problem and I thought of writing some of what I am learning here. It illustrates a beautiful techique called Iterated Rounding and uses the combinatorial idea of uncrossing. I&#8217;ll try to give a high-level idea of the argument and give references on the details. The first result of this kind was given by Goemans (although there were previous results with weaker guarantees) by Goemans in <a class="snap_noshots" href="http://math.mit.edu/~goemans/PAPERS/bmst-focs06.pdf">Minimum Bounded Degree Spanning Trees</a>, but the result based on iterated rounding and a subsequent improvement are due to Singh and Lau in a serie of papers. A main reference is <a class="snap_noshots" href="http://portal.acm.org/citation.cfm?id=1250887">Approximating minimum bounded degree spanning trees to within one of optimal</a>.</p>
<p>The problem of bounded degree spanning tree is as follows: consider a graph <img src='http://s.wordpress.com/latex.php?latex=%7BG%20%3D%20%28V%2CE%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G = (V,E)}' title='{G = (V,E)}' class='latex' /> with edge weights and we for some nodes <img src='http://s.wordpress.com/latex.php?latex=%7BW%20%5Csubseteq%20V%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W \subseteq V}' title='{W \subseteq V}' class='latex' /> a degree bound <img src='http://s.wordpress.com/latex.php?latex=%7Bb_v%2C%20v%20%5Cin%20W%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_v, v \in W}' title='{b_v, v \in W}' class='latex' />. We want to find, among the spanning trees for which the degree of <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%20b_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq b_v}' title='{\leq b_v}' class='latex' /> the one with minimum cost. It is clearly a hard problem, since taking all weights equal to <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 <img src='http://s.wordpress.com/latex.php?latex=%7Bb_v%20%3D%202%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_v = 2}' title='{b_v = 2}' class='latex' /> for all nodes is the <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Hamiltonian_path">Hamiltonian Path problem</a>, which is NP-complete. We will get a different kind of approximation. Let OPT be the optimal solution: we will show an algorithm that gives a spanning tree of cost <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%20OPT%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq OPT}' title='{\leq OPT}' class='latex' /> such that each node <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> has degree <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%20b_v%20%2B%202%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq b_v + 2}' title='{\leq b_v + 2}' class='latex' /> (this can be improved to <img src='http://s.wordpress.com/latex.php?latex=%7Bb_v%20%2B%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_v + 1}' title='{b_v + 1}' class='latex' /> with a more sofisticated algorithm, also based on Iterated Rounding).</p>
<p>As always, the first step to design an approximation algorithm is to relax it to an LP. We consider the following LP:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cleft.%20%5Cbegin%7Baligned%7D%20%26%20%5Cmin%20%5Csum_%7Be%5Cin%20E%7D%20c_e%20x_e%20%5Ctext%7B%20s.t.%20%7D%20%5C%5C%20%26%20%5Cqquad%20%5Cleft.%20%5Cbegin%7Baligned%7D%20%26%20%5Csum_%7Be%20%5Cin%20E%7D%20x_e%20%3D%20%5Cvert%20V%20%5Cvert%20-%201%20%5C%5C%20%26%20%5Csum_%7Be%20%5Cin%20E%28S%29%7D%20x_e%20%5Cleq%20%5Cvert%20S%20%5Cvert%20-%201%20%26%20%5Cforall%20S%20%5Csubseteq%20V%2C%20%5Cvert%20S%20%5Cvert%20%5Cgeq%202%20%5C%5C%20%26%20%5Csum_%7Be%20%5Cin%20%5Cdelta%28v%29%7D%20x_e%20%5Cleq%20b_v%20%26%20%5Cforall%20v%20%5Cin%20W%5C%5C%20%26%20x_e%20%5Cgeq%200%20%26%20%5Cforall%20e%20%5Cin%20E%20%5Cend%7Baligned%7D%20%5Cright.%20%5Cend%7Baligned%7D%20%5Cright.%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \left. \begin{aligned} &amp; \min \sum_{e\in E} c_e x_e \text{ s.t. } \\ &amp; \qquad \left. \begin{aligned} &amp; \sum_{e \in E} x_e = \vert V \vert - 1 \\ &amp; \sum_{e \in E(S)} x_e \leq \vert S \vert - 1 &amp; \forall S \subseteq V, \vert S \vert \geq 2 \\ &amp; \sum_{e \in \delta(v)} x_e \leq b_v &amp; \forall v \in W\\ &amp; x_e \geq 0 &amp; \forall e \in E \end{aligned} \right. \end{aligned} \right. ' title='\displaystyle \left. \begin{aligned} &amp; \min \sum_{e\in E} c_e x_e \text{ s.t. } \\ &amp; \qquad \left. \begin{aligned} &amp; \sum_{e \in E} x_e = \vert V \vert - 1 \\ &amp; \sum_{e \in E(S)} x_e \leq \vert S \vert - 1 &amp; \forall S \subseteq V, \vert S \vert \geq 2 \\ &amp; \sum_{e \in \delta(v)} x_e \leq b_v &amp; \forall v \in W\\ &amp; x_e \geq 0 &amp; \forall e \in E \end{aligned} \right. \end{aligned} \right. ' class='latex' /></p>
<p>The first constraint expresses that in a spanning tree, there are at most <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20V%20%5Cvert%20-%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert V \vert - 1}' title='{\vert V \vert - 1}' class='latex' /> edges, the second prevent the formation of cycles and the third guarantees the degree bounds. For <img src='http://s.wordpress.com/latex.php?latex=%7BW%20%3D%20%5Cemptyset%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W = \emptyset}' title='{W = \emptyset}' class='latex' /> we have the standard Minimal Spanning Tree problem and for this problem the polytope is integral. With the degree bounds, we lose this nice property. We can solve this LP using the Ellipsoid Method. The separation oracle for the <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_%7Be%20%5Cin%20E%28S%29%7D%20x_e%20%5Cleq%20%5Cvert%20S%20%5Cvert%20-%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_{e \in E(S)} x_e \leq \vert S \vert - 1}' title='{\sum_{e \in E(S)} x_e \leq \vert S \vert - 1}' class='latex' /> is done by a flow computation.</p>
<p><strong> Iterated Rounding </strong></p>
<p>Now, let&#8217;s go ahead and solve the LP. It would be great if we had an integral solution: we would be done. It is unfortunately not the case, but we can still hope it is almost integral in some sense: for example, some edges are integral and we can take them to the final solution and recurse the algorithm on a smaller graph. This is not far from truth and that&#8217;s the main idea of the iterated rounding. We will show that the support of the optimal solution <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%20%3D%20%5C%7Be%20%5Cin%20E%3B%20x_e%20%3E%200%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x) = \{e \in E; x_e &gt; 0\}}' title='{E(x) = \{e \in E; x_e &gt; 0\}}' class='latex' /> has some nice structure. Consider the following lemma:</p>
<blockquote><p><strong>Lemma 1</strong> <em><a name="structure_lemma"></a> For any basic solution <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' /> of the LP, either there is <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> with just one incident edge in the support <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x)}' title='{E(x)}' class='latex' /> or there is one <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cin%20W%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \in W}' title='{v \in W}' class='latex' /> such that that at most <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' /> edges are incident to it. </em></p></blockquote>
<p>If we can prove this lemma, we can solve the problem in the following way: we begin with an empty tree: then we solve the LP and look at the support <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x)}' title='{E(x)}' class='latex' />. There are two possibilities according to the lemma:</p>
<ul>
<li> If there is one node <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> with just one edge <img src='http://s.wordpress.com/latex.php?latex=%7Be%20%3D%20%28u%2Cv%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{e = (u,v)}' title='{e = (u,v)}' class='latex' /> incident to it in the support, we add it to the tree, remove <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> from <img src='http://s.wordpress.com/latex.php?latex=%7BV%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{V}' title='{V}' class='latex' />, decrease <img src='http://s.wordpress.com/latex.php?latex=%7Bb_u%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_u}' title='{b_u}' class='latex' />, make <img src='http://s.wordpress.com/latex.php?latex=%7BE%20%3D%20E%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E = E(x)}' title='{E = E(x)}' class='latex' /> (the trick is to remove in each iteration edges from <img src='http://s.wordpress.com/latex.php?latex=%7BE%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E}' title='{E}' class='latex' /> that are not in the support. Clearly, removing those edges doesn&#8217;t hurt the objective value) and run the algorithm again. Notice that the LP called in the recursion has value less or equal then the actual LP <img src='http://s.wordpress.com/latex.php?latex=%7B-%20c_e%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{- c_e}' title='{- c_e}' class='latex' />. So if by induction we get a spanning tree respecting the new degree bounds plus two and value less or equal than the new LP value, we can just add <img src='http://s.wordpress.com/latex.php?latex=%7Be%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{e}' title='{e}' class='latex' /> and we have a solution with value less or equal than the one of the original LP respecting the degree bounds plus two.</li>
<li> Otherwise, there is one node <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cin%20W%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \in W}' title='{v \in W}' class='latex' /> that has degree <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' /> in the support. So, we just remove that degree bound on that vertex (i.e. remove <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> from <img src='http://s.wordpress.com/latex.php?latex=%7BW%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W}' title='{W}' class='latex' />), make <img src='http://s.wordpress.com/latex.php?latex=%7BE%20%3D%20E%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E = E(x)}' title='{E = E(x)}' class='latex' /> (again,eliminate the edges not in the support) and run the algorithm again. Clearly, if one node is still in <img src='http://s.wordpress.com/latex.php?latex=%7BW%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W}' title='{W}' class='latex' />, it has <img src='http://s.wordpress.com/latex.php?latex=%7Bb_v%20%5Cgeq%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_v \geq 1}' title='{b_v \geq 1}' class='latex' />, since there are only three edges in the support, there will be for the rest of the computation, just three edges incident to it, so there will be at most three edges more incident to it. So it will exceed its original <img src='http://s.wordpress.com/latex.php?latex=%7Bb_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{b_v}' title='{b_v}' class='latex' /> by at most <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' />.</li>
</ul>
<p>The algorithm eventually stops, since in each iteration we have less edges or less nodes in <img src='http://s.wordpress.com/latex.php?latex=%7BW%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W}' title='{W}' class='latex' /> and the solution is as desired. The main effort is therefore to prove the lemma. But before, let&#8217;s look at the lemma: it is of the following kind: &#8220;any basic solution of the LP has some nice properties, which envolve having a not too big (at least in some point) support&#8221;. So, it involves proving that the support is not too large. That is our next task as we are trying to prove the lemma. And we will be done with:</p>
<blockquote><p><strong>Theorem 2</strong> <em> The algorithm described above produces a spanning tree of cost </em><em><img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%20Z%5E%2A%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq Z^*}' title='{\leq Z^*}' class='latex' /></em><em> (the LP values and therefore </em><em><img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%20OPT%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq OPT}' title='{\leq OPT}' class='latex' />)</em><em>in which each node <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cin%20W%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \in W}' title='{v \in W}' class='latex' /> has degree <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%20b_v%20%2B%202%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq b_v + 2}' title='{\leq b_v + 2}' class='latex' />. </em></p></blockquote>
<p><strong> Bounding the size of the support </strong></p>
<p>We would like now to prove some result like the Lemma above: that in the solution of the LP we have either one <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> with degree <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' /> in <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x)}' title='{E(x)}' class='latex' /> or we have a node in <img src='http://s.wordpress.com/latex.php?latex=%7BW%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W}' title='{W}' class='latex' /> with degree <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%203%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq 3}' title='{\leq 3}' class='latex' />. First, we suppose the opposite, that <img src='http://s.wordpress.com/latex.php?latex=%7B%28V%2CE%28x%29%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(V,E(x))}' title='{(V,E(x))}' class='latex' /> has all the nodes with degree <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cgeq%202%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\geq 2}' title='{\geq 2}' class='latex' /> and all the nodes in <img src='http://s.wordpress.com/latex.php?latex=%7BW%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W}' title='{W}' class='latex' /> have degree <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cgeq%204%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\geq 4}' title='{\geq 4}' class='latex' />. This implies that we have a large number of edges in the support. From the degrees, we know that:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cvert%20E%28x%29%20%5Cvert%20%5Cgeq%20%5Cfrac%7B1%7D%7B2%7D%20%5Cleft%28%202%28%20%5Cvert%20V%20%5Cvert%20-%20%5Cvert%20W%20%5Cvert%20%29%20%2B%204%20%5Cvert%20W%20%5Cvert%20%5Cright%29%20%3D%20%5Cvert%20V%20%5Cvert%20%2B%20%5Cvert%20W%20%5Cvert&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \vert E(x) \vert \geq \frac{1}{2} \left( 2( \vert V \vert - \vert W \vert ) + 4 \vert W \vert \right) = \vert V \vert + \vert W \vert' title='\displaystyle \vert E(x) \vert \geq \frac{1}{2} \left( 2( \vert V \vert - \vert W \vert ) + 4 \vert W \vert \right) = \vert V \vert + \vert W \vert' class='latex' /></p>
<p>We want to prove that the support <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20E%28x%29%20%5Cvert%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert E(x) \vert}' title='{\vert E(x) \vert}' class='latex' /> of the LP can&#8217;t be too large. The first question is: how to estimate the size of the support of a basic solution. The constraints look like that:</p>
<p><img class="aligncenter size-full wp-image-251" title="bst_fig1" src="http://www.bigredbits.com/wp-content/uploads/2009/11/bst_fig1.png" alt="bst_fig1" width="506" height="248" /></p>
<p>A basic solution can be represented by picking <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20E%20%5Cvert%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert E \vert}' title='{\vert E \vert}' class='latex' /> rows of the matrix and making them tight. So, if we have a general <img src='http://s.wordpress.com/latex.php?latex=%7BAx%20%5Cleq%20b%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Ax \leq b}' title='{Ax \leq b}' class='latex' /> LP, we pick some submatrix <img src='http://s.wordpress.com/latex.php?latex=%7BA%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A&#039;}' title='{A&#039;}' class='latex' /> of <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' /> which is <img src='http://s.wordpress.com/latex.php?latex=%7Bn%20%5Ctimes%20n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n \times n}' title='{n \times n}' class='latex' /> and the basic solution is just <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%3D%20A%27%5E%7B-1%7D%20b%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x = A&#039;^{-1} b&#039;}' title='{x = A&#039;^{-1} b&#039;}' class='latex' />. The lines of matrix <img src='http://s.wordpress.com/latex.php?latex=%7BA%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A&#039;}' title='{A&#039;}' class='latex' /> can be of three types: they can be <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_S%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_S}' title='{\chi_S}' class='latex' />, which are corresponding to <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_%7Be%20%5Cin%20E%28S%29%7D%20x_e%20%5Cleq%20%5Cvert%20S%20%5Cvert%20-%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_{e \in E(S)} x_e \leq \vert S \vert - 1}' title='{\sum_{e \in E(S)} x_e \leq \vert S \vert - 1}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_v}' title='{\chi_v}' class='latex' /> that correspond to <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_%7Be%20%5Cin%20%5Cdelta%28v%29%7D%20x_e%20%5Cleq%20b_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_{e \in \delta(v)} x_e \leq b_v}' title='{\sum_{e \in \delta(v)} x_e \leq b_v}' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cdelta_e%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\delta_e}' title='{\delta_e}' class='latex' /> corresponding to <img src='http://s.wordpress.com/latex.php?latex=%7Bx_e%20%5Cgeq%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_e \geq 0}' title='{x_e \geq 0}' class='latex' />. There are <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20E%20%5Cvert%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert E \vert}' title='{\vert E \vert}' class='latex' /> vectors in total. The size of the support <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x)}' title='{E(x)}' class='latex' /> is smaller or equal the number of rows of the form <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_S%2C%20%5Cchi_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_S, \chi_v}' title='{\chi_S, \chi_v}' class='latex' /> in the basic solution. Therefore the idea to bound the size of the support is to prove that &#8220;all basic solutions can be represented by a small number of rows in the form <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_S%2C%20%5Cchi_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_S, \chi_v}' title='{\chi_S, \chi_v}' class='latex' />. And this is done using the following:</p>
<blockquote><p><strong>Lemma 3</strong> <em><a name="basic_sol"></a> Assuming <img src='http://s.wordpress.com/latex.php?latex=%7BE%20%3D%20E%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E = E(x)}' title='{E = E(x)}' class='latex' />, for any basic solution <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' />, there is <img src='http://s.wordpress.com/latex.php?latex=%7BZ%20%5Csubseteq%20W%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Z \subseteq W}' title='{Z \subseteq W}' class='latex' /> and a family <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{S}}' title='{\mathcal{S}}' class='latex' /> of sets such that: </em></p>
<ol>
<li><em> The restrictions correspondent to <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Cin%20%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \in \mathcal{S}}' title='{S \in \mathcal{S}}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cin%20Z%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \in Z}' title='{v \in Z}' class='latex' /> are tight for <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' /> </em></li>
<li><em> <img src='http://s.wordpress.com/latex.php?latex=%7B%5C%7B%20%5Cchi_S%3B%20S%20%5Cin%20%5Cmathcal%7BS%7D%20%5C%7D%20%5Ccup%20%5C%7B%20%5Cchi_v%3B%20v%20%5Cin%20Z%20%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\{ \chi_S; S \in \mathcal{S} \} \cup \{ \chi_v; v \in Z \}}' title='{\{ \chi_S; S \in \mathcal{S} \} \cup \{ \chi_v; v \in Z \}}' class='latex' /> is an independent set </em></li>
<li><em> <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20%5Cmathcal%7BS%7D%20%5Cvert%20%2B%20%5Cvert%20Z%20%5Cvert%20%3D%20%5Cvert%20E%28x%29%20%5Cvert%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert \mathcal{S} \vert + \vert Z \vert = \vert E(x) \vert}' title='{\vert \mathcal{S} \vert + \vert Z \vert = \vert E(x) \vert}' class='latex' /> </em></li>
<li><em> <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{S}}' title='{\mathcal{S}}' class='latex' /> is a laminar family </em></li>
</ol>
<p><em> </em></p></blockquote>
<p>The first 3 items are straightfoward properties of basic solutions. The fourth one, means that for two sets <img src='http://s.wordpress.com/latex.php?latex=%7BS_1%2C%20S_2%20%5Cin%20%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_1, S_2 \in \mathcal{S}}' title='{S_1, S_2 \in \mathcal{S}}' class='latex' />, one of three things happen: <img src='http://s.wordpress.com/latex.php?latex=%7BS_1%20%5Csubseteq%20S_2%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_1 \subseteq S_2}' title='{S_1 \subseteq S_2}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%7BS_2%20%5Csubseteq%20S_1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_2 \subseteq S_1}' title='{S_2 \subseteq S_1}' class='latex' /> or <img src='http://s.wordpress.com/latex.php?latex=%7BS_1%20%5Ccap%20S_2%20%3D%20%5Cemptyset%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_1 \cap S_2 = \emptyset}' title='{S_1 \cap S_2 = \emptyset}' class='latex' />. Now, we based on the previous lemma and in the following result that can be easily proved by induction, we will prove Lemma <a href="#structure_lemma">1</a>.</p>
<blockquote><p><strong>Lemma 4</strong> <em> If <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{S}}' title='{\mathcal{S}}' class='latex' /> is a laminar family over the set <img src='http://s.wordpress.com/latex.php?latex=%7BV%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{V}' title='{V}' class='latex' /> where each set <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Cin%20%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \in \mathcal{S}}' title='{S \in \mathcal{S}}' class='latex' /> contains at least <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' /> elements, then <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20%5Cmathcal%7BS%7D%20%5Cvert%20%5Cleq%20%5Cvert%20V%20%5Cvert%20-%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert \mathcal{S} \vert \leq \vert V \vert - 1}' title='{\vert \mathcal{S} \vert \leq \vert V \vert - 1}' class='latex' />. </em></p></blockquote>
<p>Now, the proof of Lemma <a href="#structure_lemma">1</a> is easy. Let&#8217;s do it and then we come back to prove Lemma <a href="#basic_sol">3</a>. Simply see that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20E%28x%29%20%5Cvert%20%3D%20%5Cvert%20%5Cmathcal%7BS%7D%20%5Cvert%20%2B%20%5Cvert%20Z%20%5Cvert%20%5Cleq%20%5Cvert%20V%20%5Cvert%20-%201%20%2B%20%5Cvert%20W%20%5Cvert%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert E(x) \vert = \vert \mathcal{S} \vert + \vert Z \vert \leq \vert V \vert - 1 + \vert W \vert}' title='{\vert E(x) \vert = \vert \mathcal{S} \vert + \vert Z \vert \leq \vert V \vert - 1 + \vert W \vert}' class='latex' /> what contradicts <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20E%28x%29%20%5Cvert%20%5Cgeq%20%5Cvert%20V%20%5Cvert%20%2B%20%5Cvert%20W%20%5Cvert%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert E(x) \vert \geq \vert V \vert + \vert W \vert}' title='{\vert E(x) \vert \geq \vert V \vert + \vert W \vert}' class='latex' />.</p>
<p><strong> Uncrossing argument </strong></p>
<p>And now we arrive in the technical heart of the proof, which is proving Lemma <a href="#basic_sol">3</a>. This says that given any basic solution, given any feasible solution, we can write it as a &#8220;structured&#8221; basic solution. We start with any basic feasible solution. This already satifies (1)-(3), then we need to change that solution to satisfy condition (4) as well. We need to get rid crossing elements, i.e., <img src='http://s.wordpress.com/latex.php?latex=%7BS%2CT%20%5Cin%20%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S,T \in \mathcal{S}}' title='{S,T \in \mathcal{S}}' class='latex' /> in the form:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-252" title="bst_fig2" src="http://www.bigredbits.com/wp-content/uploads/2009/11/bst_fig2.png" alt="bst_fig2" width="246" height="80" /></p>
<p>We do that by the means of the:</p>
<blockquote><p><strong>Lemma 5 (Uncrossing Lemma)</strong> <em> If <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' /> are intersecting and tight (tight in the sense that their respective constraint is tight), then <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccup%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cup T}' title='{S \cup T}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccap%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cap T}' title='{S \cap T}' class='latex' /> are also tight and:<br />
</em></p>
<p align="center"><em><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cchi_%7BS%20%5Ccap%20T%7D%20%2B%20%5Cchi_%7BS%20%5Ccup%20T%7D%20%3D%20%5Cchi_S%20%2B%20%5Cchi_T&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \chi_{S \cap T} + \chi_{S \cup T} = \chi_S + \chi_T' title='\displaystyle \chi_{S \cap T} + \chi_{S \cup T} = \chi_S + \chi_T' class='latex' /></em></p>
<p><em> </em></p></blockquote>
<p>Which corresponds to that picture:</p>
<p><img class="aligncenter size-full wp-image-253" title="bst_fig3" src="http://www.bigredbits.com/wp-content/uploads/2009/11/bst_fig3.png" alt="bst_fig3" width="493" height="135" /></p>
<p><em>Proof:</em> First, we note that <img src='http://s.wordpress.com/latex.php?latex=%7Bx%28E%28S%29%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x(E(S))}' title='{x(E(S))}' class='latex' /> is a supermodular function, i.e.:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20x%28E%28S%29%29%20%2B%20x%28E%28T%29%29%20%5Cleq%20x%28E%28S%20%5Ccap%20T%29%29%20%2B%20x%28E%28S%20%5Ccup%20T%29%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle x(E(S)) + x(E(T)) \leq x(E(S \cap T)) + x(E(S \cup T))' title='\displaystyle x(E(S)) + x(E(T)) \leq x(E(S \cap T)) + x(E(S \cup T))' class='latex' /></p>
<p>We can see that by case analysis. Every edge appearing in the left side appears in the right side with at least the same multiplicity. Notice also that it holds with strict inequality iff there are edges from <img src='http://s.wordpress.com/latex.php?latex=%7BS%5Csetminus%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S\setminus T}' title='{S\setminus T}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7BT%20%5Csetminus%20S%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{T \setminus S}' title='{T \setminus S}' class='latex' />. Now, we have:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cbegin%7Baligned%7D%20%28%5Cvert%20S%20%5Cvert%20-%201%29%20%2B%20%28%5Cvert%20T%20%5Cvert%20-%201%29%20%26%20%3D%20%28%5Cvert%20S%20%5Ccap%20T%20%5Cvert%20-%201%29%20%2B%20%28%5Cvert%20S%20%5Ccup%20T%20%5Cvert%20-%201%29%20%5Cgeq%20%5C%5C%20%26%20%5Cgeq%20x%28E%28S%20%5Ccap%20T%29%29%20%2B%20x%28E%28S%20%5Ccup%20T%29%29%20%5Cgeq%20%5C%5C%20%26%20%5Cgeq%20x%28E%28S%29%29%20%2B%20x%28E%28T%29%29%20%3D%20%28%5Cvert%20S%20%5Cvert%20-%201%29%20%2B%20%28%5Cvert%20T%20%5Cvert%20-%201%29%20%5Cend%7Baligned%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \begin{aligned} (\vert S \vert - 1) + (\vert T \vert - 1) &amp; = (\vert S \cap T \vert - 1) + (\vert S \cup T \vert - 1) \geq \\ &amp; \geq x(E(S \cap T)) + x(E(S \cup T)) \geq \\ &amp; \geq x(E(S)) + x(E(T)) = (\vert S \vert - 1) + (\vert T \vert - 1) \end{aligned}' title='\displaystyle \begin{aligned} (\vert S \vert - 1) + (\vert T \vert - 1) &amp; = (\vert S \cap T \vert - 1) + (\vert S \cup T \vert - 1) \geq \\ &amp; \geq x(E(S \cap T)) + x(E(S \cup T)) \geq \\ &amp; \geq x(E(S)) + x(E(T)) = (\vert S \vert - 1) + (\vert T \vert - 1) \end{aligned}' class='latex' /></p>
<p>where the first relation is trivial, the second is by feasibility, the third is by supermodularity and the lastone is by tightness. So, all hold with equality and therefore <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccap%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cap T}' title='{S \cap T}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccup%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cup T}' title='{S \cup T}' class='latex' /> are tight. We also proved that:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20x%28E%28S%20%5Ccap%20T%29%29%20%2B%20x%28E%28S%20%5Ccup%20T%29%29%20%3D%20x%28E%28S%29%29%20%2B%20x%28E%28T%29%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle x(E(S \cap T)) + x(E(S \cup T)) = x(E(S)) + x(E(T))' title='\displaystyle x(E(S \cap T)) + x(E(S \cup T)) = x(E(S)) + x(E(T))' class='latex' /></p>
<p>so there can be no edge from <img src='http://s.wordpress.com/latex.php?latex=%7BS%5Csetminus%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S\setminus T}' title='{S\setminus T}' class='latex' /> to <img src='http://s.wordpress.com/latex.php?latex=%7BT%20%5Csetminus%20S%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{T \setminus S}' title='{T \setminus S}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x)}' title='{E(x)}' class='latex' /> and therefore, thinking just of edges in <img src='http://s.wordpress.com/latex.php?latex=%7BE%28x%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{E(x)}' title='{E(x)}' class='latex' /> we have:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cchi_%7BS%20%5Ccap%20T%7D%20%2B%20%5Cchi_%7BS%20%5Ccup%20T%7D%20%3D%20%5Cchi_S%20%2B%20%5Cchi_T&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \chi_{S \cap T} + \chi_{S \cup T} = \chi_S + \chi_T' title='\displaystyle \chi_{S \cap T} + \chi_{S \cup T} = \chi_S + \chi_T' class='latex' /></p>
<img src='http://s.wordpress.com/latex.php?latex=%5CBox&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Box' title='\Box' class='latex' />
<p><a class="snap_noshots" href="http://www.science.unitn.it/cirm/Goemans.pdf">Uncrossing arguments</a> are found everywhere in combinatorics. Now, we show how the Uncrossing Lemma can be used to prove Lemma <a href="#structure_lemma">1</a>:</p>
<p><em>Proof:</em> 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 any basic solution. It can be represented by a pair <img src='http://s.wordpress.com/latex.php?latex=%7B%28Y%2C%20%5Cmathcal%7BC%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(Y, \mathcal{C})}' title='{(Y, \mathcal{C})}' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=%7BY%20%5Csubseteq%20W%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Y \subseteq W}' title='{Y \subseteq W}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BC%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{C}}' title='{\mathcal{C}}' class='latex' /> is a family of sets. We will show that the same basic solution can be represented by <img src='http://s.wordpress.com/latex.php?latex=%7B%28Y%2C%20%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(Y, \mathcal{L})}' title='{(Y, \mathcal{L})}' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> is a laminar family and has the same size of <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BC%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{C}}' title='{\mathcal{C}}' class='latex' />.</p>
<p>Let <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{S}}' title='{\mathcal{S}}' class='latex' /> be all sets that are tight under <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=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> a maximal laminar family of tights sets in <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{S}}' title='{\mathcal{S}}' class='latex' />, such that <img src='http://s.wordpress.com/latex.php?latex=%7B%5C%7B%5Cchi_S%3B%20S%20%5Cin%20%5Cmathcal%7BL%7D%20%5C%7D%20%5Ccup%20%5C%7B%5Cchi_v%3B%20v%20%5Cin%20Z%20%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\{\chi_S; S \in \mathcal{L} \} \cup \{\chi_v; v \in Z \}}' title='{\{\chi_S; S \in \mathcal{L} \} \cup \{\chi_v; v \in Z \}}' class='latex' /> are independent. I claim that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20%5Cmathcal%7BL%7D%20%5Cvert%20%3D%20dim%28span%28%5Cmathcal%7BS%7D%29%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert \mathcal{L} \vert = dim(span(\mathcal{S}))}' title='{\vert \mathcal{L} \vert = dim(span(\mathcal{S}))}' class='latex' />.</p>
<p>In fact, suppose <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20%5Cmathcal%7BL%7D%20%5Cvert%20%3C%20dim%28span%28%5Cmathcal%7BS%7D%29%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert \mathcal{L} \vert &lt; dim(span(\mathcal{S}))}' title='{\vert \mathcal{L} \vert &lt; dim(span(\mathcal{S}))}' class='latex' />, then there are sets of <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{S}}' title='{\mathcal{S}}' class='latex' /> we could add to <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> without violating independence &#8211; the problem is that those sets would cross some set. Pick such <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Cin%20%5Cmathcal%7BS%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \in \mathcal{S}}' title='{S \in \mathcal{S}}' class='latex' /> intersecting fewer possible sets in <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' />. The set <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' /> intersects some <img src='http://s.wordpress.com/latex.php?latex=%7BT%20%5Cin%20%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{T \in \mathcal{L}}' title='{T \in \mathcal{L}}' class='latex' />. Since both are tight we can use the Uncrossing Lemma and we get:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cchi_%7BS%20%5Ccap%20T%7D%20%2B%20%5Cchi_%7BS%20%5Ccup%20T%7D%20%3D%20%5Cchi_S%20%2B%20%5Cchi_T&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \chi_{S \cap T} + \chi_{S \cup T} = \chi_S + \chi_T' title='\displaystyle \chi_{S \cap T} + \chi_{S \cup T} = \chi_S + \chi_T' class='latex' /></p>
<p>since <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_S%20%5Cnotin%20span%28%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_S \notin span(\mathcal{L})}' title='{\chi_S \notin span(\mathcal{L})}' class='latex' />, we can&#8217;t have simultaneously <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_%7BS%20%5Ccap%20T%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_{S \cap T}}' title='{\chi_{S \cap T}}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_%7BS%20%5Ccup%20T%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_{S \cup T}}' title='{\chi_{S \cup T}}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7Bspan%28%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{span(\mathcal{L})}' title='{span(\mathcal{L})}' class='latex' />. Let&#8217;s consider two cases:</p>
<ol>
<li> <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_%7BS%20%5Ccap%20T%7D%20%5Cnotin%20span%28%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_{S \cap T} \notin span(\mathcal{L})}' title='{\chi_{S \cap T} \notin span(\mathcal{L})}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccap%20T%20%5Cin%20span%28%5Cmathcal%7BS%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cap T \in span(\mathcal{S})}' title='{S \cap T \in span(\mathcal{S})}' class='latex' /> is in <img src='http://s.wordpress.com/latex.php?latex=%7Bspan%28%5Cmathcal%7BS%7D%29%20%5Csetminus%20span%28%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{span(\mathcal{S}) \setminus span(\mathcal{L})}' title='{span(\mathcal{S}) \setminus span(\mathcal{L})}' class='latex' /> and intersects fewer sets of <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> than <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' />, since all sets that intersect <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccap%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cap T}' title='{S \cap T}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> must intersect <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' /> as well (since no set can cross <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' />).<img class="aligncenter size-full wp-image-254" title="bst_fig4" src="http://www.bigredbits.com/wp-content/uploads/2009/11/bst_fig4.png" alt="bst_fig4" width="253" height="181" /></li>
<li> <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cchi_%7BS%20%5Ccup%20T%7D%20%5Cnotin%20span%28%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\chi_{S \cup T} \notin span(\mathcal{L})}' title='{\chi_{S \cup T} \notin span(\mathcal{L})}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccup%20T%20%5Cin%20span%28%5Cmathcal%7BS%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cup T \in span(\mathcal{S})}' title='{S \cup T \in span(\mathcal{S})}' class='latex' /> is in <img src='http://s.wordpress.com/latex.php?latex=%7Bspan%28%5Cmathcal%7BS%7D%29%20%5Csetminus%20span%28%5Cmathcal%7BL%7D%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{span(\mathcal{S}) \setminus span(\mathcal{L})}' title='{span(\mathcal{S}) \setminus span(\mathcal{L})}' class='latex' /> and intersects fewer sets of <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> than <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' />, since all sets that intersect <img src='http://s.wordpress.com/latex.php?latex=%7BS%20%5Ccup%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S \cup T}' title='{S \cup T}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%7BL%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal{L}}' title='{\mathcal{L}}' class='latex' /> must intersect <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' />.</li>
</ol>
<p>In either case we have a contradiction, so we proved that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cvert%20%5Cmathcal%7BL%7D%20%5Cvert%20%3D%20dim%28span%28%5Cmathcal%7BS%7D%29%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\vert \mathcal{L} \vert = dim(span(\mathcal{S}))}' title='{\vert \mathcal{L} \vert = dim(span(\mathcal{S}))}' class='latex' />. So we can generate all the space of tight sets with a laminar family. <img src='http://s.wordpress.com/latex.php?latex=%5CBox&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Box' title='\Box' class='latex' /></p>
<p>And this finishes the proof. Let&#8217;s go over all that we&#8217;ve done: we started with an LP and we wanted to prove that the support of each solution was not too large. We wanted that because we wanted to prove that there was one node with degree one in the support or a node in <img src='http://s.wordpress.com/latex.php?latex=%7BW%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{W}' title='{W}' class='latex' /> with small (<img src='http://s.wordpress.com/latex.php?latex=%7B%5Cleq%203%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\leq 3}' title='{\leq 3}' class='latex' />) degree. To prove that the degree of the support is small, we show that any basic solution has a representation in terms of a laminar family. Then we use the fact that laminar families can&#8217;t be very large families of sets. For that, we use the celebrated Uncrossing Lemma.</p>
<p><strong>Note:</strong> Most of this is based on my notes on David Williamson&#8217;s Approximation Algorithms class. I spent some time thinking about this algorithm and therefore I decided o post it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/249/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Looking at probability distributions</title>
		<link>http://www.bigredbits.com/archives/231</link>
		<comments>http://www.bigredbits.com/archives/231#comments</comments>
		<pubDate>Fri, 13 Nov 2009 03:16:27 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=231</guid>
		<description><![CDATA[I&#8217;ve been taking two classes in probability this semester and in those I saw the proofs of a lot of interesting theorems which I knew about previously but I have never seen the proof, as the Central Limit Theorem, the Laws of Large Numbers and so on&#8230; Also, some theory which is looks somewhat ugly [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been taking two classes in probability this semester and in those I saw the proofs of a lot of interesting theorems which I knew about previously but I have never seen the proof, as the Central Limit Theorem, the Laws of Large Numbers and so on&#8230; Also, some theory which is looks somewhat ugly in the undergrad courses becomes very clear with the proper formal treatment. Today I was thinking what was the main take-home message that a computer scientist could take from those classes and. at ;east for me, this message is the various ways of looking to probability distributions. I&#8217;ve heard about moments, Laplace transform, Fourier transform and other tools like that, but I never realized before their true power. Probably still today, most of their true power is hidden from me, but I am starting to look at them in a different way. Let me try to go over a few examples of different ways we can look at probability distributions and show cases where they are interesting.</p>
<p>Most of ways of looking at probability distributions are associated with multiplicative system: a multiplicative system <img src='http://s.wordpress.com/latex.php?latex=%7BQ%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q}' title='{Q}' class='latex' /> is a set of real-valued functions with the property that if <img src='http://s.wordpress.com/latex.php?latex=%7Bf_1%2C%20f_2%20%5Cin%20Q%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_1, f_2 \in Q}' title='{f_1, f_2 \in Q}' class='latex' /> then <img src='http://s.wordpress.com/latex.php?latex=%7Bf_1%20%5Cdot%20f_2%20%5Cin%20Q%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_1 \dot f_2 \in Q}' title='{f_1 \dot f_2 \in Q}' class='latex' />. Those kinds of sets are powerful because of the Multiplicative Systems Theorem:</p>
<blockquote><p><strong>Theorem 1 (Multiplicative Systems Theorem)</strong> <em> If <img src='http://s.wordpress.com/latex.php?latex=%7BQ%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q}' title='{Q}' class='latex' /> is a multiplicative system, <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' /> is a linear space containing <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' /> (the constant function <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 is closed under bounded convergence, then <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%5Csubseteq%20H%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q \subseteq H}' title='{Q \subseteq H}' class='latex' /> implies that <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' /> contains all bounded <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csigma%28Q%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sigma(Q)}' title='{\sigma(Q)}' class='latex' />-measurable functions. </em></p></blockquote>
<p>The theorem might look a bit cryptic if you are not familiar with the definitions, but it boils down to the following translation:</p>
<blockquote><p><strong>Theorem 2 (Translation of the Multiplicative Systems Theorem)</strong> <em> If <img src='http://s.wordpress.com/latex.php?latex=%7BQ%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q}' title='{Q}' class='latex' /> is &#8220;general&#8221; multiplicative system, <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=%7BY%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Y}' title='{Y}' class='latex' /> are random variable such that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathop%7B%5Cmathbb%20E%7D%7Bf%28X%29%7D%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%7Bf%28Y%29%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathop{\mathbb E}{f(X)} = \mathop{\mathbb E}{f(Y)}}' title='{\mathop{\mathbb E}{f(X)} = \mathop{\mathbb E}{f(Y)}}' class='latex' /> for all <img src='http://s.wordpress.com/latex.php?latex=%7Bf%20%5Cin%20Q%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f \in Q}' title='{f \in Q}' class='latex' /> then <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=%7BY%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Y}' title='{Y}' class='latex' /> have the same distribution. </em></p></blockquote>
<p>where general excludes some troublesome cases like <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%3D%20%5C%7B1%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q = \{1\}}' title='{Q = \{1\}}' class='latex' /> or all constant functions, for example. In technical terms, we wanted <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csigma%28Q%29%20%3D%20%5Csigma%5C%7Bf%5E%7B-1%7D%28%28-%5Cinfty%2Ca%5D%29%3B%20a%5Cin%20%7B%5Cmathbb%20R%7D%2C%20f%20%5Cin%20Q%20%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sigma(Q) = \sigma\{f^{-1}((-\infty,a]); a\in {\mathbb R}, f \in Q \}}' title='{\sigma(Q) = \sigma\{f^{-1}((-\infty,a]); a\in {\mathbb R}, f \in Q \}}' class='latex' /> to be the Borel <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csigma%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sigma}' title='{\sigma}' class='latex' />-algebra. But let&#8217;s not worry about those technical details and just look at the translated version. We now, discuss several kinds of multiplicative systems:</p>
<ol>
<li> The most common description of the a random variable is by the cummulative distribution function <img src='http://s.wordpress.com/latex.php?latex=%7BF%28u%29%20%3D%20P%5C%7BX%20%5Cleq%20u%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{F(u) = P\{X \leq u\}}' title='{F(u) = P\{X \leq u\}}' class='latex' />. This is associated with <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%3D%20%5C%7B%201_%7B%28-%5Cinfty%2Cu%5D%7D%28x%29%3B%20u%20%5Cin%20%7B%5Cmathbb%20R%7D%20%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q = \{ 1_{(-\infty,u]}(x); u \in {\mathbb R} \}}' title='{Q = \{ 1_{(-\infty,u]}(x); u \in {\mathbb R} \}}' class='latex' /> notice that simply <img src='http://s.wordpress.com/latex.php?latex=%7BF%28u%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%7B1_%7B%28-%5Cinfty%2Cu%5D%7D%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{F(u) = \mathop{\mathbb E}{1_{(-\infty,u]}}}' title='{F(u) = \mathop{\mathbb E}{1_{(-\infty,u]}}}' class='latex' />.</li>
<li> We can characterize a random variable by its moments: the variable <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' /> is characterized by the set <img src='http://s.wordpress.com/latex.php?latex=%7BM_n%20%3D%20%5Cint_%7B%5Cmathbb%20R%7D%20x%5En%20%5Cmu_X%28dx%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{M_n = \int_{\mathbb R} x^n \mu_X(dx)}' title='{M_n = \int_{\mathbb R} x^n \mu_X(dx)}' class='latex' />. Given the moemnts <img src='http://s.wordpress.com/latex.php?latex=%7BM_1%2C%20M_2%2C%20%5Chdots%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{M_1, M_2, \hdots}' title='{M_1, M_2, \hdots}' class='latex' />, the variable is totally characterized, i.e., if two variables have the same moments, then they have the same distribution by the Multiplicative Systems Theorem. This description is associated with the system <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%3D%20%5C%7Bx%5En%3B%20n%20%3D%201%2C%202%2C%20%5Chdots%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q = \{x^n; n = 1, 2, \hdots\}}' title='{Q = \{x^n; n = 1, 2, \hdots\}}' class='latex' /></li>
<li> <strong>Moment Generating Function</strong>: If <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' /> is a variable that assumes only integer values, we can describe the it as <img src='http://s.wordpress.com/latex.php?latex=%7Bp_0%2C%20p_1%2C%20p_2%2C%20%5Chdots%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_0, p_1, p_2, \hdots}' title='{p_0, p_1, p_2, \hdots}' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=%7Bp_n%20%3D%20P%5C%7B%20X%20%3D%20n%20%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_n = P\{ X = n \}}' title='{p_n = P\{ X = n \}}' class='latex' />. An interesting way of representing those probabilities is as the moment generating function <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cpsi_X%28z%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%7Bz%5EX%7D%20%3D%20%5Csum_%7Bn%3D0%7D%5E%5Cinfty%20p_n%20z%5En%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\psi_X(z) = \mathop{\mathbb E}{z^X} = \sum_{n=0}^\infty p_n z^n}' title='{\psi_X(z) = \mathop{\mathbb E}{z^X} = \sum_{n=0}^\infty p_n z^n}' class='latex' />. This is associated with the multiplicative system <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%3D%20%5C%7Bz%5Ex%2C%200%20%5Cleq%20z%20%3C%201%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q = \{z^x, 0 \leq z &lt; 1\}}' title='{Q = \{z^x, 0 \leq z &lt; 1\}}' class='latex' />.Now suppose we are given two discrete independent variables <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=%7BY%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Y}' title='{Y}' class='latex' />. What do we know about <img src='http://s.wordpress.com/latex.php?latex=%7BX%2BY%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X+Y}' title='{X+Y}' class='latex' />. It is easy to know its expectation, its variance, &#8230; but what about more complicated things? What is the distribution of <img src='http://s.wordpress.com/latex.php?latex=%7BX%2BY%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X+Y}' title='{X+Y}' class='latex' /> ? Moment generating functions answer this question very easily, since:
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cpsi_%7BX%2BY%7D%20%28z%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%20%5Bz%5E%7BX%2BY%7D%5D%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%20%5Bz%5E%7BX%7D%5D%20%5Ccdot%20%5Cmathop%7B%5Cmathbb%20E%7D%5Bz%5E%7BY%7D%5D%20%3D%20%5Cpsi_X%28z%29%20%5Ccdot%20%5Cpsi_Y%28z%29&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \psi_{X+Y} (z) = \mathop{\mathbb E} [z^{X+Y}] = \mathop{\mathbb E} [z^{X}] \cdot \mathop{\mathbb E}[z^{Y}] = \psi_X(z) \cdot \psi_Y(z)' title='\displaystyle \psi_{X+Y} (z) = \mathop{\mathbb E} [z^{X+Y}] = \mathop{\mathbb E} [z^{X}] \cdot \mathop{\mathbb E}[z^{Y}] = \psi_X(z) \cdot \psi_Y(z)' class='latex' /></p>
<p>If we know moment generating functions, we can calculate expectation very easily, since <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathop%7B%5Cmathbb%20E%7D%5BX%5D%20%3D%20%5Cpsi%27_X%281%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathop{\mathbb E}[X] = \psi&#039;_X(1)}' title='{\mathop{\mathbb E}[X] = \psi&#039;_X(1)}' class='latex' />. For example, suppose we have a process like that: there is one bacteria in time <img src='http://s.wordpress.com/latex.php?latex=%7Bt%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{t = 0}' title='{t = 0}' class='latex' />. In each timestep, either this bacteria dies (with probability <img src='http://s.wordpress.com/latex.php?latex=%7Bp_0%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_0}' title='{p_0}' class='latex' />), continues alive without reproducing (with probability <img src='http://s.wordpress.com/latex.php?latex=%7Bp_1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_1}' title='{p_1}' class='latex' /> or has <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' /> offsprings (with probability <img src='http://s.wordpress.com/latex.php?latex=%7Bp_%7B1%2Bk%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_{1+k}}' title='{p_{1+k}}' class='latex' />). In that case <img src='http://s.wordpress.com/latex.php?latex=%7B%5Csum_0%5E%5Cinfty%20p_n%20%3D%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\sum_0^\infty p_n = 1}' title='{\sum_0^\infty p_n = 1}' class='latex' />. Each time, the same happens, independently with each of the bacteria alive in that moment. The question is, what is the expected number of bacteria in time <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>It looks like a complicated problem with just elementary tools, but it is a simple problem if we have moment generating functions. Just let <img src='http://s.wordpress.com/latex.php?latex=%7BX_%7Bti%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X_{ti}}' title='{X_{ti}}' class='latex' /> be the variable associated with the <img src='http://s.wordpress.com/latex.php?latex=%7Bi%5E%7Bth%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{i^{th}}' title='{i^{th}}' class='latex' /> bacteria of time <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' />. It is zero if it dies, <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' /> if it stays the same and <img src='http://s.wordpress.com/latex.php?latex=%7Bk%2B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{k+1}' title='{k+1}' class='latex' /> if it has <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' /> offsprings. Let also <img src='http://s.wordpress.com/latex.php?latex=%7BN_t%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{N_t}' title='{N_t}' class='latex' /> be the number of bacteria in time <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' />. We want to know <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathop%7B%5Cmathbb%20E%7D%20N_t%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathop{\mathbb E} N_t}' title='{\mathop{\mathbb E} N_t}' class='latex' />. First, see that:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20N_t%20%3D%20%5Csum_%7Bi%3D1%7D%5E%7BN_%7Bt-1%7D%7D%20X_%7Bti%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle N_t = \sum_{i=1}^{N_{t-1}} X_{ti}' title='\displaystyle N_t = \sum_{i=1}^{N_{t-1}} X_{ti}' class='latex' /></p>
<p>Now, let&#8217;s write that in terms of moment generating functions:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cpsi_%7BN_t%7D%28z%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%7Bz%5E%7BX_%7Bt1%7D%20%2B%20%5Chdots%20%2B%20X_%7BtN_t%7D%7D%7D%20%3D%20%5Csum_%7Bk%3D0%7D%5E%5Cinfty%20P%5C%7BN_%7Bt-1%7D%20%3D%20k%5C%7D%20%5Ccdot%20%5Cmathop%7B%5Cmathbb%20E%7D%5Bz%5E%7BX_%7Bt1%7D%20%2B%20%5Chdots%20%2B%20X_%7BtN_t%7D%7D%20%5Cvert%20N_t%20%3D%20k%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \psi_{N_t}(z) = \mathop{\mathbb E}{z^{X_{t1} + \hdots + X_{tN_t}}} = \sum_{k=0}^\infty P\{N_{t-1} = k\} \cdot \mathop{\mathbb E}[z^{X_{t1} + \hdots + X_{tN_t}} \vert N_t = k]' title='\displaystyle \psi_{N_t}(z) = \mathop{\mathbb E}{z^{X_{t1} + \hdots + X_{tN_t}}} = \sum_{k=0}^\infty P\{N_{t-1} = k\} \cdot \mathop{\mathbb E}[z^{X_{t1} + \hdots + X_{tN_t}} \vert N_t = k]' class='latex' /></p>
<p>which is just:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cpsi_%7BN_t%7D%28z%29%20%3D%20%5Csum_%7Bk%3D0%7D%5E%5Cinfty%20P%5C%7BN_%7Bt-1%7D%20%3D%20k%5C%7D%20%5Ccdot%20%5Cmathop%7B%5Cmathbb%20E%7D%5Bz%5E%7BX_%7Bt1%7D%20%2B%20%5Chdots%20%2B%20X_%7Btk%7D%7D%5D%20%3D%20%5Csum_%7Bk%3D0%7D%5E%5Cinfty%20P%5C%7BN_%7Bt-1%7D%20%3D%20k%20%5C%7D%20%5Ccdot%20%5Cpsi_X%20%28z%29%5Ek&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \psi_{N_t}(z) = \sum_{k=0}^\infty P\{N_{t-1} = k\} \cdot \mathop{\mathbb E}[z^{X_{t1} + \hdots + X_{tk}}] = \sum_{k=0}^\infty P\{N_{t-1} = k \} \cdot \psi_X (z)^k' title='\displaystyle \psi_{N_t}(z) = \sum_{k=0}^\infty P\{N_{t-1} = k\} \cdot \mathop{\mathbb E}[z^{X_{t1} + \hdots + X_{tk}}] = \sum_{k=0}^\infty P\{N_{t-1} = k \} \cdot \psi_X (z)^k' class='latex' /></p>
<p>since the variables are all independent and identically distributed. Now, notice that:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cpsi_%7BN_%7Bt-1%7D%7D%28z%29%20%3D%20%5Csum_%7Bk%3D0%7D%5E%5Cinfty%20P%5C%7BN_%7Bt-1%7D%20%3D%20k%5C%7D%20%5Ccdot%20z%5Ek&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \psi_{N_{t-1}}(z) = \sum_{k=0}^\infty P\{N_{t-1} = k\} \cdot z^k' title='\displaystyle \psi_{N_{t-1}}(z) = \sum_{k=0}^\infty P\{N_{t-1} = k\} \cdot z^k' class='latex' /></p>
<p>by the definition of moment generating function, so we effectively proved that:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cpsi_%7BN_%7Bt%7D%7D%28z%29%20%3D%20%5Cpsi_%7BN_%7Bt-1%7D%7D%28%5Cpsi_X%28z%29%29%20%3D%20%5Cpsi_X%20%5Cpsi_X%20%5Chdots%20%5Cpsi_X%28z%29%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \psi_{N_{t}}(z) = \psi_{N_{t-1}}(\psi_X(z)) = \psi_X \psi_X \hdots \psi_X(z) ' title='\displaystyle \psi_{N_{t}}(z) = \psi_{N_{t-1}}(\psi_X(z)) = \psi_X \psi_X \hdots \psi_X(z) ' class='latex' /></p>
<p>We proved that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cpsi_%7BN_%7Bt%7D%7D%28z%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\psi_{N_{t}}(z)}' title='{\psi_{N_{t}}(z)}' class='latex' /> is just <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cpsi%28z%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\psi(z)}' title='{\psi(z)}' class='latex' /> iterated <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' /> times. Now, calculating the expectation is easy, using the fact that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cpsi_X%281%29%20%3D%201%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\psi_X(1) = 1}' title='{\psi_X(1) = 1}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cpsi%27_X%281%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%20X%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\psi&#039;_X(1) = \mathop{\mathbb E} X}' title='{\psi&#039;_X(1) = \mathop{\mathbb E} X}' class='latex' />. Just see that: <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathop%7B%5Cmathbb%20E%7D%20N_t%20%3D%20%5Cpsi_%7BN_%7Bt%7D%7D%27%281%29%20%3D%20%5Cpsi_%7BN_%7Bt-1%7D%7D%27%28%5Cpsi_X%281%29%29%20%5Ccdot%20%5Cpsi%27_X%281%29%20%3D%20%5Cpsi_%7BN_%7Bt-1%7D%7D%27%281%29%20%5Ccdot%20%5Cmathop%7B%5Cmathbb%20E%7D%20X%20%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathop{\mathbb E} N_t = \psi_{N_{t}}&#039;(1) = \psi_{N_{t-1}}&#039;(\psi_X(1)) \cdot \psi&#039;_X(1) = \psi_{N_{t-1}}&#039;(1) \cdot \mathop{\mathbb E} X }' title='{\mathop{\mathbb E} N_t = \psi_{N_{t}}&#039;(1) = \psi_{N_{t-1}}&#039;(\psi_X(1)) \cdot \psi&#039;_X(1) = \psi_{N_{t-1}}&#039;(1) \cdot \mathop{\mathbb E} X }' class='latex' />. Then, clearly <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathop%7B%5Cmathbb%20E%7D%20N_t%20%3D%20%28%5Cmathop%7B%5Cmathbb%20E%7D%20X%29%5Et%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathop{\mathbb E} N_t = (\mathop{\mathbb E} X)^t}' title='{\mathop{\mathbb E} N_t = (\mathop{\mathbb E} X)^t}' class='latex' />. Using similar technique we can prove a lot more things about this process, just by analyzing the behavior of the moment generating function.</li>
<li> <strong>Laplace Tranform</strong>: Now, moving to continuous variables, if <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' /> is a continuous non-negative variable we can define its Laplace tranform as: <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cphi_X%28u%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%20%5Be%5E%7Bu%20X%7D%5D%20%3D%20%5Cint_0%5E%5Cinfty%20e%5E%7Bux%7D%20%5Cmu_X%28dx%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\phi_X(u) = \mathop{\mathbb E} [e^{u X}] = \int_0^\infty e^{ux} \mu_X(dx)}' title='{\phi_X(u) = \mathop{\mathbb E} [e^{u X}] = \int_0^\infty e^{ux} \mu_X(dx)}' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmu_X%28dx%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mu_X(dx)}' title='{\mu_X(dx)}' class='latex' /> stands for the distribution of <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' />, for example, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Crho_X%28x%29%20dx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\rho_X(x) dx}' title='{\rho_X(x) dx}' class='latex' />. This is associated with the multiplicative system <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%3D%20%5C%7Be%5E%7Bux%7D%3B%20u%20%5Cgeq%200%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q = \{e^{ux}; u \geq 0\}}' title='{Q = \{e^{ux}; u \geq 0\}}' class='latex' />. Again, by the Multiplicative Systems Theorem, if <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cphi_X%20%3D%20%5Cphi_Y%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\phi_X = \phi_Y}' title='{\phi_X = \phi_Y}' class='latex' />, then the two variables have the same distribution. The Laplace tranform has the same nice properties as the Moment Generating Function, for example, <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cphi_%7BX%2BY%7D%28u%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%5Be%5E%7B%28X%2BY%29u%7D%5D%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%5Be%5E%7BXu%7D%5D%20%5Ccdot%20%5Cmathop%7B%5Cmathbb%20E%7D%5Be%5E%7BYu%7D%5D%20%3D%20%5Cphi_X%28u%29%20%5Ccdot%20%5Cphi_Y%28u%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\phi_{X+Y}(u) = \mathop{\mathbb E}[e^{(X+Y)u}] = \mathop{\mathbb E}[e^{Xu}] \cdot \mathop{\mathbb E}[e^{Yu}] = \phi_X(u) \cdot \phi_Y(u)}' title='{\phi_{X+Y}(u) = \mathop{\mathbb E}[e^{(X+Y)u}] = \mathop{\mathbb E}[e^{Xu}] \cdot \mathop{\mathbb E}[e^{Yu}] = \phi_X(u) \cdot \phi_Y(u)}' class='latex' />.And it allows us to do similar tricks than the one I just showed for Moment Generating Functions. One common trick that is used, for example, in the proof of Chernoff bounds is, given independent non-negative random variables:
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20P%5Cleft%5C%7B%5Csum_i%20X_i%20%3E%20u%5Cright%5C%7D%20%3D%20P%5Cleft%5C%7Be%5E%7B%5Csum_i%20X_i%7D%20%3E%20e%5Eu%5Cright%5C%7D%20%5Cleq%20%5Cfrac%7B%5Cmathop%7B%5Cmathbb%20E%7D%5Be%5E%7B%5Csum_i%20X_i%7D%20%5D%7D%7Be%5Eu%7D%20%3D%20%5Cfrac%7B%5Cprod_i%20%5Cmathop%7B%5Cmathbb%20E%7D%5Be%5E%7BX_i%7D%20%5D%7D%7Be%5Eu%7D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle P\left\{\sum_i X_i &gt; u\right\} = P\left\{e^{\sum_i X_i} &gt; e^u\right\} \leq \frac{\mathop{\mathbb E}[e^{\sum_i X_i} ]}{e^u} = \frac{\prod_i \mathop{\mathbb E}[e^{X_i} ]}{e^u} ' title='\displaystyle P\left\{\sum_i X_i &gt; u\right\} = P\left\{e^{\sum_i X_i} &gt; e^u\right\} \leq \frac{\mathop{\mathbb E}[e^{\sum_i X_i} ]}{e^u} = \frac{\prod_i \mathop{\mathbb E}[e^{X_i} ]}{e^u} ' class='latex' /></p>
<p>where we also used Markov Inequality: <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathop%7B%5Cmathbb%20E%7D%5BX%5D%20%5Cgeq%20%5Cbeta%20P%5C%7BX%20%5Cgeq%20%5Cbeta%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathop{\mathbb E}[X] \geq \beta P\{X \geq \beta\}}' title='{\mathop{\mathbb E}[X] \geq \beta P\{X \geq \beta\}}' class='latex' />. Passing to the Laplace transform is the main ingredient in the Chernoff bound and it allows us to sort of &#8220;decouple&#8221; the random variables in the sum. There are several other cases where the Laplace transform proves itsself very useful and turns things that looked very complicated when we saw in undergrad courses into simple and clear things. One clear example of that is the motivation for the Poisson random variable:</p>
<p>If <img src='http://s.wordpress.com/latex.php?latex=%7BT_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{T_i}' title='{T_i}' class='latex' /> are independend exponentially distributed random variables with mean <img src='http://s.wordpress.com/latex.php?latex=%7B%5Clambda%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\lambda}' title='{\lambda}' class='latex' />, then <img src='http://s.wordpress.com/latex.php?latex=%7B%5Crho_%7BT_i%7D%28t%29%20%3D%20%5Clambda%20e%5E%7B-%20%5Clambda%20t%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\rho_{T_i}(t) = \lambda e^{- \lambda t}}' title='{\rho_{T_i}(t) = \lambda e^{- \lambda t}}' class='latex' />. An elementary calculation shows that its laplace transform is <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cphi_%7BT_i%7D%28u%29%20%3D%20%5Cfrac%7B%5Clambda%7D%7B%5Clambda%2Bu%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\phi_{T_i}(u) = \frac{\lambda}{\lambda+u}}' title='{\phi_{T_i}(u) = \frac{\lambda}{\lambda+u}}' class='latex' />. Let <img src='http://s.wordpress.com/latex.php?latex=%7BS_n%20%3D%20T-0%20%2B%20T_1%20%2B%20T_2%20%2B%20%5Chdots%20%2B%20T_n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_n = T-0 + T_1 + T_2 + \hdots + T_n}' title='{S_n = T-0 + T_1 + T_2 + \hdots + T_n}' class='latex' />, i.e., the time of the <img src='http://s.wordpress.com/latex.php?latex=%7B%28n%2B1%29%5E%7Bth%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(n+1)^{th}}' title='{(n+1)^{th}}' class='latex' /> arrival. We want to know what is the distribution of <img src='http://s.wordpress.com/latex.php?latex=%7BS_n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_n}' title='{S_n}' class='latex' />. How to do that?</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cphi_%7BS_n%7D%28u%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%5Be%5E%7Bu%28T_0%20%2B%20%5Chdots%20%2B%20T_n%29%7D%5D%20%3D%20%5Cphi_T%28u%29%5E%7Bn%2B1%7D%20%3D%20%5Cleft%28%20%5Cfrac%7B%5Clambda%7D%7B%5Clambda%2Bu%7D%20%5Cright%29%5E%7Bn%2B1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \phi_{S_n}(u) = \mathop{\mathbb E}[e^{u(T_0 + \hdots + T_n)}] = \phi_T(u)^{n+1} = \left( \frac{\lambda}{\lambda+u} \right)^{n+1}' title='\displaystyle \phi_{S_n}(u) = \mathop{\mathbb E}[e^{u(T_0 + \hdots + T_n)}] = \phi_T(u)^{n+1} = \left( \frac{\lambda}{\lambda+u} \right)^{n+1}' class='latex' /></p>
<p>Now, we need to find <img src='http://s.wordpress.com/latex.php?latex=%7B%5Crho_%7BS_n%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\rho_{S_n}}' title='{\rho_{S_n}}' class='latex' /> such that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cint_0%5E%5Cinfty%20%5Crho_%7BS_n%7D%28t%29%20e%5E%7Biu%7D%20dt%20%3D%20%5Cleft%28%20%5Cfrac%7B%5Clambda%7D%7B%5Clambda%2Bu%7D%20%5Cright%29%5E%7Bn%2B1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\int_0^\infty \rho_{S_n}(t) e^{iu} dt = \left( \frac{\lambda}{\lambda+u} \right)^{n+1}}' title='{\int_0^\infty \rho_{S_n}(t) e^{iu} dt = \left( \frac{\lambda}{\lambda+u} \right)^{n+1}}' class='latex' />. Now it is just a matter of solving this equation and we get: <img src='http://s.wordpress.com/latex.php?latex=%7B%5Crho_%7BS_n%7D%28t%29%20%3D%20%5Cfrac%7B%5Clambda%20%28%5Clambda%20t%29%5En%7D%7Bn%21%7D%20e%5E%7B-%5Clambda%20t%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\rho_{S_n}(t) = \frac{\lambda (\lambda t)^n}{n!} e^{-\lambda t}}' title='{\rho_{S_n}(t) = \frac{\lambda (\lambda t)^n}{n!} e^{-\lambda t}}' class='latex' />. Now, the Poisson varible <img src='http://s.wordpress.com/latex.php?latex=%7BN_t%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{N_t}' title='{N_t}' class='latex' /> measures the number of arrivals in <img src='http://s.wordpress.com/latex.php?latex=%7B%5B0%2Ct%5D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{[0,t]}' title='{[0,t]}' class='latex' /> and therefore:</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Cbegin%7Baligned%7D%20P%5C%7BN_t%20%3D%20n%5C%7D%20%26%20%3D%20P%5C%7BS_%7Bn-1%7D%20%3C%20t%20%3C%20S_n%5C%7D%20%3D%20P%5C%7BS_n%20%3E%20t%5C%7D%20-%20P%5C%7BS_%7Bn-1%7D%20%5Cgeq%20t%5C%7D%20%5C%5C%20%26%20%3D%20%5Cint_t%5E%5Cinfty%20%5Crho_%7BS_n%7D%28t%29%20dt%20-%20%5Cint_t%5E%5Cinfty%20%5Crho_%7BS_%7Bn-1%7D%7D%28t%29%20dt%20%3D%20%5Cfrac%7B%28%5Clambda%20t%29%5En%7D%7Bn%21%7D%20e%5E%7B-%5Clambda%20t%7D%20%5Cend%7Baligned%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \begin{aligned} P\{N_t = n\} &amp; = P\{S_{n-1} &lt; t &lt; S_n\} = P\{S_n &gt; t\} - P\{S_{n-1} \geq t\} \\ &amp; = \int_t^\infty \rho_{S_n}(t) dt - \int_t^\infty \rho_{S_{n-1}}(t) dt = \frac{(\lambda t)^n}{n!} e^{-\lambda t} \end{aligned}' title='\displaystyle \begin{aligned} P\{N_t = n\} &amp; = P\{S_{n-1} &lt; t &lt; S_n\} = P\{S_n &gt; t\} - P\{S_{n-1} \geq t\} \\ &amp; = \int_t^\infty \rho_{S_n}(t) dt - \int_t^\infty \rho_{S_{n-1}}(t) dt = \frac{(\lambda t)^n}{n!} e^{-\lambda t} \end{aligned}' class='latex' /></p>
</li>
<li> <strong>Characteristic Function or Fourier Tranform</strong>: Taking <img src='http://s.wordpress.com/latex.php?latex=%7BQ%20%3D%20%5C%7Be%5E%7Bi%5Clambda%20x%7D%3B%20x%20%5Cin%20%5Cmathbb%7BC%7D%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{Q = \{e^{i\lambda x}; x \in \mathbb{C}\}}' title='{Q = \{e^{i\lambda x}; x \in \mathbb{C}\}}' class='latex' /> we get the Fourier Transform: <img src='http://s.wordpress.com/latex.php?latex=%7Bf_X%28%5Clambda%29%20%3D%20%5Cmathop%7B%5Cmathbb%20E%7D%20e%5E%7Bi%20%5Clambda%20x%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_X(\lambda) = \mathop{\mathbb E} e^{i \lambda x}}' title='{f_X(\lambda) = \mathop{\mathbb E} e^{i \lambda x}}' class='latex' /> which also has some of the nice properties of the previous ones and some additional ones. The characteristic functions were the main actors in the development of all the probability techniques that lead to the main result of 19th century Probability Theory: the Central Limit Theorem. We know that moment generating functions and Laplace transforms completely characterize the distributions, but it is not clear how to recover a distribution once we have a transform. For Fourier Transform there is a cleas and simple way of doing that by means of the Inversion Formula:
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%5Crho_X%28x%29%20%3D%20%5Cfrac%7B1%7D%7B2%20%5Cpi%7D%20%5Cint_%7B%5Cmathbb%20R%7D%20e%5E%7B-i%20%5Clambda%20x%7D%20f_X%28%5Clambda%29%20d%5Clambda&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle \rho_X(x) = \frac{1}{2 \pi} \int_{\mathbb R} e^{-i \lambda x} f_X(\lambda) d\lambda' title='\displaystyle \rho_X(x) = \frac{1}{2 \pi} \int_{\mathbb R} e^{-i \lambda x} f_X(\lambda) d\lambda' class='latex' /></p>
<p>One fact that always puzzled me was: why is the normal distribution <img src='http://s.wordpress.com/latex.php?latex=%7B%5Crho_N%20%28x%29%20%3D%20%5Cfrac%7B1%7D%7B%5Csqrt%7B2%20%5Cpi%7D%7D%20e%5E%7B-x%5E2%2F2%7D%20%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\rho_N (x) = \frac{1}{\sqrt{2 \pi}} e^{-x^2/2} }' title='{\rho_N (x) = \frac{1}{\sqrt{2 \pi}} e^{-x^2/2} }' class='latex' /> so important? What does it have in special to be the limiting distribution in the Central Limit Theorem, i.e., if <img src='http://s.wordpress.com/latex.php?latex=%7BX_1%2C%20X_2%2C%20%5Chdots%2C%20X_n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{X_1, X_2, \hdots, X_n}' title='{X_1, X_2, \hdots, X_n}' class='latex' /> is a sequence of independent random variables, <img src='http://s.wordpress.com/latex.php?latex=%7BS_n%20%3D%20%5Csum_1%5En%20X_i%20-%20%5Csum_1%5En%20%5Cmathop%7B%5Cmathbb%20E%7D%20X_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_n = \sum_1^n X_i - \sum_1^n \mathop{\mathbb E} X_i}' title='{S_n = \sum_1^n X_i - \sum_1^n \mathop{\mathbb E} X_i}' class='latex' /> then <img src='http://s.wordpress.com/latex.php?latex=%7BS_n%20%2F%20%5Csqrt%7Bvar%20S_n%7D%20%5Crightarrow%20N%280%2C1%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{S_n / \sqrt{var S_n} \rightarrow N(0,1)}' title='{S_n / \sqrt{var S_n} \rightarrow N(0,1)}' class='latex' /> under some natural conditions on the variables. The reason the normal is so special is because it is a &#8220;fixed point&#8221; for the Fourier Transform. We can see that <img src='http://s.wordpress.com/latex.php?latex=%7Bf_N%28%5Clambda%29%20%3D%20e%5E%7B-%5Clambda_2%2F2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{f_N(\lambda) = e^{-\lambda_2/2}}' title='{f_N(\lambda) = e^{-\lambda_2/2}}' class='latex' />. And there we have something special about it that makes me believe the Central Limit Theorem.</li>
</ol>
<p style="text-align: center;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>This blog post was based on lectures by Professor Dynkin at Cornell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/231/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random Spanning Trees</title>
		<link>http://www.bigredbits.com/archives/226</link>
		<comments>http://www.bigredbits.com/archives/226#comments</comments>
		<pubDate>Wed, 04 Nov 2009 04:51:59 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[combinatorics]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=226</guid>
		<description><![CDATA[BigRedBits is again pleased to have Igor Gorodezky as a guest blogger directly from UCLA. I leave you with his excelent post on the Wilson&#8217;s algorithm. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Igor again, with another mathematical dispatch from UCLA, where I&#8217;m spending the semester eating and breathing combinatorics as part of the 2009 program on combinatorics and its applications [...]]]></description>
				<content:encoded><![CDATA[<p>BigRedBits is again pleased to have <a href="http://jay.cam.cornell.edu/~igor/">Igor Gorodezky</a> as a guest blogger directly from UCLA. I leave you with his excelent post on the Wilson&#8217;s algorithm.</p>
<p style="text-align: center;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Igor again, with another mathematical dispatch from UCLA, where I&#8217;m spending the semester eating and breathing combinatorics as part of the 2009 program on combinatorics and its applications at IPAM. In the course of some reading related to a problem with which I&#8217;ve been occupying myself, I ran across a neat algorithmic result &#8211; Wilson&#8217;s algorithm for uniformly generating spanning trees of a graph. With Renato&#8217;s kind permission, let me once again make myself at home here at Big Red Bits and tell you all about this little gem.</p>
<p>The problem is straightforward, and I&#8217;ve essentially already stated it: given an undirected, connected graph <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' />, we want an algorithm that outputs uniformly random spanning trees of <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' />. In the early &#8217;90s, Aldous and Broder independently discovered an algorithm for accomplishing this task. This algorithm generates a tree <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' /> by, roughly speaking, performing a random walk on <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' /> and adding the edge <img src='http://s.wordpress.com/latex.php?latex=%7B%28u%2Cv%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(u,v)}' title='{(u,v)}' 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' /> every time that the walk steps 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=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> is a vertex that has not been seen before.</p>
<p>Wilson&#8217;s algorithm (D. B. Wilson, <a class="snap_noshots" href="http://dbwilson.com/ja/tau.ps">&#8220;Generating random spanning trees more quickly than the cover time,&#8221;</a> STOC &#8217;96) takes a slightly different approach. Let us fix a root vertex <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. Wilson&#8217;s algorithm can be stated as a <em>loop-erased random walk</em> on <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' /> as follows.</p>
<blockquote><p><strong>Algorithm 1 (Loop-erased random walk)</strong> Maintain a tree <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' />, initialized to consist of <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> alone. While there remains a vertex <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> not in <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' />: perform a random walk starting at <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' />, erasing loops as they are created, until the walk encounters a vertex in <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' />, then add 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' /> the cycle-erased simple path from <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' 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' />.</p></blockquote>
<p>We observe that the algorithm halts with probability 1 (its expected running time is actually polynomial, but let&#8217;s not concern ourselves with these issues here), and outputs a random directed spanning tree oriented towards <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. It is a minor miracle that this tree is in fact sampled <em>uniformly</em> from the set of all such trees. Let us note that this offers a solution to the original problem, as sampling <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> randomly and then running the algorithm will produce a uniformly generated spanning tree of <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' />.</p>
<p>It remains, then, to prove that the algorithm produces uniform spanning trees rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> (by which we mean directed spanning trees oriented towards <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />). To this we dedicate the remainder of this post.</p>
<p><strong>1. A &#8220;different&#8221; algorithm </strong></p>
<p>Wilson&#8217;s proof is delightfully sneaky: we begin by stating and analyzing a seemingly different algorithm, the <em>cycle-popping</em> algorithm. We will prove that this algorithm has the desired properties, and then argue that it is equivalent to the loop-erased random walk (henceforth LERW).</p>
<p>The cycle-popping algorithm works as follows. Given <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />, associate with each non-root vertex <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> an infinite <em>stack</em> of neighbors. More formally, to each <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cneq%20r%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \neq r}' title='{v \neq r}' class='latex' /> we associate</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%20%5Cmathcal%20S_v%20%3D%20%5Bu_%7B0%7D%2C%20u_%7B1%7D%2C%20%5Cdots%20%5D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle  \mathcal S_v = [u_{0}, u_{1}, \dots ] ' title='\displaystyle  \mathcal S_v = [u_{0}, u_{1}, \dots ] ' class='latex' /></p>
<p>where each <img src='http://s.wordpress.com/latex.php?latex=%7Bu_%7Bi%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_{i}}' title='{u_{i}}' class='latex' /> is uniformly (and independently) sampled from the set of neighbors of <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' />. Note that each stack is <em>not</em> a random walk, just a list of neighbors. We refer to the left-most element above as the <em>top</em> of <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' />, and by <em>popping</em> the stack <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' /> we mean removing this top vertex from <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' />.</p>
<p>Define the <em>stack graph</em> <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> to be the directed graph on <img src='http://s.wordpress.com/latex.php?latex=%7BV%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{V}' title='{V}' class='latex' /> that has an edge from <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> to <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' /> if <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' /> is at the top of the stack <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' />. Clearly, if <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' /> has <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' /> vertices then <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> is an oriented subgraph of <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' /> with <img src='http://s.wordpress.com/latex.php?latex=%7Bn-1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n-1}' title='{n-1}' class='latex' /> edges. The following lemma follows immediately.</p>
<blockquote><p><strong>Lemma 1</strong> <em><a name="lemstack_graph"></a> Either <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> is a directed spanning tree oriented towards <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> or it contains a directed cycle. </em></p></blockquote>
<p>If there is a directed cycle <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' /> in <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> we may pop it by popping <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' /> for every <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cin%20C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \in C}' title='{v \in C}' class='latex' />. This eliminates <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' />, but of course might create other directed cycles. Without resolving this tension quite yet, let us go ahead and formally state the cycle-popping algorithm.</p>
<blockquote><p><strong>Algorithm 2 (Cycle-popping algorithm)</strong> Create a stack <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' /> for every <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cneq%20r%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \neq r}' title='{v \neq r}' class='latex' />. While <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> contains any directed cycles, pop a cycle from the stacks. If this process ever terminates, output <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' />.</p></blockquote>
<p>Note that by the lemma, if the algorithm ever terminates then its output is a spanning tree rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. We claim that the algorithm terminates with probability 1, and moreover generates spanning trees rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> uniformly.</p>
<p>To this end, some more definitions: let us say that given a stack <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' />, the vertex <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> is at <em>level</em> <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' />. The level of a vertex in a stack is static, and is defined when the stack is created. That is, the level of <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> does not change even if <img src='http://s.wordpress.com/latex.php?latex=%7Bu_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{u_i}' title='{u_i}' class='latex' /> advances to the top of the stack as a result of the stack getting popped.</p>
<p>We regard the sequence of stack graphs produced by the algorithm as <em>leveled</em> stack graphs: each non-root vertex <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> is assigned the level of its stack. Observe that the level of <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' /> in <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> is the number of times that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20S_v%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal S_v}' title='{\mathcal S_v}' class='latex' /> has been popped. In the same way, we regard cycles encountered by the algorithm as leveled cycles, and we can regard the tree produced by the algorithm (if indeed one is produced) as a leveled tree.</p>
<p>The analysis of the algorithm relies on the following key lemma (Theorem 4 in Wilson&#8217;s paper), which tells us that the order in which the algorithm pops cycles is irrelevant.</p>
<blockquote><p><strong>Lemma 2</strong> <em><a name="lemcycles_commute"></a> For a given set of stacks, either the cycle-popping algorithm never terminates, or there exists a unique leveled spanning tree <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' /> rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> such that the algorithm outputs <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' /> irrespective of the order in which cycles are popped. </em></p></blockquote>
<p><em>Proof:</em> Fix a set of stacks <img src='http://s.wordpress.com/latex.php?latex=%7B%5C%7B%20%5Cmathcal%20S_v%20%5C%7D_%7Bv%20%5Cneq%20r%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\{ \mathcal S_v \}_{v \neq r}}' title='{\{ \mathcal S_v \}_{v \neq r}}' class='latex' />. Consider a leveled cycle <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' /> that is pop-able, i.e.~there exist leveled cycles <img src='http://s.wordpress.com/latex.php?latex=%7BC_1%2C%20C_2%2C%20%5Cdots%2C%20C_k%3DC%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C_1, C_2, \dots, C_k=C}' title='{C_1, C_2, \dots, C_k=C}' class='latex' /> that can be popped in sequence. We claim that if the algorithm pops any cycle not equal to <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 there still must exist a series of cycles that ends 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' /> and that can be popped in sequence. In other words, if <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 pop-able then it remains pop-able, no matter which cycles are popped, until <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' /> itself is actually popped.</p>
<p>Let <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' /> be a cycle popped by the algorithm. If <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%3DC_1%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;=C_1}' title='{C&#039;=C_1}' class='latex' /> then the claim is clearly true. Also, if <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' /> shares no vertices with <img src='http://s.wordpress.com/latex.php?latex=%7BC_1%2C%20%5Cdots%2C%20C_k%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C_1, \dots, C_k}' title='{C_1, \dots, C_k}' class='latex' />, then the claim is true again. So assume otherwise, and let <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' /> be the first in the series <img src='http://s.wordpress.com/latex.php?latex=%7BC_1%2C%20%5Cdots%2C%20C_k%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C_1, \dots, C_k}' title='{C_1, \dots, C_k}' class='latex' /> to share a vertex with <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' />. Let us show that <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%3DC_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;=C_i}' title='{C&#039;=C_i}' class='latex' /> by contradiction.</p>
<p>If <img src='http://s.wordpress.com/latex.php?latex=%7BC_i%20%5Cneq%20C%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C_i \neq C&#039;}' title='{C_i \neq C&#039;}' class='latex' />, then <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' /> and <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' /> must share a vertex <img src='http://s.wordpress.com/latex.php?latex=%7Bw%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{w}' title='{w}' class='latex' /> that has different successors in <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' /> and <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' />. But by definition of <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' />, none of the <img src='http://s.wordpress.com/latex.php?latex=%7BC_1%2C%20%5Cdots%2C%20C_%7Bi-1%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C_1, \dots, C_{i-1}}' title='{C_1, \dots, C_{i-1}}' class='latex' /> contain <img src='http://s.wordpress.com/latex.php?latex=%7Bw%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{w}' title='{w}' class='latex' />, and this implies that <img src='http://s.wordpress.com/latex.php?latex=%7Bw%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{w}' title='{w}' class='latex' /> has the same level in <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' /> and <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' />. Therefore its successor in both cycles is the same, a contradiction. This proves <img src='http://s.wordpress.com/latex.php?latex=%7BC_i%3DC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C_i=C&#039;}' title='{C_i=C&#039;}' class='latex' />.</p>
<p>Moreover, the argument above proves that <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' /> and <img src='http://s.wordpress.com/latex.php?latex=%7BC%27%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{C&#039;}' title='{C&#039;}' class='latex' /> are equal as <em>leveled</em> cycles (i.e.~every vertex has the same level in both cycles). Hence</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%20C%27%3DC_i%2C%20C_1%2C%20C_2%2C%20%5Cdots%2C%20C_%7Bi-1%7D%2C%20C_%7Bi%2B1%7D%2C%20%5Cdots%2C%20C_k%3DC%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle  C&#039;=C_i, C_1, C_2, \dots, C_{i-1}, C_{i+1}, \dots, C_k=C ' title='\displaystyle  C&#039;=C_i, C_1, C_2, \dots, C_{i-1}, C_{i+1}, \dots, C_k=C ' class='latex' /></p>
<p>is a series of cycles that can be popped in sequence, which proves the original claim about <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' />.</p>
<p>We conclude that given a set of stacks, either there is an infinite number of pop-able cycles, in which case there will always be an infinite number and the algorithm will never terminate, or there is a finite number of such cycles. In the latter case, every one of these cycles is eventually popped, and the algorithm produces a spanning tree <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' /> rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. The level of each non-root vertex in <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 given by (one plus) the number of popped cycles that contained <img src='http://s.wordpress.com/latex.php?latex=%7Bv%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v}' title='{v}' class='latex' />. <img src='http://s.wordpress.com/latex.php?latex=%5CBox&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Box' title='\Box' class='latex' /></p>
<p>Wilson summarizes the cycle-popping algorithm thusly: &#8220;[T]he stacks uniquely define a tree together with a partially ordered set of cycles layered on top of it. The algorithm peels off these cycles to find the tree.&#8221;</p>
<blockquote><p><strong>Theorem 3</strong> <em> The cycle-popping algorithm terminates with probability 1, and the tree that it outputs is a uniformly sampled spanning tree rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. </em></p></blockquote>
<p><em>Proof:</em> The first claim is easy: <img src='http://s.wordpress.com/latex.php?latex=%7BG%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G}' title='{G}' class='latex' /> has a spanning tree, therefore it has a directed spanning tree oriented towards <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. The stacks generated in the first step of the algorithm will contain such a tree, and hence the algorithm will terminate, with probability 1.</p>
<p>Now, consider a spanning tree <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' /> rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' />. We&#8217;ll abuse notation and let <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' /> be the event that <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 produced by the algorithm. Similarly, given a collection of leveled cycles <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal C}' title='{\mathcal C}' class='latex' />, we will write <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal C}' title='{\mathcal C}' class='latex' /> for the event that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal C}' title='{\mathcal C}' class='latex' /> is the set of leveled cycles popped by the algorithm before it terminates. Finally, let <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20C%20%5Cwedge%20T%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal C \wedge T}' title='{\mathcal C \wedge T}' class='latex' /> be the event that the algorithm popped the leveled cycles in <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathcal%20C%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\mathcal C}' title='{\mathcal C}' class='latex' /> and terminated, with the resulting <em>leveled</em> tree being equal 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>By the independence of the stack entries, we have <img src='http://s.wordpress.com/latex.php?latex=%7B%5CPr%5B%5Cmathcal%20C%20%5Cwedge%20T%5D%20%3D%20%5CPr%5B%5Cmathcal%20C%5D%20%5Ccdot%20p%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Pr[\mathcal C \wedge T] = \Pr[\mathcal C] \cdot p}' title='{\Pr[\mathcal C \wedge T] = \Pr[\mathcal C] \cdot p}' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=%7Bp%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p}' title='{p}' class='latex' /> is the probability that the algorithm&#8217;s output is a leveled version of <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' />, a quantity which a moment&#8217;s reflection will reveal is independent of <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,</p>
<p align="center"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%20%5CPr%5BT%5D%20%3D%20%5Csum_%7B%5Cmathcal%20C%7D%20%5CPr%5B%5Cmathcal%20C%20%5Cwedge%20T%5D%20%3D%20p%20%5Csum_%7B%5Cmathcal%20C%7D%20%5CPr%5B%5Cmathcal%20C%5D%20&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle  \Pr[T] = \sum_{\mathcal C} \Pr[\mathcal C \wedge T] = p \sum_{\mathcal C} \Pr[\mathcal C] ' title='\displaystyle  \Pr[T] = \sum_{\mathcal C} \Pr[\mathcal C \wedge T] = p \sum_{\mathcal C} \Pr[\mathcal C] ' class='latex' /></p>
<p>which, as desired, is independent of <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' />. <img src='http://s.wordpress.com/latex.php?latex=%5CBox&#038;bg=T&#038;fg=000000&#038;s=0' alt='\Box' title='\Box' class='latex' /></p>
<p><strong>2. Conclusion </strong></p>
<p>We have shown that the cycle-popping algorithm generates spanning trees rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> uniformly. It remains to observe that the LERW algorithm is nothing more than an implementation of the cycle-popping algorithm! Instead of initially generating the (infinitely long) stacks and then looking for cycles to pop, the LERW generates stack elements as necessary via random walk (computer scientists might recognize this as the Principle of Deferred Decisions). If the LERW encounters a loop, then it has found a cycle in the stack graph <img src='http://s.wordpress.com/latex.php?latex=%7BG_%7B%5Cmathcal%20S%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{G_{\mathcal S}}' title='{G_{\mathcal S}}' class='latex' /> induced by the stacks that the LERW has been generating. Erasing the loop is equivalent to popping this cycle. We conclude that the LERW algorithm generates spanning trees rooted at <img src='http://s.wordpress.com/latex.php?latex=%7Br%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{r}' title='{r}' class='latex' /> uniformly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/226/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>Cayley-Hamilton Theorem and Jordan Canonical Form</title>
		<link>http://www.bigredbits.com/archives/215</link>
		<comments>http://www.bigredbits.com/archives/215#comments</comments>
		<pubDate>Thu, 29 Oct 2009 04:17:15 +0000</pubDate>
		<dc:creator>renatoppl</dc:creator>
				<category><![CDATA[theory]]></category>
		<category><![CDATA[finite fields]]></category>
		<category><![CDATA[linear algebra]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=215</guid>
		<description><![CDATA[I was discussing last week with my officemates Hu Fu and Ashwin about the Cayley-Hamilton Theorem. The theorem is the following, given an matrix we can define its characteristic polynomial by . The Cayley-Hamilton Theorem says that . The polynomiale is something like: so we can just see it as a formal polynomial and think [...]]]></description>
				<content:encoded><![CDATA[<p>I was discussing last week with my officemates Hu Fu and Ashwin about the Cayley-Hamilton Theorem. The theorem is the following, given an <img src='http://s.wordpress.com/latex.php?latex=%7Bn%20%5Ctimes%20n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n \times n}' title='{n \times n}' class='latex' /> matrix <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' /> we can define its characteristic polynomial by <img src='http://s.wordpress.com/latex.php?latex=%7Bp_A%28%5Clambda%29%20%3D%20%5Cdet%28A%20-%20I%5Clambda%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_A(\lambda) = \det(A - I\lambda)}' title='{p_A(\lambda) = \det(A - I\lambda)}' class='latex' />. The Cayley-Hamilton Theorem says that <img src='http://s.wordpress.com/latex.php?latex=%7Bp_A%28A%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_A(A) = 0}' title='{p_A(A) = 0}' class='latex' />. The polynomiale is something like:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20p_A%28x%29%20%3D%20a_k%20x%5Ek%20%2B%20a_%7Bk-1%7D%20x%5E%7Bk-1%7D%20%2B%20%5Chdots%20%2B%20a_1%20x%5E1%20%2B%20a_0&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle p_A(x) = a_k x^k + a_{k-1} x^{k-1} + \hdots + a_1 x^1 + a_0' title='\displaystyle p_A(x) = a_k x^k + a_{k-1} x^{k-1} + \hdots + a_1 x^1 + a_0' class='latex' /></p>
<p>so we can just see it as a formal polynomial and think of:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20p_A%28A%29%20%3D%20a_k%20A%5Ek%20%2B%20a_%7Bk-1%7D%20A%5E%7Bk-1%7D%20%2B%20%5Chdots%20%2B%20a_1%20A%20%2B%20a_0%20I&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle p_A(A) = a_k A^k + a_{k-1} A^{k-1} + \hdots + a_1 A + a_0 I' title='\displaystyle p_A(A) = a_k A^k + a_{k-1} A^{k-1} + \hdots + a_1 A + a_0 I' class='latex' /></p>
<p>which is an <img src='http://s.wordpress.com/latex.php?latex=%7Bn%20%5Ctimes%20n%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{n \times n}' title='{n \times n}' class='latex' /> matrix. The theorem says it is the zero matrix. We thought for a while, looked in the <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Cayley_hamilton_theorem">Wikipedia</a>, and there there were a few proofs, but not the one-line proof I was looking for. Later, I got this proof that I sent to Hu Fu:</p>
<p>Write the matrix <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' /> in the basis of its eigenvectors, then we can write <img src='http://s.wordpress.com/latex.php?latex=%7BA%20%3D%20%5CGamma%5Et%20D%20%5CGamma%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A = \Gamma^t D \Gamma}' title='{A = \Gamma^t D \Gamma}' class='latex' /> where <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' /> is the diagonal matrix with the eigenvalues in the main diagonal.</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20A%5Ek%20%3D%20%28%5CGamma%5Et%20D%20%5CGamma%29%20%5Chdots%20%28%5CGamma%5Et%20D%20%5CGamma%29%20%3D%20%5CGamma%5Et%20D%5Ek%20%5CGamma&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle A^k = (\Gamma^t D \Gamma) \hdots (\Gamma^t D \Gamma) = \Gamma^t D^k \Gamma' title='\displaystyle A^k = (\Gamma^t D \Gamma) \hdots (\Gamma^t D \Gamma) = \Gamma^t D^k \Gamma' class='latex' /></p>
<p>and since <img src='http://s.wordpress.com/latex.php?latex=%7BD%20%3D%20%5Ctext%7Bdiag%7D%28%5Clambda_1%2C%20%5Chdots%2C%20%5Clambda_n%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{D = \text{diag}(\lambda_1, \hdots, \lambda_n)}' title='{D = \text{diag}(\lambda_1, \hdots, \lambda_n)}' class='latex' /> we have <img src='http://s.wordpress.com/latex.php?latex=%7BD%5Ek%20%3D%20%5Ctext%7Bdiag%7D%28%5Clambda_1%5Ek%2C%20%5Chdots%2C%20%5Clambda_n%5Ek%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{D^k = \text{diag}(\lambda_1^k, \hdots, \lambda_n^k)}' title='{D^k = \text{diag}(\lambda_1^k, \hdots, \lambda_n^k)}' class='latex' />. Now, it is simple to see that:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20p_A%28A%29%20%3D%20%5CGamma%5Et%20p%28D%29%20%5CGamma&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle p_A(A) = \Gamma^t p(D) \Gamma' title='\displaystyle p_A(A) = \Gamma^t p(D) \Gamma' class='latex' /></p>
<p>and therefore:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20p%28D%29%20%3D%20%5Cbegin%7Bbmatrix%7D%26%20p_A%28%5Clambda_1%29%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20p_A%28%5Clambda_2%29%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20%26%20%5Cddots%20%26%20%5C%5C%20%26%20%26%20%26%20%26%20p_A%28%5Clambda_n%29%20%5Cend%7Bbmatrix%7D%20%3D%20%5Cbegin%7Bbmatrix%7D%20%26%200%20%26%20%26%20%26%20%5C%5C%20%26%20%26%200%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20%26%20%5Cddots%20%26%20%5C%5C%20%26%20%26%20%26%20%26%200%20%5Cend%7Bbmatrix%7D%20%3D%200&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle p(D) = \begin{bmatrix}&amp; p_A(\lambda_1) &amp; &amp; &amp; \\ &amp; &amp; p_A(\lambda_2) &amp; &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; p_A(\lambda_n) \end{bmatrix} = \begin{bmatrix} &amp; 0 &amp; &amp; &amp; \\ &amp; &amp; 0 &amp; &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; 0 \end{bmatrix} = 0' title='\displaystyle p(D) = \begin{bmatrix}&amp; p_A(\lambda_1) &amp; &amp; &amp; \\ &amp; &amp; p_A(\lambda_2) &amp; &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; p_A(\lambda_n) \end{bmatrix} = \begin{bmatrix} &amp; 0 &amp; &amp; &amp; \\ &amp; &amp; 0 &amp; &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; 0 \end{bmatrix} = 0' class='latex' /></p>
<p>And that was the one-line proof. One even simpler proof is: let <img src='http://s.wordpress.com/latex.php?latex=%7Bv_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v_i}' title='{v_i}' class='latex' /> be the eigenvectors, then <img src='http://s.wordpress.com/latex.php?latex=%7Bp_A%28A%29v_i%20%3D%20p_A%28%5Clambda_i%29A%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_A(A)v_i = p_A(\lambda_i)A = 0}' title='{p_A(A)v_i = p_A(\lambda_i)A = 0}' class='latex' />, so <img src='http://s.wordpress.com/latex.php?latex=%7Bp_A%28A%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_A(A)}' title='{p_A(A)}' class='latex' /> must 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' /> since it returns zero for all elements of a basis. Well, I sent that to Hu Fu and he told me the proof had a bug. Not really a bug, but I was proving only for symmetric matrices. More generally, I was proving for diagonalizable matrices. He showed me, for example, the matrix:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20%20%5Cbegin%7Bbmatrix%7D%200%20%26%201%20%5C%5C%200%20%26%200%20%5Cend%7Bbmatrix%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle  \begin{bmatrix} 0 &amp; 1 \\ 0 &amp; 0 \end{bmatrix}' title='\displaystyle  \begin{bmatrix} 0 &amp; 1 \\ 0 &amp; 0 \end{bmatrix}' class='latex' /></p>
<p>which has only one eigenvalue <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' /> and the the eigenvectors are all of the form <img src='http://s.wordpress.com/latex.php?latex=%7B%28x%2C0%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{(x,0)}' title='{(x,0)}' class='latex' /> for <img src='http://s.wordpress.com/latex.php?latex=%7Bx%20%5Cin%20%7B%5Cmathbb%20R%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x \in {\mathbb R}}' title='{x \in {\mathbb R}}' class='latex' />. So, the dimension of the space spanned by the eigenvectors is <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' />, less than the dimension of the matrix. This never happens for symmetric matrices, and I guess after some time as a computer scientist, I got used to work only with symmetric matrices for almost everything I use: metrics, quadratic forms, correlation matrices, &#8230; but there is more out there then only symmetric matrices. The good news is that this proof is not hard to fix for the general case.</p>
<p>First, it is easy to prove that for each root of the characteristic polynomial there is one eigenvector associated to it (just see that <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cdet%28A%20-%20%5Clambda%20I%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\det(A - \lambda I) = 0}' title='{\det(A - \lambda I) = 0}' class='latex' /> and therefore there must be <img src='http://s.wordpress.com/latex.php?latex=%7Bv%20%5Cin%20%5Cker%28A%20-%20%5Clambda%20I%29%20%5Csetminus%20%5C%7B%200%20%5C%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{v \in \ker(A - \lambda I) \setminus \{ 0 \}}' title='{v \in \ker(A - \lambda I) \setminus \{ 0 \}}' class='latex' />, so if all the roots are distinct, then there is a basis of eigenvalues, and therefore the matrix is diagonalizable (notice that maybe we will need to use complex eigenvalues, but it is ok). The good thing is that a matrix having two identical eigenvalues is a &#8220;coincidence&#8221;. We can identify matrices with <img src='http://s.wordpress.com/latex.php?latex=%7B%7B%5Cmathbb%20R%7D%5E%7Bn%5E2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{{\mathbb R}^{n^2}}' title='{{\mathbb R}^{n^2}}' class='latex' />. The matrices with identical eigenvalues form a zero measure subset of <img src='http://s.wordpress.com/latex.php?latex=%7B%7B%5Cmathbb%20R%7D%5E%7Bn%5E2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{{\mathbb R}^{n^2}}' title='{{\mathbb R}^{n^2}}' class='latex' />, they are in fact the roots of a polynomial in <img src='http://s.wordpress.com/latex.php?latex=%7Bx_%7Bij%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{x_{ij}}' title='{x_{ij}}' class='latex' />. This polynomial is the <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Resultant">resultant polynomial</a> <img src='http://s.wordpress.com/latex.php?latex=%7BR_%7Bp%2Cp%27%7D%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{R_{p,p&#039;} = 0}' title='{R_{p,p&#039;} = 0}' class='latex' />. Therefore, we proved Cayley-Hamilton theorem in the complement of a zero-measure set in <img src='http://s.wordpress.com/latex.php?latex=%7B%7B%5Cmathbb%20R%7D%5E%7Bn%5E2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{{\mathbb R}^{n^2}}' title='{{\mathbb R}^{n^2}}' class='latex' />. Since <img src='http://s.wordpress.com/latex.php?latex=%7BA%20%5Cmapsto%20p_A%28A%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A \mapsto p_A(A)}' title='{A \mapsto p_A(A)}' class='latex' /> is a continuous function, it extends naturally to all matrices <img src='http://s.wordpress.com/latex.php?latex=%7BA%20%5Cin%20%7B%5Cmathbb%20R%7D%5E%7Bn%5E2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A \in {\mathbb R}^{n^2}}' title='{A \in {\mathbb R}^{n^2}}' class='latex' />.</p>
<p>We can also interpret that probabilistically: get a matrix <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' /> where <img src='http://s.wordpress.com/latex.php?latex=%7BU_%7Bij%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{U_{ij}}' title='{U_{ij}}' class='latex' /> is taken uniformly at random from <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' />. Then <img src='http://s.wordpress.com/latex.php?latex=%7BA%20%2B%20%5Cepsilon%20U%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A + \epsilon U}' title='{A + \epsilon U}' class='latex' /> has with probability <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' /> all different eigenvalues. So, <img src='http://s.wordpress.com/latex.php?latex=%7Bp_%7BA%2B%5Cepsilon%20U%7D%20%28A%2B%5Cepsilon%20U%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_{A+\epsilon U} (A+\epsilon U) = 0}' title='{p_{A+\epsilon U} (A+\epsilon U) = 0}' class='latex' /> with probability <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' />. Now, just make <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cepsilon%20%5Crightarrow%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\epsilon \rightarrow 0}' title='{\epsilon \rightarrow 0}' class='latex' />.</p>
<p>Ok, this proves the Theorem for real and complex matrices, but what about a matrix defined over a general field where we can&#8217;t use those continuity arguments. A way to get around it is by using <a class="snap_noshots" href="http://en.wikipedia.org/wiki/Jordan_canonical_form">Jordan Canonical Form</a>, which is a generalization of eigenvector decomposition. Not all matrices have eigenvector decomposition, but all matrices over an algebraic closed field can be written in Jordan Canonical Form. Given any <img src='http://s.wordpress.com/latex.php?latex=%7BA%20%5Cin%20%5Coverline%7BK%7D%5E%7Bn%5E2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{A \in \overline{K}^{n^2}}' title='{A \in \overline{K}^{n^2}}' class='latex' /> there is a matrix <img src='http://s.wordpress.com/latex.php?latex=%7B%5CGamma%20%5Cin%20%5Coverline%7BK%7D%5E%7Bn%5E2%7D%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\Gamma \in \overline{K}^{n^2}}' title='{\Gamma \in \overline{K}^{n^2}}' class='latex' /> so that:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20A%20%3D%20%5CGamma%5E%7B-1%7D%20%5Cbegin%7Bbmatrix%7D%26%20B_1%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20B_2%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20%26%20%5Cddots%20%26%20%5C%5C%20%26%20%26%20%26%20%26%20B_p%20%5Cend%7Bbmatrix%7D%5CGamma&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle A = \Gamma^{-1} \begin{bmatrix}&amp; B_1 &amp; &amp; &amp; \\ &amp; &amp; B_2 &amp; &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; B_p \end{bmatrix}\Gamma' title='\displaystyle A = \Gamma^{-1} \begin{bmatrix}&amp; B_1 &amp; &amp; &amp; \\ &amp; &amp; B_2 &amp; &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; B_p \end{bmatrix}\Gamma' class='latex' /></p>
<p>where <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' /> are blocks of the form:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20B_i%20%3D%20%5Cbegin%7Bbmatrix%7D%26%20%5Clambda%20%26%201%20%26%20%26%20%5C%5C%20%26%20%26%20%5Clambda%20%26%201%20%26%20%26%20%5C%5C%20%26%20%26%20%26%20%5Cddots%20%26%20%5C%5C%20%26%20%26%20%26%20%26%20%5Clambda%20%5Cend%7Bbmatrix%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle B_i = \begin{bmatrix}&amp; \lambda &amp; 1 &amp; &amp; \\ &amp; &amp; \lambda &amp; 1 &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; \lambda \end{bmatrix}' title='\displaystyle B_i = \begin{bmatrix}&amp; \lambda &amp; 1 &amp; &amp; \\ &amp; &amp; \lambda &amp; 1 &amp; &amp; \\ &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; \lambda \end{bmatrix}' class='latex' /></p>
<p>By the same argument as above, we just need to prove Cayley Hamilton for each block in separate. So we need to prove that <img src='http://s.wordpress.com/latex.php?latex=%7Bp_A%28B_i%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p_A(B_i) = 0}' title='{p_A(B_i) = 0}' class='latex' />. If the block has size <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' />, then it is exacly the proof above. If the block is bigger, then we need to look at how does <img src='http://s.wordpress.com/latex.php?latex=%7BB_i%5Ek%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{B_i^k}' title='{B_i^k}' class='latex' /> looks like. By inspection:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20B_i%5E2%20%3D%20%5Cbegin%7Bbmatrix%7D%26%20%5Clambda%5E2%20%26%202%20%5Clambda%20%26%201%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20%5Clambda%5E2%20%26%202%20%5Clambda%20%26%201%20%26%20%26%20%26%20%5C%5C%20%26%20%26%20%26%20%26%20%26%20%5Cddots%20%26%20%5C%5C%20%26%20%26%20%26%20%26%20%26%20%5Clambda%5E2%20%5Cend%7Bbmatrix%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle B_i^2 = \begin{bmatrix}&amp; \lambda^2 &amp; 2 \lambda &amp; 1 &amp; &amp; &amp; \\ &amp; &amp; \lambda^2 &amp; 2 \lambda &amp; 1 &amp; &amp; &amp; \\ &amp; &amp; &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; &amp; \lambda^2 \end{bmatrix}' title='\displaystyle B_i^2 = \begin{bmatrix}&amp; \lambda^2 &amp; 2 \lambda &amp; 1 &amp; &amp; &amp; \\ &amp; &amp; \lambda^2 &amp; 2 \lambda &amp; 1 &amp; &amp; &amp; \\ &amp; &amp; &amp; &amp; &amp; \ddots &amp; \\ &amp; &amp; &amp; &amp; &amp; \lambda^2 \end{bmatrix}' class='latex' /></p>
<p>Tipically, for <img src='http://s.wordpress.com/latex.php?latex=%7BB_i%5Ek%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{B_i^k}' title='{B_i^k}' class='latex' /> we have in each row, starting in column <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' /> the sequence <img src='http://s.wordpress.com/latex.php?latex=%7B%5Clambda%5Ek%2C%20k%20%5Clambda%5E%7Bk-1%7D%2C%20k%28k-1%29%20%5Clambda%5E%7Bk-1%7D%2C%20%5Chdots%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\lambda^k, k \lambda^{k-1}, k(k-1) \lambda^{k-1}, \hdots}' title='{\lambda^k, k \lambda^{k-1}, k(k-1) \lambda^{k-1}, \hdots}' class='latex' />, i.e., <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bd%5E0%7D%7Bd%5Clambda%5E0%7D%20%5Clambda%5Ek%2C%20%5Cfrac%7Bd%5E1%7D%7Bd%5Clambda%5E1%7D%20%5Clambda%5Ek%20%2C%20%5Cfrac%7Bd%5E2%7D%7Bd%5Clambda%5E2%7D%20%5Clambda%5Ek%20%5Chdots%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\frac{d^0}{d\lambda^0} \lambda^k, \frac{d^1}{d\lambda^1} \lambda^k , \frac{d^2}{d\lambda^2} \lambda^k \hdots}' title='{\frac{d^0}{d\lambda^0} \lambda^k, \frac{d^1}{d\lambda^1} \lambda^k , \frac{d^2}{d\lambda^2} \lambda^k \hdots}' class='latex' />. So, we have</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%20p%28B_i%29%20%3D%20%5Cbegin%7Bbmatrix%7D%20p%28%5Clambda%29%20%26%20p%27%28%5Clambda%29%20%26%20p%27%27%28%5Clambda%29%20%26%20p%27%27%27%28%5Clambda%29%20%26%20%5Chdots%20%5C%5C%20%26%20p%28%5Clambda%29%20%26%20p%27%28%5Clambda%29%20%26%20p%27%27%28%5Clambda%29%20%26%20%5Chdots%20%5C%5C%20%09%09%09%09%26%20%26%20p%28%5Clambda%29%20%26%20p%27%28%5Clambda%29%20%26%20%5Chdots%20%5C%5C%20%09%09%09%09%26%20%26%20%26%20p%28%5Clambda%29%20%26%20%5Chdots%20%5C%5C%20%09%09%09%09%26%20%26%20%26%20%26%20%5Cddots%20%5C%5C%20%5Cend%7Bbmatrix%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\displaystyle p(B_i) = \begin{bmatrix} p(\lambda) &amp; p&#039;(\lambda) &amp; p&#039;&#039;(\lambda) &amp; p&#039;&#039;&#039;(\lambda) &amp; \hdots \\ &amp; p(\lambda) &amp; p&#039;(\lambda) &amp; p&#039;&#039;(\lambda) &amp; \hdots \\ 				&amp; &amp; p(\lambda) &amp; p&#039;(\lambda) &amp; \hdots \\ 				&amp; &amp; &amp; p(\lambda) &amp; \hdots \\ 				&amp; &amp; &amp; &amp; \ddots \\ \end{bmatrix}' title='\displaystyle p(B_i) = \begin{bmatrix} p(\lambda) &amp; p&#039;(\lambda) &amp; p&#039;&#039;(\lambda) &amp; p&#039;&#039;&#039;(\lambda) &amp; \hdots \\ &amp; p(\lambda) &amp; p&#039;(\lambda) &amp; p&#039;&#039;(\lambda) &amp; \hdots \\ 				&amp; &amp; p(\lambda) &amp; p&#039;(\lambda) &amp; \hdots \\ 				&amp; &amp; &amp; p(\lambda) &amp; \hdots \\ 				&amp; &amp; &amp; &amp; \ddots \\ \end{bmatrix}' class='latex' /></p>
<p>If block <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' /> has size <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' />, then <img src='http://s.wordpress.com/latex.php?latex=%7B%5Clambda_i%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{\lambda_i}' title='{\lambda_i}' class='latex' /> has multiplicity <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' /> in <img src='http://s.wordpress.com/latex.php?latex=%7Bp%28.%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p(.)}' title='{p(.)}' class='latex' /> and therefore <img src='http://s.wordpress.com/latex.php?latex=%7Bp%28%5Clambda_i%29%20%3D%20p%27%28%5Clambda_i%29%20%3D%20%5Chdots%20%3D%20p%5E%7B%28k-1%29%7D%28%5Clambda_i%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p(\lambda_i) = p&#039;(\lambda_i) = \hdots = p^{(k-1)}(\lambda_i)}' title='{p(\lambda_i) = p&#039;(\lambda_i) = \hdots = p^{(k-1)}(\lambda_i)}' class='latex' /> and therefore, <img src='http://s.wordpress.com/latex.php?latex=%7Bp%28B_i%29%20%3D%200%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='{p(B_i) = 0}' title='{p(B_i) = 0}' class='latex' /> as we wanted to prove.</p>
<p>It turned out not to be a very very short proof, but it is still short, since it uses mostly elementary stuff and the proof is really intuitive in some sense. I took some lessons from that: (i) first it reinforces my idea that, if I need to say something about a matrix, the first thing I do is to look at its eigenvectors decomposition. A lot of Linear Algebra problems are very simple when we consider things in the right basis. Normally the right basis is the eigenvector basis. (ii) not all matrices are diagonalizable. But in those cases, Jordan Canonical Form comes in our help and we can do almost the same as we did with eigenvalue decomposition.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/215/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[LADIS 2009] Technical Session #4 &#8211; Monitoring and Repair</title>
		<link>http://www.bigredbits.com/archives/208</link>
		<comments>http://www.bigredbits.com/archives/208#comments</comments>
		<pubDate>Sun, 11 Oct 2009 22:33:57 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Live Blogging]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=208</guid>
		<description><![CDATA[Second Talk: A case for the accountable cloud by Andreas Haeberlen Three cloud stories .. a threatening cloud, a promising cloud, and a nice cloud The problem with current clouds is that the user does not know what the cloud service provider is doing with the customer&#8217;s code and data. Also, from the cloud service [...]]]></description>
				<content:encoded><![CDATA[<p>Second Talk: <strong><u>A case for the accountable cloud</u></strong> by Andreas Haeberlen</p>
<p>Three cloud stories .. a threatening cloud, a promising cloud, and a nice cloud <img src='http://www.bigredbits.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The problem with current clouds is that the user does not know what the cloud service provider is doing with the customer&#8217;s code and data. Also, from the cloud service provider&#8217;s perspective, the operator does not know what is the code that they are running for customers supposed to do.</p>
<p>Alice is the customer running a service on the cloud owned and operated by Bob.</p>
<p>A solution: what if we had an oracle that Alice and Bob could ask about cloud problems? We want completeness, (if something is faulty, we will know) accuracy (no false positives), verifiability (the oracle can prove its diagnoses is correct).</p>
<p>Idea: make clud accountable to alice+bob. Cloud records its actions in a tamper-evident log, alice and bob can audit, use log to construct evidence that a fault does or does not exist.</p>
<p>Discussion: 1) Isn&#8217;t this too pessimistic? bob isn&#8217;t malicious ..maybe, but bob can get hacked, or things can just go wrong. 2) shouldn&#8217;t bob use fault tolerance instead? yes whenever we can, but masking faults is never perfect, we still need to check. 3) why would a provider want to deploy this? this feature will be attractive to prospective customers, and helpful for support. 4) Are these the right guarantees? completeness (no false negatives), could be relaxed with probabilistic completeness; verifiability could be relaxed only provide some evidence; accuracy (no false positives) can not be relaxed because we need to have confidence when we rule out problems.</p>
<p>A call to action: cloud accountability should do; deliverable provable guarantees, work for most cloud apps, require no changes to application code, cover a wide spectrum of properties, low overhead.</p>
<p>Work in Progress: Accountable Virtual Machines (AVM), goal: provide accountability for arbitrary unmodified software. cloud records enough data to enable deterministic replay, alice can replay log with a known-good copy of the software, can audit any part of the original execution.</p>
<p>Conclusion: current cloud designs carry risks for both customers and providers (mainly because of split administration problem). Proposed solution: accountable cloud. Lots of research opportunities.</p>
<p>Third Talk: <strong><u>Learning from the Past for Resolving Dilemmas of Asynchrony</u></strong> by Paul Ezhilchelvan</p>
<p>In an asynchronous model you can not bound message delivery time or even message processing time by a machine. However, in a probabilistic synchronous model, we can bound times within a certain probability via proactive measurements. The new central hypothesis of the new model is that most of the time, performance of the past is indicative of the performance of the near future (i.e. delay in the past is the indicative of delay in the future).</p>
<p>Design steps include doing proactive measurements, using them to establish synchrony bounds, and assign time bounds based on that, try that and see how it works and enable exceptions.</p>
<p>On-going work: development of exceptions (to deal with exceptional cases when mistakes are detected). Open environments are asynchronous, use crash signals for notification of extreme unexpected behavior.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/208/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[LADIS 2009] Technical Session #5 &#8211; Communication</title>
		<link>http://www.bigredbits.com/archives/210</link>
		<comments>http://www.bigredbits.com/archives/210#comments</comments>
		<pubDate>Sun, 11 Oct 2009 20:37:11 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Live Blogging]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=210</guid>
		<description><![CDATA[First Talk: Bulletin Board: A Scalable and Robust Eventually Consistent Shared Memory over a Peer-to-Peer Overlay by Gregory Chockler WebSphere Virtual Enterprise (WVE) is a product for managing resources in a data center. The product is a distributed system whose nodes and controllers need to communicate and share information, and BulletinBoard (BB) is used for [...]]]></description>
				<content:encoded><![CDATA[<p>First Talk: <strong><u>Bulletin Board: A Scalable and Robust Eventually Consistent Shared Memory over a Peer-to-Peer Overlay</u></strong> by Gregory Chockler</p>
<p>WebSphere Virtual Enterprise (WVE) is a product for managing resources in a data center. The product is a distributed system whose nodes and controllers need to communicate and share information, and BulletinBoard (BB) is used for that. BB is a platform service for facilitating group-based information sharing in a data center. It is critical component of WVE, and its primary application is monitoring and control, but the designers believe that it could be useful for other weakly consistent services.</p>
<p>Motivation &amp; Contribution: Prior implementation of group communication implemented internall as not designed to grow 10 folds, and that was based on Virtual Synchronous group communication; robustness, stability, high runtime overheads as the system grew beyond several 100s of processes; static hierarchy introduced configuration problems. So the goal was to provide a new implementation to resolve the scaling and stability issues of the prior implementation (and implement this in a short time! so this constraint had important implications on the design decisions).</p>
<p>BB supports a write-sub (write subscribe) service model. It is a cross between pub-sub systems, shared memory systems, and traditional group communication systems. In pub-sub communication is async and done through topics. In shared memory we have overwrite semantics, singe writer per topic and process, and notifications are snapshots of state.</p>
<p>Consistency Semantics (single topic). PRAM Consistency: notified snapshots are consistent with the other process order of writes. A note made was that developers who built services on top of that turned out to understand this semantics of consistency.</p>
<p>Liveness Semantics (single topics). Uses Eventual inclusion: eventually each write by a correct and connected process is included into the notified snapshot. Eventual exclusion means that failed processes will be eventually excluded from updates.</p>
<p>Performance and Scalability Goals: adequate latency, scalable runtime costs, throughput is less of an issue (management load is fixed and low). Low overhead. Robustness, scalability in the presence of large number of processes and topics (2883 topics in a system of 127 processes, note that the initial target was around 1000 processes).</p>
<p>Approach: decided to build this on an overlay network called SON. Service Overlay Network (SON). SON is a semi-structured P2P overlay, already in the product, and self-* (recover from changes quickly without problems), resilient, and supports peer membership and broadcast. <u>The research question</u> here was whether if BB can be implemented efficiently on top of a P2P overlay like SON?</p>
<p>Architecture: SON with IAM (interest aware membership) built on top of it and BB on top of that (but BB can interact directly with SON).</p>
<p>Reliable Shared State Maintenance in SON for BB: is made fully decentralized, and update propagation is optimized for bimodal topic popularity. Overlay broadcast or iterative unicast over direct TCP connections if # subscribers of a topic is less than a certain threshold (and group broadcast otherwise). For Reliability, periodic refresh of the latest written value (on a long cycle) if not overwritten (this was a bad decision in retrospect) with state transfer to new/reconnected subscribers.</p>
<p>Experimental study on different topologies showed low cpu overhead and latency, but these numbers increased as the topology increased in size. Analysis of that revealed that this was because the periodic refreshes were stacked and caused increased CPU &amp; latency overheads. An additional problem was in broadcast flooding, and when that was removed cpu &amp; latency overheads stayed flat as the topology increased in size.</p>
<p>Lessons learned: communication cost is the major factor affecting scalability of overlay based implementations, and that anti-entropy techniques are best fit for such services.</p>
<hr />
<p>Second Talk: <strong><u>Optimizing Information Flow in the Gossip Objects Platform</u></strong> by Ymir Vigfusson</p>
<p>In gossip, nodes exchange information with a random peer periodically in rounds. Gossip has appealing properties such as bounded network traffic, scalability in group size, robustness against failures, coding simplicity. This is nice when gossip is considered individually per application. In cloud computing with nodes joining many groups, the traffic is no longer bounded per node (but per topic).</p>
<p>The Gossip Objects (GO) platform is a general platform for running gossip for multiple applications on a single node. It bounds the gossip traffic going out of a particular node. The talk focused on how to select rumors to publish out from multiple applications on a single node such that we reduce number of messages. This is possible because rumor messages are small and have a short destination. An observation made is that rumors can be delivered indirectly, uninterested nodes can forward rumors to interested nodes.</p>
<p>The GO heuristic: recipient selection is biased towards higher group traffic. The content is selected by computing a utility of a rumor which is defined as the probability of that rumor will add information to a host that didn&#8217;t know that info.</p>
<p>Simulation, a first simulation of an extreme example with only two nodes joining many groups. The GO heuristic showed promising results. Then a real-world evaluation was conducted based on a 55 minute trace of the IBM WebSphere Virtual Enterprise Bulletin Board layer. The trace had 127 nodes and 1364 groups, and the evaluation showed that GO had placed a cap on traffic compared to random and random with stacking heuristics for GO. Additionally, the GO heuristic was able to deliver rumors faster than the other heuristic, and the number of messages needed to deliver the messages to interested nodes, and the GO heuristic had multiple orders of reduction over other heuristics and traditional rumor spreading.</p>
<p>Conclusion: GO implemented novel ideas such as per-node gossip, rumor stacking (pushing the rumor to the MTU size), utility based rumor dissemination, and adapting to traffic rates. GO gives per-node guarantees even when the # of groups scales up. Experimental results were compelling.</p>
<p>Questions:</p>
<p>Mike Spreitzer, IBM Research: What would happen if the number of groups increases?</p>
<p>Answer: Study of available real-world traces showed a pattern of overlap. We also conducted simulation with other group membership patterns and the results were similar.</p>
<p>&#8212;: What was the normal rumor size? And what would happen if that increased?</p>
<p>Answer: The average rumor size was 100Bytes. If the message size increased we will stack less rumors, but our platform can also reject really large rumors.</p>
<p>&#8212;: Have you thought about network-level encoding?</p>
<p>Answer: Not yet, but we plan to in the future.</p>
<p>&#8212;: Have you thought of leveraging other dissemination techniques to run under GO?</p>
<p>Answer: Actually, we thought about the opposite direction where we would run other communication protocols and map them under the hood to GO. Results are pending.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/210/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[LADIS 2009] Keynote #4 &#8211; Life on the Farm: Using SQL for Fun and Profit in Windows Live</title>
		<link>http://www.bigredbits.com/archives/206</link>
		<comments>http://www.bigredbits.com/archives/206#comments</comments>
		<pubDate>Sun, 11 Oct 2009 19:38:15 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Live Blogging]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=206</guid>
		<description><![CDATA[Keynote #4 by David Nichols from Microsoft. Published abstract and speaker bio. In his talk, David shared some stories about his experience of using SQL in a data center environment to provide cloud services. The speaker was a bit fast while talking, I captured most of his message and the important parts, but i had [...]]]></description>
				<content:encoded><![CDATA[<p>Keynote #4 by David Nichols from Microsoft. <a href="http://www.cs.cornell.edu/projects/ladis2009/program.htm#keynote4">Published abstract and speaker bio</a>.</p>
<p>In his talk, David shared some stories about his experience of using SQL in a data center environment to provide cloud services. The speaker was a bit fast while talking, I captured most of his message and the important parts, but i had to skip some parts.</p>
<p>In Windows Live, when building a new service they prefer to use off-the-shelf products such as SQL. Why SQL? familiar tested programming model (real queries, real transactions, good data modeling, excellent at OLTP, easy to find developers that know it). Solid systems software (used often and fine tuned many times and updated). Challenges with using SQL, living without single-image database model (no global transactions or global indexes). Administration and maintenance overhead. Breaking things at scale.</p>
<p>DB partitioned by user, many users per instance DB because it is easy and self contained. User info are small enough that you can place multiple users on single location. Front ends send requests to proper DB. Location is determined by lookup (a Lookup Partition Service &#8211; LPS &#8211; maps users to partitions). DBs are partitioned by hash to avoid hotspots.</p>
<p>Architecture: Three stages of scale out: bigger server, functional division, and data division.</p>
<p>A problem with scaling out: updates to multiple sevices and users (e.g., add messenger buddy, upload a photo which is writen to file store and recent activity store). Two-phase commit is out (because the risk of having the crash that locks your data out is too high), instead us ad hoc methods: for example: write A intent, write B, write A; another example, write A and work item, let work item write B; another example: write A, then B, tolerate inconsistency.</p>
<p>Another problem is how do you read data about multiple users or even all users. Example scenario, user updates his status, his friends need to know. The old way (inefficient) to do that is to write a change about the users into the profile of all affected users, easy to query, but heavy write load. </p>
<p>Data Availability and Reliability. Replication is used for all user data using SQL replication. Front ends have library (WebStore) to notice failures and switch to secondary. Original scheme was one-to-one which was too slow because parallel transactions vs. single replication stream. Next try was to have four DBs talking to four DBs which fixed most speed problems, but too much load on secondaries after failure. Current approach uses 8-host pods, 25% load increase for secondaries on failure (8&#215;8 matrix, and the replication was done on the transpose of the matrix). However, still not fast enough for key tables (100&#8242;s of write threads vs. 5 replication streams). Manual replication (FE&#8217;s run SProcs at both primary and secondary, but small probability of inconsistent data). Replication runs a few seconds behind (ops reluctant to auto-promote secondary due to potential data in replication stream), new SQL tech should fix this.</p>
<p>Data loss causes: above the app (external application and old data); in the app (software bugs especially migration logic bugs); below the app (controller failure, disk failure). Mitigation techniques: audit trails and soft deletes for above app problems; per-user backup for software bugs; tape backup, sql replication, and RAID for below app problems (however these are expensive).</p>
<p>Managing Replication: fail safe set, a set of databases in some sort of replication membership. Typical fail safe set is two to four DBs (most are two). Fail safe are the true target of partition schemes.</p>
<p>Upgrade options: upgrade partitions: run DDL in each partition (via WebStore),  this is complicated by replication, after all DBs are done, upgrade FEs (SProcs are compatible; changed APIs get new names). Migrate users: can take various forms (between servers, within a server, or even within services), and migrating users can be complex, slow, error-prone, and nobody&#8217;s likes it.</p>
<p>Some Operation stories.</p>
<p>Capacity management: growth is in units of servers. when to buy more? test teams provides one opinion, ops team aims to find max  resource and stay below limit, two kinds of limits, graceful and catastrophic. Interesting thing about graceful vs catastrophic limits .. if you back off from graceful limits, you can usually go back to your original state (good state), however for catastrophic limits, even if you back off you can remain in a bad situation.</p>
<p>Ops lessons: 1) never do the same thing to all machines at once -stats queries, re-indexing have all crashed clusters in the past. 2) Smaller DBs are better, already coping with many DBs, plus re-indexing backups, upgrades are all faster for small DBs. 3) Read-only mode is powerful (failure maintenance and migration all use it). 4) Use the the live site to try things out (new code new SQL settings etc) &#8220;taste vs test&#8221;.</p>
<p>Conclusions: SQL can be tamed, it has some real issues but mostly manageable with some infrastructure, and its ops cost not out of line. It is hard to do better than SQL, it keeps improving, each time we go to design something, we find that SQL already design it, perhaps not in the form we want exactly, but close enough and not worth the effort probably. However SQL is not always the best solution.</p>
<p>SQL wish list. Easy ones: partitioned data support, easy migration/placement control, reporting, jobs; supporting aggregated data pattern, improved manageability. Hard ones: taming DB schema evolution, soft delete/versioning support of some kind, and A&#8211;D transactions (Atomic &amp; Durable).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/206/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[LADIS 2009] Technical session #3 &#8211; Storage</title>
		<link>http://www.bigredbits.com/archives/201</link>
		<comments>http://www.bigredbits.com/archives/201#comments</comments>
		<pubDate>Sun, 11 Oct 2009 17:56:58 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Live Blogging]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=201</guid>
		<description><![CDATA[First Talk: Consistency without concurrency control by Marc Shapiro This seemed like an interesting piece of work. Unfortunately i came in a bit late from the break and so my writing is sloppy and doesn&#8217;t do it much justice. However the paper about CRDTs and TreeDoc has been published in ICDCS. Problem motivation: TreeDoc is [...]]]></description>
				<content:encoded><![CDATA[<p>First Talk: <strong><u>Consistency without concurrency control</u></strong> by Marc Shapiro</p>
<p>This seemed like an interesting piece of work. Unfortunately i came in a bit late from the break and so my writing is sloppy and doesn&#8217;t do it much justice. However the paper about CRDTs and TreeDoc has been published in ICDCS.</p>
<p>Problem motivation: TreeDoc is a storage structure that uses binary tree encoding to address and store data. Inserting data is done by adding leaves to the tree. Reading the document consists of reading the binary tree using an &#8220;In Order&#8221; traversal. Deleting portions of the tree involves marking nodes with tombstones. However, trees can grow very badly, so removing deleted nodes and &#8220;rebalancing&#8221; the tree is needed. However, now after the rebalancing the tree addresses do not have the same meaning as before, so incoming updates might be inserted in the wrong location. So how can we agree on current addresses without concurrency control.</p>
<p>Tree located at two types of sites: Core and Nebula. The core is a smaller group that runs 2-phase commit to manage updates. the Nebula is a larger set of remote sites that do not run a consistency protocol. Catch-up protocol: if a core and nebula are networked partitioned, core proceeds with updates and buffers operations, let&#8217;s say that the nebula also gets some updates and buffers them. Then when the nebula gets the updates from the core, and replays it and the replays its own operations.</p>
<p><strong>main point:</strong> There is a need for useful data structures that support operations that commute. The commutativity gives us convergence between multiple sites without concurrency control. TreeDoc is an example of such data structure. The main point with such data structures is that we should take care of garbage collection because it becomes a big issue.</p>
<hr />
<p>Second Talk: <strong><u>Provenance as First Class Cloud Data</u></strong> by Kiran-Kumar Muniswamy-Reddy</p>
<p>This talk gave motivation for why would provenance be useful in cloud computing services. The speaker argued that provenance can allow us to reason better about the data from cloud services. The speaker argued that <u>native</u> support for provenance in cloud services will be beneficial.</p>
<p>Provenance tells us where did the data come from, its dependencies, and origins. Provenance is essentially a DAG that captures links between objects. Motivating example applications: web-search vs. cloud-search: both have tons of resources, however web search uses hyperlinks to infer dependencies, while no such thing exists for cloud-search. Provenance can provide a solution for that, and this has been argued for in a previous paper by Shah in usenix &#8217;07. Another example, pre-fetching. Provenance can tell us which documents are related to each other, and this allows you to pre-fetch related items for performance. Other examples include ACLs and auditing apps.</p>
<p>Requirements for provenance: consistency, long-term persistence, queryable, security, coordinate compute facilities and storage facilities.</p>
<hr />
<p>Third Talk: <strong><u>Cassandra &#8211; A Decentralized Structured Storage System</u></strong> by Prashant Malik</p>
<p>Why Cassandra? Lots of data (copies of messages, reverse indices of messages, per user data ..etc), random queries ..etc.</p>
<p>Design goals: high availability, eventual consistency (trade-off strong consistency in favor of high availability), incremental scalability, optimistic replication, &#8220;knobs&#8221; to tune trade-offs between consistency durability and latency, low total cost of ownership, minimal administration.</p>
<p>Data model: similar to the BigTable data model. columns are indexed by key, data is stored in column families, and the columns are sorted by value or by timestamp. Super columns allow columns to be added dynamically.</p>
<p>Write operations, a client issues a write request to a random node in the Cassandra cluster. The &#8220;partitioner&#8221; determines the nodes responsible for the data. Locally, write operations are logged and then applied to an in-memory version. Commit log is stored on a dedicated disk local to the machine.</p>
<p>Write properties: there are no locks in the critical path, we have sequential disk access. It behaves like a write back cache, and we have append support without read ahead. Atomicity guarantee for a key per replica. &#8220;Always Writable&#8221;, writes accepted even during failures, in that case the write is handed-off to some other node and loaded back to the correct place when node comes back up.</p>
<p>Reads are sent from the client to any node in the cassandra cluster, and then depending about the knobs the reads either get the most recent value or a quorrum.</p>
<p>Gossip is used between replicas using the Scuttlebutt protocol which has low overhead. Failure detection assigns a failure suspicion to nodes that increases with time until you hear again from users.</p>
<p><strong>Lessons learned:</strong> add fancy features only when absolutely necessary. Failures are the norm not the exception. You need system-level monitoring. Value simple designs.</p>
<hr />
<p> Fourth Talk: <strong><u>Towards Decoupling Storage and Computation in Hadoop with SuperDataNodes</u></strong> by George Porter</p>
<p>Hadoop is growing, gaining adopting, and used in production (Facebook, last.fm, linked in). E.g., facebook imports 25/day to 1k hadoop nodes. A key to that growth and efficiency relies on coupling compute and storage: benefits of moving computation to data, scheduling, locality reduce traffic, map parallelism (&#8220;grep&#8221; type workload).</p>
<p>So, when to couple storage with computation? This is a critical and complicated design decision, and this is not always done right. Examples, Emerging best practices with dedicated clusters. Your data center design may not be based on the needs for Hadoop (adding map/reduce to existing cluster, or a small workgroup who like the programming model such as Pig, Hive, and Mahout). </p>
<p>Goal is to support late binding between storage and computation. Explore alternative balances between the two (specifically explore the extreme point of decoupling storage and compute nodes). An observation from the Facebook deployment is that the scheduler is really good at scheduling nodes to local nodes for small tasks and bad for scheduling them in rack-locality for large tasks.</p>
<p>SuperDataNode approach: key features include a stateless worker tier, and storage node with shared pool of disks under single O/S, and a high bisection bandwidth worker tier.</p>
<p>There has been alot of talk about advantages of coupling storage and computation, what are the advantages of decoupling them. Advantages include, decoupling amount of storage from number of worker nodes. More intra-rack bandwidth than inter-rack bandwidth. Support for &#8220;archival&#8221; data, subset of data with low probability of access. Increased uniformity for job scheduling and block placement. Ease of management, workers become stateless; SDN management similar to that of a regular storage node. Replication only for node failures.</p>
<p>Limitations of SDN, scarce storage bandwidth between workers and SDN. Effective throughput with N disks in SDN (@ 100MB/sec each) 1:N ration of bandwidth between local and remote disks. Effect on fault -tolerance. Disk vs Node vs Link failure model. Cost. Performance depends on the work loads.</p>
<p>Evaluation compared a baseline hadoop cluster and an SDN cluster with 10 servers. The results showed that SDN performed better for grep and sort like workloads, and a bad case was random writers were hadoop performed better (workload was just each worker write to disk as fast as possible .. 100% parallelism).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/201/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[LADIS 2009] Keynote #2 &#8211; Some Lessons Learned from Running Amazon Web Services</title>
		<link>http://www.bigredbits.com/archives/195</link>
		<comments>http://www.bigredbits.com/archives/195#comments</comments>
		<pubDate>Sun, 11 Oct 2009 00:46:16 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Live Blogging]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=195</guid>
		<description><![CDATA[Keynote #2 by Marvin Theimer from Amazon. Published abstract and speaker bio. In his talk, Marvin reflected on experiences building and maintaining applications in data centers. He stressed the point that each of these issues are non-surprising individually by themselves, but the very large scale makes all of the possible all at once, and this [...]]]></description>
				<content:encoded><![CDATA[<p>Keynote #2 by Marvin Theimer from Amazon. <a href="http://www.cs.cornell.edu/projects/ladis2009/program.htm#keynote2">Published abstract and speaker bio</a>.</p>
<p>In his talk, Marvin reflected on experiences building and maintaining applications in data centers. He stressed the point that each of these issues are non-surprising individually by themselves, but the very large scale makes all of the possible all at once, and this is the surprising point! I really liked this talk.</p>
<p>A nice analogy he gave for building and running data center and cloud services is: <em>Evolving a Cessna prop-plane into a 747 jump jet in-flight </em> <img src='http://www.bigredbits.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Start with a Cessna prop-plane for cost and timeliness reasons. 4-9&#8242;s availability means that you get to land for 52 minutes every year (including scheduled maintenance, refueling, and crash landings). Success implies growth and evolution and rebuilding the plane mid-flight: Passenger capacity goes from 4-person cabin to 747 jumbo wide-body cabin, support for &#8220;scale out&#8221; means you add jet engines and remove the propellers while flying, testing and safety have to happen while flying!</p>
<p>Here are the lessons learned:</p>
<p>The unexpected happens! A fuse blows and darkens a set of racks, chillers die in a datacenter and a fraction of servers are down, an electrical plug bursts into flames, tornadoes or lightening hits datacenter, datacenter floods from the roof down, a telco connectivity goes down, the DNS provider creates black holes, simultaneous infant mortality occurs of servers newly-deployed in multiple datacenters, power generation doesn&#8217;t start because the ambient temperature is too high, load ..etc</p>
<p>Networking challenges. The IP protocol is deeply embedded in systems that you de-facto have to use it. IP networks can have lost packets, duplicate packets, and corrupted packets. Even if you use TCP your applications still need to worry about lost packets, duplicate packets, and corrupted packets. Software (and hardware) bugs can result in consistent loss or corruption of some packets. You have to be prepared for message storms. Client software is sometimes written without a notion of backing off on retries. One might expect that CRCs and the design of TCP can catch most of these issues. However, we are running in such a large scale that there are enough rare events that can give multiple errors. For example, if a switch or some network hardware erroneously flips the 8th bit of every 64 packets, with the large running scale, these rare events can happen repeatedly!</p>
<p><strong><u>Things you should be able to do without causing outages:</u></strong> adding new hardware, deploying a new version of software, rolling back to a previous version of software, recovering from the absence, loss, or corruption of non-critical data. Losing a mirror of a DBMS, recovering from having lost a mirror of a DBMS, losing a host in its fleet, losing a datacenter, losing network connectivity between data centers. Can we roll back some parts in the middle of upgrading other parts ?</p>
<p><strong><u>System resources/objects have lives of their own!</u></strong> Resources/objects in a service may live longer than the accounts used to create them. You have to be able to remap them between accounts. Resources/objects may live longer than versions of the service! You have to be able to migrate them forward with minimal or no disruptions. For example, EC2 instances were designed to run for short periods on demand, but customers start using them and keeping instances up for a long time, and this happens often enough such that shooting down long-lived instances will upset the clients. So how can you deal with that ?</p>
<p><strong><u>Downstream dependencies fail.</u></strong> It&#8217;s a service-oriented architecture. The good news is that your service has the ability to keep going even if other services become unavailable, and the challenge is how to keep going and/or degrade gracefully if you depend on the functionality of downstream services at low levels. Suppose all services are 4-9&#8242;s available, if a downstream service fails for 52 minutes, how will you meet your own SLA of failing no more than 52 minutes ? Cascading outages happen, if multiple downstream services fail, how will you handle it? For example, if a storage service fails, 2 services depending on it can also fail, then more services depending on them fail, and so on and so forth. Services need to defend against that.</p>
<p><strong><u>You must be prepared to deal with data corruption.</u></strong> Data corruption happens: flakey hardware, IO sub-systems can lie, software can be wrong, system evolution happen, people can screw up. End-to-end integrity checks are a must, straight-forward data corruption checking, how do you know if your system is operating correctly? Can your design do <em>fsck</em> in &lt; 52 minutes ?</p>
<p><strong><u>Keep it simple.</u></strong> It&#8217;s 4am on Sunday morning and the service has gone down, can you explain the corner cases of your design to the front-line on-call team over the phone? can you figure out what&#8217;s going on in under 52 minutes? Can you make sure it is not a corner case of using your code that did not result in that crash, or how to fix it if it is ? Simple brute force is sometimes preferable to elegant complexity: examples: eventual consistency considered painful (but sometimes necessary), P2P can be harder to debug than centralized approaches (but may be necessary). Is it necessary to build your system to handle situations after product growth when it is more likely that your system will actually change and be replaced by the time that it is big enough to require handling that issue.</p>
<p><strong><u>Scale: will your design envelope scale far enough? Do you understand your components well enough?</u></strong> Cloud computing has global reach, services may grow at an astonishing pace, the overall scale is HUGE!. The scale of cloud computing tends to push systems outside their standard design envelopes. The rule of thumb that you must redesign your system every time it grows by 10x implies you must be prepared to redesign early and often.</p>
<p><strong><u>**CAE Trade-Off for Resources.</u></strong> CAE: cost-efficient, available, elastic. You can only pick two of them!</p>
<p><strong><u>Do not Ignore the Business Model or your TCO.</u></strong> Do you know all the sources of cost? can you accurately measure them? Do you know all the &#8220;dimensions of cost&#8221; that will be used in pricing? Can you meter them? Have you thought about ways the system can be abused? How will you resolve billing disputes? All these may affect the design of the service in fundamental ways. This is important to measure even if you think that your revenue will come from adds. For example, some customer figured out that if they store large names in the key part of the key/value store rather than the name, they can reduce their cost by 1000x times because S3 only charges for the size of the value not key! So you have to think about what you are not charging people for and how can they abuse it.</p>
<p><strong><u>Elastic Resources: What boundaries to expose?</u></strong> High availability apps require the notion of independent failure zones &#8211;&gt; introduce the notion of availability zones (AZ). Concurrent apps want bounded, preferably low message latency and high bandwidths &#8211;&gt; introduce notion of <em>cluster affinity</em> to an AZ. The challenges of AZ clustering, clumping effect since everyone will want to be near everyone else (for example, if you ask people to pick an AZ and they don&#8217;t care, everyone will end up in AZ1 !!), makes elastic scheduling harder. Fine-tuned applications are the enemy of elasticity, customers will try to divine your intra-AZ topology (co-location on the same rack, etc.) Eventual evolution to different network infrastructures and topologies means you don&#8217;t want to expose more than you have to.</p>
<p><strong><u>Summary and Conclusions:</u></strong> The unexpected happens, in large systems even extremely rare events occur with a non-negligible frequency; what&#8217;s your story on handling them? Keep it simple: it&#8217;s 4&#8242;am and the clock is ticking- can you debug what&#8217;s going on in your system? Cloud computing is a business: you have to think about cost-efficiency as well as availability and elasticity.</p>
<p><strong><u>Questions:</u></strong></p>
<p>Mike Freedman, Princeton University: What things of these issues are specific for infrastructure provider (such as Amazon) compared to web service providers such as walmart.com or hotmail?</p>
<p>Answer: Many things are common such as hazards and load. As for other things such as accounting and billing, this is still useful for service providers, then this can at least minimize your running costs and allow you to know where you are spending your money.</p>
<p>Ken Birman, Cornell University: What makes you feel consistency, is it the 4am call or is latency and competitiveness and the added complexity?</p>
<p>Answer: It is the 4am call. When you have systems at large scale, you have to work out all the possible cases in your system and you can not cheat out of it. These corner cases make it hard. Remember that this has to be developed in a timely manner and it is developed by junior developers that are evolving their knowledge and expertise in this.</p>
<p>&#8212;: How do you test the resilience of your data centers? Are there people who go and turn off part of your datacenter?</p>
<p>Answer: Essentially yes! You test as much as you can, then you roll out.</p>
<p>Dough Terry, MSR-SV: Shouldn&#8217;t the analogy be that you start with a fleet of Cessnas and you want to evolve them into a fleet of Jumbo jets in flight without losing all of them together.</p>
<p>Answer: the problem is that you can not parallelize everything. There is some percentage of your code that does not get fixed.</p>
<p>Hakim Weatherspoon, Cornell University: What about embracing failure? running your systems hot and expect that nodes will fail ?</p>
<p>Answer: That solves some of the existing problems, but newer problems that we don&#8217;t know about yet can rise. For example, we never thought that the boot temperature on backup power generators will ever be an issue but it was! So you can never enumerate all problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/195/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[LADIS 2009] Technical Session #2 &#8211; Applications and Services</title>
		<link>http://www.bigredbits.com/archives/181</link>
		<comments>http://www.bigredbits.com/archives/181#comments</comments>
		<pubDate>Sat, 10 Oct 2009 22:14:21 +0000</pubDate>
		<dc:creator>hussam</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Live Blogging]]></category>

		<guid isPermaLink="false">http://www.bigredbits.com/?p=181</guid>
		<description><![CDATA[First Talk: Are Clouds Ready for Large Distributed Applications? by Kay Sripanidkulchai This talk essentially focused on how can enterprise applications be transported to cloud computing settings. Issues focused on are: deployment, this is more complex than just booting up VMs due to data and functionality dependencies. The second issue, availability. Enterprise apps are heavily [...]]]></description>
				<content:encoded><![CDATA[<p>First Talk: <strong><u>Are Clouds Ready for Large Distributed Applications?</u></strong> by Kay Sripanidkulchai</p>
<p>This talk essentially focused on how can enterprise applications be transported to cloud computing settings. Issues focused on are: deployment, this is more complex than just booting up VMs due to data and functionality dependencies. The second issue, availability. Enterprise apps are heavily engineered to maximize uptime. According to a published study, current cloud services can expect up to 5 hours of down time per year. Enterprise customers however really expect 1 hour of downtime per year. So how can this gap be bridged ? The third issue is that of problem resolution.</p>
<p>Bridging the availability gap: ideas include: 1) implementing scaling architectures in the cloud, 2) developing APIs to allow multiple clouds to interact with each other so as to develop failover techniques, 3) Live VM migration to mask failures.</p>
<p>As for problem resolution: categories of issues raised regarding EC2 on EC2 boards: 10% of topics discussed are feature request, 56% user how-to. As for problems 25% cloud error, 64% user error, 11% unknown error. One of the important things that enterprise customers want is being able to know if something is not running correctly, is the issue with the cloud platform, the VM, faulty hardware or what. So techniques and tools have to be developed in that regards.</p>
<hr />
<p>Second Talk: <strong><u>Cloudifying Source Code Repositories: How Much Does it Cost?</u></strong><strong> </strong>by Michael Siegenthaler</p>
<p>Cloud computing used to be mainly used by large companies that have the resources that enabled them to build and maintain the datacenters. Now this is accessible to people outside these companies for low costs.</p>
<p>Why move source control to the cloud? resilient storage, no physical server to administrate, scale to large communities. Used SVN which is very popular, store data on S3 (problem with eventual consistency), used Yahoo Zookeeper (a coordination service) as a lock service. How to measure costs for SVN on S3? measure cost per diff files and stored files. Back of the envelope analysis of cost shows it is inexpensive even for large projects such as Debian and KDE. A trend to notice is that code repos are getting larger in size, but the price of storing a GB is decreasing with time.</p>
<p>Architecture: machines talk to front-end servers on EC2 and storage is on S3. The front-end need not be on EC2, the cloud is there mainly for storage. A problem with a naive implementation is that eventual consistency in S3 means that multiple revision numbers can be issued for conflicting updates. For this reason locking is required. The commit process essentially has a hook that acquires a lock from ZooKeeper and pull for the most recent version number. The most recent version is retrieved from S3 (retry if not found due to eventual consistency), then make commit and release lock and ZooKeeper increments the version number.</p>
<p>Performance evaluation: usage patterns: Apache foundation has 1 repo for 74 project with average 1.10 commits per minute and a max of 7 per minute. The Debian community has 506 repos with 1.12 commits per minute in aggregate and 6 in max. These were used as experiment traces. The results showed that as you add more front-end servers from EC2 the performance does not suffocate due to possible lock contention, and this was tried with differing number of clients.</p>
<hr />
<p>Third Talk: <strong><u>Cloud9: A Software Testing Service</u></strong> by Stefan Bucur</p>
<p>There is a need to facilitate automatic testing of programs. Cloud computing can make this have better performance. Testing frameworks should provide autonomy (no human intervention), usability, performance. Cloud9 (<a href="http://cloud9.epfl.ch/">http://cloud9.epfl.ch/</a>) is a web service for testing cloud applications.</p>
<p>Symbolic Execution: when testing a function, instead of feeding it input values, send it an input abstraction (say, lambda) and whenever we see a control flow branching (such as an if statement) create a subtree of execution. One idea is to send each of these subtrees to a separate machine and test all possible execution paths at once. A naive approach can have many problems. For example trees can expand exponentially, so incrementally getting new resources to run can be problematic. A solution to that is to pre-allocate all needed machines. There are many challenges in parallel symbolic execution in the cloud such as dynamically load balancing trees among workers and state transfers. Along with other problems such as picking the right strategy portfolios</p>
<p>Preliminary results show that parallel symbolic execution on the cloud can give over linear improvement over conventional methods and KLEE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigredbits.com/archives/181/feed</wfw:commentRss>
		<slash:comments>0</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! -->