If a random number generator generated random numbers between 1 and 5 (including both) until it generated a 5, what is the chance that no number before then will have been generated more than once?

Printable View

- Oct 7th 2008, 12:57 PMObsidantionRandom Number Generator
If a random number generator generated random numbers between 1 and 5 (including both) until it generated a 5, what is the chance that no number before then will have been generated more than once?

- Oct 7th 2008, 01:21 PMicemanfan
It should be clear (by the pigeonhole principle) that the five must be generated no later than fifth in the sequence if each other number is to have been generated only once.

Then either the five is generated first, second, third, fourth, or fifth.

P(1) = 1/5

P(2) = (4/5)x(1/5)

P(3) = (4/5)x(3/5)x(1/5)

P(4) = (4/5)x(3/5)x(2/5)x(1/5)

P(5) = (4/5)x(3/5)x(2/5)x(1/5)x(1/5)

Just add up the probabilities from there. - Oct 21st 2008, 05:01 AMObsidantion
Nice one. I think this is correct.

- Oct 22nd 2008, 12:22 AMCaptainBlack