Oregon licence plates consist of three letters followed by a three digit number (each digit can be from [0..9]).
While driving to work Seth plays the following game:
Whenever the numbers of two licence plates seen on his trip add to 1000 that's a win.
E.g. MIC-012 and HAN-988 is a win and RYU-500 and SET-500 too. (as long as he sees them in the same trip).
Find the expected number of plates he needs to see for a win.
Give your answer rounded to 8 decimal places behind the decimal point.
Help me /sci/, it's from project Euler.
Does he win when the order of spotted plates is: 100->500->900?
>>8043405
No, when numbers of TWO licence plates add to 1000 he wins.
So, first plate is random
second wins 1/1000
third 1/1000
n-th 1/1000
Distribution is random, so on average he's gonna find 1000 after 50% of plates?
>>8043447
No it increases with the number of plates, because any n-th plate he sees can add up to any previously seen plate. So the chances increase with number of plats he sses.
>>8043447
By the time he sees the second car his chances have already doubled, since that one is in the pool now as well. Third car is thus 2/999, fourth is 3/999 etc.
This means 1+2+3+...+n=999 where n is the amount of cars needed. Not sure if there is a simple way of solving it though.
and is 1000 not 999 bruh
>>8043447
You're not taking into account that the second and the third could win... etc.
Chance of finding second number that works: 1/999 3rd number that works with either of those numbers is 2/999 unless the number you found was the same then it is still 1/999 and the chance the number is the same would be 1/999 so there are two conditions
37.74565452
>>8043372
I bet everyone ignores the letters on the plates even though it is actually relevant. Two license plates can't have the same letter/number combination. This means that a license plate with 500 is slightly less likely to be matched, because this requires another plate with 500 but with a different letter combo. Plates that don't have 500 can be matched with plates with the same letters.
>>8043372
OP here, the result is 40. with decimals behind it, what I cant figure out is how to get it
>>8043574
2/10^3+3(1-1/10^3)(2/10^3)+4(1-1/10^3)(1-2/10^3)(3/10^3)+...
>>8043625
Can you explain the set, I know it's elementary but I just don't know enough probability to follow.
998001