Showing posts with label questionable sanity. Show all posts
Showing posts with label questionable sanity. Show all posts
Sunday, April 15, 2012
If It's Negative in Area, Do I Get a Refund for Buying It?
I realize this is mostly crazy on my part, but honestly, I really wish real estate people would stop using the plus-minus sign (±) in this jackass way.
Monday, February 13, 2012
Weighted Fair Division
I'm sure this is an old puzzle somewhere in the world, but it came upon us a few years ago here at work in connection with driving to lunch.
Where I work, the company provides a cafeteria where one may purchase lunch. Unfortunately, the lunch is either too expensive or not good enough, depending on your point of view, so we generally eat out. We're lucky that we can do that. Anyway, in general, we try to take turns driving so that we're all likely to drive about equally often. It doesn't always work out that way, but that's the aim.
If we all ate out every meal, it'd be simple; we'd all drive with equal probability. But what happens if, as has been the case occasionally throughout the years I've worked here, one of us can only eat out once per week? How often should that person drive, when they do eat out?
To make things simpler, let's assume that there are two of us daily diner (five times per week), and one single-day diner. Four days out of the week, there are only two diners. If each one drives one-half of the time, then both of them end up driving two days out of the four.
On the last remaining day of the week, when there are three diners, should each drive one-third of the time? Well, if we do things that way, then each of the two diners drives 2-1/3 days, on average, whereas the single-day diner drives just 1/3 day per week, on average. That's not fair, because the two daily diners drive seven times as much as the single-day diner, even though they only eat five times as often. The single-day diner should have to shoulder more of the driving burden on that one day.
Let's denote by p the probability that the single-day diner drives on that day. Then the two daily diners drive on that day with probability (1-p)/2, and over the course of the week, they drive (5-p)/2 days, on average. According to our fairness metric, we must find p such that (5-p)/2 = 5p, which yields
5-p = 10p
11p = 5
p = 5/11
So the single-day diner should drive nearly half of the time, on those days when he or she joins the two daily diners. By a similar line of reasoning, if there are three daily diners, that probability drops to 5/16, and in general, with n daily diners, the probability is 5/(1+5n), with each of the daily diners driving five times more often, or 25/(1+5n).
What happens if there are m one-day diners (each of them eating on the same day)? Then the probability p that any of the one-day diners should drive on that one day drops even further, to 5/(m+5n).
One might well consider (providing one is still reading) extending these to k-day diners, and whether the results depend on the k-day diners eating on the same k days, or if the results are insensitive to the distribution of those k days.
Where I work, the company provides a cafeteria where one may purchase lunch. Unfortunately, the lunch is either too expensive or not good enough, depending on your point of view, so we generally eat out. We're lucky that we can do that. Anyway, in general, we try to take turns driving so that we're all likely to drive about equally often. It doesn't always work out that way, but that's the aim. If we all ate out every meal, it'd be simple; we'd all drive with equal probability. But what happens if, as has been the case occasionally throughout the years I've worked here, one of us can only eat out once per week? How often should that person drive, when they do eat out?
To make things simpler, let's assume that there are two of us daily diner (five times per week), and one single-day diner. Four days out of the week, there are only two diners. If each one drives one-half of the time, then both of them end up driving two days out of the four.
On the last remaining day of the week, when there are three diners, should each drive one-third of the time? Well, if we do things that way, then each of the two diners drives 2-1/3 days, on average, whereas the single-day diner drives just 1/3 day per week, on average. That's not fair, because the two daily diners drive seven times as much as the single-day diner, even though they only eat five times as often. The single-day diner should have to shoulder more of the driving burden on that one day.
Let's denote by p the probability that the single-day diner drives on that day. Then the two daily diners drive on that day with probability (1-p)/2, and over the course of the week, they drive (5-p)/2 days, on average. According to our fairness metric, we must find p such that (5-p)/2 = 5p, which yields
5-p = 10p
11p = 5
p = 5/11
So the single-day diner should drive nearly half of the time, on those days when he or she joins the two daily diners. By a similar line of reasoning, if there are three daily diners, that probability drops to 5/16, and in general, with n daily diners, the probability is 5/(1+5n), with each of the daily diners driving five times more often, or 25/(1+5n).
What happens if there are m one-day diners (each of them eating on the same day)? Then the probability p that any of the one-day diners should drive on that one day drops even further, to 5/(m+5n).
One might well consider (providing one is still reading) extending these to k-day diners, and whether the results depend on the k-day diners eating on the same k days, or if the results are insensitive to the distribution of those k days.
Friday, December 9, 2011
Monday, April 18, 2011
When Does It Start?
So I'm driving to work the other day, and I'm stuck behind this car whose driver has decided that today, freeways shall be traversed at the speed of 42 mph. (In reality, I suspect this decision applies to most days, but I'm trying to be conservative here.) And it's almost impossible to pass him, because the stream of cars passing both of us is too dense and too much faster than we are to enter safely.Eventually, I manage, and at a relatively safe moment, I cast a quick sidelong glance at him and affirm that he's northward of 80 years old. Now, there's a lot of talk that drivers that old should be looked at fairly hard and often to establish that they're able to drive safely, but I'm actually not thinking about that. What I'm thinking about is, at what point did he become a 42 mph kind of driver on the freeway? Was he always like that, or did he start out as what most of us would consider an ordinary kind of driver, and over time got slower and slower? I mean, maybe there are places where 42 mph is considered sort of daring, and that's where he grew up.
At this point in the discussion, someone invariably pipes up and mentions that such drivers are in fact safer than those driving at some higher speed, say, 80 mph, on the assumption that 80 mph is just inherently less safe. There's something to be said for that point of view, in that there's less time to avoid impacts if you're driving at a higher speed, and any impacts you do end up in are more dangerous. But that's only part of the picture.
The reality of the situation is that although (in Los Angeles) the freeway traffic occupies a continuum of speeds, most of the traffic—perhaps 90 to 95 percent—falls between 60 and 80 mph. And your risk of impact depends primarily on how often you encounter cars travelling at that range of speed. A long time ago, in grad school, I spent a little time figuring out how often you encounter cars on the road: either passing slower cars, or being passed by faster ones. And what I found was that the details of the speed distribution of cars matters very little. There are only four parameters of interest: the density of cars on the road, the percentage of cars you're faster than, the average speed of those cars that you're faster than, and the average speed of those cars that are faster than you.
That means that you could pretty much figure out the rate at which both my 42 mph driving friend and the hypothetical 80 mph driver would encounter cars by simply assuming everybody else was driving 70 mph. Our superannuated man behind the wheel would encounter cars nearly three times more often than the 80 mph driver, and encounter them at nearly three times the relative rate of speed. To be sure, the combined energy of an actual collision would be greater for 70 mph and 80 mph than it would be for 42 mph and 70 mph, but the increased frequency of encounters and the much shorter period of time drivers would have to avoid them would, I think, more than compensate for that.
All in all, I think if you want to drive slower to be safer, you're better off driving 60 mph, or whatever the lower end of speeds is for your road of choice.
Friday, January 28, 2011
How to Be Wrong, With Statistics!
Please, just stop it. You're hurting me.
Anyone who understands statistics at all cannot dispute that Kobe Bryant does not perform well statistically, in the clutch. But anyone who understands statistics well cannot dispute that the current statistics are woefully under-equipped to discern who is the clutchiest player in the league.
Look: Nothing happens in a vacuum. We look at crunch-time statistics because it's the most exciting part of the game, when it happens. But it's only one way to condition a play.
What do I mean by condition? I mean "to restrict the characteristics of." With respect to comparing players on their clutchiosity, the objective should be to condition the crunch-time plays sufficiently that we are comparing apples to apples, and oranges to oranges. And here, as with many other aspects of basketball, we simply don't have the statistics to do it at our disposal.
For instance, suppose that we wish to compare two players, A and B. Suppose that A's offensive efficiency (points per possession) is greater than B's, with less than 24 seconds on the clock and the team tied or down no more than three points. Does that mean that A is clutchier than B?
Not at all. If B has stiffs for teammates, compared to A, then he's likely going to be faced with tighter individual defense than A, and likely earn a lower offensive efficiency than A. That's a couple of instances of "likely" in there, but the point doesn't have to be ironclad, it just has to be plausible, even probable. We just don't know enough to conclude with anything approaching certainty that A is clutchier, because we haven't conditioned on the teammates. (Or the defense, for that matter.)
Observe that this is mostly independent of what statistic you use to measure clutchiness. Suppose, instead, that you decide to use win probability increment. A player's ability to increase his team's likelihood of winning is still going to be affected by his teammates: If he passes, they will have a lower probability of scoring; if he doesn't, the defense can afford to defend him more tightly.
Of course, maybe you're OK with this kind of quality vacillating with things like which teammates a player has. But personally, I think such a measure has a certain ephemeral aspect that we don't usually associate with clutchiness.
The problem is, how can you possibly condition on the kind of teammates that a player has? Players don't change teammates the way they change their clothes (or at least they shouldn't). So what do you do?
Here's my gentle suggestion: Stop trying to answer these abstract questions statistically. I've been using outlandish forms of the word "clutch" to underscore this, in case you haven't noticed, but my point is serious. Use statistics to answer the questions they can. As the field advances, we'll be able to answer more of these questions, but in the meantime, use the same method we've been using all along: subjective observation. Western civilization didn't break down before we had PER. Nothing hinges on who people outside the game think is clutch. And mostly, stop pretending to any degree of certainty in the matter, just because a number is attached to it.
EDIT: Since I'm a fan of Kobe Bryant, one might reasonably wonder whether or not I've got a built-in bias against crunch-time statistics, since almost all of them (except perhaps a raw count of shots made in crunch time, as opposed to efficiency) point to quite a few players as being superior in the clutch. Obviously, I can't deny said bias. Quite possibly I would not be making these same arguments, or making them with quite the same degree of vehemence, if those statistics showed Bryant in a better light.
That being said, however, I don't think the question of using statistics to examine clutchitude should be predicated on how well they accord with conventional wisdom (where Bryant is, indeed, king of clutch). In my opinion, there are quite compelling fundamental arguments that straightforward linear classifiers such as PER or offensive efficiency or wins produced, conditioned on crunch time or not, are simply not reliable indicators of individual performance, and those arguments would remain valid regardless of whether I espoused them, or of whom they revealed to be the top performers, in crunch time or in the game overall.
Anyone who understands statistics at all cannot dispute that Kobe Bryant does not perform well statistically, in the clutch. But anyone who understands statistics well cannot dispute that the current statistics are woefully under-equipped to discern who is the clutchiest player in the league.
Look: Nothing happens in a vacuum. We look at crunch-time statistics because it's the most exciting part of the game, when it happens. But it's only one way to condition a play.
What do I mean by condition? I mean "to restrict the characteristics of." With respect to comparing players on their clutchiosity, the objective should be to condition the crunch-time plays sufficiently that we are comparing apples to apples, and oranges to oranges. And here, as with many other aspects of basketball, we simply don't have the statistics to do it at our disposal.
For instance, suppose that we wish to compare two players, A and B. Suppose that A's offensive efficiency (points per possession) is greater than B's, with less than 24 seconds on the clock and the team tied or down no more than three points. Does that mean that A is clutchier than B?
Not at all. If B has stiffs for teammates, compared to A, then he's likely going to be faced with tighter individual defense than A, and likely earn a lower offensive efficiency than A. That's a couple of instances of "likely" in there, but the point doesn't have to be ironclad, it just has to be plausible, even probable. We just don't know enough to conclude with anything approaching certainty that A is clutchier, because we haven't conditioned on the teammates. (Or the defense, for that matter.)
Observe that this is mostly independent of what statistic you use to measure clutchiness. Suppose, instead, that you decide to use win probability increment. A player's ability to increase his team's likelihood of winning is still going to be affected by his teammates: If he passes, they will have a lower probability of scoring; if he doesn't, the defense can afford to defend him more tightly.
Of course, maybe you're OK with this kind of quality vacillating with things like which teammates a player has. But personally, I think such a measure has a certain ephemeral aspect that we don't usually associate with clutchiness.
The problem is, how can you possibly condition on the kind of teammates that a player has? Players don't change teammates the way they change their clothes (or at least they shouldn't). So what do you do?
Here's my gentle suggestion: Stop trying to answer these abstract questions statistically. I've been using outlandish forms of the word "clutch" to underscore this, in case you haven't noticed, but my point is serious. Use statistics to answer the questions they can. As the field advances, we'll be able to answer more of these questions, but in the meantime, use the same method we've been using all along: subjective observation. Western civilization didn't break down before we had PER. Nothing hinges on who people outside the game think is clutch. And mostly, stop pretending to any degree of certainty in the matter, just because a number is attached to it.
EDIT: Since I'm a fan of Kobe Bryant, one might reasonably wonder whether or not I've got a built-in bias against crunch-time statistics, since almost all of them (except perhaps a raw count of shots made in crunch time, as opposed to efficiency) point to quite a few players as being superior in the clutch. Obviously, I can't deny said bias. Quite possibly I would not be making these same arguments, or making them with quite the same degree of vehemence, if those statistics showed Bryant in a better light.
That being said, however, I don't think the question of using statistics to examine clutchitude should be predicated on how well they accord with conventional wisdom (where Bryant is, indeed, king of clutch). In my opinion, there are quite compelling fundamental arguments that straightforward linear classifiers such as PER or offensive efficiency or wins produced, conditioned on crunch time or not, are simply not reliable indicators of individual performance, and those arguments would remain valid regardless of whether I espoused them, or of whom they revealed to be the top performers, in crunch time or in the game overall.
Labels:
basketball,
Kobe Bryant,
probability,
questionable sanity,
statistics
Wednesday, November 24, 2010
Too Many Damned Monkeys
What do you need more monkeys to do: (a) guarantee the writing of all of Shakespeare's plays, or (b) be able to sink an infinite number of basketball shots in a row? OK, I realize that this is entirely inconsequential, but it actually came up a couple of days ago in what would otherwise have been fairly ordinary coffeehouse conversation, so let me bring you up to speed.
The anchor point is the notion that by having an infinite number of monkeys, each of them sitting in front of a typewriter, randomly typing away, you could guarantee that one of them would surely generate a perfect typescript of Hamlet. Or Macbeth. On the other hand, you'd also guarantee that one of them would generate a "perfect" version of Astrology for Dummies.
What this is really about (since few of us are likely to corral together an infinite number of monkeys) is the so-called cardinality of possible books of arbitrary (but finite) length. Now what's cardinality? The cardinality of a finite set is simply the number of things in the set. So, for example, the cardinality of the U.S. Supreme Court justices is nine, usually. The cardinality of the English alphabet is 26. And the cardinality of the sand grains on the Earth is some almost unimaginably large number. But it's still finite.
Infinite sets are a whole 'nother kettle of fish. Maybe the simplest example of an infinite set is ℕ, the set of natural numbers: 0, 1, 2, ... We use the ellipsis (...) to indicate that the natural numbers go on, forever, without end. There is no last number; in other words, infinity is not really a number in the usual sense. Nonetheless, we might say that the cardinality of ℕ is infinity, which is conventionally denoted ∞.
But in so doing, we would be ambiguous, for as it turns out, there are different varieties of infinity. The infinity of ℕ is the smallest possible infinity, but there are larger infinities. That sounds kind of paradoxical: How could a set go on longer than forever?
Well, let's see if we can construct an infinity that's larger than the cardinality of ℕ. The first thing we might do is add some more numbers to ℕ and see if that yields a set with larger cardinality: we might add in all the negative whole numbers, to get ℤ, the set of all integers. Shouldn't ℤ, which is (naively) almost twice as big as ℕ, have nearly twice as large a cardinality?
No, and here we run into one of the fundamental differences between finite sets and infinite sets. Suppose we divide ℕ into two mutually distinct subsets: O (1, 3, 5, ...) and E (0, 2, 4, ...). Intuitively, both O and E are infinite sets. But if ℕ is the union—the sum set, so to speak—of O and E, is ℕ then doubly infinite?
Mathematicians decided that was too much. So cardinality is defined, less intuitively but more consistently, as follows. We say that the cardinality of the English alphabet is 26, because there are 26 letters in the alphabet. Another way of saying the same thing is that the letters of the alphabet can be placed into a one-to-one correspondence with the set of numbers from 1 through 26: 1-A, 2-B, 3-C, and so on, up to 26-Z. You can try a similar exercise with the U.S. Supreme Court justices.
If we define the notion of cardinality this way, then it follows that two sets have the same cardinality if there exists a one-to-one correspondence between the sets. Somewhat amazingly, then, the set of odd numbers O has exactly the same cardinality as ℕ, because one can define a one-to-one correspondence that matches each number in ℕ with a number in O, and vice versa: 0-1, 1-3, 2-5, 3-7, ..., in each case pairing a number n from ℕ with the number 2n+1 from O. It doesn't matter that one can define a correspondence in which the two sets don't match one-to-one; all that matters it that there exists at least one correspondence where they do match.
Pretty clearly, we can do the same thing with E, matching n from ℕ with 2n from E. So all three sets—ℕ, O, and E—have the same cardinality, even though O and E combine to make up ℕ. The question then arises: Are there infinite sets that can't be matched up one-to-one with ℕ, no matter how you try? We can certainly do that for ℤ, matching up all odd numbers m in ℕ with (-1-m)/2 from ℤ, and all even numbers n in ℕ with n/2 from ℤ.
Well then, what about ℚ, the set of rational numbers—all possible fractions involving only whole numbers in the numerator and denominator? Surely that is a bigger set. But as it turns out, ℚ also has the same cardinality as ℕ, even though there are an infinite number of possible numerators and an infinite number of denominators. This state of affairs has led people to write such semi-sensical equations as
∞ + ∞ = ∞
since O and E combine to make ℕ, and
∞ × ∞ = ∞
since all the infinite pairings of ℕ make up ℚ. (By the way, in case you're wondering, ℕ stands for Natural Numbers, of course; ℤ stands for Zahlen, the German word for number; and ℚ stands for Quotient.)
All right, what about ℝ, the set of real numbers? Can that set be placed into a one-to-one correspondence with ℕ? Based on the way things have been going, you might suppose that they could, but in 1891, the German mathematician Georg Cantor (1845-1918) showed that in fact they could not, that ℝ was a strictly larger set than ℕ.
His argument was clever one, employing proof by contradiction. Suppose, Cantor said, that you could find such a one-to-one correspondence. You could write out a catalogue of real numbers then, as follows:
1 - 0.14159265...
2 - 0.71828182...
3 - 0.41421356...
and so forth. Now, suppose you construct a new number g, using the following process: The first digit of g will be the first digit of the first number in your catalogue, plus one; the second digit of g will be the second digit of the second number, plus one; the third digit of g will be the third digit of the third number, plus one; and so on. We could read out g along a diagonal in our catalogue of real numbers, like this:
1 - 0.24159265...
2 - 0.72828182...
3 - 0.41521356...
So g would be the number 0.225... This number g has an amazing property—it cannot appear anywhere in our catalogue of real numbers. Why not? Because it differs from the first number at the first digit, it differs from the second number at the second digit, it differs from the third number at the third digit, ... in short, it differs from every single number in the catalogue.
We have a contradiction: Either g is not a real number, or our catalogue is not complete as we thought it was. Well, g is clearly a real number, so the problem must lie with the other part—our catalogue is not complete. After all, we only assumed we could create such a catalogue. Since it seems we cannot, no one-to-one correspondence exists between ℝ and ℕ.
You might think that there's a simple way around this, if we simply add g to our catalogue, or rearrange it in some way. But Cantor's diagonalization argument, as it is usually called, would apply just as well to this new catalogue. No matter what catalogue you attempt to compile and amend, there's no way to avoid the construction of a real number that's nowhere in the list. Those two sets fundamentally have different cardinalities. And because of that, we can't use the single symbol ∞ to denote their cardinalities. Instead, mathematicians use the aleph-numbers: The cardinality of ℕ is ℵ0 (pronounced "aleph-null"), and under certain commonly held assumptions, that of ℝ is ℵ1 (pronounced "aleph-one").
So what about all those scripts for Shakespeare? Each of them can clearly be entered into a computer document, which is represented by a finite string of digits in the computer. We can therefore place the set of possible scripts into a one-to-one correspondence with the integers in ℕ, meaning that the set of scripts has cardinality ℵ0, so ℵ0 monkeys would be enough for at least one monkey to write any given script. (In fact, ℵ0 monkeys would write that script.)
But what about the infinite string of makes in a basketball game? These are infinitely long strings of basketball shots (each one with ℵ0 shots), so there would be a one-to-one correspondence between those strings and infinitely long sequences of digits—i.e., ℝ, the reals. So it would take ℵ1 monkeys to guarantee that at least one monkey would shoot any given sequence (in particular, the one sequence consisting of all makes).
I don't even want to know about the bananas.
The anchor point is the notion that by having an infinite number of monkeys, each of them sitting in front of a typewriter, randomly typing away, you could guarantee that one of them would surely generate a perfect typescript of Hamlet. Or Macbeth. On the other hand, you'd also guarantee that one of them would generate a "perfect" version of Astrology for Dummies.What this is really about (since few of us are likely to corral together an infinite number of monkeys) is the so-called cardinality of possible books of arbitrary (but finite) length. Now what's cardinality? The cardinality of a finite set is simply the number of things in the set. So, for example, the cardinality of the U.S. Supreme Court justices is nine, usually. The cardinality of the English alphabet is 26. And the cardinality of the sand grains on the Earth is some almost unimaginably large number. But it's still finite.
Infinite sets are a whole 'nother kettle of fish. Maybe the simplest example of an infinite set is ℕ, the set of natural numbers: 0, 1, 2, ... We use the ellipsis (...) to indicate that the natural numbers go on, forever, without end. There is no last number; in other words, infinity is not really a number in the usual sense. Nonetheless, we might say that the cardinality of ℕ is infinity, which is conventionally denoted ∞.
But in so doing, we would be ambiguous, for as it turns out, there are different varieties of infinity. The infinity of ℕ is the smallest possible infinity, but there are larger infinities. That sounds kind of paradoxical: How could a set go on longer than forever?Well, let's see if we can construct an infinity that's larger than the cardinality of ℕ. The first thing we might do is add some more numbers to ℕ and see if that yields a set with larger cardinality: we might add in all the negative whole numbers, to get ℤ, the set of all integers. Shouldn't ℤ, which is (naively) almost twice as big as ℕ, have nearly twice as large a cardinality?
No, and here we run into one of the fundamental differences between finite sets and infinite sets. Suppose we divide ℕ into two mutually distinct subsets: O (1, 3, 5, ...) and E (0, 2, 4, ...). Intuitively, both O and E are infinite sets. But if ℕ is the union—the sum set, so to speak—of O and E, is ℕ then doubly infinite?
Mathematicians decided that was too much. So cardinality is defined, less intuitively but more consistently, as follows. We say that the cardinality of the English alphabet is 26, because there are 26 letters in the alphabet. Another way of saying the same thing is that the letters of the alphabet can be placed into a one-to-one correspondence with the set of numbers from 1 through 26: 1-A, 2-B, 3-C, and so on, up to 26-Z. You can try a similar exercise with the U.S. Supreme Court justices.
If we define the notion of cardinality this way, then it follows that two sets have the same cardinality if there exists a one-to-one correspondence between the sets. Somewhat amazingly, then, the set of odd numbers O has exactly the same cardinality as ℕ, because one can define a one-to-one correspondence that matches each number in ℕ with a number in O, and vice versa: 0-1, 1-3, 2-5, 3-7, ..., in each case pairing a number n from ℕ with the number 2n+1 from O. It doesn't matter that one can define a correspondence in which the two sets don't match one-to-one; all that matters it that there exists at least one correspondence where they do match.Pretty clearly, we can do the same thing with E, matching n from ℕ with 2n from E. So all three sets—ℕ, O, and E—have the same cardinality, even though O and E combine to make up ℕ. The question then arises: Are there infinite sets that can't be matched up one-to-one with ℕ, no matter how you try? We can certainly do that for ℤ, matching up all odd numbers m in ℕ with (-1-m)/2 from ℤ, and all even numbers n in ℕ with n/2 from ℤ.
Well then, what about ℚ, the set of rational numbers—all possible fractions involving only whole numbers in the numerator and denominator? Surely that is a bigger set. But as it turns out, ℚ also has the same cardinality as ℕ, even though there are an infinite number of possible numerators and an infinite number of denominators. This state of affairs has led people to write such semi-sensical equations as
∞ + ∞ = ∞
since O and E combine to make ℕ, and
∞ × ∞ = ∞
since all the infinite pairings of ℕ make up ℚ. (By the way, in case you're wondering, ℕ stands for Natural Numbers, of course; ℤ stands for Zahlen, the German word for number; and ℚ stands for Quotient.)
All right, what about ℝ, the set of real numbers? Can that set be placed into a one-to-one correspondence with ℕ? Based on the way things have been going, you might suppose that they could, but in 1891, the German mathematician Georg Cantor (1845-1918) showed that in fact they could not, that ℝ was a strictly larger set than ℕ.
His argument was clever one, employing proof by contradiction. Suppose, Cantor said, that you could find such a one-to-one correspondence. You could write out a catalogue of real numbers then, as follows: 1 - 0.14159265...
2 - 0.71828182...
3 - 0.41421356...
and so forth. Now, suppose you construct a new number g, using the following process: The first digit of g will be the first digit of the first number in your catalogue, plus one; the second digit of g will be the second digit of the second number, plus one; the third digit of g will be the third digit of the third number, plus one; and so on. We could read out g along a diagonal in our catalogue of real numbers, like this:
1 - 0.24159265...
2 - 0.72828182...
3 - 0.41521356...
So g would be the number 0.225... This number g has an amazing property—it cannot appear anywhere in our catalogue of real numbers. Why not? Because it differs from the first number at the first digit, it differs from the second number at the second digit, it differs from the third number at the third digit, ... in short, it differs from every single number in the catalogue.
We have a contradiction: Either g is not a real number, or our catalogue is not complete as we thought it was. Well, g is clearly a real number, so the problem must lie with the other part—our catalogue is not complete. After all, we only assumed we could create such a catalogue. Since it seems we cannot, no one-to-one correspondence exists between ℝ and ℕ.
You might think that there's a simple way around this, if we simply add g to our catalogue, or rearrange it in some way. But Cantor's diagonalization argument, as it is usually called, would apply just as well to this new catalogue. No matter what catalogue you attempt to compile and amend, there's no way to avoid the construction of a real number that's nowhere in the list. Those two sets fundamentally have different cardinalities. And because of that, we can't use the single symbol ∞ to denote their cardinalities. Instead, mathematicians use the aleph-numbers: The cardinality of ℕ is ℵ0 (pronounced "aleph-null"), and under certain commonly held assumptions, that of ℝ is ℵ1 (pronounced "aleph-one").
So what about all those scripts for Shakespeare? Each of them can clearly be entered into a computer document, which is represented by a finite string of digits in the computer. We can therefore place the set of possible scripts into a one-to-one correspondence with the integers in ℕ, meaning that the set of scripts has cardinality ℵ0, so ℵ0 monkeys would be enough for at least one monkey to write any given script. (In fact, ℵ0 monkeys would write that script.)
But what about the infinite string of makes in a basketball game? These are infinitely long strings of basketball shots (each one with ℵ0 shots), so there would be a one-to-one correspondence between those strings and infinitely long sequences of digits—i.e., ℝ, the reals. So it would take ℵ1 monkeys to guarantee that at least one monkey would shoot any given sequence (in particular, the one sequence consisting of all makes).
I don't even want to know about the bananas.
Labels:
basketball,
mathematics,
monkeys,
questionable sanity
Friday, September 17, 2010
An Unusual Series
Which may not be all that interesting to you, unless you're interested in recreational math. For lots of you, that may be sort of an oxymoron. (Although, I'm hoping it's less likely among readers of my blog than it would be among the general population.)
Here's the idea. Start with an integer. Add its digits together. If that sum is even, halve the number (not the sum of digits) to get the next number. If the sum is odd, add one to the number.
For instance, suppose we start with the number 10. Its digits sum to 1+0 = 1, so we add 1 to get 11. Those digits sum to 1+1 = 2, so we halve it to get 11/2 = 5.5. Those digits sum up to 5+5 = 10, so we again halve the number to get 2.75. Those digits sum up to 2+7+5 = 14, so we again halve the number to get 1.375...well, I think you get the idea.
On the other hand, suppose you start out with the number 1. Its one digit sums to 1, so we add 1 to get 2. Its single digit sums to 2, so we halve it to get 1 again. Obviously, this series repeats forever: 1, 2, 1, 2, 1, etc.
The first eight numbers, 1 through 8, all end up at that same repeating sequence. The next number, 9, leads immediately to 10, which starts out as I worked out above, and then goes on indefinitely: Each number has one more digit after the decimal point than the preceding number, so the series never repeats, and it never reaches zero, either.
In my limited trials, every integer I've started out with either ends up with the repeating sequence 1, 2, 1, 2, 1, ..., or else it eventually merges with the same series that you get if you start with 10 (or 9, for that matter). So, two questions for those of you who might like to play with this kind of thing:
Here's the idea. Start with an integer. Add its digits together. If that sum is even, halve the number (not the sum of digits) to get the next number. If the sum is odd, add one to the number.
For instance, suppose we start with the number 10. Its digits sum to 1+0 = 1, so we add 1 to get 11. Those digits sum to 1+1 = 2, so we halve it to get 11/2 = 5.5. Those digits sum up to 5+5 = 10, so we again halve the number to get 2.75. Those digits sum up to 2+7+5 = 14, so we again halve the number to get 1.375...well, I think you get the idea.
On the other hand, suppose you start out with the number 1. Its one digit sums to 1, so we add 1 to get 2. Its single digit sums to 2, so we halve it to get 1 again. Obviously, this series repeats forever: 1, 2, 1, 2, 1, etc.
The first eight numbers, 1 through 8, all end up at that same repeating sequence. The next number, 9, leads immediately to 10, which starts out as I worked out above, and then goes on indefinitely: Each number has one more digit after the decimal point than the preceding number, so the series never repeats, and it never reaches zero, either.
In my limited trials, every integer I've started out with either ends up with the repeating sequence 1, 2, 1, 2, 1, ..., or else it eventually merges with the same series that you get if you start with 10 (or 9, for that matter). So, two questions for those of you who might like to play with this kind of thing:
- Is it true that the series for any integer always either ends with the sequence 1, 2, 1, 2, 1, ..., or else merges with the series that starts with 10?
- Consider the series that starts with 10. As we said, it goes on forever, without repeating. What is the average of the numbers in that infinite series?
Neither of these questions can be answered definitively (as far as I can tell) with brute-force computation, although the results might be suggestive. If you do want to try some computations, use an infinite-precision package; our friend Bernie has already tried it with ordinary floating-point numbers (eight-byte doubles, I think), and roundoff error rendered everything after about the 15th number quickly invalid.
P.S. Don't ask me how I got started thinking about the series. It's inspired in part by this guy, but I've already forgotten how I decided to think about this variant.
Wednesday, April 14, 2010
Back, Slash, Back!
Remember this post? Probably not, but now I have some company and/or vindication. Check out this xkcd comic, drawn by the redoubtable Randall Munroe.


Observe: Friends don't let friends say "backslash" in their URLs.
Monday, January 11, 2010
Cutting Your Losses
I was standing at the vending machine at work today, buying some chips with lots of small coins (nickels and dimes). And as I often do, I carefully inserted the nickels first, then the dimes; if I had used any quarters, they'd have come last.
You may—assuming you've read this far—wondered why this is. To be fair, having done this for a long time, I wondered myself for a moment. And then I remembered.
See, when I first started doing this, I was in college. I was living in the dorms. The dorms had vending machines, which were balky, much like anything in the dorms. They would, occasionally, find something objectionable about your change. They were even particular about the way you inserted your change; sometimes, it would take six or seven tries for you to get it to accept a specific dime. I would bring extra change just in case, if I had any, but sometimes even that would run out. So there I would be standing, with 45 cents that the machine was refusing to take, and more money back in the dorm room that I could try out on the Keeper of the Fizzies. But in order to get that money, I'd actually have to back to the dorm room. Away from the vending machine.
I'd run downstairs, get the change, run back upstairs, and hope that in the meantime, no dormitory Grinch had decided to get a 30-cent discount on his Coke.
Because, as it happens, sometimes they would. I'd get back and there would be no credit at all in the vending machine. You might suppose that Whoever It Was would at least leave the credit they had benefited from in change on the side, but noooooo.
That's when this business with inserting change in ascending order of value started. It was a way of cutting my losses. You might think that it would be simpler for me to just push the coin return and withdraw my change before heading downstairs, but in the first place, the coin return lever was balky, like everything else, and in the second place, it had often taken me lots of effort to get those coins in and I was reluctant to relinquish those hard-won gains.
Eventually, I managed to obtain a small dorm fridge and thereafter bought my drinks at the market. But this was before all that. Just the same, I continued my coin-sorting practice even to the present day, where (I daresay) my co-workers are far less likely to stiff me out of a handful of change than my dormmates were.
You know me, always looking for something mathy about the situation, so here's the question: Suppose that I only used n nickels and d dimes (no quarters), that I foolishly brought exact change, and that the vending machine refuses to take exactly one coin, randomly and uniformly selected from all the coins. On average, how much less money did I place at risk going nickels first than I did going dimes first?
The answer: The average reduction in risk was equal to the value of the nickels multiplied by the fraction of coins that were dimes.
I had thought to try to tie this story to something deeper, but I just can't bring myself to do it.
You may—assuming you've read this far—wondered why this is. To be fair, having done this for a long time, I wondered myself for a moment. And then I remembered.
See, when I first started doing this, I was in college. I was living in the dorms. The dorms had vending machines, which were balky, much like anything in the dorms. They would, occasionally, find something objectionable about your change. They were even particular about the way you inserted your change; sometimes, it would take six or seven tries for you to get it to accept a specific dime. I would bring extra change just in case, if I had any, but sometimes even that would run out. So there I would be standing, with 45 cents that the machine was refusing to take, and more money back in the dorm room that I could try out on the Keeper of the Fizzies. But in order to get that money, I'd actually have to back to the dorm room. Away from the vending machine.
I'd run downstairs, get the change, run back upstairs, and hope that in the meantime, no dormitory Grinch had decided to get a 30-cent discount on his Coke.Because, as it happens, sometimes they would. I'd get back and there would be no credit at all in the vending machine. You might suppose that Whoever It Was would at least leave the credit they had benefited from in change on the side, but noooooo.
That's when this business with inserting change in ascending order of value started. It was a way of cutting my losses. You might think that it would be simpler for me to just push the coin return and withdraw my change before heading downstairs, but in the first place, the coin return lever was balky, like everything else, and in the second place, it had often taken me lots of effort to get those coins in and I was reluctant to relinquish those hard-won gains.
Eventually, I managed to obtain a small dorm fridge and thereafter bought my drinks at the market. But this was before all that. Just the same, I continued my coin-sorting practice even to the present day, where (I daresay) my co-workers are far less likely to stiff me out of a handful of change than my dormmates were.
You know me, always looking for something mathy about the situation, so here's the question: Suppose that I only used n nickels and d dimes (no quarters), that I foolishly brought exact change, and that the vending machine refuses to take exactly one coin, randomly and uniformly selected from all the coins. On average, how much less money did I place at risk going nickels first than I did going dimes first?The answer: The average reduction in risk was equal to the value of the nickels multiplied by the fraction of coins that were dimes.
I had thought to try to tie this story to something deeper, but I just can't bring myself to do it.
Monday, August 3, 2009
Slashed Back
I'd like to call your attention to our latest scourge: Well-meaning radio announcers who, while reading out URLs in commercials, refer to the ordinary slash (/) as a "backslash." Why they feel compelled to even use the word "backslash," goodness only knows, since most people only ever come into contact with the ordinary slash; the backslash is almost exclusively used by DOS and LaTeX heads.
We now return you to your regularly scheduled rant.
We now return you to your regularly scheduled rant.
Saturday, June 27, 2009
Do Not Pass Text Design, Do Not Collect $200
A long time ago (I won't say just how long, but it'll soon become fairly obvious), I worked my first summer job at a computer-controlled font engraving place in Mountain View called Xybergraphics. Lots of stories from that summer, which I'll eventually get to when I want to talk about what happens when a 95-pounder drinks 42 ounces of caffeine-laden soda pop, or the beginnings of my fascination with the Police, or what a cubic spline is.
At any rate, my job, which paid me the princely sum of $2.85 each hour (workers under 16 could be paid somewhat under minimum wage), required me to encode fonts for the aforementioned computer-controlled engraver. Typically, the engraved letters would be in the neighborhood of an inch or two in height, but for better precision, the letterforms I worked from, designed by my immediate supervisor, were about 14 inches tall and drafted in pencil on vellum. My job was to take a mouse (this was before the Mac, mind you), and trace along the letterforms, clicking at appropriately spaced points, until the letter was entirely traced. A simple letter, like a capital I, might require 50 points; a more involved letter, such as lower-case m, might require as many as 150. This was a tedious and time-consuming job, you could well imagine.
But I'm nothing if not efficient at boring tasks, especially if I've got my tunes in the background, and in the meantime, I learned quite a lot about fonts—what they should look like, how features are shared in common by various letters, what design rules not to break, and so forth. All this that I learned is both fascinating (to me) and almost entirely useless, which means that it has lodged tight in my memory banks and won't budge.
As a result, I'm exceptionally sensitive to bad typography. For example, I was walking one day in the Denver airport, waiting for my next flight, when a store sign caught my eye. Bad Typography Alert! The capital A in the sign was reversed; its broad stroke went down to the left, rather than to the right, as it should in traditional serifed fonts. And this on the sign for a stationery store! I think you will properly apprehend the depth of my mania when I tell you that I actually reported it to the clerk. She seemed quite receptive to my complaint, although she probably promptly forgot about/rejected it as soon as I turned my head.
There's a similar problem with one of the signs where I work—the name of the building has a capital V in it, with its broad stroke, again, going down to the left. Alas, this is welded on and probably unmulliganable.
But my encounter with the very bottom, the absolute worst, came when I began frequenting a supermarket that opened near our house. There was little wrong with the typography at the supermarket, but across the street was this abomination:

At any rate, my job, which paid me the princely sum of $2.85 each hour (workers under 16 could be paid somewhat under minimum wage), required me to encode fonts for the aforementioned computer-controlled engraver. Typically, the engraved letters would be in the neighborhood of an inch or two in height, but for better precision, the letterforms I worked from, designed by my immediate supervisor, were about 14 inches tall and drafted in pencil on vellum. My job was to take a mouse (this was before the Mac, mind you), and trace along the letterforms, clicking at appropriately spaced points, until the letter was entirely traced. A simple letter, like a capital I, might require 50 points; a more involved letter, such as lower-case m, might require as many as 150. This was a tedious and time-consuming job, you could well imagine.
But I'm nothing if not efficient at boring tasks, especially if I've got my tunes in the background, and in the meantime, I learned quite a lot about fonts—what they should look like, how features are shared in common by various letters, what design rules not to break, and so forth. All this that I learned is both fascinating (to me) and almost entirely useless, which means that it has lodged tight in my memory banks and won't budge.
As a result, I'm exceptionally sensitive to bad typography. For example, I was walking one day in the Denver airport, waiting for my next flight, when a store sign caught my eye. Bad Typography Alert! The capital A in the sign was reversed; its broad stroke went down to the left, rather than to the right, as it should in traditional serifed fonts. And this on the sign for a stationery store! I think you will properly apprehend the depth of my mania when I tell you that I actually reported it to the clerk. She seemed quite receptive to my complaint, although she probably promptly forgot about/rejected it as soon as I turned my head.
There's a similar problem with one of the signs where I work—the name of the building has a capital V in it, with its broad stroke, again, going down to the left. Alas, this is welded on and probably unmulliganable.
But my encounter with the very bottom, the absolute worst, came when I began frequenting a supermarket that opened near our house. There was little wrong with the typography at the supermarket, but across the street was this abomination:

This signage is simply staggering in its wrongness. It's hard for me to convey just how staggering, but the fact that you're reading this post is some indication. Click on the image to see an enlarged version and look at this tangle of thorns.
Practically any letter that could have been misplaced, was, and those that weren't, seem to have been correctly placed to highlight how wrong their identical partners were. To wit: The E in GERMAN is upside-down. The M and A in the same word are backwards. Unbelievably, the N is correctly placed. A mistake must have been made.
In CAR, the C is upside-down. The A is backwards. After the bad E in GERMAN, the E's in SERVICE are right, but the S and the C (again!) are upside-down, and the V is backwards.
The M in BMW is backwards. The W is very strange, it seems to have been made with a pair of leftover V's, both with one stroke broken in half. If so, they should have broken the other stroke on the right half, but I'll give them credit for showing some resourcefulness.
The horror continues in Volkswagen. This V is correct (what happened to the V in SERVICE?), but the l is backwards, the s is upside-down, and the w and even the g (!) are backwards again. How do you screw up the g? The lower-case s is upside-down again in Porsche, and the lower-case c joins its capital brethren in being inverted also.
The Audi is correct, but is set in a narrower font. Must have been added on later.
Considering that many of the letters couldn't have been placed incorrectly (either because they're totally symmetrical or totally unsymmetrical), the percentage of letters placed incorrectly runs at about 15/22 = 68 percent, by my reckoning. A dolphin without opposable thumbs flinging letters up randomly with its tail could have done better.
OK, I realize that I'm probably clinically unhinged on this point, but can we agree that someone screwed up royally here? I mean, please.
Subscribe to:
Posts (Atom)


