Friday, October 20, 2006

I'm going to count from 1 to 1000 while I'm driving

Richard Herring's excellent website introduced me to the strange world of CNPS: that is Consecutive Number Plate Spotting. He explains it better and funnier than I can here, but as a pointless longwinded harmelss taks, I felt inspired as I read. He took a year to spot the 1,000 numerical elements of number plates in the right order.

In trying to work out whether that was a good or bad time, I started looking at the probability, assuming at the start that there was a random distribution of numbers. My first approach was to think in terms of the probability that the next car would have the number required (1 in 1000 or 0.1%), or the second (1 in 999 or a tiny bit more than 0.1%), but then I realised that if I ignored duplicates, there was an elegant solution: for a given number (say 123), it could be encountered anywhere between 1st and 1000th, which neatly gives a mean order of 500th. So in order to complete the challenge, you might expect to have to see 500 x 1,000 = 0.5 million cars (about all the cars in Wales).

Thinking about the question of duplicates, it doesn't actually matter that much if there is a peak (say 100 extra cars with 101 in the number): it would mean that searching for 101 will be much quicker, but on the other hand other numbers would take longer to find since there would be extra 101 duplicates to go through. As far as I can, see this cancels out.*Update below

More problematic, and what gives the game its urgency and charm, is that the world has changed. In 2001, the old three-random-digit number elements plus year-denoting letter were replaced by a two-digit number denoting year + letters, which makes 01-06 easy to do, but also means that the pool of larger numbers is restricted to older cars : it may already be the case that there are no longer any cars with some numbers on the road, and there is no way to find out.

There is an odd apsect to the way the statistics work: it doesn't actually matter how long you spend looking on any particular day: fatalistically, if you only see 300 cars you're unlikely to see the number you need, but then, you might see 900 and still not see it.

There is, at a low level, a bit of the thrill of gambling: you sink into a depressed torpor as one wrong number after another flies by, until suddenly you see the one you need: surprise and joy, almost disbelief, lasts for a few seconds, and then it fades, you switch to the new number, hoping this time it'll be quick... in its own way, it's as addictive as nicotine.**Update below


UPDATES

* This is wrong, further thought has shown. The initial assumption is that there are 1000 numbers, equally distributed, and therefore there is 1/1000 = 0.1 % chance that any given number will be that required. If we then inflate the figure by making 5 numbers represented by 200 rather than 1 per thousand, then the likelihood of 995 numbers when being searched for is 1/2000 = 0.05%, and the likelihood of the five numbers is 200/2000 = 10%. Unfortunately, the higher probability only operates when looking for those five numbers; for all the other 995, there are more, twice as many, wrong numbers to go through. So no, it doesn't cancel out, it makes it harder.

** Having gone through this a few times now, and not being a gambler, I can see why they go on about lucky streaks. After initial hope, you fall into a stupor of near-despair- is that number ever going to come up? That's why, when it does, it is as much a surprise as a joy. Now comes the critical point: any logical view would be that having just won, you are almost bound to endure the long period of loss before you win again, and therefore you would think twice about betting again. Except the voice of hope tells you that you are on a roll, that no way will it be so long to the next win, it's worth trying for a bit at least-- and then in no time at all you have lost so much that it would be foolish to give up when you were 'due' a win again. My view on gambling is that you should look carefully at the people who want you to do it: experienced gamblers, gambling companies, the government. Do these often give away money?

No comments: