How many poker hands are there?

I've been posting a lot of philosophical geekery lately, so I'll balance that today with some math geekery. Today's math term is equivalence class. The basic idea is simple: if you have a big set of things, you can reduce it to a smaller set of things, each of which is a subset, or "class", of those things that are “equivalent” in some well-defined way.

Here's an example: how many five-card poker hands are there? Well we can pick any card from a 52-card deck, then pick a second card from the 51 remaining, and so on five times. This gives us 52×51×50×49×48 hands, or 311,875,200. Those 300 million hands include A♥4♦A♣9♥4♣ and also 4♣9♥A♣A♥4♦, so we can immediately reduce that by a factor of 120 by noting that poker rules don't care what order the cards are in. So we collect all those together and reduce our number to 2,598,960.

But we can go further still. That 2.5 million counts our two hands above (along with other combinations like 9♥4♦A♥4♣A♣) as equivalent, but it counts separately the hand A♠A♥4♥4♦9♠, which is the “same” hand in the sense of being identically valued—it is “two pair, aces and fours, nine kicker”, just like the first two. So how many poker hands are there, only counting those that are actually of different value in the game? As it turns out, only 7,462. Number one at the top of that list of 7,462 is simply “royal flush”, which accounts for four of our 2.5 million hands, and 480 of our 300 million. Number 2 is “king high straight flush”, and so on down to number 7,462 which is “no pair, 7-5-4-3-2” (which accounts for 1,020 of our 2.5 million, or 122,400 of our 300 million).

Notice a major difference between our two reduction operations: in the first case, we reduced the big set into subsets that were all the same size. Each of our 2.5 million hands contains exactly 120 of our 300 million—that's the number of different ways you can arrange 5 cards. As a consequence of this, the probability of each of those 2.5 million hands is exactly the same, just as is the probability of each of the 300 million. The 7,462 sets, however, are of different sizes. There are hundreds of times as many ways to get 7-5-4-3-2 as there are to get a royal flush, so the probability of each is different.

One common application of equivalence classes is in computer science: sometimes you need to do something to a very large set of inputs, and you can simplify and speed up the operation by reducing them to a smaller set. If you ask Google for pages about “poker”, not only would you expect it to return pages that mention “Poker” and “POKER”, but Google would save time and disk space by indexing those only once.

This can be applied to life as well. Perhaps there is a large set of things you'd like to improve about your life in some way. If you can group them by things that might have a similar cause or similar solutions, not only will you reduce the number of things to think about, you might notice that some groups are much larger than others, giving you guidance about what to focus on.

Prisoner's Dilemma

Grade schools in the US ignore philosophy as a subject. A few high schools give it brief mention (and then it's only to cover historically important people). Even in many colleges it remains elective. The result is that many important subjects in philosophy are unknown to the general public, despite the fact that they are simple and can have a great influence on our everyday lives.

I've mentioned concepts like confirmation bias and the sunk cost fallacy before. These are common mistakes all people make in reasoning that can be avoided if we learn about them. These have aspects of psychology as well as philosophy. A more purely philosophical concept everyone should understand is the Prisoner's Dilemma. A typical example goes like this:

Two suspects are arrested for a robbery. Each is questioned separately by police and told this: Our evidence against the two of you for the robbery is thin, but we can give each of you a year in jail on a lesser weapons charge. If you confess and squeal on your buddy, he'll get five years and we'll let you walk. But if you both squeal, you each get three years.

A keeps silentA confesses
B keeps silentA: 1 year
B: 1 year
A: free
B: 5 years
B confessesA: 5 years
B: free
A: 3 years
B: 3 years

Each suspect reasons like this: I can't talk to my buddy, and I have no control over what he does. If he clams up, I get a year if I do as well, but I go free if I confess. If he squeals, then I get five years if I stay silent and three if I confess. In both cases, I'm better off confessing. Both suspects reason this way, so both confess, and each gets three years in prison. But if they had both remained silent, they both would have gotten only a year. So the essence of the Prisoner's dilemma is this: reasoning separately, both parties doing what is clearly in their best interest end up with a result that is worse that what they would have gotten if they had cooperated.

Many situations in life mirror this. Take doping in sports, for example. Whether or not your opponent is doping is out of your control. If he is, you must dope to compete. If he isn't, doping won't lessen your chance of winning, so individually you are always better off doping. But if everyone in the sport is doping, the results will be roughly the same as if no one is doping, so as a group, it would be better if everyone didn't. Other situations like the tragedy of the commons can be modeled this way.

The way out of these dilemmas is to find some means to encourage or force cooperation. For example, a criminal gang might have a prior agreement—or strong social taboo—against snitching. Sports regulators might have strong rules against doping and do regular testing. It has even been suggested that one of the primary motivations for which people create governments is to have a third party to resolve such dilemmas between citizens.

Like any simplified mathematical model of complex human interaction, there is a danger of applying it to situations that don't quite match. In a recent episode of the Philosophy Bites podcast, Jeff McMahan suggests modeling aspects of the gun control debate as a prisoner's dilemma: for example, the interaction between a burglar and homeowner. Each reasons that if the opponent is armed, he is certainly safer being armed himself, and if his opponent is unarmed, being armed doesn't hurt, so it is better to be armed in each case. But collectively, they are safer if both are unarmed.

I don't think this particular argument holds water, even ignoring all the other aspects of a very complicated issue. First, the “payoffs” (that's mathematical jargon for the relative value of the results to each of the participants) are not symmetrical. In the “both unarmed” condition, the winner of the interaction is likely to be whoever is bigger, stronger, or the more experienced fighter—probably the criminal. The “both armed” condition raises the stakes and the danger for both, but is also equalizes them, so it is likely to benefit the homeowner relative to the burglar. Second, it assumes that both the criminal and the homeowner place equal value on their own safety. This is a psychological question. Perhaps the burglar is a sociopath who values violence for its own sake. It also makes the assumption that the “both unarmed” condition is something that's possible to achieve in real life.

