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

<channel>
	<title>Test Blog &#187; Cryptography</title>
	<atom:link href="http://dcostanet.net/wordpress/category/cryptography/feed/" rel="self" type="application/rss+xml" />
	<link>http://dcostanet.net/wordpress</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 05 May 2006 14:53:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Kruskal Count</title>
		<link>http://dcostanet.net/wordpress/2005/05/08/30/</link>
		<comments>http://dcostanet.net/wordpress/2005/05/08/30/#comments</comments>
		<pubDate>Mon, 09 May 2005 04:56:32 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Mathematics]]></category>

		<guid isPermaLink="false">http://dcostanet.net/wordpress/?p=30</guid>
		<description><![CDATA[&#x2660;&#x2661;&#x2662;&#x2663;&#x2664;&#x2665;&#x2666;&#x2667; Murali told us about this amazing card trick his professor did in his statistics class. The professor asked a student to shuffle a deck of cards and then lay all the cards face up in a straight line. Every card was given a value between 1 and 10. The value of the numbered cards [...]]]></description>
			<content:encoded><![CDATA[<div align="center">
<font size="7" color="red">&#x2660;</font><font size="7" color="black">&#x2661;</font><font size="7" color="red">&#x2662;</font><font size="7" color="black">&#x2663;</font><font size="7" color="red">&#x2664;</font><font size="7" color="black">&#x2665;</font><font size="7" color="red">&#x2666;</font><font size="7" color="black">&#x2667;</font>
</div>
<p>Murali told us about this <a href="http://www.maa.org/mathland/mathtrek_12_24_01.html">amazing card trick</a> his professor did in his statistics class. The professor asked a student to shuffle a deck of cards and then lay all the cards face up in a straight line. Every card was given a value between 1 and 10. The value of the numbered cards was equal to their number (Aces are given the value 1) and the value of the remaining face cards (Jack, Queen, King) was 2. To start with, the student chooses a secret number <em>n</em> between 1 and 8. He or she then looks at the <em>n</em><sup>th</sup> card and silently figures out its value. If that value is <em>m</em> then the student finds the value of the <em>m</em><sup>th</sup> card after the <em>n</em><sup>th</sup>. This continues till the student reaches the end of the deck.  For example, suppose the secret number is 5 and in the 5<sup>th</sup> place is the 7 of clubs. Then the student has to look at the 12<sup>th</sup> (5 + 7) place and if that is the Jack of Hearts then he or she would have to look at the 14<sup>th</sup> (12 + 2) place. At some point the student runs out of cards and cannot do this process anymore. The card that (s)he had just before this process ended is the &#8220;magic&#8221; card. For example, if the student happens to get to the 47<sup>th</sup> card and that is the 9 of spades, then since 9 + 47 is greater than 52, the 9 of spades is the magic card. The professor does not know what secret number the student has chosen but is still able to figure out what the magic card is. </p>
<p>How is this trick done? Well initially we thought that the magic card depends only on the distribution of the cards and not on the secret number. However it is easy to produce a distribution of the cards where two different secret numbers end up giving two different magic cards. This is very fragile, because if the distribution of the cards is changed even slightly it ends up giving the same magic card no matter what secret number is chosen. So it appears to be a probability game where the magician who performs the trick ends up getting the very same magic card almost all the time no matter what secret number is chosen. In the rare occasion that the magician is wrong, the person doing the counting should be ridiculed for being bad at simple arithmetic. It would help to quickly shuffle the deck while doing the ridiculing so that all evidence is erased and the trick can be performed again <img src='http://dcostanet.net/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The mathematical idea behind this trick is very simple. It is known as the Kruskal Principle after Martin D. Kruskal. The magician goes through the same procedure using 1 as the starting secret value. After a few steps there is a great probability that the two procedures will &#8220;hit&#8221; the same card and then after that they will be &#8220;in step&#8221;, thus producing the same magic card. I didn&#8217;t realise it at the time but this is principle is very similar to the one used in the <a href="http://mathworld.wolfram.com/PollardRhoFactorizationMethod.html">Rho Pollard Method</a> of factorizing large integers. The idea being to iterate a function till it falls into a cycle. <a href="http://arxiv.org/pdf/math.PR/0110143">Here</a> is an arxiv paper which uses coupling in Markov chains to analyse this card trick. </p>
]]></content:encoded>
			<wfw:commentRss>http://dcostanet.net/wordpress/2005/05/08/30/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hacking the Papal Election</title>
		<link>http://dcostanet.net/wordpress/2005/04/30/19/</link>
		<comments>http://dcostanet.net/wordpress/2005/04/30/19/#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://dcostanet.net/wordpress/?p=19</guid>
		<description><![CDATA[Bruce Schneier has a nice article in the latest cryptogram on hacking the papal election.The bottom line is when an election process is left to develop over the course of a couple thousand years, you end up with something surprisingly good.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.schneier.com/">Bruce Schneier</a> has a nice article  in the latest <a href="http://www.schneier.com/crypto-gram.html">cryptogram</a>  on <a href="http://www.schneier.com/crypto-gram-0504.html#8">hacking the papal election</a>.The bottom line is</p>
<blockquote><p>when an election process is left to develop over the course of a couple thousand years, you end up with something surprisingly good.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dcostanet.net/wordpress/2005/04/30/19/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

