<?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>smoosh | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/smoosh/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Sat, 29 Aug 2020 15:04:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>smoosh | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>How many riffles are needed to shuffle a deck?</title>
		<link>https://learncgames.com/how-many-riffles-are-needed-to-shuffle-a-deck/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-many-riffles-are-needed-to-shuffle-a-deck</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 01 Sep 2020 23:00:20 +0000</pubDate>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[card]]></category>
		<category><![CDATA[riffle]]></category>
		<category><![CDATA[smoosh]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=1320</guid>

					<description><![CDATA[<p>It fascinates me because 52! is such a large number.  Here it is in full 8.0658* 10^67 or 80,658,175,170,943,878,571,660, 636,856,403,766,975,289,505,440,883, 277,824,000,000,000,000. That is the possible number of ways of shuffling a pack of cards. It means that when you shuffle a deck of cards, it&#8217;s possible that you are the first person on Earth to [&#8230;]</p>
The post <a href="https://learncgames.com/how-many-riffles-are-needed-to-shuffle-a-deck/">How many riffles are needed to shuffle a deck?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignleft size-medium wp-image-1321" src="https://learncgames.com/wp-content/uploads/2020/08/card-riffle-300x225.png" alt="card riffle photo" width="300" height="225" srcset="https://learncgames.com/wp-content/uploads/2020/08/card-riffle-300x225.png 300w, https://learncgames.com/wp-content/uploads/2020/08/card-riffle.png 640w" sizes="(max-width: 300px) 100vw, 300px" />It fascinates me because 52! is such a large number.  Here it is in full 8.0658* 10^<sup>67</sup> or 80,658,175,170,943,878,571,660, 636,856,403,766,975,289,505,440,883, 277,824,000,000,000,000. That is the possible number of ways of shuffling a pack of cards.</p>
<p>It means that when you shuffle a deck of cards, it&#8217;s possible that you are the first person on Earth to ever get that particular arrangement. It&#8217;s the kind of fact that amazes me. Another one is that it takes a very long time for particles emitted from the centre of the sun to reach the surface and blast into space. On the order of many many years. (<em>Thousands of years!</em>)</p>
<p>Playing cards have only been around maybe 500 years as we know it (<em>52 card deck</em>) though date back to 9th century China for their invention. If there had been a billion shuffles each day during that 500 years, that&#8217;s only 1.8 x 10^<sup>14</sup> shuffles. That is a minuscule fraction of the possible number of arrangements so the chances are that any shuffled arrangement is new is pretty high.</p>
<p>It&#8217;s accepted that seven is the number of riffles needed to perfectly shuffle a pack of cards. A riffle is where you split the deck in two and then merge the two halves back into one deck as in the photo I took.</p>
<p>I proved this once by writing a program to simulate riffles  and looking how far cards have moved after seven. In fact a card at the top of the deck moved to the bottom after only six riffles. I&#8217;ll try and write that in C and will publish it here in a day or two.</p>
<p>Other shuffling techniques like smooshing <em>(spreading out all the cards on the table with their backs face up and then pushing them together</em>) are nowhere near as efficient. It&#8217;s estimated it can take thousands of smooshes to properly shuffle a pack. It&#8217;s not easy to simulate, though one of these days I&#8217;ll have a go and see if I can come up with a more accurate estimation.</p>The post <a href="https://learncgames.com/how-many-riffles-are-needed-to-shuffle-a-deck/">How many riffles are needed to shuffle a deck?</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1320</post-id>	</item>
	</channel>
</rss>
