shantanushanto's blog

By shantanushanto, 10 years ago, In English

Can anyone please help me to understand the solution of this problem?
ZOJ: 3329: One Person Game
Solution link

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Define f(x) as the expected number of dice rolls if the current number is x. We can express f(x) in the form f(x) = k + a·f(0). Then when we get to f(0) we can use simple algebra to solve for the answer: