Random Numbers with Constraints
Probability puzzles require you to weigh all the possibilities and pick the most likely outcome.
Generate two random numbers from 1 to 9, inclusive. Call them n1 and n2. What is the probability that  n1  n2  > 5?
Answer
12/81
Since you are making two choices of 9 numbers each, there are 81 total possible combinations (9 x 9).
The only combinations that have a difference greater than 5 are:
9 and 1, 2, or 3
8 and 1 or 2
7 and 1
This makes six combinations, but you also have to take them in the reverse order (i.e. 1 and 9 is a different combination than 9 and 1). This makes a total of 12 possibilities, making the probability 12 in 81.
Hide
Comments
Cakey1987
Sep 14, 2003
 Huh? Oh wait...  means absolute value. It's been so long that I forgot about that. 
jimbo
Sep 15, 2003
 I like that. Simple but makes you think. Do me another one! 
Katelin
Dec 02, 2003
 I liked that one, too. You can simplify 12/81, I think. 
Poker
Aug 01, 2004
 Yes, you can. To 4/27. 
seanlandrews
Nov 07, 2005
 I only came up with half as many. 91 is greater than 5, but 19 is not. 
brainjuice
Mar 27, 2006
 i think that isn't called combination. if 19 is the same as 91 then it is combination. but if 19 is not the same as 91 then it called permutation. 
javaguru
Dec 17, 2008
 The answer is 9/64 = 0.140625.
The answer 12/81 (0.148148148...) WOULD be correct IF the problem had stated two random integers instead of two random numbers.
With two random numbers, it's only possible for the difference to be greater than 5 if the lower number is less than 95 = 4 and the higher number is greater than 1+5=6. Each of these has a (41)/(91) = 3/8 probability. Either the first or second number can be in the low range, giving a (3/^2 * 2 = 18/64 probability. Of these cases, if n is the low number then the probability varies with from 1 to 0 as n moves from 1 to 4. This gives an average probability of 1/2, so the probability that n1  n2 > 5 is (18/64)*(1/2) = 9/64. 
javaguru
Dec 17, 2008
 Arrg! Of course instead of the smiley face above it should read [3/8]^2*2 = 18/64 
Back to Top
 

Follow Braingle!