Another way out of the prisoner's dilemma is available when situations are repeated more than once: reciprocity. When we have multiple interactions with people, we can gain a reputation for being cooperative, making others more likely to cooperate with us. Robert Axelrod's classic experiments along these lines are explored in his book The Evolution of Cooperation. Reciprocity can also explain how our moral sense (and things like our ability to recognize faces) can evolve from the essentially selfish process of natural selection.

This concept is simple, and recognizing it in real life situations can make such a difference in life that it should be taught to everyone in grade school.

Predictably Irrational

Dan Ariely's Predictably Irrational should be required reading in all English-speaking high schools. Though he is an academic of impeccable credentials (including a 2008 Ig Nobel prize), he is also an entertaining writer—a rare combination. The book details some of his important and cutting-edge research in the emerging field of behavioral economics, but its writing is accessible, clear, funny, and effective.

His examples resonate with the ordinary choices we all make in life: buying magazines, dating, vacationing. He shows us the mistakes we all make, but not in a way that is condescending or cynical. Indeed, his intent is clearly to show us how we can avoid making those mistakes even while he shows us how universal they are. His advice is not that of a college professor or a parent, but more like a best friend telling you “Wow, I just did something really stupid—don't do that.”

Indeed, its very lucidity might be a risk: you might be tempted to think “Well, of course, how obvious” after he explains some aspect of human behavior, and not realize that his discoveries were not obvious, and that they are backed up by solid experimental evidence, not just platitudes.

You can get a taste of his style from Youtube, but the details in the book are worth the time spent. While it is likely that academics will continue to cite the groundbreaking 1974 Kahneman and Tversky paper as the founding work of the field, Ariely's book is likely to be one most discussed by the rest of us, and it will serve you well to be familiar with it when related subjects come up in conversation.

Show me the mouse

I once attended a scientific conference where several of the speakers were doing research into longevity. Each had a promising area of research. We have learned a lot about aging in recent years and know many of the biochemical changes that take place. There are drugs and other interventions (like calorie restriction) that show promise in slowing, stopping, or even reversing some of those changes. The speakers explained their work and why it had promise, then invited questions (as is standard practice in scientific conferences).

The first question for every speaker was usually the same: Where's your 5-year-old mouse? Mice are commonly used in medical research for many reasons. They are easy to breed and keep, their biochemistry is reasonably similar to humans (and most other mammals), and their life cycle is short and fast. Testing longevity drugs on humans would take decades. Mice only live a year or two. So if someone discovered a drug that could significantly extend human lifetimes, it is likely that it would be tested on mice first. If a drug really was the breakthrough we hope for, pictures of 5-year-old mice would be on news shows and websites everywhere.


None of the researchers was able to show a 5-year-old mouse. Some did have good results with lower animals like flies, some had mice that were measurably healthier in their later months than controls, but no one had the holy grail. But this is not a story of failure: research continues, new things are being tried, and new things are being learned and shared at conferences. My point is that science is successful precisely because everyone knows what the hard questions are and can't duck them.

Contrast science to, say, advertising. A commercial on this year's Superbowl for vitamins touted their benefits by saying “Centrum Silver was part of the recently published landmark study evaluating the long-term benefits of multivitamins.” This statement still appears on their website, verbatim. They can say these things safely knowing that no one will ask the obvious question—so what were the results of the study? Even the website doesn't link to the study, for good reason. The study showed no long-term benefits from multivitamins. But advertisers aren't scientists. They can give their audience carefully crafted, misleading—but totally true—statements while ducking the obvious questions.

