CalvinDude Masthead
Losing WeightGod of the Gaps

Entropy in the Cards

Posted: September 14, 2016 (12:07 PM) by CalvinDude
While I continue through The Collapse of Chaos by Cohen and Stewart, I have recently gone through a chapter where they discussed the oft-used example of shuffled cards as an analogy of entropy. Entropy, as many of my readers may already know, is the amount of disorder in a system. The idea is that due to the Second Law of Thermodynamics, in any closed system entropy will increase. That is to say that the amount of disorder rises.

One of the ways this is illustrated is by thinking of a deck of cards. There is only one way that the deck could be ordered "correctly" (new deck order), but there are countless ways that it could be ordered incorrectly. Indeed, if you're wondering, there are a total of 52! (that's fifty-two factorial) ways that a deck can be arranged. 52! is a huge number. In fact, that number is: 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000.

That means that there is 1 way to have the correctly ordered deck, and there are 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,823,999,999,999,999 ways to get it in the incorrect order. Therefore, the conclusion is that it's much easier to get the wrong order than the right order. Thus, entropy will increase.

This example has been shared in several physics books I've read, including works by Brian Green. Green uses the example of pages of a book instead of cards, but the principle is the same. There is only one correct ordering for the pages of a book, and many ways to get the pages out of order. Thus, if you leave the pages loose and scoop them up, entropy will have increased because the pages will be more likely to be out of order than to be in order.

Cohen and Stewart challenge this analogy of entropy, and in the process bring up some great points. They thankfully use a much simpler system to demonstrate this: just 8 cards, numbered 1 through 8. But the principal is scaleable and useful here.

If you were to take an ordered deck of these eight cards and riffle shuffle them, what do you end up with? Well, let's just start by taking cards 1234 in one hand and 5678 in the other. When we mix them, the 5 falls, then the 1. Then the 6 and the 2, etc. So we end up with: 51627384.

Now it is certainly true that 51627384 looks more "random" than 12345678, but is it really? The pattern is easy to see. The cards in the odd numbers of the sequence are 5678 and the even numbers of the sequence are going 1234. If you ran across that in "nature" you would say that it is certainly not random.

So let's give it another riffle shuffle. This time, riffling 5162 and 7384 gives us: 75318642. Now certainly 75318642 looks more random than 12345678, and we might perhaps say that it is more random than 51627384 too. But then we notice that 75318642 is just the odd numbers in decreasing value (7531) followed by the even numbers in decreasing value (8642). This, in fact, does not actually look any more random at all.

So we shuffle 7531 and 8642, and we get: 87654321.

Wait. 87654321 is just 12345678 backwards. Definitely not more random at all. As you can guess, the next riffle shuffle gives us 48372615, which has odd numbers of 4321 and even numbers running 8765. Clearly not random. Next we get 24681357, which is 2468 followed by 1357. And, not to be outdone, our final shuffle gives us 12345678 once more and we're back to where we started.

So this riffle shuffle, in fact, yields no results that actually look random, and the fact that doing six perfect riffle shuffles gets us back to our original state means that the cycle of perfect riffle shuffles is giving us absolutely no entropy. How can entropy be increasing if we end up where we started?

Naturally, Cohen and Stewart point out that most of the time we are not expecting perfect riffle shuffles, but rather we are thinking of random shuffles. But if that is the case, is 73481625 any more or less random than 15483726? If we begin with one and randomly convert it to the other, has entropy increased?

Put it this way: the very fact that you could randomly go from either number to the other number means that entropy has not increased between them. The fact that it could go either way shows that they are equal, in the eyes of randomness. And, for that manner, even starting from 15483726 you could theoretically shuffle the deck a few times and have 12345678 again. The fact that it's not likely to be there for any one particular shuffle doesn't mean it's not possible to be there; and the fact that it's possible to be there--indeed, it will necessarily be there given enough shuffles--means that this system is not increasing in entropy whatsoever.

Furthermore, since the arrangement of cards has no inherent meaning at all, but rather looks more or less random depending on what we want, then whether it makes sense or not depends on us, not the cards. That is, you could have an arrangement of playing cards that looks random but which really is a sequence that would give a full house to player 1, and two pair to player three, in a game of Texas Hold 'em when you have four players. That means that arrangement is meaningful in the context of a Texas Hold 'em game, even if not just looking at them in a list. Furthermore, every ordering of a deck can be viewed as "Player 1 wins a game of War" or "Player 2 wins a game of War" or "This will end in a tie in a game of War."

The context of what the cards are being used for very much determines whether or not the data in the cards is "random".

For all these reasons, card shuffles turn out not to be a very good way of describing entropy at all...

Comments 0Rating: 0

There are no comments on this post.
Losing WeightGod of the Gaps
Content on the site is copyright 1996 - 2017 by Peter Pike. All Rights Reserved. This page works best with HTML 5 browsers.
By accessing this site, you acknowledge your agreement with our Terms and Conditions and Privacy Policy.