An army of k knights is going to try to kill an evil dragon. The dragon has h heads, and the knights must cut off all his heads one by one to complete their mission. Their fight will go as follows:
First, the dragon will attack the knights as many times as he wants (as long he still has at least one head). Each time the dragon attacks, he will either kill one knight with a probability of probDragon or lose one of his heads otherwise. Of course, the dragon may choose not to attack any knights at all. After these attacks, the dragon will return to his cave, and the knights will attack him one by one. When a knight attacks, he will either cut off one of the dragon's heads with a probability of probKnight or get killed by the dragon otherwise. Each knight only gets one turn, so if he cuts off a head, he can NOT attack the dragon again.
If all the dragon's heads are cut off at any point in the fight, the knights' mission will be successful, and the surviving knights will return home with glory. Otherwise, the knights will all be dead and the dragon will still have at least one head on his wide shoulders. Assuming that the dragon acts optimally (tries to maximize the probability of staying alive), return the probability that the knights will complete their mission successfully.
|