In general, let's assume there are r red cards and b black cards, and the expected earning using the optimal strategy is e(r,b), then we have: e(r,b) = e(r-1,b)*r/(r+b) + e(r,b-1)*b/(r+b) with boundary condition: e(r,0) = r; e(0,b)=0 Then we can calculate e(r,b), and stop the game when e(r,b)<=0, where r and b are the number of cards remaining in the deck. |
Good try. But I think the equation shoud be e(r,b) = max{[e(r-1,b)+1]*r/(r+b) + [e(r,b-1)-1]*b/(r+b),0} |
I think you are right. |
It's a good answer. But can you figure out what should be the optimal strategy? |
欢迎光临 珍珠湾ART (http://66.160.158.134/) | Powered by Discuz! X3 |