Wikipedia:Reference desk/Archives/Mathematics/2009 December 7
Mathematics desk | ||
---|---|---|
< December 6 | << Nov | December | Jan >> | December 8 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
December 7
editrandom 8 digit number reads the same both ways
editIf I were to take a random 8 digit number, what are the odds that it will read the same forwards and backwards like the below examples
- 14455441
- 00299200
- 98855889
Is it 1/100,000? Googlemeister (talk) 19:36, 7 December 2009 (UTC)
- Assuming it is uniformly chosen, you just want the last four digits to fit with the first four. You have to guess four digits, not five; your answer would be ok in the 10 digits version. --pma (talk) 19:46, 7 December 2009 (UTC)
- Ah so 1/10,000 then, or 1/9,999 depending on if 00000000 would be valid or not. Googlemeister (talk) 20:05, 7 December 2009 (UTC)
- If 00000000 is not in the big pot where you pick the number from, I'd say that the probability has to be a bit smaller, not greater, than 1/10,000 (how many palindromes are there among the 108-1 numbers then? Btw 99,999,999=9,999*10,001)-- pma (talk) 20:14, 7 December 2009 (UTC)
- The best way to answer these sorts of questions is by using combinatorics. E.g. the total number of 8-digit numbers is (9 possibilities for the first digit (1-9), 10 for the rest (0-9)) 9*10*10*10*10*10*10*10 = 90 000 000. The number that read the same forward and backward are (9 for the first digit, 10 for the second through fourth digits, and then only 1 for the fifth through eighth digit, as they have to match the fourth through first digits) 9*10*10*10*1*1*1*1 = 9000. So 9000/90 000 000 = 1/10 000. You can use the same reasoning for more complex calculations, for example, the percentage of even four digit numbers where the second digit is twice the first, and the third is a prime number: 4*1*4*5 = 80 (1-4, can't be higher because then the second digit wouldn't be twice);(fixed by first digit);(2,3,5,7);(0,2,4,6,8) numbers which match the criteria out of 9*10*10*5 = 4500 total even four digit primes, for a probability of 80/4500 ~= 1.8% -- 128.104.112.95 (talk) 22:31, 7 December 2009 (UTC)
- Whoops, missed that you considered 00299200 to be a eight digit number. But the calculation is straightforward to rectify: (10*10*10*10*1*1*1*1)/(10*10*10*10*10*10*10*10) = 1/10 000. If you don't want to include 00000000, you need to remove it from both the numerator and denominator (because it otherwise "fits" both categories): (10*10*10*10*1*1*1*1 - 1)/(10*10*10*10*10*10*10*10 - 1) = 1/10 001 -- 128.104.112.95 (talk) 22:38, 7 December 2009 (UTC)
- To answer the OP: The odds are 9,999-to-1 against. There are 100,000,000 eight digit strings (00000000 through to 99999999). As pma says, for a palindromic string, you chose the first four digits and the next four are given by the first four in reverse order. There are 10,000 choices for the first four digits (0000 through to 9999). There are 10,000 palindromic strings, and 100,000,000 − 10,000 = 99,990,000 non-palindromic strings. The odds are given by (# non-palindromic strings)-to-(# palindromic strings) against, i.e. 9,999-to-1 against. ~~ Dr Dec (Talk) ~~ 15:50, 8 December 2009 (UTC)