dimanche 5 novembre 2017

Probability of A winning the game?

There are 2 players , say A and B . There are m+n+1 cards and A gets m cards and B gets n cards. 1 card is left behind. A personality is linked with each card. The game begins as A begins to guess the left out card . If B has the card, he has to show the card. Else the judge checks the result if A is sure of his guess. Next turn goes to B . The game proceeds in this way. Now , what is the probability that A will win ? The probability must be accurate to 9 decimal places.

input

5 // the number of cards taken by A

5 // the number of cards taken by B

Output 0.500000000 // Probability

What I have tried:

Consider A has 5 card B has 5. A know beforehand that the card is one of remaining 6 cards similarly B also know that the card is one of 6 cards. Now A starts guessing suppose A guess it wrong it's chance of B so it's like AB -> AB ->AB ->AB->AB->A but in 6th turn A would surely guess it right !! so this clearly means A has greater probability to guess it correctly how could the answer be 0.5 ??

2nd thought:

is it something like bcz A and B both have to guess 1 card out of 6 so probab is 1/2 ??

Aucun commentaire:

Enregistrer un commentaire