Let me see if I can work through this.
Player 1 wins based on the following series:
Chance to get a 1 (turn 1): 1/6 Chance to be allowed to roll: Previous chance to be allowed to roll * 5/6 (Chance player 1 didn't roll a 1) * 5/6 (Chance player 2 didn't roll a 6) Chance to get a 1 (turns 2+): Chance to be allowed to roll * Chance to get a 1
So... summation( 1/6 * (25/36)^(n-1) )
I don't know what that comes out to be.
It's actually 1/6 * Sum_n (5/6)^2n = 1/6 * 1 / (1 - 25/36) = 6/11. The first move provides a small advantage, as intuition dictates.
Re:Ask HN: FizzBuzz for mathematicians ...
by stephencanon on Saturday July 14, 2012 @12:17PM
(#4244566)
I like this one. It can be brute-forced easily enough, but there are also a couple much more elegant approaches that I would expect a good mathematician to produce.
Re:Ask HN: FizzBuzz for mathematicians ...
by hypeibole on Saturday July 14, 2012 @12:00PM
(#4244500)
As a mathematician I'll be interested in knowing why you ask that question to people with math degrees.
What information does that give to you as an interviewer?
It tells me if they can at least minimally apply their knowledge and reason about a problem. It's a filter question. If a person with a college degree in math cannot solve this, what's the likelihood they will be able to solve an actual real problem I need them to work on?
Two players play a game with a single six-sided die. The player that starts can only win by rolling a 1. If he or she doesn't win, the other player gets to roll; he or she can only win by rolling a 6. The game continues until one player wins. What's the probability the first player wins (eventually)?