<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Yaniv&#039;s Gems</title>
	<atom:link href="http://yaniv.leviathanonline.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://yaniv.leviathanonline.com/blog</link>
	<description>Strain your Brain</description>
	<lastBuildDate>Thu, 07 Feb 2013 11:01:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Z</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-129484</link>
		<dc:creator>Z</dc:creator>
		<pubDate>Thu, 07 Feb 2013 11:01:09 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-129484</guid>
		<description>I&#039;m probably missing something. 
But if the prisoners (p_1,p_2 and p_3) are allowed to change their guesses at each &quot;bit&quot; t 
why guessing  &quot;has_twos(p_i,t) = bit(p_i,t)&quot; for each i and t is not the solution?</description>
		<content:encoded><![CDATA[<p>I&#8217;m probably missing something.<br />
But if the prisoners (p_1,p_2 and p_3) are allowed to change their guesses at each &#8220;bit&#8221; t<br />
why guessing  &#8220;has_twos(p_i,t) = bit(p_i,t)&#8221; for each i and t is not the solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Dylan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-112651</link>
		<dc:creator>Dylan</dc:creator>
		<pubDate>Mon, 12 Nov 2012 00:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-112651</guid>
		<description>isn&#039;t this extremely easy unless I&#039;m reading the riddle incorrectly?

The last guy goes first, the 100th. you get one error, two errors and everyone dies. the last guy, 100, guesses first. lastly, from 100 to 1 is how they guess.

the 100th guy (first one to guess) tells the guy in front of him (the next to guess) his hat color. from there the 99th person says his hat color and through probability and assuming that there was 50 of each of the two colors, every subsequent person can find their own hat color.

x,b,b,w,w,b,w,w,b,w

1/10th scale example: x tells the second person theirs. once this is determined, everyone else knows everyone else so it&#039;s easy</description>
		<content:encoded><![CDATA[<p>isn&#8217;t this extremely easy unless I&#8217;m reading the riddle incorrectly?</p>
<p>The last guy goes first, the 100th. you get one error, two errors and everyone dies. the last guy, 100, guesses first. lastly, from 100 to 1 is how they guess.</p>
<p>the 100th guy (first one to guess) tells the guy in front of him (the next to guess) his hat color. from there the 99th person says his hat color and through probability and assuming that there was 50 of each of the two colors, every subsequent person can find their own hat color.</p>
<p>x,b,b,w,w,b,w,w,b,w</p>
<p>1/10th scale example: x tells the second person theirs. once this is determined, everyone else knows everyone else so it&#8217;s easy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Differing Neighbors by Nathaniel</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/differing-neighbors/comment-page-1/#comment-102377</link>
		<dc:creator>Nathaniel</dc:creator>
		<pubDate>Wed, 29 Aug 2012 17:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=195#comment-102377</guid>
		<description>What is the required space complexity ? O(1), O(n) ?</description>
		<content:encoded><![CDATA[<p>What is the required space complexity ? O(1), O(n) ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by R.</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-95543</link>
		<dc:creator>R.</dc:creator>
		<pubDate>Sat, 14 Jul 2012 00:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-95543</guid>
		<description>See a complete proof here:
http://arxiv.org/abs/1204.5490</description>
		<content:encoded><![CDATA[<p>See a complete proof here:<br />
<a href="http://arxiv.org/abs/1204.5490" rel="nofollow">http://arxiv.org/abs/1204.5490</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by Ben Patches</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-86021</link>
		<dc:creator>Ben Patches</dc:creator>
		<pubDate>Mon, 05 Mar 2012 18:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-86021</guid>
		<description>I&#039;m taking galois theory and having an incredible amount of trouble understanding the proof Lagrange/ruffini worked on (the book I have used heavy pre-galois, set notation); Could you offer any helpful explanations? And yes Im definitely looking to when/if part II comes out 
Thanks in advance</description>
		<content:encoded><![CDATA[<p>I&#8217;m taking galois theory and having an incredible amount of trouble understanding the proof Lagrange/ruffini worked on (the book I have used heavy pre-galois, set notation); Could you offer any helpful explanations? And yes Im definitely looking to when/if part II comes out<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-71192</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 13 Sep 2011 13:21:47 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-71192</guid>
		<description>Hi John,

As the comment in parenthesis says, you use Eisenstein&#039;s Lemma after multiplying f by n.</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>As the comment in parenthesis says, you use Eisenstein&#8217;s Lemma after multiplying f by n.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by John Grech</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-71182</link>
		<dc:creator>John Grech</dc:creator>
		<pubDate>Tue, 13 Sep 2011 09:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-71182</guid>
		<description>Hi, I am reading the article right now and it&#039;s immensely interesting. I have come across a stumbling block, however - the proof that the polynomial f(x) = g(x) - 2/n is irreducible using eisenstein&#039;s criterion - how do we know that the coefficients are integer? as I understand it n was chosen as any odd number such that 2/n &lt; e. so 2/n is a fraction. That means that a_o in f(x) = 2.n_1.n_2...n_k - 2/n, which might or might not be integer, in which case eisenstein&#039;s criterion might not apply. I am sure I am missing something...can you point it out please?</description>
		<content:encoded><![CDATA[<p>Hi, I am reading the article right now and it&#8217;s immensely interesting. I have come across a stumbling block, however &#8211; the proof that the polynomial f(x) = g(x) &#8211; 2/n is irreducible using eisenstein&#8217;s criterion &#8211; how do we know that the coefficients are integer? as I understand it n was chosen as any odd number such that 2/n &lt; e. so 2/n is a fraction. That means that a_o in f(x) = 2.n_1.n_2&#8230;n_k &#8211; 2/n, which might or might not be integer, in which case eisenstein&#039;s criterion might not apply. I am sure I am missing something&#8230;can you point it out please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monochrome Lizards by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monochrome-lizards/comment-page-1/#comment-57235</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sun, 03 Apr 2011 13:46:24 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=248#comment-57235</guid>
		<description>If I&#039;m not mistaken, I told you that riddle about a year ago, after I&#039;ve heard it from my barber, who got it from the minister of industry, Shalom Simhon.</description>
		<content:encoded><![CDATA[<p>If I&#8217;m not mistaken, I told you that riddle about a year ago, after I&#8217;ve heard it from my barber, who got it from the minister of industry, Shalom Simhon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monochrome Lizards by R.</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monochrome-lizards/comment-page-1/#comment-57110</link>
		<dc:creator>R.</dc:creator>
		<pubDate>Sat, 02 Apr 2011 01:43:30 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=248#comment-57110</guid>
		<description>@Seb:

Assume we are able to make all lizards blue, and consider phi = (X-Y) mod 3.
Claim: phi is invariant to rubbing.
Proof:
- Rubbing yellow and green decreases both X and Y by one, so phi doesn&#039;t change;
- Rubbing yellow and blue decreases X by one and increases Y by two, so phi still doesn&#039;t change;
- Rubbing green and blue decreases Y by one and increases X by two, so phi once again doesn&#039;t change.

Since in the end phi=0 (as X=Y=0), it must be so in the beginning as well, so we must have X=Y mod 3.

Same goes for the two other colors.</description>
		<content:encoded><![CDATA[<p>@Seb:</p>
<p>Assume we are able to make all lizards blue, and consider phi = (X-Y) mod 3.<br />
Claim: phi is invariant to rubbing.<br />
Proof:<br />
- Rubbing yellow and green decreases both X and Y by one, so phi doesn&#8217;t change;<br />
- Rubbing yellow and blue decreases X by one and increases Y by two, so phi still doesn&#8217;t change;<br />
- Rubbing green and blue decreases Y by one and increases X by two, so phi once again doesn&#8217;t change.</p>
<p>Since in the end phi=0 (as X=Y=0), it must be so in the beginning as well, so we must have X=Y mod 3.</p>
<p>Same goes for the two other colors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monochrome Lizards by rouli</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monochrome-lizards/comment-page-1/#comment-56839</link>
		<dc:creator>rouli</dc:creator>
		<pubDate>Tue, 29 Mar 2011 22:46:08 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=248#comment-56839</guid>
		<description>Although I first had to compile a list of sample tuples were one cannot get a solution, see the pattern there and reverse engineer my way why this rule is necessary and sufficient, I still enjoyed it very much.

Neat riddle, thanks!</description>
		<content:encoded><![CDATA[<p>Although I first had to compile a list of sample tuples were one cannot get a solution, see the pattern there and reverse engineer my way why this rule is necessary and sufficient, I still enjoyed it very much.</p>
<p>Neat riddle, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monochrome Lizards by Seb</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monochrome-lizards/comment-page-1/#comment-56811</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Tue, 29 Mar 2011 13:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=248#comment-56811</guid>
		<description>Very nice riddle by the way!</description>
		<content:encoded><![CDATA[<p>Very nice riddle by the way!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monochrome Lizards by Seb</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monochrome-lizards/comment-page-1/#comment-56810</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Tue, 29 Mar 2011 13:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=248#comment-56810</guid>
		<description>Isn&#039;t there a second page anymore to post messages without giving the solution on the first page?

Anyway, here goes my modest attempt: if (X,Y,Z) can be written in the following way (n,0,0)+(0,k,k)+(0,0,3p)+(0,3q,0)=(n,k+3q,k+3p) then you can get n+2k+3p+3q unicolor lizards.

This is sufficient, but I do not know (yet) if it is necessary.

For example, (1,2,3) cannot be written in this way, and it is also not possible to unicolorize (1,2,3).

The condition is equivalent to &quot;one pair out of the three numbers differs by a multiple of 3&quot;.</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t there a second page anymore to post messages without giving the solution on the first page?</p>
<p>Anyway, here goes my modest attempt: if (X,Y,Z) can be written in the following way (n,0,0)+(0,k,k)+(0,0,3p)+(0,3q,0)=(n,k+3q,k+3p) then you can get n+2k+3p+3q unicolor lizards.</p>
<p>This is sufficient, but I do not know (yet) if it is necessary.</p>
<p>For example, (1,2,3) cannot be written in this way, and it is also not possible to unicolorize (1,2,3).</p>
<p>The condition is equivalent to &#8220;one pair out of the three numbers differs by a multiple of 3&#8243;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on You are in my Seat! by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/you-are-in-my-seat/comment-page-1/#comment-56123</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Sun, 20 Mar 2011 19:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/you-are-in-my-seat/#comment-56123</guid>
		<description>Hi Jim,
Nice guess, but it is not right.
If you want to see some solutions, switch to the second page.</description>
		<content:encoded><![CDATA[<p>Hi Jim,<br />
Nice guess, but it is not right.<br />
If you want to see some solutions, switch to the second page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on You are in my Seat! by Jim</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/you-are-in-my-seat/comment-page-1/#comment-56120</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Sun, 20 Mar 2011 19:13:22 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/you-are-in-my-seat/#comment-56120</guid>
		<description>1 in 100</description>
		<content:encoded><![CDATA[<p>1 in 100</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on You are in my Seat! by Jim</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/you-are-in-my-seat/comment-page-1/#comment-56119</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Sun, 20 Mar 2011 19:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/you-are-in-my-seat/#comment-56119</guid>
		<description>1 in 100 ?</description>
		<content:encoded><![CDATA[<p>1 in 100 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Understanding Soccer by This Week I Learned (Week of 21 February)</title>
		<link>http://yaniv.leviathanonline.com/blog/math/understanding-soccer/comment-page-1/#comment-54635</link>
		<dc:creator>This Week I Learned (Week of 21 February)</dc:creator>
		<pubDate>Tue, 01 Mar 2011 04:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/understanding-soccer/#comment-54635</guid>
		<description>[...] To detect straight lines in an image, use the naive version of the hough transform. The hough transform takes you from the image space to the Hough space where a line in the image, corresponds to a point and a point in the image corresponds to a line.Naive approach: y = mx + c is the line in the image space. In the hough space, get the lines corresponding to the points (x0, y0) [you can mark these white or something like that]. The line in hough space is just the equation representing: c = m * x0 &#8211; y0 (basically all possible m, c that can satisfy x0 and y0). Once you get a line in hough space for every (x,y) on a line in the image space, you observe that through 1 particular x, y, there&#8217;s a ton of concurrent lines. This is essentially the m, c pair that correspond to our line in the image space. For more info: http://yaniv.leviathanonline.com/blog/math/understanding-soccer/ [...]</description>
		<content:encoded><![CDATA[<p>[...] To detect straight lines in an image, use the naive version of the hough transform. The hough transform takes you from the image space to the Hough space where a line in the image, corresponds to a point and a point in the image corresponds to a line.Naive approach: y = mx + c is the line in the image space. In the hough space, get the lines corresponding to the points (x0, y0) [you can mark these white or something like that]. The line in hough space is just the equation representing: c = m * x0 &#8211; y0 (basically all possible m, c that can satisfy x0 and y0). Once you get a line in hough space for every (x,y) on a line in the image space, you observe that through 1 particular x, y, there&#8217;s a ton of concurrent lines. This is essentially the m, c pair that correspond to our line in the image space. For more info: http://yaniv.leviathanonline.com/blog/math/understanding-soccer/ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Differing Neighbors by rouli</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/differing-neighbors/comment-page-1/#comment-52006</link>
		<dc:creator>rouli</dc:creator>
		<pubDate>Sun, 23 Jan 2011 16:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=195#comment-52006</guid>
		<description>can I allocate another array in time O(n)?
and a better question (which may be considered as a hint) - should I?

spoiler - 
I think I have a solution using (something similar to) bin sort, but it requires two extra arrays.</description>
		<content:encoded><![CDATA[<p>can I allocate another array in time O(n)?<br />
and a better question (which may be considered as a hint) &#8211; should I?</p>
<p>spoiler &#8211;<br />
I think I have a solution using (something similar to) bin sort, but it requires two extra arrays.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zeroing an Array in Constant Time by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/zeroing-an-array-in-constant-time/comment-page-1/#comment-51921</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sat, 22 Jan 2011 19:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=202#comment-51921</guid>
		<description>And another equivalent way to look at it:
Implement an integer-set data structure that supports the following 3 operations in O(1):
Init(n) - Initialize an empty set, ready to contain elements between 0 and n-1.
Test(i) - Test if &quot;i&quot; is in the set.
Set(i) - Put &quot;i&quot; in the set.

Simple proof for equivalency:
Given the first data-structure, just initialize it with k=0, and set it with k=1.
Given the second data-structure, allocate an array, and use the set to remember which elements are initialized. if not initialized, return the default value.

I found it easier (and more elegant) to solve the second verse.

P.S.
There&#039;s a platform-dependent solution, which is to page-out the memory blocks, and let the CPU on &quot;page-in&quot; zero the page. If page size is O(1), it works. But this is really really platform dependent (and even must run as kernel code).</description>
		<content:encoded><![CDATA[<p>And another equivalent way to look at it:<br />
Implement an integer-set data structure that supports the following 3 operations in O(1):<br />
Init(n) &#8211; Initialize an empty set, ready to contain elements between 0 and n-1.<br />
Test(i) &#8211; Test if &#8220;i&#8221; is in the set.<br />
Set(i) &#8211; Put &#8220;i&#8221; in the set.</p>
<p>Simple proof for equivalency:<br />
Given the first data-structure, just initialize it with k=0, and set it with k=1.<br />
Given the second data-structure, allocate an array, and use the set to remember which elements are initialized. if not initialized, return the default value.</p>
<p>I found it easier (and more elegant) to solve the second verse.</p>
<p>P.S.<br />
There&#8217;s a platform-dependent solution, which is to page-out the memory blocks, and let the CPU on &#8220;page-in&#8221; zero the page. If page size is O(1), it works. But this is really really platform dependent (and even must run as kernel code).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zeroing an Array in Constant Time by rouli</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/zeroing-an-array-in-constant-time/comment-page-1/#comment-51803</link>
		<dc:creator>rouli</dc:creator>
		<pubDate>Fri, 21 Jan 2011 08:51:48 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=202#comment-51803</guid>
		<description>I don&#039;t know about the Technion, but in Tel Aviv we assumed that malloc put zeros (or any other well known, non random bits) in the allocated array.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know about the Technion, but in Tel Aviv we assumed that malloc put zeros (or any other well known, non random bits) in the allocated array.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zeroing an Array in Constant Time by Arie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/zeroing-an-array-in-constant-time/comment-page-1/#comment-51737</link>
		<dc:creator>Arie</dc:creator>
		<pubDate>Thu, 20 Jan 2011 12:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=202#comment-51737</guid>
		<description>This is a classic.  Used to be (maybe still is) taught in the basic Data Structures course at Technion.</description>
		<content:encoded><![CDATA[<p>This is a classic.  Used to be (maybe still is) taught in the basic Data Structures course at Technion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Secure Computing &#8211; Part I by aquafresh whitening</title>
		<link>http://yaniv.leviathanonline.com/blog/math/secure-computing-part-i/comment-page-1/#comment-51734</link>
		<dc:creator>aquafresh whitening</dc:creator>
		<pubDate>Thu, 20 Jan 2011 09:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/uncategorized/secure-computing-part-i/#comment-51734</guid>
		<description>thank you verry much for nice post</description>
		<content:encoded><![CDATA[<p>thank you verry much for nice post</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SIMD (Fire)Works! by network storage</title>
		<link>http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/comment-page-1/#comment-51047</link>
		<dc:creator>network storage</dc:creator>
		<pubDate>Wed, 12 Jan 2011 09:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/#comment-51047</guid>
		<description>Hello, I like your post. We desire everyone would spend this kind of attention to their post as you do. We came acros your blog on yahoo when looking for the area. We is in order to your blog. I am sorry for my personal poor englisch, i&#039;m in the netherlands. Sincerely from the holland!</description>
		<content:encoded><![CDATA[<p>Hello, I like your post. We desire everyone would spend this kind of attention to their post as you do. We came acros your blog on yahoo when looking for the area. We is in order to your blog. I am sorry for my personal poor englisch, i&#8217;m in the netherlands. Sincerely from the holland!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Higher Dimensions by wpolscemamymocneseo</title>
		<link>http://yaniv.leviathanonline.com/blog/math/higher-dimensions/comment-page-1/#comment-51017</link>
		<dc:creator>wpolscemamymocneseo</dc:creator>
		<pubDate>Tue, 11 Jan 2011 21:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/higher-dimensions/#comment-51017</guid>
		<description>I really thankful to find this site on bing, just what I was looking for : D too bookmarked .</description>
		<content:encoded><![CDATA[<p>I really thankful to find this site on bing, just what I was looking for : D too bookmarked .</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seam Carving by saurabh Aggarwal</title>
		<link>http://yaniv.leviathanonline.com/blog/math/seam-carving/comment-page-1/#comment-46173</link>
		<dc:creator>saurabh Aggarwal</dc:creator>
		<pubDate>Sat, 13 Nov 2010 21:14:47 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/seam-carving/#comment-46173</guid>
		<description>Well ! a great research going over it I came to know adobe is still yet to apply the optimal algo for this. As I have noticed that the seam carving will not work in images which have high number of edges,for that purpose image scaling is much better option.In this algo first we have to find that image which is required to be resized can be done thru seam carvin or image scaling.

In the Seam-Carving ,in the old algo that provided by SHamir i have noticed that many times the seamlocation comes adjacent to eachother which cause blur of image aftwer pixel duplication at this locations. SO, high seam density is to be avoided at any cost that should be our motto but density should be in controlled way means not should low not should high ,low density of seams can causes the seam can enter in edges. For this i Have cut the edge image in 2equal parts thru colums so number of seams required to be added is equally distributed, then the from the 8 neighbours of every pixels from which seam is passing u can add some value like 0.1 to 1 but be carefule if u dd high value the seam will start pass thorugh edges if uadd low value the seam will show same situation as the  old one so the value which required to added should be optimal one. In addition to it ,the in Shamir Algo Seam backtracking start from the bottom with minimum value,but I think it is better that add the edge values along the cloumns of all rows nad the column which show min value ,shows that in that column ther i shigh probability of findin optimal seam i mean no edge seam. 
i requires ur comments on this and ur suggestion to more improve it. I hav lot more image outputs produced by my matlab code regarding this that my algo is much better than the ariel shamir&#039;s that is images produced by duolang Matlab code .I will post in this blog if u ppl required.I am seeing how to launch papaer on it in tech conferences . 

Saurabh Aggarwal
INDIA</description>
		<content:encoded><![CDATA[<p>Well ! a great research going over it I came to know adobe is still yet to apply the optimal algo for this. As I have noticed that the seam carving will not work in images which have high number of edges,for that purpose image scaling is much better option.In this algo first we have to find that image which is required to be resized can be done thru seam carvin or image scaling.</p>
<p>In the Seam-Carving ,in the old algo that provided by SHamir i have noticed that many times the seamlocation comes adjacent to eachother which cause blur of image aftwer pixel duplication at this locations. SO, high seam density is to be avoided at any cost that should be our motto but density should be in controlled way means not should low not should high ,low density of seams can causes the seam can enter in edges. For this i Have cut the edge image in 2equal parts thru colums so number of seams required to be added is equally distributed, then the from the 8 neighbours of every pixels from which seam is passing u can add some value like 0.1 to 1 but be carefule if u dd high value the seam will start pass thorugh edges if uadd low value the seam will show same situation as the  old one so the value which required to added should be optimal one. In addition to it ,the in Shamir Algo Seam backtracking start from the bottom with minimum value,but I think it is better that add the edge values along the cloumns of all rows nad the column which show min value ,shows that in that column ther i shigh probability of findin optimal seam i mean no edge seam.<br />
i requires ur comments on this and ur suggestion to more improve it. I hav lot more image outputs produced by my matlab code regarding this that my algo is much better than the ariel shamir&#8217;s that is images produced by duolang Matlab code .I will post in this blog if u ppl required.I am seeing how to launch papaer on it in tech conferences . </p>
<p>Saurabh Aggarwal<br />
INDIA</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-44402</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Mon, 18 Oct 2010 23:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-44402</guid>
		<description>Hi Arie,

Interesting comments.
You can find my response (which admittedly, I wrote before your comment :-)) in the post on the axiom of choice: http://yaniv.leviathanonline.com/blog/math/set-it-straight/</description>
		<content:encoded><![CDATA[<p>Hi Arie,</p>
<p>Interesting comments.<br />
You can find my response (which admittedly, I wrote before your comment <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) in the post on the axiom of choice: <a href="http://yaniv.leviathanonline.com/blog/math/set-it-straight/" rel="nofollow">http://yaniv.leviathanonline.com/blog/math/set-it-straight/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Arie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-44380</link>
		<dc:creator>Arie</dc:creator>
		<pubDate>Mon, 18 Oct 2010 14:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-44380</guid>
		<description>Dan,

I&#039;m still unconvinced on the issue of AC.  The fact that something superficially (or not superficially) simple needs AC is just a reflection of the fact that AC itself is nearly as simple as you can get (&quot;I can form a set by picking one element from each set in my collection&quot; - isn&#039;t it obvious that I should always be able to do that?).  If you get perplexing and counter-intuitive results from AC, then that&#039;s just beautiful mathematics, not a reason to reject it.  Fundamentally, it&#039;s obviously true.  To illustrate what I mean, consider again the postulate of parallels.  Nobody pondering ordinary 2d (or 3D) geometry would ever consider POP to be false (which is why mathematicians had tried to prove it for millenia - I don&#039;t think anyone ever tried to disprove it).  Can you imagine someone saying &quot;well, I can prove this or that relation between the faces of those two buildings right there, but only if there exist parallel straight lines?&quot;  Only when you decide that &quot;point&quot; and &quot;straight line&quot; can meaning something other than everyday points and straights lines (or indeed, that they need not correspond to anything at all in the real world) do you find that rejecting the POP can be useful.  Similarly, as long as we think of a &quot;set&quot; as a collection of things, each of which may either &quot;belong&quot; or not to any given set, I would say that AC is certainly something you&#039;d expect to hold.  If somebody comes up with a different interpretation of &quot;set&quot; and &quot;belongs&quot; then I&#039;d expect rejection of AC to be worthwhile, but only in that context.  I still think people are overly obsessed with pointing out where AC is being used.

Regarding Tex (or, if you will, LaTex), alas, I know of no plugin or such that displays it.  The only reason I used it is that I know of no other way to reasonably express mathematics in ASCII text.  (In fact I was using some sort of pidgin LaTex, not strictly correct syntactically.)  I&#039;m guessing it could be done in html, but I barely now html.  Sorry about that.

Finally, two remark on my second solution (the using Zorn&#039;s lemma directly).
1. Condition 1 in the definition of consistent is of course superfluous.  Not only is it subsumed by condition 2 (when considering nonempty sets), it is also not used anywhere in the sequel.
2. I forgot to point out that the poset is not empty.  It contains as a member the set of all bit vectors with a finite number of 1s.</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>I&#8217;m still unconvinced on the issue of AC.  The fact that something superficially (or not superficially) simple needs AC is just a reflection of the fact that AC itself is nearly as simple as you can get (&#8220;I can form a set by picking one element from each set in my collection&#8221; &#8211; isn&#8217;t it obvious that I should always be able to do that?).  If you get perplexing and counter-intuitive results from AC, then that&#8217;s just beautiful mathematics, not a reason to reject it.  Fundamentally, it&#8217;s obviously true.  To illustrate what I mean, consider again the postulate of parallels.  Nobody pondering ordinary 2d (or 3D) geometry would ever consider POP to be false (which is why mathematicians had tried to prove it for millenia &#8211; I don&#8217;t think anyone ever tried to disprove it).  Can you imagine someone saying &#8220;well, I can prove this or that relation between the faces of those two buildings right there, but only if there exist parallel straight lines?&#8221;  Only when you decide that &#8220;point&#8221; and &#8220;straight line&#8221; can meaning something other than everyday points and straights lines (or indeed, that they need not correspond to anything at all in the real world) do you find that rejecting the POP can be useful.  Similarly, as long as we think of a &#8220;set&#8221; as a collection of things, each of which may either &#8220;belong&#8221; or not to any given set, I would say that AC is certainly something you&#8217;d expect to hold.  If somebody comes up with a different interpretation of &#8220;set&#8221; and &#8220;belongs&#8221; then I&#8217;d expect rejection of AC to be worthwhile, but only in that context.  I still think people are overly obsessed with pointing out where AC is being used.</p>
<p>Regarding Tex (or, if you will, LaTex), alas, I know of no plugin or such that displays it.  The only reason I used it is that I know of no other way to reasonably express mathematics in ASCII text.  (In fact I was using some sort of pidgin LaTex, not strictly correct syntactically.)  I&#8217;m guessing it could be done in html, but I barely now html.  Sorry about that.</p>
<p>Finally, two remark on my second solution (the using Zorn&#8217;s lemma directly).<br />
1. Condition 1 in the definition of consistent is of course superfluous.  Not only is it subsumed by condition 2 (when considering nonempty sets), it is also not used anywhere in the sequel.<br />
2. I forgot to point out that the poset is not empty.  It contains as a member the set of all bit vectors with a finite number of 1s.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Out of the Norm by Raghunandan</title>
		<link>http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/comment-page-1/#comment-44059</link>
		<dc:creator>Raghunandan</dc:creator>
		<pubDate>Wed, 13 Oct 2010 06:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/#comment-44059</guid>
		<description>:D</description>
		<content:encoded><![CDATA[<p> <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Out of the Norm by Raghunandan</title>
		<link>http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/comment-page-1/#comment-44058</link>
		<dc:creator>Raghunandan</dc:creator>
		<pubDate>Wed, 13 Oct 2010 06:46:37 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/#comment-44058</guid>
		<description>Thanks!! Neat explanation! But I found this on Wikipedia, and smelt fish

&quot;The infinity norm distance is also called Chebyshev distance. In 2D, it is the minimum number of moves kings require to travel between two squares on a chessboard.&quot;

Shouldnt that be l1 and not l-inf norm??

Thanks again!!</description>
		<content:encoded><![CDATA[<p>Thanks!! Neat explanation! But I found this on Wikipedia, and smelt fish</p>
<p>&#8220;The infinity norm distance is also called Chebyshev distance. In 2D, it is the minimum number of moves kings require to travel between two squares on a chessboard.&#8221;</p>
<p>Shouldnt that be l1 and not l-inf norm??</p>
<p>Thanks again!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Out of the Norm by Motorcycle gloves</title>
		<link>http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/comment-page-1/#comment-44034</link>
		<dc:creator>Motorcycle gloves</dc:creator>
		<pubDate>Tue, 12 Oct 2010 23:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/#comment-44034</guid>
		<description>You&#039;ve got truly a attention very own posting style and present fantastic information. The articles are fine to examine and you don´t use good ads like all the other bloggers.</description>
		<content:encoded><![CDATA[<p>You&#8217;ve got truly a attention very own posting style and present fantastic information. The articles are fine to examine and you don´t use good ads like all the other bloggers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-43755</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 08 Oct 2010 21:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-43755</guid>
		<description>Hi Arie,

Your formulation of the solution with the compactness theorem is nice! I will say that it is different, although of course all of these solutions are very intrinsically linked. There is a nice connection between ultrafilters and the compactness theorem: ultrafilters - and specifically ultraproducts, which rely on them - offer what is probably the most elegant proof for the compactness theorem (Although this bears absolutely no relation to your proof, where you use the compactness to prove the existence of the ultrafilter-like set). For more on this, see the Wikipedia articles &quot;Ultraproducts&quot; and &quot;Compactness theorem&quot;.

About your rant, there are some nice results to be gained by rejecting AC: wouldn&#039;t you like to have all sets of real numbers measurable, instead of having monsters that can be compressed to any size (and thus with measure at most zero), yet that can cover the real numbers with only countably many copies (thus not of measure zero - thus not measurable)? But indeed there are less such results than there are to be gained by accepting AC. The problem with those is that many of them are unintuitive, maybe even &quot;too strong&quot;, and of course not one of them can be constructive - good examples (in my opinion) are the Well Ordering Principle and the Hahn-Banach theorem. This is of course very much unlike the results of (and reasons for) accepting or rejecting the parallel postulate (at least to modern minds familiar with spherical and hyperbolic geometry). Furthermore, there are many cases where the necessity of the axiom of choice is surprising (as might be argued for this riddle, for example), and it is noteworthy to point out when you are using a powerful and non-trivial tool, especially for something superficially simple.

Finally, and somewhat off topic, does your browser parse the TeX in your above posts as images, or does it leave all the slashes in? I, for one, am not fluent in TeX, and it&#039;s not much fun to read text filled with \leq and \bar. So if your browser displays it nicely, I&#039;d be happy to hear how :) (I tried googling for appropriate firefox extensions, unsuccessfully)</description>
		<content:encoded><![CDATA[<p>Hi Arie,</p>
<p>Your formulation of the solution with the compactness theorem is nice! I will say that it is different, although of course all of these solutions are very intrinsically linked. There is a nice connection between ultrafilters and the compactness theorem: ultrafilters &#8211; and specifically ultraproducts, which rely on them &#8211; offer what is probably the most elegant proof for the compactness theorem (Although this bears absolutely no relation to your proof, where you use the compactness to prove the existence of the ultrafilter-like set). For more on this, see the Wikipedia articles &#8220;Ultraproducts&#8221; and &#8220;Compactness theorem&#8221;.</p>
<p>About your rant, there are some nice results to be gained by rejecting AC: wouldn&#8217;t you like to have all sets of real numbers measurable, instead of having monsters that can be compressed to any size (and thus with measure at most zero), yet that can cover the real numbers with only countably many copies (thus not of measure zero &#8211; thus not measurable)? But indeed there are less such results than there are to be gained by accepting AC. The problem with those is that many of them are unintuitive, maybe even &#8220;too strong&#8221;, and of course not one of them can be constructive &#8211; good examples (in my opinion) are the Well Ordering Principle and the Hahn-Banach theorem. This is of course very much unlike the results of (and reasons for) accepting or rejecting the parallel postulate (at least to modern minds familiar with spherical and hyperbolic geometry). Furthermore, there are many cases where the necessity of the axiom of choice is surprising (as might be argued for this riddle, for example), and it is noteworthy to point out when you are using a powerful and non-trivial tool, especially for something superficially simple.</p>
<p>Finally, and somewhat off topic, does your browser parse the TeX in your above posts as images, or does it leave all the slashes in? I, for one, am not fluent in TeX, and it&#8217;s not much fun to read text filled with \leq and \bar. So if your browser displays it nicely, I&#8217;d be happy to hear how <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (I tried googling for appropriate firefox extensions, unsuccessfully)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Arie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-43334</link>
		<dc:creator>Arie</dc:creator>
		<pubDate>Sun, 03 Oct 2010 12:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-43334</guid>
		<description>I thought about it some more and realized the solution can be based directly on Zorn&#039;s lemma, without appealing to the compactness theorem.  I think it would be interesting to contemplate whether there is a solution relying (reasonably straightforwardly) directly on the axiom of choice.

Define: A set X of bit vectors is \emph{consistent} if:
1.  0* \in X; and
2.  x \in X  implies  y \in X  for all  y \leq&#039; x; and
3.  x \in X  implies  \bar{x} \not \in X.

Define a poset:  the elements are all consistent sets of vectors; the partial order is the set containment relation.

It is easy to see that, for every chain, the union of elements in the chain is a consistent set of vectors and is therefore an upper bound.

Thus by Zorn&#039;s lemma there is a maximal element T.

For every bit vector x, either T contains a vector z=\bar{y} for some y \leq&#039; x, in which case  \bar{x} \in T  (because  \bar{x} \leq&#039; z), or else T \cup { y &#124; y \leq&#039; x } is consistent, in which case  x \in T  (by T&#039;s maximality).  Also, it is not possible that both x and \bar{x} are in T (by consistency).  In other words, for each x, exactly one of x and \bar{x} is in T.

The strategy  f(x)=1 iff x \in T  therefore satisfies (B)-(C).</description>
		<content:encoded><![CDATA[<p>I thought about it some more and realized the solution can be based directly on Zorn&#8217;s lemma, without appealing to the compactness theorem.  I think it would be interesting to contemplate whether there is a solution relying (reasonably straightforwardly) directly on the axiom of choice.</p>
<p>Define: A set X of bit vectors is \emph{consistent} if:<br />
1.  0* \in X; and<br />
2.  x \in X  implies  y \in X  for all  y \leq&#8217; x; and<br />
3.  x \in X  implies  \bar{x} \not \in X.</p>
<p>Define a poset:  the elements are all consistent sets of vectors; the partial order is the set containment relation.</p>
<p>It is easy to see that, for every chain, the union of elements in the chain is a consistent set of vectors and is therefore an upper bound.</p>
<p>Thus by Zorn&#8217;s lemma there is a maximal element T.</p>
<p>For every bit vector x, either T contains a vector z=\bar{y} for some y \leq&#8217; x, in which case  \bar{x} \in T  (because  \bar{x} \leq&#8217; z), or else T \cup { y | y \leq&#8217; x } is consistent, in which case  x \in T  (by T&#8217;s maximality).  Also, it is not possible that both x and \bar{x} are in T (by consistency).  In other words, for each x, exactly one of x and \bar{x} is in T.</p>
<p>The strategy  f(x)=1 iff x \in T  therefore satisfies (B)-(C).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Arie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-43332</link>
		<dc:creator>Arie</dc:creator>
		<pubDate>Sun, 03 Oct 2010 12:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-43332</guid>
		<description>Arrrgh!  I wasn&#039;t paying attention.  The proposed generalization is solved in exactly the same manner, using the existence of a group of every cardinality.</description>
		<content:encoded><![CDATA[<p>Arrrgh!  I wasn&#8217;t paying attention.  The proposed generalization is solved in exactly the same manner, using the existence of a group of every cardinality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Arie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-43100</link>
		<dc:creator>Arie</dc:creator>
		<pubDate>Tue, 28 Sep 2010 18:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-43100</guid>
		<description>I&#039;m sorry to say I didn&#039;t find the puzzle nearly as enjoyable as you have indicated, mainly because it became quite quickly clear what the necessary and sufficient conditions were, and then the first (and I&#039;d say fairly obvious) tool that came to mind established the solution.  I&#039;m posting my solution here because it&#039;s different (at least superficially) from the two that have already been suggested.

Being a meagre computer scientist I don&#039;t know much set theory, nor much analysis.  Here&#039;s my solution, based on a bit of propositional logic.  (I won&#039;t be surprised if there is an underlying connection to the other solutions.  I&#039;m not familiar enough with the concepts used in them, though, so I can&#039;t tell.)

First, a bit of an analysis of the problem a-la Dan.
Let&#039;s assume a solution exists.  Let&#039;s call the players p, q, r, and their strategies f_p, f_q, f_r, respectively.  Also, let&#039;s define that the answer is 1 in the case of all 1s and 2 in the other case.  Denote by 0* the all-0s vector, and by 1* the all-1s vector.

1.  Suppose f_p(x)=1 for some input x given to p.  Let y be the complement of x.  Then if q gets y and r gets 1*, then the correct answer is 2.  Thus f_q(y)=2.
2.  Suppose f_p(x)=2 for some x given to p.  Again, let y be the complement of x.  Then if q gets y and r gets 0*, then the correct answer is 1.  Thus f_q(y)=1.

So we can conclude that  f_q(\bar{x}) = \bar{f_p(x)} for all x, where \bar{&quot;something&quot;} is the opposite of &quot;something&quot;.  (In the case of a bit vector it is the complement; in the case of an answer it is 3 minus that answer.)  Thus once f_p is determined, so is f_q.

Now, q is just a name of one of the non-p participants.  So by symmetry, f_q=f_r.  Similarly, p is just a name, so we conclude that f_p=f_q=f_r.
Thus:
(A) All three participants must use the same strategy.  Let&#039;s call it f.
(B) f(\bar{x}) = \bar{f(x)} for all x.

Let us now introduce some more notation.  Denote by z_i the ith bit of vector z.  For two bit vectors x, y we denote by x \leq&#039; y (x&lt;&#039;y) the statement:
There exists n such that x_i \leq y_i for all i \geq n (and there exists at least one j \geq n such that x_i &lt; y_i).

Let y be such that f(y)=1 and let x be such that x &lt;&#039; y.  Then f(\bar{y})=2.  Now, if p gets \bar{y} and q gets x, r can get a vector such that the sum of all three is 1*.  In this case p answers 2, so the two others must answer 1.  It follows that f(x)=1.
Thus:
(C) x \leq&#039; y implies f(x) \leq f(y) for all x and y.

All we&#039;ve done so far is develop some necessary conditions.  (Of course, they are not needed in order to solve the puzzle, but it&#039;s a fun analysis.)  To solve the puzzle we need sufficient conditions.  We claim that (A)-(C) are just such conditions.

To prove this, suppose the three participants use a strategy f satisfying (B) and (C).  Consider an instance of the puzzle.
Case 1: the correct answer is 1.  Suppose one of the participants gets x such that f(x)=2.  Because the correct answer is 1, it must be the case that the other two participants have vectors y and z that sum to \bar{x}.  It follows that y \leq&#039; \bar{x} and z \leq&#039; \bar{x}.  Since f(\bar{x})=1 by virtue of (B), we have f(y)=f(z)=1, by (C).
Case 2: the correct answer is 2.  Suppose one of the participants gets x such that f(x)=1.  Because the correct answer is 2, it must be the case that the other two participants have vectors y and z such that for some n, x_i=0 implies y_i=z_i=1 for all i \geq n.  Thus \bar{x} \leq&#039; y and \bar{x} \leq&#039; z.  Since f(\bar{x})=2 by virtue of (B), we have f(y)=f(z)=2, by (C).

Does there exist such an f?  Clearly, if the adversary can only choose from some finite collection of 1-2 vectors then there is a maximum point k at which the transition from 1 to 2 may occur.  The simple strategy f(x)=1 iff x_k=0 is easily seen to work.  Also, conditions (B)-(C) are satisfied by this strategy if we replace \leq&#039; in condition (C) with a bounded version \leq&#039;k defined by: &quot;There exists n \leq k such that ...&quot;

Of course the problem is that the adversary is not limited to a finite collection of instances.  We need to somehow go from all finite subcases to the infinite general case.  The first thing that comes to mind (well, at least to my mind) is the notion of compactness.  Indeed, in this case we can employ the compactness theorem of propositional logic to get the desired result.

Define propositional variables {V_x &#124; x is an infinite bit vector}.  The intended semantics is: V_x=false means f(x)=1, and V_x=true means f(x)=2.

Now encode (B) and (C) by the following sets of formulae.
B: For all vectors x
      V_{\bar{x}} \rightleftarrow \not V_x.
C: For all vectors x and y such that x \leq&#039; y
      \not V_x \vee V_y

Clearly there is a bijective correspondence between satisfying assignments and strategies satisfying (B)-(C).  By the argumentation above every finite subset of formulae is satisfiable.  Thus by the compactness theorem the entire set of formulae is satisfiable.

Remark:  Of course the set of variables is uncountable so we need Zorn&#039;s lemma (i.e., AC) to support the compactness theorem.

Rant:  Why is everybody so obsessed with the axiom of choice?  Yes, it&#039;s formal statement seems significantly more complicated than the ZF axioms (even if informally---&quot;can form a set by choosing one element from each set&quot;---it&#039;s just as basic as the other axioms, at least to my mind).  I can see that its independence of ZF is interesting within set theory, but for general math, what&#039;s the big deal?  Why do we always need to point out that we are using it?  Unlike, say, non-euclidean geometry, there is no great deal of interesting math to be gained by rejecting it (at least to my knowledge; someone please correct me if I&#039;m wrong), and there is a much to gain.  So if you&#039;re doing foundations-of-mathematics, by all means go ahead and point out the reliance on AC (or lack thereof), but otherwise why not just give it a rest.  Oh, and as long as I&#039;m on the topic of geometry, when was the last time anyone saw a proof requiring the Postulate of Parallels bothering to point that out?

Finally, to answer rouli&#039;s suggestion, suppose each participant can only examine a finite number of bits.  Consider an instance of the problem where the correct answer is 1.  Let k be the maximum index of a bit observed by any participant.  If we change the inputs to the participants such that they remain the same up to bit k, and thereafter are all-1s, all-1s and all-0s, the correct answer changes to 2, but the participants will clearly not change their guesses.</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry to say I didn&#8217;t find the puzzle nearly as enjoyable as you have indicated, mainly because it became quite quickly clear what the necessary and sufficient conditions were, and then the first (and I&#8217;d say fairly obvious) tool that came to mind established the solution.  I&#8217;m posting my solution here because it&#8217;s different (at least superficially) from the two that have already been suggested.</p>
<p>Being a meagre computer scientist I don&#8217;t know much set theory, nor much analysis.  Here&#8217;s my solution, based on a bit of propositional logic.  (I won&#8217;t be surprised if there is an underlying connection to the other solutions.  I&#8217;m not familiar enough with the concepts used in them, though, so I can&#8217;t tell.)</p>
<p>First, a bit of an analysis of the problem a-la Dan.<br />
Let&#8217;s assume a solution exists.  Let&#8217;s call the players p, q, r, and their strategies f_p, f_q, f_r, respectively.  Also, let&#8217;s define that the answer is 1 in the case of all 1s and 2 in the other case.  Denote by 0* the all-0s vector, and by 1* the all-1s vector.</p>
<p>1.  Suppose f_p(x)=1 for some input x given to p.  Let y be the complement of x.  Then if q gets y and r gets 1*, then the correct answer is 2.  Thus f_q(y)=2.<br />
2.  Suppose f_p(x)=2 for some x given to p.  Again, let y be the complement of x.  Then if q gets y and r gets 0*, then the correct answer is 1.  Thus f_q(y)=1.</p>
<p>So we can conclude that  f_q(\bar{x}) = \bar{f_p(x)} for all x, where \bar{&#8220;something&#8221;} is the opposite of &#8220;something&#8221;.  (In the case of a bit vector it is the complement; in the case of an answer it is 3 minus that answer.)  Thus once f_p is determined, so is f_q.</p>
<p>Now, q is just a name of one of the non-p participants.  So by symmetry, f_q=f_r.  Similarly, p is just a name, so we conclude that f_p=f_q=f_r.<br />
Thus:<br />
(A) All three participants must use the same strategy.  Let&#8217;s call it f.<br />
(B) f(\bar{x}) = \bar{f(x)} for all x.</p>
<p>Let us now introduce some more notation.  Denote by z_i the ith bit of vector z.  For two bit vectors x, y we denote by x \leq&#8217; y (x&lt;&#039;y) the statement:<br />
There exists n such that x_i \leq y_i for all i \geq n (and there exists at least one j \geq n such that x_i &lt; y_i).</p>
<p>Let y be such that f(y)=1 and let x be such that x &lt;&#039; y.  Then f(\bar{y})=2.  Now, if p gets \bar{y} and q gets x, r can get a vector such that the sum of all three is 1*.  In this case p answers 2, so the two others must answer 1.  It follows that f(x)=1.<br />
Thus:<br />
(C) x \leq&#039; y implies f(x) \leq f(y) for all x and y.</p>
<p>All we&#039;ve done so far is develop some necessary conditions.  (Of course, they are not needed in order to solve the puzzle, but it&#039;s a fun analysis.)  To solve the puzzle we need sufficient conditions.  We claim that (A)-(C) are just such conditions.</p>
<p>To prove this, suppose the three participants use a strategy f satisfying (B) and (C).  Consider an instance of the puzzle.<br />
Case 1: the correct answer is 1.  Suppose one of the participants gets x such that f(x)=2.  Because the correct answer is 1, it must be the case that the other two participants have vectors y and z that sum to \bar{x}.  It follows that y \leq&#039; \bar{x} and z \leq&#039; \bar{x}.  Since f(\bar{x})=1 by virtue of (B), we have f(y)=f(z)=1, by (C).<br />
Case 2: the correct answer is 2.  Suppose one of the participants gets x such that f(x)=1.  Because the correct answer is 2, it must be the case that the other two participants have vectors y and z such that for some n, x_i=0 implies y_i=z_i=1 for all i \geq n.  Thus \bar{x} \leq&#039; y and \bar{x} \leq&#039; z.  Since f(\bar{x})=2 by virtue of (B), we have f(y)=f(z)=2, by (C).</p>
<p>Does there exist such an f?  Clearly, if the adversary can only choose from some finite collection of 1-2 vectors then there is a maximum point k at which the transition from 1 to 2 may occur.  The simple strategy f(x)=1 iff x_k=0 is easily seen to work.  Also, conditions (B)-(C) are satisfied by this strategy if we replace \leq&#039; in condition (C) with a bounded version \leq&#039;k defined by: &quot;There exists n \leq k such that &#8230;&quot;</p>
<p>Of course the problem is that the adversary is not limited to a finite collection of instances.  We need to somehow go from all finite subcases to the infinite general case.  The first thing that comes to mind (well, at least to my mind) is the notion of compactness.  Indeed, in this case we can employ the compactness theorem of propositional logic to get the desired result.</p>
<p>Define propositional variables {V_x | x is an infinite bit vector}.  The intended semantics is: V_x=false means f(x)=1, and V_x=true means f(x)=2.</p>
<p>Now encode (B) and (C) by the following sets of formulae.<br />
B: For all vectors x<br />
      V_{\bar{x}} \rightleftarrow \not V_x.<br />
C: For all vectors x and y such that x \leq&#039; y<br />
      \not V_x \vee V_y</p>
<p>Clearly there is a bijective correspondence between satisfying assignments and strategies satisfying (B)-(C).  By the argumentation above every finite subset of formulae is satisfiable.  Thus by the compactness theorem the entire set of formulae is satisfiable.</p>
<p>Remark:  Of course the set of variables is uncountable so we need Zorn&#039;s lemma (i.e., AC) to support the compactness theorem.</p>
<p>Rant:  Why is everybody so obsessed with the axiom of choice?  Yes, it&#039;s formal statement seems significantly more complicated than the ZF axioms (even if informally&#8212;&quot;can form a set by choosing one element from each set&quot;&#8212;it&#039;s just as basic as the other axioms, at least to my mind).  I can see that its independence of ZF is interesting within set theory, but for general math, what&#039;s the big deal?  Why do we always need to point out that we are using it?  Unlike, say, non-euclidean geometry, there is no great deal of interesting math to be gained by rejecting it (at least to my knowledge; someone please correct me if I&#039;m wrong), and there is a much to gain.  So if you&#039;re doing foundations-of-mathematics, by all means go ahead and point out the reliance on AC (or lack thereof), but otherwise why not just give it a rest.  Oh, and as long as I&#039;m on the topic of geometry, when was the last time anyone saw a proof requiring the Postulate of Parallels bothering to point that out?</p>
<p>Finally, to answer rouli&#039;s suggestion, suppose each participant can only examine a finite number of bits.  Consider an instance of the problem where the correct answer is 1.  Let k be the maximum index of a bit observed by any participant.  If we change the inputs to the participants such that they remain the same up to bit k, and thereafter are all-1s, all-1s and all-0s, the correct answer changes to 2, but the participants will clearly not change their guesses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Arie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-43053</link>
		<dc:creator>Arie</dc:creator>
		<pubDate>Mon, 27 Sep 2010 16:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-43053</guid>
		<description>Now consider (what might be) the mother of all generalizations, namely, where the set of people is completely arbitrary, as is the set of colors.

To overcome the problem of an uncountable set of people speaking one after the other, note that in the original puzzle, when person i needs to speak, this person has already heard the guesses of all those preceding him.  These guesses are all known to be correct, except for the first person&#039;s guess.  Furthermore, person i can see the colors of all subsequent people.  Thus the information person i uses is the guess of the first person and the hat colors of all participants except for himself (and the first person).

So the generalized setting is the following.  One person is designated as &quot;first&quot;.  Everybody gets to see the hats of all others but not their own.  (Possibly, they also don&#039;t get to see the first person&#039;s hat; this makes no difference.)  The first person then makes a guess heard by all.  Thereafter no communication occurs; all silently write down their guesses.</description>
		<content:encoded><![CDATA[<p>Now consider (what might be) the mother of all generalizations, namely, where the set of people is completely arbitrary, as is the set of colors.</p>
<p>To overcome the problem of an uncountable set of people speaking one after the other, note that in the original puzzle, when person i needs to speak, this person has already heard the guesses of all those preceding him.  These guesses are all known to be correct, except for the first person&#8217;s guess.  Furthermore, person i can see the colors of all subsequent people.  Thus the information person i uses is the guess of the first person and the hat colors of all participants except for himself (and the first person).</p>
<p>So the generalized setting is the following.  One person is designated as &#8220;first&#8221;.  Everybody gets to see the hats of all others but not their own.  (Possibly, they also don&#8217;t get to see the first person&#8217;s hat; this makes no difference.)  The first person then makes a guess heard by all.  Thereafter no communication occurs; all silently write down their guesses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seam Carving by Radha</title>
		<link>http://yaniv.leviathanonline.com/blog/math/seam-carving/comment-page-1/#comment-42552</link>
		<dc:creator>Radha</dc:creator>
		<pubDate>Fri, 17 Sep 2010 05:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/seam-carving/#comment-42552</guid>
		<description>I want to further enhance the technique of seam carving.What improvement should i do? Please help me because i want to do it in my dissertation.</description>
		<content:encoded><![CDATA[<p>I want to further enhance the technique of seam carving.What improvement should i do? Please help me because i want to do it in my dissertation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Find the Duplicate by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/find-the-duplicate/comment-page-1/#comment-40999</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 31 Aug 2010 17:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/find-the-duplicate/#comment-40999</guid>
		<description>A clarification - the solution takes O(log(N)) bits of memory and O(N * logN) time, if you are only allowed actions on bits. Note that in this case the size of the input is N*log(N).
It is simpler to count the complexity in integers, in which case it is indeed O(N) running time and O(1) memory.</description>
		<content:encoded><![CDATA[<p>A clarification &#8211; the solution takes O(log(N)) bits of memory and O(N * logN) time, if you are only allowed actions on bits. Note that in this case the size of the input is N*log(N).<br />
It is simpler to count the complexity in integers, in which case it is indeed O(N) running time and O(1) memory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-38175</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 29 Jun 2010 01:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-38175</guid>
		<description>Oh, and regarding rouli&#039;s comment, I forgot to say that I think that the riddle cannot be proved by looking at only finitely many bits (even if unbounded).
Not sure how to prove that though.

And finally, I thanked Haran for the riddle, but I should have also thanked Nadav for being a proxy :-)
So thanks Nadav! Cool riddle!</description>
		<content:encoded><![CDATA[<p>Oh, and regarding rouli&#8217;s comment, I forgot to say that I think that the riddle cannot be proved by looking at only finitely many bits (even if unbounded).<br />
Not sure how to prove that though.</p>
<p>And finally, I thanked Haran for the riddle, but I should have also thanked Nadav for being a proxy <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
So thanks Nadav! Cool riddle!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-38173</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 29 Jun 2010 00:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-38173</guid>
		<description>Hi,

Well, my solution is essentially the second one Dan describes (with the correct treatment for 1/2). Actually, the construction itself (modifying the proof of the Hahn-Banach theorem) is also very similar to the use of a filter.

For simplicity, I will start from the beginning (Dan - I must say that I really like your filter solution, Oded Badt solved it like this as well).

So, take the vector space of all bounded sequences (with the sup norm). Take the subspace of all converging sequences. On it, the limit linear functional is defined. Now, using Hahn-Banach we can indeed extend it to the entire space. The only problem is indeed with the value 1/2.

The correction for the value 1/2 is actually really simple, we will build our extension such that all binary sequences will get whole number values (we can even enforce that any sequence that is composed of whole numbers receives whole values).
How do we do it? Well, let&#039;s recall how the Hahn-Banach proof works: we have the set of pairs Fi,Hi of functionals Fi and subspaces Hi. What happens if we consider only ones which satisfy our requirement? Well, everything still works! Every chain still has an upper bound and the maximal element is our entire space! (BTW - it is enough to define it on the subspace spanned by all the sequences composed of whole numbers, which I think is equal to that spanned by all binary sequences but STRICTLY smaller than the entire space - comments?).

Anyway, the problem can also be solved by standard transfinite induction (i.e. our modified Hahn-Banach theorem can be proved with it). Which is kind of similar to the filter idea (without explicitly using it). I.e., take the next binary sequence not yet assigned, assign it 0, expand the functional, rinse and repeat.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Well, my solution is essentially the second one Dan describes (with the correct treatment for 1/2). Actually, the construction itself (modifying the proof of the Hahn-Banach theorem) is also very similar to the use of a filter.</p>
<p>For simplicity, I will start from the beginning (Dan &#8211; I must say that I really like your filter solution, Oded Badt solved it like this as well).</p>
<p>So, take the vector space of all bounded sequences (with the sup norm). Take the subspace of all converging sequences. On it, the limit linear functional is defined. Now, using Hahn-Banach we can indeed extend it to the entire space. The only problem is indeed with the value 1/2.</p>
<p>The correction for the value 1/2 is actually really simple, we will build our extension such that all binary sequences will get whole number values (we can even enforce that any sequence that is composed of whole numbers receives whole values).<br />
How do we do it? Well, let&#8217;s recall how the Hahn-Banach proof works: we have the set of pairs Fi,Hi of functionals Fi and subspaces Hi. What happens if we consider only ones which satisfy our requirement? Well, everything still works! Every chain still has an upper bound and the maximal element is our entire space! (BTW &#8211; it is enough to define it on the subspace spanned by all the sequences composed of whole numbers, which I think is equal to that spanned by all binary sequences but STRICTLY smaller than the entire space &#8211; comments?).</p>
<p>Anyway, the problem can also be solved by standard transfinite induction (i.e. our modified Hahn-Banach theorem can be proved with it). Which is kind of similar to the filter idea (without explicitly using it). I.e., take the next binary sequence not yet assigned, assign it 0, expand the functional, rinse and repeat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-38031</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 27 Jun 2010 21:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-38031</guid>
		<description>Argh. Thought I got rid of all the less-thans, forgot to search up :\
If the above was less than clear, that is of course due to it being cut off just after the start of line (d), and joined five paragraphs down... Here are the solutions again, with the first and last paragraphs repeated from the last post:


First solution (warning: heavy set theory!):
This is a rather axiomatic approach, based on making some reasonable assumptions about the strategy and then living up to them. First, because of symmetry, it seems reasonable that each of them will have the same deterministic strategy, i.e. a function F from all infinite sequences of bits to the set {0,1} where output is the guess about the majority of the sequences in infinity. Now for some desired properties of F:
(a) F({a_n}) = c if {a_n} is the constant sequence a_n=c, for both c in {0,1} (reasonable)
(b) If sequences a_n and b_n differ only in finitely many places, then F({a_n})=F({b_n}). This is reasonable as what happens up to a finite time shouldn&#039;t matter, as it might differ from the behaviour at infinity.
(c) If sequences a_n and b_n complement each other, i.e. a_n+b_n=1 for all n (or for all but finitely many n, by (b)), then F({a_n})+F({b_n})=1, that is, they also complement. This is not only reasonable but necessary: Suppose the first person got sequence a_n, and the second got b_n. Now it could still be possible for the sum of the sequences to be constantly 1 or 2, the third person will just get the appropriate constant function. Hence for at least two people to guess the correct sum in both cases, the person who got {a_n} must guess differently from the person who got {b_n}.
(d) If b_n &gt;= a_n for all n, then F({a_n}) &gt;= F({b_n}). This is reasonable, as it does not make sense that seeing strictly more 1&#039;s in {b_n} than in {a_n} will make us guess that the majority was 1 for {a_n}, but 0 for {b_n}.

Now, note that any such function F:{0,1}^N → {0,1} could equivalently be considered as the indicator function of some subset (which by abusing notation we shall also call F) of the power set P(N), i.e. for any subset A of N, F(A)=1 if and only if A is in F. In this language the properties translate to: 
(a) N is in F, the empty set is not in F
(b) If A and B differ by finitely many elements, then A is in F if and only if B is in F
(c) A is in F if and only if its complement is not in F.
(d) If A is a subset of B, and A is in F, then B is also in F.

At this stage someone who is familiar with the concept might see that such a set F could be, for example, any free ultrafilter: A filter is a set F which satisfies (a),(d) and (e): If A,B are in F, then so is their intersection. Adding property (c) makes it an ultrafilter, and property (b) is then equivalent to the &quot;free&quot; property, which is that no singleton {x} is in F. Proving the existence of a free ultrafilter on N is non-trivial and requires the Axiom of Choice (or some weaker form of it). I recommend looking it up in Wikipedia. It might be simpler just to show that a set satisfying (a-d) exists, though.

Now let us show that any set F satisfying (a-d) will yield a working strategy: To show that at least two people out of three guess correctly is equivalent to showing that out of each two, at least one will guess correctly. Suppose that at infinity, the sum was 1. Then at no time did both people get 1 simultaneously. Hence their sets, A and B, are disjoint, i.e. A is contained in the complement of B and vice versa. Thus is F(A)=1 then by (d) F(B^c)=1 and by (c) F(B)=0, and similarly if F(B)=1 then F(A)=0. Then at least one of them will guess &#039;0&#039;, which is the correct response. If the sum at infinity was 2, then it can be similarly shown (using property (b) as well) that either F(A)=1 or F(B)=1, which again means at least one of the two guesses correctly.

(And that&#039;s all!)


Second solution(?) (warning: heavy analysis!):
It seems to me that many people, upon encountering this problem, try the following direction: &quot;If each of the sequences has a density at infinity, then it is very simple: If it is less than half, I will guess 0, if it is more than half, I will guess 1&quot;. A good idea, and true, although dependent on two big ifs: If there is a density (and in general of course there isn&#039;t), and if it isn&#039;t exactly 1/2 (where the above algorithm isn&#039;t defined). The big problem here of course is the existence of the density. Fortunately there exists a common (yet sophisticated and advanced) tool that solves it: The Hahn-Banach theorem. Basically, it allows us to extend any bounded linear functional on a subspace of the vector space of bounded sequences into a bounded linear functional on the entire space. For example, if we use it to extend the limit functional defined on the space of convergent sequences, we will get a functional F on all bounded sequences, which is bounded by the supremum, extends the notion of density, and will attain only values in [0,1] the bit sequences.

Now given the sequence of bits, we apply F on it, and if it less than 1/2 we guess 0, and if it is more than 1/2 we guess 1. As the sum a_n+b_n+c_n is constantly 1 or 2 at infinity, so is the sum F({a_n})+F({b_n})+F({c_n}) be 1 or 2, by the linearity of F and by the fact that it extends the limit functional. If the sum is 1 then at most one person can have F &gt; 1/2 (else the total sum is &gt; 1) and the other two guess correctly; if the sum is 2, then at most one can have F less than 1/2 (else the sum is less than 2), and again the other two guess correctly.

It can be seen that the only cases where we do not clearly win is if the values of F are (1,1/2,1/2) or (0,1/2,1/2). As before, in such a case we must have the two people guess differently. Because there are three people, it can be seen that this is not doable by having different people react differently to the value 1/2, and so we must decide for each bit sequence with F = 1/2 whether to guess 0 or 1, in such a way that any two complementary sequences (or more accurately - complementary up to a sequence with F=0) are assigned different guesses.

I had thought earlier that this could be done easily, but now I realize that it might not be so, and I&#039;m not really sure if this can be finished with something simpler than the first proof. In any case it will most likely require AoC again, but of course, even the Hahn-Banach theorem requires some weaker form of the AoC to hold.</description>
		<content:encoded><![CDATA[<p>Argh. Thought I got rid of all the less-thans, forgot to search up :\<br />
If the above was less than clear, that is of course due to it being cut off just after the start of line (d), and joined five paragraphs down&#8230; Here are the solutions again, with the first and last paragraphs repeated from the last post:</p>
<p>First solution (warning: heavy set theory!):<br />
This is a rather axiomatic approach, based on making some reasonable assumptions about the strategy and then living up to them. First, because of symmetry, it seems reasonable that each of them will have the same deterministic strategy, i.e. a function F from all infinite sequences of bits to the set {0,1} where output is the guess about the majority of the sequences in infinity. Now for some desired properties of F:<br />
(a) F({a_n}) = c if {a_n} is the constant sequence a_n=c, for both c in {0,1} (reasonable)<br />
(b) If sequences a_n and b_n differ only in finitely many places, then F({a_n})=F({b_n}). This is reasonable as what happens up to a finite time shouldn&#8217;t matter, as it might differ from the behaviour at infinity.<br />
(c) If sequences a_n and b_n complement each other, i.e. a_n+b_n=1 for all n (or for all but finitely many n, by (b)), then F({a_n})+F({b_n})=1, that is, they also complement. This is not only reasonable but necessary: Suppose the first person got sequence a_n, and the second got b_n. Now it could still be possible for the sum of the sequences to be constantly 1 or 2, the third person will just get the appropriate constant function. Hence for at least two people to guess the correct sum in both cases, the person who got {a_n} must guess differently from the person who got {b_n}.<br />
(d) If b_n &gt;= a_n for all n, then F({a_n}) &gt;= F({b_n}). This is reasonable, as it does not make sense that seeing strictly more 1&#8242;s in {b_n} than in {a_n} will make us guess that the majority was 1 for {a_n}, but 0 for {b_n}.</p>
<p>Now, note that any such function F:{0,1}^N → {0,1} could equivalently be considered as the indicator function of some subset (which by abusing notation we shall also call F) of the power set P(N), i.e. for any subset A of N, F(A)=1 if and only if A is in F. In this language the properties translate to:<br />
(a) N is in F, the empty set is not in F<br />
(b) If A and B differ by finitely many elements, then A is in F if and only if B is in F<br />
(c) A is in F if and only if its complement is not in F.<br />
(d) If A is a subset of B, and A is in F, then B is also in F.</p>
<p>At this stage someone who is familiar with the concept might see that such a set F could be, for example, any free ultrafilter: A filter is a set F which satisfies (a),(d) and (e): If A,B are in F, then so is their intersection. Adding property (c) makes it an ultrafilter, and property (b) is then equivalent to the &#8220;free&#8221; property, which is that no singleton {x} is in F. Proving the existence of a free ultrafilter on N is non-trivial and requires the Axiom of Choice (or some weaker form of it). I recommend looking it up in Wikipedia. It might be simpler just to show that a set satisfying (a-d) exists, though.</p>
<p>Now let us show that any set F satisfying (a-d) will yield a working strategy: To show that at least two people out of three guess correctly is equivalent to showing that out of each two, at least one will guess correctly. Suppose that at infinity, the sum was 1. Then at no time did both people get 1 simultaneously. Hence their sets, A and B, are disjoint, i.e. A is contained in the complement of B and vice versa. Thus is F(A)=1 then by (d) F(B^c)=1 and by (c) F(B)=0, and similarly if F(B)=1 then F(A)=0. Then at least one of them will guess &#8217;0&#8242;, which is the correct response. If the sum at infinity was 2, then it can be similarly shown (using property (b) as well) that either F(A)=1 or F(B)=1, which again means at least one of the two guesses correctly.</p>
<p>(And that&#8217;s all!)</p>
<p>Second solution(?) (warning: heavy analysis!):<br />
It seems to me that many people, upon encountering this problem, try the following direction: &#8220;If each of the sequences has a density at infinity, then it is very simple: If it is less than half, I will guess 0, if it is more than half, I will guess 1&#8243;. A good idea, and true, although dependent on two big ifs: If there is a density (and in general of course there isn&#8217;t), and if it isn&#8217;t exactly 1/2 (where the above algorithm isn&#8217;t defined). The big problem here of course is the existence of the density. Fortunately there exists a common (yet sophisticated and advanced) tool that solves it: The Hahn-Banach theorem. Basically, it allows us to extend any bounded linear functional on a subspace of the vector space of bounded sequences into a bounded linear functional on the entire space. For example, if we use it to extend the limit functional defined on the space of convergent sequences, we will get a functional F on all bounded sequences, which is bounded by the supremum, extends the notion of density, and will attain only values in [0,1] the bit sequences.</p>
<p>Now given the sequence of bits, we apply F on it, and if it less than 1/2 we guess 0, and if it is more than 1/2 we guess 1. As the sum a_n+b_n+c_n is constantly 1 or 2 at infinity, so is the sum F({a_n})+F({b_n})+F({c_n}) be 1 or 2, by the linearity of F and by the fact that it extends the limit functional. If the sum is 1 then at most one person can have F &gt; 1/2 (else the total sum is &gt; 1) and the other two guess correctly; if the sum is 2, then at most one can have F less than 1/2 (else the sum is less than 2), and again the other two guess correctly.</p>
<p>It can be seen that the only cases where we do not clearly win is if the values of F are (1,1/2,1/2) or (0,1/2,1/2). As before, in such a case we must have the two people guess differently. Because there are three people, it can be seen that this is not doable by having different people react differently to the value 1/2, and so we must decide for each bit sequence with F = 1/2 whether to guess 0 or 1, in such a way that any two complementary sequences (or more accurately &#8211; complementary up to a sequence with F=0) are assigned different guesses.</p>
<p>I had thought earlier that this could be done easily, but now I realize that it might not be so, and I&#8217;m not really sure if this can be finished with something simpler than the first proof. In any case it will most likely require AoC again, but of course, even the Hahn-Banach theorem requires some weaker form of the AoC to hold.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-38029</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 27 Jun 2010 21:38:29 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-38029</guid>
		<description>Maybe it&#039;s time to post some solutions.

Interestingly enough, I know of two solutions so far, each based on a rather high-end concept involving the axiom of choice. One solution I came up with on my own, the other I heard as an immediate response from at least two people (though the immediate part was only the main idea, and not the complete solution - actually, I&#039;m not sure if it really works any more, read and find out).


First solution (warning: heavy set theory!):
This is a rather axiomatic approach, based on making some reasonable assumptions about the strategy and then living up to them. First, because of symmetry, it seems reasonable that each of them will have the same deterministic strategy, i.e. a function F from all infinite sequences of bits to the set {0,1} where output is the guess about the majority of the sequences in infinity. Now for some desired properties of F:
(a) F({a_n}) = c if {a_n} is the constant sequence a_n=c, for both c in {0,1} (reasonable)
(b) If sequences a_n and b_n differ only in finitely many places, then F({a_n})=F({b_n}). This is reasonable as what happens up to a finite time shouldn&#039;t matter, as it might differ from the behaviour at infinity.
(c) If sequences a_n and b_n complement each other, i.e. a_n+b_n=1 for all n (or for all but finitely many n, by (b)), then F({a_n})+F({b_n})=1, that is, they also complement. This is not only reasonable but necessary: Suppose the first person got sequence a_n, and the second got b_n. Now it could still be possible for the sum of the sequences to be constantly 1 or 2, the third person will just get the appropriate constant function. Hence for at least two people to guess the correct sum in both cases, the person who got {a_n} must guess differently from the person who got {b_n}.
(d) If a_n &lt;= b_n for all n, then F({a_n})  1/2 (else the total sum is &gt; 1) and the other two guess correctly; if the sum is 2, then at most one can have F less than 1/2 (else the sum is less than 2), and again the other two guess correctly.

It can be seen that the only cases where we do not clearly win is if the values of F are (1,1/2,1/2) or (0,1/2,1/2). As before, in such a case we must have the two people guess differently. Because there are three people, it can be seen that this is not doable by having different people react differently to the value 1/2, and so we must decide for each bit sequence with F = 1/2 whether to guess 0 or 1, in such a way that any two complementary sequences (or more accurately - complementary up to a sequence with F=0) are assigned different guesses.

I had thought earlier that this could be done easily, but now I realize that it might not be so, and I&#039;m not really sure if this can be finished with something simpler than the first proof. In any case it will most likely require AoC again, but of course, even the Hahn-Banach theorem requires some weaker form of the AoC to hold.



Anyway, I really liked this riddle. Fun and rewarding. I&#039;ll be glad to hear of any solutions simpler than ultrafilters or Hahn-Banach, as well as a finishing statement for the second proof, if there are any :)</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;s time to post some solutions.</p>
<p>Interestingly enough, I know of two solutions so far, each based on a rather high-end concept involving the axiom of choice. One solution I came up with on my own, the other I heard as an immediate response from at least two people (though the immediate part was only the main idea, and not the complete solution &#8211; actually, I&#8217;m not sure if it really works any more, read and find out).</p>
<p>First solution (warning: heavy set theory!):<br />
This is a rather axiomatic approach, based on making some reasonable assumptions about the strategy and then living up to them. First, because of symmetry, it seems reasonable that each of them will have the same deterministic strategy, i.e. a function F from all infinite sequences of bits to the set {0,1} where output is the guess about the majority of the sequences in infinity. Now for some desired properties of F:<br />
(a) F({a_n}) = c if {a_n} is the constant sequence a_n=c, for both c in {0,1} (reasonable)<br />
(b) If sequences a_n and b_n differ only in finitely many places, then F({a_n})=F({b_n}). This is reasonable as what happens up to a finite time shouldn&#8217;t matter, as it might differ from the behaviour at infinity.<br />
(c) If sequences a_n and b_n complement each other, i.e. a_n+b_n=1 for all n (or for all but finitely many n, by (b)), then F({a_n})+F({b_n})=1, that is, they also complement. This is not only reasonable but necessary: Suppose the first person got sequence a_n, and the second got b_n. Now it could still be possible for the sum of the sequences to be constantly 1 or 2, the third person will just get the appropriate constant function. Hence for at least two people to guess the correct sum in both cases, the person who got {a_n} must guess differently from the person who got {b_n}.<br />
(d) If a_n &lt;= b_n for all n, then F({a_n})  1/2 (else the total sum is &gt; 1) and the other two guess correctly; if the sum is 2, then at most one can have F less than 1/2 (else the sum is less than 2), and again the other two guess correctly.</p>
<p>It can be seen that the only cases where we do not clearly win is if the values of F are (1,1/2,1/2) or (0,1/2,1/2). As before, in such a case we must have the two people guess differently. Because there are three people, it can be seen that this is not doable by having different people react differently to the value 1/2, and so we must decide for each bit sequence with F = 1/2 whether to guess 0 or 1, in such a way that any two complementary sequences (or more accurately &#8211; complementary up to a sequence with F=0) are assigned different guesses.</p>
<p>I had thought earlier that this could be done easily, but now I realize that it might not be so, and I&#8217;m not really sure if this can be finished with something simpler than the first proof. In any case it will most likely require AoC again, but of course, even the Hahn-Banach theorem requires some weaker form of the AoC to hold.</p>
<p>Anyway, I really liked this riddle. Fun and rewarding. I&#8217;ll be glad to hear of any solutions simpler than ultrafilters or Hahn-Banach, as well as a finishing statement for the second proof, if there are any <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seam Carving by Seam carving for content aware image resizing: MATLAB implementation &#38; tutorial &#171; Dan&#39;s Blog</title>
		<link>http://yaniv.leviathanonline.com/blog/math/seam-carving/comment-page-1/#comment-36479</link>
		<dc:creator>Seam carving for content aware image resizing: MATLAB implementation &#38; tutorial &#171; Dan&#39;s Blog</dc:creator>
		<pubDate>Mon, 31 May 2010 01:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/seam-carving/#comment-36479</guid>
		<description>[...] http://yaniv.leviathanonline.com/blog/math/seam-carving/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://yaniv.leviathanonline.com/blog/math/seam-carving/" rel="nofollow">http://yaniv.leviathanonline.com/blog/math/seam-carving/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by rouli</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-36249</link>
		<dc:creator>rouli</dc:creator>
		<pubDate>Sat, 29 May 2010 16:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-36249</guid>
		<description>hmm...are the prisoners allowed to read only a finite (though unbounded) number of bits from their sequence?</description>
		<content:encoded><![CDATA[<p>hmm&#8230;are the prisoners allowed to read only a finite (though unbounded) number of bits from their sequence?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-36222</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sat, 29 May 2010 13:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-36222</guid>
		<description>Yaniv, you&#039;ve just ruined the riddle.
Rule number 1 of every riddle: There must be a funny story! Otherwise, it&#039;s terribly boring.

Three terrorists plan a terror attack on a power plant.
During the attack, they all got arrested, leaving a bomb with a timer at the crime scene.
They all got sent to lifetime in prison after not telling where the bomb is.
Since electricity is expensive nowadays, the prison can only afford turning the light on in 2 cells every night, leaving one prisoner in the darkness.
If the bomb will go off one day, electricity should become even more expensive, and the prison will afford only to turn one light on every night.

Infinite years later, the three terrorists met god. God said that if at least two of them will know what happen to the bomb, all three terrorists will earn their 72 virgins in heaven. However, if two or more will give a wrong answer, all three will suffer in hell for eternity.

Help the terrorists.</description>
		<content:encoded><![CDATA[<p>Yaniv, you&#8217;ve just ruined the riddle.<br />
Rule number 1 of every riddle: There must be a funny story! Otherwise, it&#8217;s terribly boring.</p>
<p>Three terrorists plan a terror attack on a power plant.<br />
During the attack, they all got arrested, leaving a bomb with a timer at the crime scene.<br />
They all got sent to lifetime in prison after not telling where the bomb is.<br />
Since electricity is expensive nowadays, the prison can only afford turning the light on in 2 cells every night, leaving one prisoner in the darkness.<br />
If the bomb will go off one day, electricity should become even more expensive, and the prison will afford only to turn one light on every night.</p>
<p>Infinite years later, the three terrorists met god. God said that if at least two of them will know what happen to the bomb, all three terrorists will earn their 72 virgins in heaven. However, if two or more will give a wrong answer, all three will suffer in hell for eternity.</p>
<p>Help the terrorists.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prisoners with Bit Sequences by R.</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/prisoners-with-bit-sequences/comment-page-1/#comment-36087</link>
		<dc:creator>R.</dc:creator>
		<pubDate>Fri, 28 May 2010 20:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=185#comment-36087</guid>
		<description>There are three types of hard riddles:
- those which require recursive logic reasoning (e.g., pirates sharing a treasure)
- those which require an awesome trick, usually a potential function (e.g., the peg solitaire one)
- those which require the axiom of choice (e.g., this one)</description>
		<content:encoded><![CDATA[<p>There are three types of hard riddles:<br />
- those which require recursive logic reasoning (e.g., pirates sharing a treasure)<br />
- those which require an awesome trick, usually a potential function (e.g., the peg solitaire one)<br />
- those which require the axiom of choice (e.g., this one)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Better Half by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/the-better-half/comment-page-1/#comment-35477</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sat, 22 May 2010 07:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=178#comment-35477</guid>
		<description>Nice solution! Some remarks:
A queue of size 7 is enough, because when we decrease 1 from all of the elements of the queue, we in effect &quot;remove&quot; 8 strings from the data base: Those that were tracked in the queue, and also the last string read. Then if some element appeared more than 1/8th of the time, he will still be there more than 1/8 of the time after removing 8 different elements from the base, so it will be in the queue at the end of the process.

The claim that the maximal counter belongs to a high-freq element is false: Consider the scenario where the data base has 101 appearances of string &#039;0&#039;, 100 appearances of strings &#039;1&#039;,...,&#039;8&#039;, and 2 appearances of string &#039;9&#039;, and they appear in lexicographical order. Then the queue at the end will have &#039;0&#039; with 1 appearance and &#039;9&#039; with 2. But &#039;0&#039; must still appear in the queue: So if we keep a register for each of the (at most) 8 elements in the final queue, and go over the list one more time, we will be able to determine which of them was really the most common.</description>
		<content:encoded><![CDATA[<p>Nice solution! Some remarks:<br />
A queue of size 7 is enough, because when we decrease 1 from all of the elements of the queue, we in effect &#8220;remove&#8221; 8 strings from the data base: Those that were tracked in the queue, and also the last string read. Then if some element appeared more than 1/8th of the time, he will still be there more than 1/8 of the time after removing 8 different elements from the base, so it will be in the queue at the end of the process.</p>
<p>The claim that the maximal counter belongs to a high-freq element is false: Consider the scenario where the data base has 101 appearances of string &#8217;0&#8242;, 100 appearances of strings &#8217;1&#8242;,&#8230;,&#8217;8&#8242;, and 2 appearances of string &#8217;9&#8242;, and they appear in lexicographical order. Then the queue at the end will have &#8217;0&#8242; with 1 appearance and &#8217;9&#8242; with 2. But &#8217;0&#8242; must still appear in the queue: So if we keep a register for each of the (at most) 8 elements in the final queue, and go over the list one more time, we will be able to determine which of them was really the most common.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Better Half by R.</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/the-better-half/comment-page-1/#comment-35293</link>
		<dc:creator>R.</dc:creator>
		<pubDate>Thu, 20 May 2010 19:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=178#comment-35293</guid>
		<description>Hey! my entire proof is gone! Again.

ALGORITHM

We keep a (priorirty) queue of length at most 8, with strings and positive integer counters. The lowest counter value is called the baseline.
Read a string.
If it&#039;s already in the queue, increase its counter. Otherwise:
{
  If the queue has 8 elements, decrease all counters by the baseline and drop all elements with counter value zero.
  Add the new element with counter value 1.
}
At the end, report the element of highest counter value.

PROOF

Let X be a string that appeared K times (so other elements appeared N-K times).
We investigate how its queue counter value C evolves.
Every time X appears, C increases by one.
Every time X is dropped, the decrease in C (=baseline) is applied to the other 7 counters too, so we can charge it to 7*baseline appearances of other strings.

All in all, C &gt;= K - (N-K)/7 = (8K-N)/7.
Specifically, if K &gt; N/8 then C is positive at the end and X is a member of the final queue.

Now, it can happen that the final queue contains some low-freq elements (e.g., the last element to appear is surely in the queue), but the maximal counter belongs to a high-freq element [proof needed].</description>
		<content:encoded><![CDATA[<p>Hey! my entire proof is gone! Again.</p>
<p>ALGORITHM</p>
<p>We keep a (priorirty) queue of length at most 8, with strings and positive integer counters. The lowest counter value is called the baseline.<br />
Read a string.<br />
If it&#8217;s already in the queue, increase its counter. Otherwise:<br />
{<br />
  If the queue has 8 elements, decrease all counters by the baseline and drop all elements with counter value zero.<br />
  Add the new element with counter value 1.<br />
}<br />
At the end, report the element of highest counter value.</p>
<p>PROOF</p>
<p>Let X be a string that appeared K times (so other elements appeared N-K times).<br />
We investigate how its queue counter value C evolves.<br />
Every time X appears, C increases by one.<br />
Every time X is dropped, the decrease in C (=baseline) is applied to the other 7 counters too, so we can charge it to 7*baseline appearances of other strings.</p>
<p>All in all, C &gt;= K &#8211; (N-K)/7 = (8K-N)/7.<br />
Specifically, if K &gt; N/8 then C is positive at the end and X is a member of the final queue.</p>
<p>Now, it can happen that the final queue contains some low-freq elements (e.g., the last element to appear is surely in the queue), but the maximal counter belongs to a high-freq element [proof needed].</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Better Half by R.</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/the-better-half/comment-page-1/#comment-35290</link>
		<dc:creator>R.</dc:creator>
		<pubDate>Thu, 20 May 2010 19:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/?p=178#comment-35290</guid>
		<description>The following simple algorithm works:
- Keep a (priority) queue of N/8, the value of x&#039;s counter at the end is positive.

Now, it can happen that the final queue contains some low-freq elements (e.g., the last element to appear is surely in the queue), but the maximal counter belongs to a high-freq element [proof needed].</description>
		<content:encoded><![CDATA[<p>The following simple algorithm works:<br />
- Keep a (priority) queue of N/8, the value of x&#8217;s counter at the end is positive.</p>
<p>Now, it can happen that the final queue contains some low-freq elements (e.g., the last element to appear is surely in the queue), but the maximal counter belongs to a high-freq element [proof needed].</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ants by get paid for online surveys</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/ants/comment-page-1/#comment-35023</link>
		<dc:creator>get paid for online surveys</dc:creator>
		<pubDate>Tue, 18 May 2010 15:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://leviathanonline.com/wordpress/?p=3#comment-35023</guid>
		<description>I&#039;ve bookmarked your blog, informative read</description>
		<content:encoded><![CDATA[<p>I&#8217;ve bookmarked your blog, informative read</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Reverse &amp; Clean by rouli</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/reverse-clean/comment-page-1/#comment-31467</link>
		<dc:creator>rouli</dc:creator>
		<pubDate>Tue, 20 Apr 2010 19:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/reverse-clean/#comment-31467</guid>
		<description>Great riddle, great proofs!</description>
		<content:encoded><![CDATA[<p>Great riddle, great proofs!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Nichola</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-31389</link>
		<dc:creator>Nichola</dc:creator>
		<pubDate>Tue, 20 Apr 2010 09:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-31389</guid>
		<description>Impressive blog, many thanks for discussing this post</description>
		<content:encoded><![CDATA[<p>Impressive blog, many thanks for discussing this post</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Reverse &amp; Clean by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/reverse-clean/comment-page-1/#comment-31180</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 19 Apr 2010 10:55:51 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/reverse-clean/#comment-31180</guid>
		<description>I have a somewhat different solution for part 2, but I think Nadav&#039;s is nicer.

First surround the board with another 2(M+N) pieces, so that every pebble from the original MxN board has exactly 4 neighbors (just for simplification of the computations). Paint the table like a chess board, with light and dark places. Note that whenever a piece other than the first is removed, the parity of the number of black pieces on both colours changes: Say that we remove a piece on a light square. Obviously the number of black pebbles on light squares simply decreases by one, and the parity changes. Because the piece was black, it had an odd number of neighbors still on the board, each on a dark square, so an odd number of pieces on dark squares will change their colour, and the number of black pebbles on dark squares will change its parity. After the first move, there is an even number of black pebbles on both light and dark squares (0 and 4). In the end, when the board is clear, all of the fictional border will be black, so there will be M+N black pieces on both light and dark (actually, if both M and N are odd, there will be M+N+2 on dark squares and M+N-2 on light squares, but the parity is the same). On the other hand MN-1 moves were made after the first, so 
MN - 1 = M +N (mod 2) =&gt; MN + M + N +1 = 0 (mod 2) =&gt; (M+1)(N+1) = 0 (mod 2), thus either M or N must be odd. 

Both solutions reach the conclusion that MN-1 = M+N (mod 2), but this is really just equivalent to the necessary and sufficient condition for the game to be winnable, so I don&#039;t really know if there&#039;s a deep connection between the two. It seems to me that the objects counted are profoundly different.</description>
		<content:encoded><![CDATA[<p>I have a somewhat different solution for part 2, but I think Nadav&#8217;s is nicer.</p>
<p>First surround the board with another 2(M+N) pieces, so that every pebble from the original MxN board has exactly 4 neighbors (just for simplification of the computations). Paint the table like a chess board, with light and dark places. Note that whenever a piece other than the first is removed, the parity of the number of black pieces on both colours changes: Say that we remove a piece on a light square. Obviously the number of black pebbles on light squares simply decreases by one, and the parity changes. Because the piece was black, it had an odd number of neighbors still on the board, each on a dark square, so an odd number of pieces on dark squares will change their colour, and the number of black pebbles on dark squares will change its parity. After the first move, there is an even number of black pebbles on both light and dark squares (0 and 4). In the end, when the board is clear, all of the fictional border will be black, so there will be M+N black pieces on both light and dark (actually, if both M and N are odd, there will be M+N+2 on dark squares and M+N-2 on light squares, but the parity is the same). On the other hand MN-1 moves were made after the first, so<br />
MN &#8211; 1 = M +N (mod 2) =&gt; MN + M + N +1 = 0 (mod 2) =&gt; (M+1)(N+1) = 0 (mod 2), thus either M or N must be odd. </p>
<p>Both solutions reach the conclusion that MN-1 = M+N (mod 2), but this is really just equivalent to the necessary and sufficient condition for the game to be winnable, so I don&#8217;t really know if there&#8217;s a deep connection between the two. It seems to me that the objects counted are profoundly different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Reverse &amp; Clean by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/reverse-clean/comment-page-1/#comment-31057</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sun, 18 Apr 2010 20:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/reverse-clean/#comment-31057</guid>
		<description>Solution: if not both N and M are even, it is possible

Proof:
Part 1:
If for example N is odd, the following algorithm should work:
for row = 1:
  for col = 1 to N:
    take peice
# now we&#039;ve cleaned the first row, and the second row is all black
for row = 2 to M:
  for every odd col between 1 to N (including both):
    take peice
  # all even cols are still black
  for every even col between 2 to N - 1:
    take peice

Part 2:
Let S be the strategy (IE - order of squares)
We denote f(S) as: the total number of flips during the process.
On the one hand, every peice we move, was black, therefore all the peices were flipped an odd number of times, except for the first peice. there is an odd number of peices besides the first one, therefore f(S) is odd.
On the other hand, if we look at the neighbours-graph G=(V,E) (V = all places, E = are those two places neighbours), we can notice that for every edge, one of its sides was moved first, and by that, causing the other side to flip. Therefore f(S) = &#124;E&#124;.
however, &#124;E&#124; = M*(N-1) + N*(M-1) = 0 (mod 2)
Contradiction.</description>
		<content:encoded><![CDATA[<p>Solution: if not both N and M are even, it is possible</p>
<p>Proof:<br />
Part 1:<br />
If for example N is odd, the following algorithm should work:<br />
for row = 1:<br />
  for col = 1 to N:<br />
    take peice<br />
# now we&#8217;ve cleaned the first row, and the second row is all black<br />
for row = 2 to M:<br />
  for every odd col between 1 to N (including both):<br />
    take peice<br />
  # all even cols are still black<br />
  for every even col between 2 to N &#8211; 1:<br />
    take peice</p>
<p>Part 2:<br />
Let S be the strategy (IE &#8211; order of squares)<br />
We denote f(S) as: the total number of flips during the process.<br />
On the one hand, every peice we move, was black, therefore all the peices were flipped an odd number of times, except for the first peice. there is an odd number of peices besides the first one, therefore f(S) is odd.<br />
On the other hand, if we look at the neighbours-graph G=(V,E) (V = all places, E = are those two places neighbours), we can notice that for every edge, one of its sides was moved first, and by that, causing the other side to flip. Therefore f(S) = |E|.<br />
however, |E| = M*(N-1) + N*(M-1) = 0 (mod 2)<br />
Contradiction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by Alfred Neunzoller</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-27683</link>
		<dc:creator>Alfred Neunzoller</dc:creator>
		<pubDate>Fri, 19 Mar 2010 01:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-27683</guid>
		<description>The article was awesome! Please, please, write a part II!</description>
		<content:encoded><![CDATA[<p>The article was awesome! Please, please, write a part II!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by Genady</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25860</link>
		<dc:creator>Genady</dc:creator>
		<pubDate>Sun, 07 Mar 2010 08:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25860</guid>
		<description>Nice one!</description>
		<content:encoded><![CDATA[<p>Nice one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25481</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Thu, 04 Mar 2010 22:24:15 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25481</guid>
		<description>Dan,

Great solution! As usual!

A reasoning similar to yours above (or a few lines of python) show that in a &quot;star&quot;-tree with only 3 legs of length 3 and a center (so 10 nodes in total) the rabbit will survive forever.
BTW - if you remove one node, so one of the legs has length 2 (and the graph has only 9 nodes in total), the rabbit dies. So probably the 3-3 star is the smallest tree in which the rabbit survives.

The next logical generalization is: given any graph (tree or not), what is the minimum number of shots per turn needed to guarantee a kill? Some particularly interesting special cases are trees, and maybe a checkerboard (i.e. a 2d analog of the original question).</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Great solution! As usual!</p>
<p>A reasoning similar to yours above (or a few lines of python) show that in a &#8220;star&#8221;-tree with only 3 legs of length 3 and a center (so 10 nodes in total) the rabbit will survive forever.<br />
BTW &#8211; if you remove one node, so one of the legs has length 2 (and the graph has only 9 nodes in total), the rabbit dies. So probably the 3-3 star is the smallest tree in which the rabbit survives.</p>
<p>The next logical generalization is: given any graph (tree or not), what is the minimum number of shots per turn needed to guarantee a kill? Some particularly interesting special cases are trees, and maybe a checkerboard (i.e. a 2d analog of the original question).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25480</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Thu, 04 Mar 2010 22:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25480</guid>
		<description>Seems to me that for a general tree, the rabbit can survive indefinitely.
Consider a a simple tree with one central vertex, which has four legs stretching from it, each leg being a string of three vertices (so 13 vertices altogether). Assuming that the rabbit knows your shooting strategy, it can compute its strategy as follows: If it is not in the central vertex, it will jump in the direction of the vertex - unless that location will be targeted next, in which case it will jump backward. If it is on the central vertex, it will jump into one of the &quot;free&quot; legs, which will be defined later.

Assuming we can always jump into a &quot;free&quot; leg from the center without dying, the only way that the rabbit will die is when it is in the outer vertex of a leg, and on the next turn the middle vertex of the leg will be shot; for this to happen, the inner vertex of the leg must have been shot on this turn (or the rabbit would have jumped to it instead of the outer vertex). This tells the rabbit that he must avoid being on a leg when the middle vertex is shot immediately after the inner. When the rabbit is in the center, call the next leg to have such a pattern in it a dead leg. Also say that the leg shot on the turn before the pattern appears is dead, and also the leg to be shot next turn. There are at most three dead legs, so there is at least one &quot;free&quot; leg to jump to which isn&#039;t dead. The rabbit can jump to that leg as it won&#039;t be shot next turn, and when the pattern appears next the rabbit will have 3 turns in which the leg he is on won&#039;t be shot - enough time to return to the center of the graph, and jump to the next free leg, and so will live indefinitely.</description>
		<content:encoded><![CDATA[<p>Seems to me that for a general tree, the rabbit can survive indefinitely.<br />
Consider a a simple tree with one central vertex, which has four legs stretching from it, each leg being a string of three vertices (so 13 vertices altogether). Assuming that the rabbit knows your shooting strategy, it can compute its strategy as follows: If it is not in the central vertex, it will jump in the direction of the vertex &#8211; unless that location will be targeted next, in which case it will jump backward. If it is on the central vertex, it will jump into one of the &#8220;free&#8221; legs, which will be defined later.</p>
<p>Assuming we can always jump into a &#8220;free&#8221; leg from the center without dying, the only way that the rabbit will die is when it is in the outer vertex of a leg, and on the next turn the middle vertex of the leg will be shot; for this to happen, the inner vertex of the leg must have been shot on this turn (or the rabbit would have jumped to it instead of the outer vertex). This tells the rabbit that he must avoid being on a leg when the middle vertex is shot immediately after the inner. When the rabbit is in the center, call the next leg to have such a pattern in it a dead leg. Also say that the leg shot on the turn before the pattern appears is dead, and also the leg to be shot next turn. There are at most three dead legs, so there is at least one &#8220;free&#8221; leg to jump to which isn&#8217;t dead. The rabbit can jump to that leg as it won&#8217;t be shot next turn, and when the pattern appears next the rabbit will have 3 turns in which the leg he is on won&#8217;t be shot &#8211; enough time to return to the center of the graph, and jump to the next free leg, and so will live indefinitely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25071</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 02 Mar 2010 15:36:29 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25071</guid>
		<description>Rani,
The rabbit must move - if it were allowed to remain stationary then there is no solution! (see why?)
Also, the sweep you are suggesting does not work. If the rabbit starts in cell 4, then moves to cell 3 (after your first shot to cell 2) and then moves to cell 2 (after your second shot to cell 2) and then oscillates between cells 1 and 2 during the rest of the sweep, you will not kill it.</description>
		<content:encoded><![CDATA[<p>Rani,<br />
The rabbit must move &#8211; if it were allowed to remain stationary then there is no solution! (see why?)<br />
Also, the sweep you are suggesting does not work. If the rabbit starts in cell 4, then moves to cell 3 (after your first shot to cell 2) and then moves to cell 2 (after your second shot to cell 2) and then oscillates between cells 1 and 2 during the rest of the sweep, you will not kill it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by R.</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25066</link>
		<dc:creator>R.</dc:creator>
		<pubDate>Tue, 02 Mar 2010 15:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25066</guid>
		<description>The rabbit *must* move? or it may remain stationary?
If it must move then also a sweep 2 2 3 3 ... n-1 n-1 will surely kill it.</description>
		<content:encoded><![CDATA[<p>The rabbit *must* move? or it may remain stationary?<br />
If it must move then also a sweep 2 2 3 3 &#8230; n-1 n-1 will surely kill it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by Yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25012</link>
		<dc:creator>Yaniv</dc:creator>
		<pubDate>Tue, 02 Mar 2010 10:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25012</guid>
		<description>s,
Note that the first shot (in cell 1) is wasted, and so is the shot in cell 10.
A slightly better solution is then: 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2, which consists of 16 shots (16 is indeed the minimum number of shots required).
</description>
		<content:encoded><![CDATA[<p>s,<br />
Note that the first shot (in cell 1) is wasted, and so is the shot in cell 10.<br />
A slightly better solution is then: 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2, which consists of 16 shots (16 is indeed the minimum number of shots required).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by s</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25008</link>
		<dc:creator>s</dc:creator>
		<pubDate>Tue, 02 Mar 2010 10:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25008</guid>
		<description>well, let me try again/
first let me think that the rabbit was in cell 1 or 3 or 5 or 7 or 9/
then if we shot cell 1, the rabbit steel alive just if it is (after the shot) in cell 2, or 4, or 6 or 8 or 10.
now let shot cell 2,  the rabbit steel alive just if it is (after the shot) in cell 3, or 5, or 7 or 9.
now let shot cell 3,  the rabbit steel alive just if it is (after the shot) in cell 4, or 6, or 8 or 10.
this way, after 10 shots we know that the rabbit is killed/
that mens that if it steel alive, it has to be now in cell 2 or 4,6,8,10/
again shot cell 2, 3, till 9, and the job is done. (18 shots at all)</description>
		<content:encoded><![CDATA[<p>well, let me try again/<br />
first let me think that the rabbit was in cell 1 or 3 or 5 or 7 or 9/<br />
then if we shot cell 1, the rabbit steel alive just if it is (after the shot) in cell 2, or 4, or 6 or 8 or 10.<br />
now let shot cell 2,  the rabbit steel alive just if it is (after the shot) in cell 3, or 5, or 7 or 9.<br />
now let shot cell 3,  the rabbit steel alive just if it is (after the shot) in cell 4, or 6, or 8 or 10.<br />
this way, after 10 shots we know that the rabbit is killed/<br />
that mens that if it steel alive, it has to be now in cell 2 or 4,6,8,10/<br />
again shot cell 2, 3, till 9, and the job is done. (18 shots at all)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-25001</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 02 Mar 2010 10:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-25001</guid>
		<description>s,
Good solution, but its is a little complicated and requires quite a lot of shots. A much more efficient (and simple) solution exists.
Also, try to think of the extra-credit part.</description>
		<content:encoded><![CDATA[<p>s,<br />
Good solution, but its is a little complicated and requires quite a lot of shots. A much more efficient (and simple) solution exists.<br />
Also, try to think of the extra-credit part.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rabbit Season by s</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/comment-page-1/#comment-24993</link>
		<dc:creator>s</dc:creator>
		<pubDate>Tue, 02 Mar 2010 09:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/rabbit-season/#comment-24993</guid>
		<description>first try to shot the rabbit if it was in cell 1. one shot is enough/
noe try to shot it if it was in cell 2: after first shot it is in cell 1 or 3, then shot first to cell 1, then now if it steel alive, it has to be in cell 2 or 4, then shot cell 2, then 3, 4,5,6,7,8,9. this ensure killing if it was firet in crll 2.
noe we go on if the first situation was cell 3. after 10 shots as before, it must be in an odd cell (1 0r 3 ...) again shot 1,2... and so on/</description>
		<content:encoded><![CDATA[<p>first try to shot the rabbit if it was in cell 1. one shot is enough/<br />
noe try to shot it if it was in cell 2: after first shot it is in cell 1 or 3, then shot first to cell 1, then now if it steel alive, it has to be in cell 2 or 4, then shot cell 2, then 3, 4,5,6,7,8,9. this ensure killing if it was firet in crll 2.<br />
noe we go on if the first situation was cell 3. after 10 shots as before, it must be in an odd cell (1 0r 3 &#8230;) again shot 1,2&#8230; and so on/</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fat Aunts by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/fat-aunts/comment-page-1/#comment-21229</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sat, 16 Jan 2010 23:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/fat-aunts/#comment-21229</guid>
		<description>and one small correction:
instead of g[t] is smaller and h[t] is greater, i meant to write:
f(g[t]),f(h[t])</description>
		<content:encoded><![CDATA[<p>and one small correction:<br />
instead of g[t] is smaller and h[t] is greater, i meant to write:<br />
f(g[t]),f(h[t])</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fat Aunts by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/fat-aunts/comment-page-1/#comment-21228</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sat, 16 Jan 2010 23:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/fat-aunts/#comment-21228</guid>
		<description>Trying to sleep, is the ultimate time for solving riddles.</description>
		<content:encoded><![CDATA[<p>Trying to sleep, is the ultimate time for solving riddles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fat Aunts by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/fat-aunts/comment-page-1/#comment-21227</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sat, 16 Jan 2010 23:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/fat-aunts/#comment-21227</guid>
		<description>Solution:
It is impossible for the aunts to exchange houses.

Proof:
Mark route 1 as p:[0,1] to R^n (n is the map&#039;s dimension, 2 in this case)
Mark route 2 as q:[0,1] to R^n (n is the map&#039;s dimension, 2 in this case)

Consider the following function f:[0,1]x[0,1] to R
f(x,y)=dist(p(x),q(y))

f is the distance from each point on route 1 to each point on route 2.

Given the fact that the aunts could walk with the rope, we get that there is a path g:[0,1] to [0,1]x[0,1]
such that:
g[0] = (0,0)
g[1] = (1,1)
g[t] is smaller than L

the aunts could exchange houses, iff there is a path h:[0,1] to [0,1]x[0,1] such that:

h[0] = (1,0)
h[1] = (0,1)
h[t] is greater than L

ofcourse h and g must intersect, therefore it is impossible</description>
		<content:encoded><![CDATA[<p>Solution:<br />
It is impossible for the aunts to exchange houses.</p>
<p>Proof:<br />
Mark route 1 as p:[0,1] to R^n (n is the map&#8217;s dimension, 2 in this case)<br />
Mark route 2 as q:[0,1] to R^n (n is the map&#8217;s dimension, 2 in this case)</p>
<p>Consider the following function f:[0,1]x[0,1] to R<br />
f(x,y)=dist(p(x),q(y))</p>
<p>f is the distance from each point on route 1 to each point on route 2.</p>
<p>Given the fact that the aunts could walk with the rope, we get that there is a path g:[0,1] to [0,1]x[0,1]<br />
such that:<br />
g[0] = (0,0)<br />
g[1] = (1,1)<br />
g[t] is smaller than L</p>
<p>the aunts could exchange houses, iff there is a path h:[0,1] to [0,1]x[0,1] such that:</p>
<p>h[0] = (1,0)<br />
h[1] = (0,1)<br />
h[t] is greater than L</p>
<p>ofcourse h and g must intersect, therefore it is impossible</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-21081</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Mon, 11 Jan 2010 07:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-21081</guid>
		<description>Hi Rouli,

If you drop the condition that the two sets have equal size then the claim is no longer true. Take the set {1,1,1,3,3}.</description>
		<content:encoded><![CDATA[<p>Hi Rouli,</p>
<p>If you drop the condition that the two sets have equal size then the claim is no longer true. Take the set {1,1,1,3,3}.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by rouli</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-21065</link>
		<dc:creator>rouli</dc:creator>
		<pubDate>Sun, 10 Jan 2010 21:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-21065</guid>
		<description>Good one. 
My solution to the private case is quite similar to Nadav&#039;s, but much less elegant, so I&#039;ll avoid writing it over here.
I still try to understand the solution to the general case (it&#039;s been a few years since my last encounter with extension fields).

Is there a set of naturals, not all equal, that exhibit this behavior when for each division set A doesn&#039;t need to be the same size as set B?</description>
		<content:encoded><![CDATA[<p>Good one.<br />
My solution to the private case is quite similar to Nadav&#8217;s, but much less elegant, so I&#8217;ll avoid writing it over here.<br />
I still try to understand the solution to the general case (it&#8217;s been a few years since my last encounter with extension fields).</p>
<p>Is there a set of naturals, not all equal, that exhibit this behavior when for each division set A doesn&#8217;t need to be the same size as set B?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by pitboss</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-21004</link>
		<dc:creator>pitboss</dc:creator>
		<pubDate>Fri, 08 Jan 2010 22:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-21004</guid>
		<description>Hah, I was trying to prove that the rank of the matrix is 2N all day, because I proceeded directly to the general case... This  was quite an unpleasant experience I can assure you :) But the problem was worth it.</description>
		<content:encoded><![CDATA[<p>Hah, I was trying to prove that the rank of the matrix is 2N all day, because I proceeded directly to the general case&#8230; This  was quite an unpleasant experience I can assure you <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But the problem was worth it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-20913</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Mon, 04 Jan 2010 07:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-20913</guid>
		<description>Dan,

Great to hear from you!

I agree that with the matrix-solution field extensions are a little overkill (although I still like it better). I wrote it like that so as to use the same argument as in the more elegant matrix-less solution. I think that the matrix-less solution with the field extension is definitely more elegant.

And I will indeed start to update again, I have tons of new stuff to post...</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Great to hear from you!</p>
<p>I agree that with the matrix-solution field extensions are a little overkill (although I still like it better). I wrote it like that so as to use the same argument as in the more elegant matrix-less solution. I think that the matrix-less solution with the field extension is definitely more elegant.</p>
<p>And I will indeed start to update again, I have tons of new stuff to post&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-20886</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 03 Jan 2010 19:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-20886</guid>
		<description>Seems to me that you&#039;re forcing field extensions on what could be done with elementary-er linear algebra (not that there&#039;s anything wrong with field extensions).

A More Elementary Proof that the Rank Does not Change:
The rank of the matrix can be defined as the maximal number K, such that there exists a K x K on minor which is non singular. Clearly, singularity does not change when the field is extended, as it can be defined over any field as &quot;Determinant = 0&quot;, and the determinant does not change. Thus the rank does not change either.


Good to see you updating again!</description>
		<content:encoded><![CDATA[<p>Seems to me that you&#8217;re forcing field extensions on what could be done with elementary-er linear algebra (not that there&#8217;s anything wrong with field extensions).</p>
<p>A More Elementary Proof that the Rank Does not Change:<br />
The rank of the matrix can be defined as the maximal number K, such that there exists a K x K on minor which is non singular. Clearly, singularity does not change when the field is extended, as it can be defined over any field as &#8220;Determinant = 0&#8243;, and the determinant does not change. Thus the rank does not change either.</p>
<p>Good to see you updating again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-20877</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Sun, 03 Jan 2010 14:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-20877</guid>
		<description>Nadav,

Good solution. In the last part (the proof for the reals/complex) you use an assertion (without proof) that the rank is the same over Q and over R. The assertion is of course true (I prove it below for other readers). But then the construction of the matrix is not necessary and a more elegant solution exists (again, see below).

The Missing Proof that the Rank Does not Change:
Let T be a set of m vectors from Qn, independent over Q. Then T is also independent over R. Otherwise, let a1,...,am (in R) be the non-trivial coefficients than make the sum 0. Let e1,...,ek be a basis for the extension field Q(a1,...,am). Then in at least one coordinate, we have a non-trivial sum over Q that is 0. Contradiction.

A More Elegant Solution (no need to talk about matrices):
Let S be our set of reals. As S is finite, take a finite-degree extension field of Q that contains all the elements of S. Take a basis, e1,...,en of this extension field. Now, our property holds for S i.f.f. it holds for the projection of the elements of S onto each of the coordinates defined by e1 and en, and it does hold for each coordinate, as it holds for Q.</description>
		<content:encoded><![CDATA[<p>Nadav,</p>
<p>Good solution. In the last part (the proof for the reals/complex) you use an assertion (without proof) that the rank is the same over Q and over R. The assertion is of course true (I prove it below for other readers). But then the construction of the matrix is not necessary and a more elegant solution exists (again, see below).</p>
<p>The Missing Proof that the Rank Does not Change:<br />
Let T be a set of m vectors from Qn, independent over Q. Then T is also independent over R. Otherwise, let a1,&#8230;,am (in R) be the non-trivial coefficients than make the sum 0. Let e1,&#8230;,ek be a basis for the extension field Q(a1,&#8230;,am). Then in at least one coordinate, we have a non-trivial sum over Q that is 0. Contradiction.</p>
<p>A More Elegant Solution (no need to talk about matrices):<br />
Let S be our set of reals. As S is finite, take a finite-degree extension field of Q that contains all the elements of S. Take a basis, e1,&#8230;,en of this extension field. Now, our property holds for S i.f.f. it holds for the projection of the elements of S onto each of the coordinates defined by e1 and en, and it does hold for each coordinate, as it holds for Q.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really equal? Naturally! by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/comment-page-1/#comment-20875</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Sun, 03 Jan 2010 13:47:35 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/really-equal-naturally/#comment-20875</guid>
		<description>Solution:
Denote the set by S.

For Naturals:

First, lets notice that if S has the property, so does tS for every scalar t. Also, S+t has the property, because each partition is into two sets of equal size N.
Second, we notice that for every element x in S, sum(S-x) = sum(A) + sum(B) = 2 * sum(A) and it&#039;s an even number.
Therefore, sum(S) is even iff x is even - which is correct for every element x. Therefore all elements of S has the same parity.
Now, first we take S and subtract min(S) from it. it will still have the property, still be all natural numbers, and now has a 0 element.
Since 0 is even, all elements are even, and so we can divide by 2 - again and again. if not all elements were 0, sometime, one of them will become odd, and this is a contradiction.
Therefore, they were all 0 - so all of S elements were equal.

For Integers:

Simply subtract min(S), and now all of S&#039;s elements are non-negatives and integers.

For Rationals:

Simply multiply S by LCM(denominators of S) - now they&#039;re all integers.

For Reals and Complex:

Since Q is a field, and we know that every set of rational numbers that have the property are all equal, we can write the following:
Let M be a 2N+1 x 2N+1 matrix, such that - the main diagonal is all 0&#039;s. every Row has exactly N 1&#039;s and N (-1)&#039;s.
Then the dimension of the Nullspace of this matrix is 1: only vectors of type (x,x,x...,x)
So Rank(M) = 2N

but if Rank(M) = 2N in Q, it&#039;s also the rank of the matrix in any other superfield of Q, such as R and C.
So the only vectors in the nullspace of this matrix are (x,...,x) in those fields too.</description>
		<content:encoded><![CDATA[<p>Solution:<br />
Denote the set by S.</p>
<p>For Naturals:</p>
<p>First, lets notice that if S has the property, so does tS for every scalar t. Also, S+t has the property, because each partition is into two sets of equal size N.<br />
Second, we notice that for every element x in S, sum(S-x) = sum(A) + sum(B) = 2 * sum(A) and it&#8217;s an even number.<br />
Therefore, sum(S) is even iff x is even &#8211; which is correct for every element x. Therefore all elements of S has the same parity.<br />
Now, first we take S and subtract min(S) from it. it will still have the property, still be all natural numbers, and now has a 0 element.<br />
Since 0 is even, all elements are even, and so we can divide by 2 &#8211; again and again. if not all elements were 0, sometime, one of them will become odd, and this is a contradiction.<br />
Therefore, they were all 0 &#8211; so all of S elements were equal.</p>
<p>For Integers:</p>
<p>Simply subtract min(S), and now all of S&#8217;s elements are non-negatives and integers.</p>
<p>For Rationals:</p>
<p>Simply multiply S by LCM(denominators of S) &#8211; now they&#8217;re all integers.</p>
<p>For Reals and Complex:</p>
<p>Since Q is a field, and we know that every set of rational numbers that have the property are all equal, we can write the following:<br />
Let M be a 2N+1 x 2N+1 matrix, such that &#8211; the main diagonal is all 0&#8242;s. every Row has exactly N 1&#8242;s and N (-1)&#8217;s.<br />
Then the dimension of the Nullspace of this matrix is 1: only vectors of type (x,x,x&#8230;,x)<br />
So Rank(M) = 2N</p>
<p>but if Rank(M) = 2N in Q, it&#8217;s also the rank of the matrix in any other superfield of Q, such as R and C.<br />
So the only vectors in the nullspace of this matrix are (x,&#8230;,x) in those fields too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seam Carving by deepak</title>
		<link>http://yaniv.leviathanonline.com/blog/math/seam-carving/comment-page-1/#comment-19926</link>
		<dc:creator>deepak</dc:creator>
		<pubDate>Wed, 25 Nov 2009 03:48:15 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/seam-carving/#comment-19926</guid>
		<description>i am planning to implement the seam carving algortihm on TMS320C6713 DSK but i am having difficulty in converting the MATLAB code to a compatible C code. Does anybody know how to do this? i tried using mcc command but the resulting files are not compatible with CCS studio of the processor.</description>
		<content:encoded><![CDATA[<p>i am planning to implement the seam carving algortihm on TMS320C6713 DSK but i am having difficulty in converting the MATLAB code to a compatible C code. Does anybody know how to do this? i tried using mcc command but the resulting files are not compatible with CCS studio of the processor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Understanding Soccer by sandrar</title>
		<link>http://yaniv.leviathanonline.com/blog/math/understanding-soccer/comment-page-1/#comment-18448</link>
		<dc:creator>sandrar</dc:creator>
		<pubDate>Thu, 10 Sep 2009 21:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/understanding-soccer/#comment-18448</guid>
		<description>Hi! I was surfing and found your blog post... nice! I love your blog.  :) Cheers! Sandra. R.</description>
		<content:encoded><![CDATA[<p>Hi! I was surfing and found your blog post&#8230; nice! I love your blog.  <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Cheers! Sandra. R.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seam Carving by sandrar</title>
		<link>http://yaniv.leviathanonline.com/blog/math/seam-carving/comment-page-1/#comment-18441</link>
		<dc:creator>sandrar</dc:creator>
		<pubDate>Thu, 10 Sep 2009 14:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/seam-carving/#comment-18441</guid>
		<description>Hi! I was surfing and found your blog post... nice! I love your blog.  :) Cheers! Sandra. R.</description>
		<content:encoded><![CDATA[<p>Hi! I was surfing and found your blog post&#8230; nice! I love your blog.  <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Cheers! Sandra. R.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Out of the Norm by Bhupendrasinh Thakre</title>
		<link>http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/comment-page-1/#comment-18315</link>
		<dc:creator>Bhupendrasinh Thakre</dc:creator>
		<pubDate>Sat, 05 Sep 2009 18:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/out-of-the-norm/#comment-18315</guid>
		<description>Sujith,
Thank you very much for so neatly explaining the norms....

take care</description>
		<content:encoded><![CDATA[<p>Sujith,<br />
Thank you very much for so neatly explaining the norms&#8230;.</p>
<p>take care</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SIMD (Fire)Works! by Asper</title>
		<link>http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/comment-page-1/#comment-18251</link>
		<dc:creator>Asper</dc:creator>
		<pubDate>Tue, 01 Sep 2009 14:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/#comment-18251</guid>
		<description>Now this demo works in KolibriOS. Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Now this demo works in KolibriOS. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Il Buono, il Brutto, il Cattivo by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/comment-page-1/#comment-17104</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Tue, 07 Jul 2009 12:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/#comment-17104</guid>
		<description>Il Non Collegato Solution:

call the Polynomial f. f(x(i)) = +-1 for each i=1,...,7
Suppose f=g*h, two Polynomials of degree 1 at least.
so one of them is of degree 3 at most. WLOG it&#039;s g.
since the polynomials are of integer coefficients, and x(i) are integers too, f(x(i))=g(x(i))*h(x(i)), and all g(x(i)) must divide +-1, so g(x(i)) = +-1 for each i = 1,...,7
so we now have g, a polynomial of degree at most 3, getting +-1 on 7 integers.
one of the values +1 or -1 is received 4 times at least. WLOG it&#039;s 1
so we now have g-1, a polynomial of degree at most 3, getting 0 on 4 integers at least.
so g-1 == 0 every place.
contradiction (g&#039;s degree is at least 1)</description>
		<content:encoded><![CDATA[<p>Il Non Collegato Solution:</p>
<p>call the Polynomial f. f(x(i)) = +-1 for each i=1,&#8230;,7<br />
Suppose f=g*h, two Polynomials of degree 1 at least.<br />
so one of them is of degree 3 at most. WLOG it&#8217;s g.<br />
since the polynomials are of integer coefficients, and x(i) are integers too, f(x(i))=g(x(i))*h(x(i)), and all g(x(i)) must divide +-1, so g(x(i)) = +-1 for each i = 1,&#8230;,7<br />
so we now have g, a polynomial of degree at most 3, getting +-1 on 7 integers.<br />
one of the values +1 or -1 is received 4 times at least. WLOG it&#8217;s 1<br />
so we now have g-1, a polynomial of degree at most 3, getting 0 on 4 integers at least.<br />
so g-1 == 0 every place.<br />
contradiction (g&#8217;s degree is at least 1)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Il Buono, il Brutto, il Cattivo by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/comment-page-1/#comment-17085</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Mon, 06 Jul 2009 06:24:54 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/#comment-17085</guid>
		<description>BTW, Liron Raz asked me the Good, the Bad and the Ugly, and Oren Sarig asked me the Unrelated.

Thanks guys!</description>
		<content:encoded><![CDATA[<p>BTW, Liron Raz asked me the Good, the Bad and the Ugly, and Oren Sarig asked me the Unrelated.</p>
<p>Thanks guys!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Il Buono, il Brutto, il Cattivo by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/comment-page-1/#comment-17083</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Mon, 06 Jul 2009 06:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/#comment-17083</guid>
		<description>*SPOILER*

Rani,

You are welcome to still write down the answers to the Ugly and the Good. Although the Bad is much harder, it could be given in Discrete Math as well, as its proof relies entirely on the pigeonhole principle too.

What about the Unrelated?</description>
		<content:encoded><![CDATA[<p>*SPOILER*</p>
<p>Rani,</p>
<p>You are welcome to still write down the answers to the Ugly and the Good. Although the Bad is much harder, it could be given in Discrete Math as well, as its proof relies entirely on the pigeonhole principle too.</p>
<p>What about the Unrelated?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Il Buono, il Brutto, il Cattivo by Rani</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/comment-page-1/#comment-17079</link>
		<dc:creator>Rani</dc:creator>
		<pubDate>Mon, 06 Jul 2009 00:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/il-buono-il-brutto-il-cattivo/#comment-17079</guid>
		<description>The ugly and the good are sometimes given (in this order!) as homework in Discrete Math introductory courses.
The bad is known as http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem and was first proved in 1935.</description>
		<content:encoded><![CDATA[<p>The ugly and the good are sometimes given (in this order!) as homework in Discrete Math introductory courses.<br />
The bad is known as <a href="http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem" rel="nofollow">http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem</a> and was first proved in 1935.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by César Bravo</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-16681</link>
		<dc:creator>César Bravo</dc:creator>
		<pubDate>Thu, 04 Jun 2009 14:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-16681</guid>
		<description>Thanks for your answer...

At+
César</description>
		<content:encoded><![CDATA[<p>Thanks for your answer&#8230;</p>
<p>At+<br />
César</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-16679</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Thu, 04 Jun 2009 09:51:31 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-16679</guid>
		<description>Cesar,

1. The original phrasing is correct - g(x) is not irreducible. We are using it in order to create the polynomial f(x) which will be irreducible.
2. You are right, thanks!
3. Right.
4. v*u = sig-1(sig(u)*sig(v)) = sig-1((p+f(x))*(s+f(x))) = sig-1(p*s+f(x)) = sig-1(1+f(x)) = 1.
5. As the article says - the Galois group is the automorphism group of E/F. Part 2 of the article will explain the importance of the Galois group.</description>
		<content:encoded><![CDATA[<p>Cesar,</p>
<p>1. The original phrasing is correct &#8211; g(x) is not irreducible. We are using it in order to create the polynomial f(x) which will be irreducible.<br />
2. You are right, thanks!<br />
3. Right.<br />
4. v*u = sig-1(sig(u)*sig(v)) = sig-1((p+f(x))*(s+f(x))) = sig-1(p*s+f(x)) = sig-1(1+f(x)) = 1.<br />
5. As the article says &#8211; the Galois group is the automorphism group of E/F. Part 2 of the article will explain the importance of the Galois group.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Galois Theory for Dummies &#8211; Part I by César Bravo</title>
		<link>http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/comment-page-1/#comment-16667</link>
		<dc:creator>César Bravo</dc:creator>
		<pubDate>Tue, 02 Jun 2009 20:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/galois-theory-for-dummies-part-i/#comment-16667</guid>
		<description>Hi 
Some observations:
1.-
Page 2, line 2 reads:
&quot;The problem is that g(x) is not irreducible.&quot;
I think the text must be
&quot;The problem is that g(x) is irreducible over Q.&quot;
or perhaps
&quot;The problem is that g(x) is not reducible over Q.&quot;

2.- I think that the symbols &quot;&quot; are swapped on the
first line of Gauss´s Lemma proof
&quot;()&quot;
That is:
(=&gt;) If f(x) splits on Z, obviously it splits on Q, since Z is contained on Q.

3.- Whitout loss of generality I must assume that
&quot;WLOG&quot;
stands for
&quot;Whitout Loss Of Generality&quot;,
right?

4.- I can cope with the arguments up to page 3 where is claimed that
&quot;Let v = \sigma^{-1}(s). It is clear that v \times u = 1&quot;
justifying the claim with
&quot;(if this is not clear to you at this point try to prove it)&quot;
well I recognize that I tried to prove it and was unable to do it, so:
can you sketch the proof giving working hints to a standard proof?

5.- About the &quot;Fields Automorphisms&quot; sections: elsewhere I found a
figure relating what seemed to me as extension fields (perhaps splitting fields)
and Galois Groups, but there was not any explication and I can not 
reformulate the underline relation myself. So, it would be great if you
can explain that relation.

Regards
César</description>
		<content:encoded><![CDATA[<p>Hi<br />
Some observations:<br />
1.-<br />
Page 2, line 2 reads:<br />
&#8220;The problem is that g(x) is not irreducible.&#8221;<br />
I think the text must be<br />
&#8220;The problem is that g(x) is irreducible over Q.&#8221;<br />
or perhaps<br />
&#8220;The problem is that g(x) is not reducible over Q.&#8221;</p>
<p>2.- I think that the symbols &#8220;&#8221; are swapped on the<br />
first line of Gauss´s Lemma proof<br />
&#8220;()&#8221;<br />
That is:<br />
(=&gt;) If f(x) splits on Z, obviously it splits on Q, since Z is contained on Q.</p>
<p>3.- Whitout loss of generality I must assume that<br />
&#8220;WLOG&#8221;<br />
stands for<br />
&#8220;Whitout Loss Of Generality&#8221;,<br />
right?</p>
<p>4.- I can cope with the arguments up to page 3 where is claimed that<br />
&#8220;Let v = \sigma^{-1}(s). It is clear that v \times u = 1&#8243;<br />
justifying the claim with<br />
&#8220;(if this is not clear to you at this point try to prove it)&#8221;<br />
well I recognize that I tried to prove it and was unable to do it, so:<br />
can you sketch the proof giving working hints to a standard proof?</p>
<p>5.- About the &#8220;Fields Automorphisms&#8221; sections: elsewhere I found a<br />
figure relating what seemed to me as extension fields (perhaps splitting fields)<br />
and Galois Groups, but there was not any explication and I can not<br />
reformulate the underline relation myself. So, it would be great if you<br />
can explain that relation.</p>
<p>Regards<br />
César</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SIMD (Fire)Works! by tony(mac)</title>
		<link>http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/comment-page-1/#comment-16406</link>
		<dc:creator>tony(mac)</dc:creator>
		<pubDate>Wed, 13 May 2009 02:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/#comment-16406</guid>
		<description>I like it!  I saw it modified for a hobby OS, very fast, even in an emulated environment.  Props!</description>
		<content:encoded><![CDATA[<p>I like it!  I saw it modified for a hobby OS, very fast, even in an emulated environment.  Props!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Understanding Soccer by Lucas</title>
		<link>http://yaniv.leviathanonline.com/blog/math/understanding-soccer/comment-page-1/#comment-16204</link>
		<dc:creator>Lucas</dc:creator>
		<pubDate>Wed, 29 Apr 2009 04:18:43 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/understanding-soccer/#comment-16204</guid>
		<description>Could you send the python source code to my e-mail?

Your post is quite perfect...

Thank you!</description>
		<content:encoded><![CDATA[<p>Could you send the python source code to my e-mail?</p>
<p>Your post is quite perfect&#8230;</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Seam Carving by john kramer</title>
		<link>http://yaniv.leviathanonline.com/blog/math/seam-carving/comment-page-1/#comment-14091</link>
		<dc:creator>john kramer</dc:creator>
		<pubDate>Fri, 16 Jan 2009 17:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/math/seam-carving/#comment-14091</guid>
		<description>waht is the use of the image gradient in it wat is the utility of image gradient don&#039;t write the to find out the pixel with minimum enery level i want the logical explanation,shamir document has no clear explanation for it,why use only sobel operater for gradient why not prewitt</description>
		<content:encoded><![CDATA[<p>waht is the use of the image gradient in it wat is the utility of image gradient don&#8217;t write the to find out the pixel with minimum enery level i want the logical explanation,shamir document has no clear explanation for it,why use only sobel operater for gradient why not prewitt</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13455</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 23 Dec 2008 23:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13455</guid>
		<description>Nadav - Cool answer!</description>
		<content:encoded><![CDATA[<p>Nadav &#8211; Cool answer!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13454</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Tue, 23 Dec 2008 23:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13454</guid>
		<description>Actually, there is a group of every cardinality A:
The Free Group, over the set A.
its cardinality is sup(A^n &#124; n smaller than omega) = A

Now, take a subset of R of cardinality aleph1.
The free group generated by it (with the regular addition or multiplication in R) is a subgroup of R with cardinality aleph 1.</description>
		<content:encoded><![CDATA[<p>Actually, there is a group of every cardinality A:<br />
The Free Group, over the set A.<br />
its cardinality is sup(A^n | n smaller than omega) = A</p>
<p>Now, take a subset of R of cardinality aleph1.<br />
The free group generated by it (with the regular addition or multiplication in R) is a subgroup of R with cardinality aleph 1.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13453</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Tue, 23 Dec 2008 23:00:01 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13453</guid>
		<description>Actually, there is a group of every cardinality A:
The Free Group, over the set A.
its cardinality is sup(A^n &#124; n </description>
		<content:encoded><![CDATA[<p>Actually, there is a group of every cardinality A:<br />
The Free Group, over the set A.<br />
its cardinality is sup(A^n | n </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13452</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 23 Dec 2008 22:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13452</guid>
		<description>Oh, I see.  I thought you meant that you put an extra condition on a group for it to work.
Of course you are right then (I used the aleph 0 example in the post to avoid cluttering the riddle with too many extra side-notes, I did not mean it is the only example).

What about the second part? Given a cardinal A, is there a group of cardinality A?
More specifically, I wonder if there is a subgroup of R of cardinality aleph 1.
Any thoughts?</description>
		<content:encoded><![CDATA[<p>Oh, I see.  I thought you meant that you put an extra condition on a group for it to work.<br />
Of course you are right then (I used the aleph 0 example in the post to avoid cluttering the riddle with too many extra side-notes, I did not mean it is the only example).</p>
<p>What about the second part? Given a cardinal A, is there a group of cardinality A?<br />
More specifically, I wonder if there is a subgroup of R of cardinality aleph 1.<br />
Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13444</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Tue, 23 Dec 2008 21:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13444</guid>
		<description>&quot;Some More&quot; = There are sets, which aren&#039;t groups, that will do too (for example, the the set of naturals with operations + and -).
It refered your comment in the &quot;Some Trivial Extensions&quot; where it seemed to me that you meant that only a cardinality of Aleph 0 will work, which is wrong (take for example the group of reals)</description>
		<content:encoded><![CDATA[<p>&#8220;Some More&#8221; = There are sets, which aren&#8217;t groups, that will do too (for example, the the set of naturals with operations + and -).<br />
It refered your comment in the &#8220;Some Trivial Extensions&#8221; where it seemed to me that you meant that only a cardinality of Aleph 0 will work, which is wrong (take for example the group of reals)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13442</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Tue, 23 Dec 2008 21:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13442</guid>
		<description>Nadav,

I don&#039;t understand your phrase &quot;any group + some more&quot;.

For each cardinal A, if you have a group G of cardinality A, then the solution works. I mean that you don&#039;t need anything &lt;b&gt;more&lt;/b&gt; than a group. Disagree?

On another note, it remains to show that for each cardinal A, there is a group of cardinality A. ;-)</description>
		<content:encoded><![CDATA[<p>Nadav,</p>
<p>I don&#8217;t understand your phrase &#8220;any group + some more&#8221;.</p>
<p>For each cardinal A, if you have a group G of cardinality A, then the solution works. I mean that you don&#8217;t need anything <b>more</b> than a group. Disagree?</p>
<p>On another note, it remains to show that for each cardinal A, there is a group of cardinality A. <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hats in a Line by Nadav</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/comment-page-1/#comment-13432</link>
		<dc:creator>Nadav</dc:creator>
		<pubDate>Tue, 23 Dec 2008 18:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/hats-in-a-line/#comment-13432</guid>
		<description>A more simple way of saying it is as follows:
once the set of all representatives is chosen, and given the real vector v, v is different from its representative by a finite number of bits. the man can say Zero or One depending on the parity of the number of flipping.

And another little comment (about the original riddle and the new one): the number of possible hat colors could be even more than Aleph0. The hats could be organized in any set with a &quot;+&quot; and a &quot;-&quot; operations (any group + some more). Once a man knows the &quot;Sum&quot; of all the hats in front of him B, and the &quot;Sum&quot; of all the hats in front him including him A, he can calculate the &quot;Difference&quot; (A - B) giving his hat color. The algorithm will still work. Ofcourse you would like the men to be able to say-out-loud the color, so that&#039;s quite reduces the options to Aleph0 or finie sets.</description>
		<content:encoded><![CDATA[<p>A more simple way of saying it is as follows:<br />
once the set of all representatives is chosen, and given the real vector v, v is different from its representative by a finite number of bits. the man can say Zero or One depending on the parity of the number of flipping.</p>
<p>And another little comment (about the original riddle and the new one): the number of possible hat colors could be even more than Aleph0. The hats could be organized in any set with a &#8220;+&#8221; and a &#8220;-&#8221; operations (any group + some more). Once a man knows the &#8220;Sum&#8221; of all the hats in front of him B, and the &#8220;Sum&#8221; of all the hats in front him including him A, he can calculate the &#8220;Difference&#8221; (A &#8211; B) giving his hat color. The algorithm will still work. Ofcourse you would like the men to be able to say-out-loud the color, so that&#8217;s quite reduces the options to Aleph0 or finie sets.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monty Hall Revised by yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/comment-page-1/#comment-13315</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Sat, 20 Dec 2008 18:48:32 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/#comment-13315</guid>
		<description>Seb,
Good to hear from you!

Danny,
Very well analyzed.  Note that in case the &quot;killing theory&quot; is correct (i.e. the host does not know where the prize is) switching is the best strategy only in a trivial sense - all the possible strategies are equivalent and give you a chance of exactly 0.5 of winning (given that you are not killed :-) ).

Yair,
:-)</description>
		<content:encoded><![CDATA[<p>Seb,<br />
Good to hear from you!</p>
<p>Danny,<br />
Very well analyzed.  Note that in case the &#8220;killing theory&#8221; is correct (i.e. the host does not know where the prize is) switching is the best strategy only in a trivial sense &#8211; all the possible strategies are equivalent and give you a chance of exactly 0.5 of winning (given that you are not killed <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).</p>
<p>Yair,<br />
 <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monty Hall Revised by Yair</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/comment-page-1/#comment-13311</link>
		<dc:creator>Yair</dc:creator>
		<pubDate>Sat, 20 Dec 2008 16:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/#comment-13311</guid>
		<description>You forgot to mention that they also occasionally kill participants even if the host didn&#039;t ruin the show, just so the stats would be indistinguishable from the no-killing scenario.</description>
		<content:encoded><![CDATA[<p>You forgot to mention that they also occasionally kill participants even if the host didn&#8217;t ruin the show, just so the stats would be indistinguishable from the no-killing scenario.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monty Hall Revised by Danny</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/comment-page-1/#comment-13260</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Fri, 19 Dec 2008 14:56:43 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/#comment-13260</guid>
		<description>(Oops! Definitions should be the other way around, i.e. H0 - with deaths; H1 - no deaths).</description>
		<content:encoded><![CDATA[<p>(Oops! Definitions should be the other way around, i.e. H0 &#8211; with deaths; H1 &#8211; no deaths).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monty Hall Revised by Danny</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/comment-page-1/#comment-13259</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Fri, 19 Dec 2008 14:52:52 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/#comment-13259</guid>
		<description>Interesting take on the original riddle. Here&#039;s my two cents:

We will only consider games in which the candidate chose to switch doors (obviously this is also the correct strategy, but we don&#039;t care, as we can simply ignore the other cases).

We need to distinguish between two hypotheses:
H0: The host never opens the prize door, all candidates get their 15 minutes of television fame.
H1: The host might open the prize door, in which case the candidate is executed.

WLOG we can assume the candidate&#039;s original choice was door #1 (everything is symmetrical, so it shouldn&#039;t really matter).

Now, there are 3 scenarios under H0, each w.p. 1/3:
1. The prize is behind door #1: so the host opens some random door 2 or 3, the candidate switches to the other one and loses.
2. The prize is behind door #2, so the host opens door #2 w.p. 1/2 and the candidate dies, or opens door #3 w.p. 1/2 and the candidate lives and wins.
3. the prize is behind door #3 - same as last.

All and all, under H0 we have:
candidate loses: 1/3
candidate wins: 1/3 * 1/2 * 2  = 1/3
candidate dies : 1/3 * 1/2 * 2 = 1/3

So under H0 and limiting ourselves to TV appearences only, we can expect to see about 1/2 of the candidates winning and the rest losing.

Under H1 we have also 3 scenarios, each w.p. 1/3:
1. The prize is behind door #1: so the host opens some random door 2 or 3, the candidate switches to the other one and loses.
2. The prize is behind door #2, so the host opens door #3 and and the candidate wins.
3. The prize is behind door #3 - same as last.

And all and all, under H1 we have:
candidate loses: 1/3
candidate wins: 1/3 * 2  = 2/3

So under H1 and limiting ourselves to TV appearences only, we can expect to see about 2/3 of the candidates winning and the rest losing.

Now we just need to apply the (weak) law of large numbers, compute the win proportion from the actual (virtually unlimited) television shows we have, and see which of H0 and H1 is more likely.</description>
		<content:encoded><![CDATA[<p>Interesting take on the original riddle. Here&#8217;s my two cents:</p>
<p>We will only consider games in which the candidate chose to switch doors (obviously this is also the correct strategy, but we don&#8217;t care, as we can simply ignore the other cases).</p>
<p>We need to distinguish between two hypotheses:<br />
H0: The host never opens the prize door, all candidates get their 15 minutes of television fame.<br />
H1: The host might open the prize door, in which case the candidate is executed.</p>
<p>WLOG we can assume the candidate&#8217;s original choice was door #1 (everything is symmetrical, so it shouldn&#8217;t really matter).</p>
<p>Now, there are 3 scenarios under H0, each w.p. 1/3:<br />
1. The prize is behind door #1: so the host opens some random door 2 or 3, the candidate switches to the other one and loses.<br />
2. The prize is behind door #2, so the host opens door #2 w.p. 1/2 and the candidate dies, or opens door #3 w.p. 1/2 and the candidate lives and wins.<br />
3. the prize is behind door #3 &#8211; same as last.</p>
<p>All and all, under H0 we have:<br />
candidate loses: 1/3<br />
candidate wins: 1/3 * 1/2 * 2  = 1/3<br />
candidate dies : 1/3 * 1/2 * 2 = 1/3</p>
<p>So under H0 and limiting ourselves to TV appearences only, we can expect to see about 1/2 of the candidates winning and the rest losing.</p>
<p>Under H1 we have also 3 scenarios, each w.p. 1/3:<br />
1. The prize is behind door #1: so the host opens some random door 2 or 3, the candidate switches to the other one and loses.<br />
2. The prize is behind door #2, so the host opens door #3 and and the candidate wins.<br />
3. The prize is behind door #3 &#8211; same as last.</p>
<p>And all and all, under H1 we have:<br />
candidate loses: 1/3<br />
candidate wins: 1/3 * 2  = 2/3</p>
<p>So under H1 and limiting ourselves to TV appearences only, we can expect to see about 2/3 of the candidates winning and the rest losing.</p>
<p>Now we just need to apply the (weak) law of large numbers, compute the win proportion from the actual (virtually unlimited) television shows we have, and see which of H0 and H1 is more likely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Monty Hall Revised by Seb Przd</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/comment-page-1/#comment-13244</link>
		<dc:creator>Seb Przd</dc:creator>
		<pubDate>Fri, 19 Dec 2008 10:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/monty-hall-revised/#comment-13244</guid>
		<description>An interesting (and deadlier) variation...</description>
		<content:encoded><![CDATA[<p>An interesting (and deadlier) variation&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pirates! by adeloBalzed</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/pirates/comment-page-1/#comment-13235</link>
		<dc:creator>adeloBalzed</dc:creator>
		<pubDate>Fri, 19 Dec 2008 07:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/pirates/#comment-13235</guid>
		<description>Hi all! 
 
As a fresh yaniv.leviathanonline.com user i only want to say hi to everyone else who uses this forum ;-)</description>
		<content:encoded><![CDATA[<p>Hi all! </p>
<p>As a fresh yaniv.leviathanonline.com user i only want to say hi to everyone else who uses this forum <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