Many people think science is about studying lots of facts discovered by people many years ago. That's certainly part of it, but far more important than yesterday's answers is learning what the right questions are.

Advocates for a product or a cause can make a very eloquent case, even if they're wrong. This is because they don't have to face hard questions. A book, a movie, or a TV documentary can all make you believe nonsense because you can't talk back. And if an idea supports our ideology, or benefits us, we are more likely to believe it without questioning, even when we can ask questions. Good scientists know this, and are trained to be most suspicious of things they would like to believe, like the idea that they could live longer.

This habit of being overly credulous or optimistic about things we would like to be true is called confirmation bias. It's another habit of bad poker players that we can take advantage of. They want to call, so they convince themselves that their opponent is bluffing. They want to fold, so they convince themselves that their opponent has the nuts.

Be skeptical. Especially of yourself, and what you want to be true. Don't ever forget to ask yourself the tough questions. Even if you're telling me what I want to hear, I'm going to tell you to shut up and show me the 5-year-old mouse.

Copyright introduction

Among the three or four book projects I have on the back burner is one that sets out my case for the abolition of copyright. It's not very far along, but I thought it might be good to get the idea out there as a statement of principle and a focus for discussion. So here's a draft of my introduction:

Prometheus Bound, Jacob Jordaens, ca. 1640

Prometheus Bound, Jacob Jordaens, ca. 1640

And the Lord said, ‘Behold, they are one people, and they have all one language, and this is only the beginning of what they will do. And nothing that they propose to do will now be impossible for them.”

— Genesis 11:6

The myths of many cultures contain a story of a hero who gives fire to the people, incurring the gods' anger. Cherokee myth has Grandmother Spider using her web to sneak into the land of light and carry fire back to the people in a clay pot. The Polynesian mythic hero Maui learns the secret from the fire-goddess, who sets all the land and sea aflame in her anger; Maui's ancestors bring rain in answer to his prayers. The best known of these is certainly the Greek myth of the titan Prometheus. He takes fire from Zeus, hides it in a fennel plant, and carries it to mankind. Zeus has him chained to a rock, where an eagle eats his liver, which grows back each day.

The gods were angry not because they lost something—they still had fire—they were angry because they knew that knowledge is power, and knowledge of fire would make the people more powerful and more difficult to control. These myths were created to explain the rise of civilization: how mankind came to be the master of his own destiny instead of living at the whims of nature like the animals and his hunter-gatherer ancestors.

If fire were discovered today, those in power would guard its secrets as zealously as did those gods. They would form a fire-makers' guild to enforce their monopoly, justifying this with quite reasonable-sounding arguments. “Fire is powerful and dangerous; an untrained user could burn down a house. We can't let just anyone use it. There must be licenses and regulations. We must give its inventors control over its use so that they are rewarded for their ingenuity and given incentives to invest in further research.”

Information technology is today's fire. As presciently illustrated by the story of Babel, information technologies from language itself to the Internet can empower humanity as much as fire, the wheel, agriculture, medicine, and many others. They too have been tightly controlled by those in power for as long as they could. But their true power is unleashed only when they are available to everyone. This is because of the network effect: the value of a communication technology is not based on the number of users, but on the number of connections between users, which is exponentially greater.

The tightest control on the use of information technology today is copyright law. When these laws were first proposed, the debate was lively, encompassing all points of view from complete freedom to copy to complete control. Control mostly won, justified by reasonable-sounding arguments about incentives and natural rights. Over the years, a mess of exceptions and compromises were made to address the problems caused by copyright, but the basic arguments for it soaked into the public consciousness. Even the many people today who decry the excesses of copyright and point out the terrible consequences of its abuse still support the basic idea. They speak of “reform” and “balance” rather than abolition, saying that we need to find just the right amount of copyright law to achieve its aims while minimizing its harms.

I am an abolitionist. I believe that the “right amount” of copyright law is none at all. I will argue that copyright not only fails to achieve the very goals it claims, but that it actively thwarts them, and always will, no matter how much we reform it. I will argue that even though copyright has been touted as a pillar of capitalism, it is a drag on a vital free market, throwing sand in the gears of progress. The experiment has failed, and it is time to abandon it.

The long contentious history of copyright beautifully exemplifies Ambrose Bierce's definition of politics: a strife of interests masquerading as a contest of principles. Its defenders have cleverly framed the issue as a moral one rather than a practical one to cut off rational argument about costs and benefits, while ignoring the moral arguments that favor freedom. The present is a story of widespread creativity and the forces of the status quo that try to squash it while claiming to be its biggest supporter. I won't pretend to predict the future, but I hope to present a vision of what a world without copyright might be like for both consumers and producers of creative works. I hope you will find it inspiring, and that you will agree that it is not just an idle dream, but an achievable future that will be better for us all.