Where I live, car licence plates have seven digits. I spend about 4 hours a day locked inside my car, and have invented a game looking for palindromic numbers, rewarding myself with a personal prize on any day I find one.
I have computed the probability for this on the following basis.
Breaking the 7 digits into three sets AB-CDC-BA.
Now, I figure that there is a one-in-ten chance that the middle set CDC will be a palindrome (which of course is a necessary condition for the whole number to be palindromic). This is based on the assumption that if you take any two numbers, the chances of a random selection matching will be 1/10.
Then taking the first pair AB, there’s only one pair in a hundred that will be BA, so my chances are 1/100.
Overall, therefore, I have 1/10 * 1/100 chance of finding the required number. If I can check one car every 6 seconds, I should be checking 46010 cars per day, and I should find more than one every day - 2.4 to be exact.
But … so far after one month of playing, I have only found 5. What’s wrong with my logic:eek:
First, I am moving this thread to General Questions, since it doesn’t seem to relate to any particular Staff Report.
Second, depending on what state you are in, license plates are not necessary issued at random.
There are usually “vanity” plates, where a person can request a specific number or number/letter combination. Thus, numbers are not issued at random. Requested numbers like birthdates don’t have equal chances of being palindromic, until we have a lot more than 12 months, or 31 days in a month.
I find your estimate of the number of plates you are checking to be suspiciously high. Next time, try just counting just the number of cars whose plates you are looking at.
How are you watching cars? Is your car parked and you are looking at plates of cars going by, or are you on the move? If you are on the move, you may have many duplicate plates from cars moving parallel to you (a specific car passes you, and then at the next stoplight you pass that same car, and you see it twice… or more, depending on driving circumstances)
Those are my thoughts, just off the top of my head.
Assuming C is inequal to D, I calculate the chance of finding a middle palindromic triple is not 1/10, but 9/100 (10/10 * 9/10 * 1/10).
If A, B, C, and D are distinct numbers then the odds of finding a palindromic number of form ABCDCBA are 10/10 * 9/10 8/10 * 7/10 * 1/10 * 1/10 1/10 which reduces to 63/125,000.
Actually, your odds of finding palindromic numbers are greater than that because they can take the forms ABBBBBA, ABCCCBA, etc., but my math skills have been strained enough.
rampisad: your calculation of the probability of choosing a palindromic number at random (i.e., all seven digit numbers have equal probability) is correct. However, for the reasons that Dex mentioned, and for the fact that most states issue license plates in sequential order, the distribution of license plate numbers is far from random.
Your counting is accurate for determining all the seven digit palindromes if the numbers are allowed to begin with 0 - choose anything you want for the first 4 digits - this determines the last 3. This gives you 10000 palindromes out of the 10000000 possible numbers between 0000000 and 9999999, or 1/1000 that a randomly chosen 7 digit number is a palindrome. If you insist that numbers cannot begin with 0, it changes things a bit, and I leave it as an exercise for the reader - you will still have 10000000 7 digit numbers from 0 to 9999999, but won’t consider something like 0023200 legal, having to represent it as a non-palindromic 23200 instead.
However, as already observed, the distribution of license plate numbers is probably NOT random, and the reasoning does not apply.
In this case, 0023200 is different from 23200. We’re not looking at decimal representations, but strings over the alphabet {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}.
Don’t the license plates where you live include letters as well? They do here in California, which would drastically reduce the odds of palindromes (I think).
If you’re looking for a seven-character string over the alphabet {0, …, 9, A, …, Z}, you have 36 choices for each of the first four characters, and one for each of the last three. 36[sup]4[/sup] in total, and 36[sup]7[/sup] possible combinations. The odds do go down.
For strings over an alphabet of n characters, there are n[sup]ceiling(k/2)[/sup] palindromes of length k. Divide that by n[sup]k[/sup] to get the probability of picking a palindrome at random. As either n or k goes to infinity, the probability goes to zero.
Thank you for all those thoughts. The only one I can take issue with is The Peyote Coyote, mainly because there is no significance to the middle number of the seven digits - whether it is the same as or different to it’s neighbor doesn’t affect in any way the probability that the one on the other side will be a match. (In other words 555 has exactly the same probability as 545. The only condition in which the middle number could affect the probability is if there was a finite quantity of each number in a pool, so that by taking one match out of the pool, you were reducing the probability of that number coming up again.)
My thanks especially to CK for correcting the bad initial posting, and for his observation about the difference between traffic flowing with me as opposed to against me - obviously very true.
As for the general contribution about non-random numbers - I don’t live in the States, and ther’s no chance of “polluting” the numbers through choice by the owner. It also is not possible to have a number beginning with 0, but by my reconning that should not affect the overall computation of probabilities.
Rampisad. I said my calculations were for palindromic numbers where A, B, C, and D are distinct numbers, i.e. 1, 4, 6 and 9. In that case, the middle digit does make a difference. I also implied, but did not state clearly, that it does not matter what number begins the string.
Ramispad, sorry, I guess I assumed you were somewhere in the States.
My comments about the number of independent observations you are making would still apply. But my comments about “vanity” plates must be modified somewhat.
Are all license plates exactly seven digits?
And even so, I have to think that the government does NOT just produce plates at random. “Official government cars” for instance, might have special numbers (such as, the mayor gets 001 or something silly like that), and if you live in the capital city or are driving where there are lots of government cars, you would get this distortion.
The government might also have its own rules about what constitutes a legitimate number (excluding 666’s, say, or excluding 7734 or not allowing more than 3 sequential repetitions of a digit, or whatever.)
Their is an easier way to look at number palindromes conceptually. Foir example assume a 7-digit palindrome ABCDFGH. There are 1000 combinations of FGH (000-999). Since the number is 7-digit, the middle digit D can be any value. For every FGH (1000 of them) there is exactly one and only one ABC which is a palindrome of FGH. Thus, there are 1000*10 (times 10 because the middle digits can be any of 10) or 10000 palindromes of 7-digit numbers. Or a 10000/10000000 = 1/1000 chance of a palindrome This is obviously easily extendable to any n-digit number.
If we don’t allow an ending zero (and thus beginning zero) then there are 900 (take out one-tenth of 1000 FGH) combinations of FGH, and thus 900*10/10000000=0.9/1000 chance of a palindrome, only slightly less.
> If I can check one car every 6 seconds, I should be checking
> 46010 cars per day, and I should find more than one every
> day - 2.4 to be exact.
This can’t be right. Are you driving the car? How can you do that while you’re looking at a license plate every six seconds? Even if you aren’t driving, I don’t believe this. Doing something like this that takes 20 hours a week of extreme concentration would be difficult even for someone who’s pretty obsessive. (You only do this Monday to Friday, right?) Furthermore, a new car is not going to pass you every six seconds. On my commute to work, which is mostly on a moderately crowded highway, I pass a new car about once every thirty seconds to a minute. Remember, you spend most of your time keeping up with same cars.
I suspect that you’ve overestimated the number of cars you see each day by a factor of 10. You would thus expect to see only about .24 palindromic license plates a day. In a month there are about 20 weekdays, so you would expect to have seen about 20 * .24 = 4.8 palindromic license plates. So 5 plates is just about right.
I have spent today adding the number of cars I see, and admit to a gross over-estimation. Forgive me! 6 per minute is optimal, not actual over any extended time.
Free the rampisad n+1 (where n is an positive integer or zero)!
Free the rampisad n+1 (where n is an positive integer or zero)!
Free the rampisad n+1 (where n is an positive integer or zero)!