Sample Question #269 (probability theory)

You roll a normal dice three times in a row. What’s the probability that the second roll gives a number larger than the first roll, and the third roll gives a number larger than the second roll? I.e., roll 1 < roll 2 < roll 3.

[Source: real interview question]

### Like this:

Like Loading...

*Related*

ANSWER

When I first saw this question at an interview, I freaked out. Don’t let that happen to you: always try — just try! — to remain calm, no matter what question you have to face!

Ok, if you roll a dice three times, there’re a total of 6x6x6=216 possible outcomes. We need to find out, then, how many of these outcomes satisfy roll 1 < roll 2 < roll 3. I have not figured out a mathematical formula for counting them, but the brute-force method works well in this case: just list all the possible outcomes that satisfy the condition. There’re a total of 20. So the answer is 20/216, or about 9.26%.

The mathematical formula is nCk.n=6 is the number of sides on the dice.k=3 is the number of rolls.There are 6C3 = 20 ways to pick 3 numbers out of 1,2,3,4,5,6 without repetition.Each gives you a unique i<j<k

Nice solution the last one ( a neat solution is always appreciated best).OR, if you took calculus II or something in college (or even in high school) you can simply calculate a triple sum over i, j and k of the constant function where the index i runs form 1 to 6, j runs from i+1 to 6 and k runs from j+1 to 6. 2 lines later gives you the answer: 20. Q.E.D. Yanis