Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

12585 — Poker End Games

Правка en1, от rasen__shuriken, 2019-09-21 16:58:17

Problem : Uva 12585

Lets say Alice has $a and Bob has $b, let c = min(a,b). In every round they will bet $c, whoever wins the round get $c . The game stops when Alice or Bob has no money to play. we have to find the expected number of rounds will be played for given a and b.

My Idea was to find answer for DP[a][b]=0.5*(DP[a+c][b-c] + 1)+ 0.5*(DP[a-c][b+c] +1 ).But as we see if a!=b , there always will be cycle. I need help to eliminate this cycle.

TIA

Теги #probabilities, expectation value, #dynamic programing

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский rasen__shuriken 2019-09-21 16:58:17 583 Initial revision (published)