The rules of the game: 1. All round into a ring; 2. All the people may encounter one of his current side two people and fight with him, and will only live a person; 3. Eliminate were removed from the ring (i.e. A - B - C - D - A ring, A beat B, if A side becomes C or D); 4. All duel sequence is random; 5. In the end only one survived, and
So now we know that all of the two fight winner relational tables, ask a duel order under the condition of random, how many people may eventually survive?
This requires the use of dynamic programming in, what kind of problem, this belongs to the dynamic programming is a little didn't mind,,
CodePudding user response:
Not to say only live all alone, how subject still ask how many people may eventually survive