AG and SG both study in the same class. They are mad in love of Katrina , one of their prettiest classmates. Katrina also is fond of their intelligence and smartness.
So, on the upcoming Valentine's Day, they plan to have a date with Katrina. They fight with each other to go with Katrina on a date. Katrina listens to their fight and tries to calm down the matter.
Katrina: Hey, let's not fight over it!
SG: But I want to go with you on a date.
AG: I also want to go.
Katrina: I have an idea. Let's play a game. I have a pile of coins and I will give you any number of coins ranging from to . You can take out coin, coins or half of the pile of coins. You have to take turns to take out the coins. The one who takes out the last coin wins the game. Since I am a huge fan of your intelligence, I will go with the one who wins the game. SG will make the first move. So, are you ready guys?
AG: Sounds interesting!
SG: Let's play AG !!
Katrina will randomly choose how many coins to give to AG and SG . If both the players play optimally and intelligently, let the probability of AG to go on a date with Katrina is where and are coprime positive integers. Find .
Details and Assumptions:
If the number of coins chosen by Katrina is odd, then the players can't take out half of the pile of coins. They can take out only or coins.
Bonus points for identifying AG and SG .
.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If there are 1 or 2 coins, SG wins;
If there are 3 coins, the number of coins becomes 1 or 2 after SG takes his move, so AG wins;
If there are 4, 5 or 6 coins, SG can make it 3 so he wins;
If there are 7 coins, AG wins;
If there are 8, 9 or 14 coins, SG wins
......
From the analysis we can see AG wins if there are 3 coins or the coins number has the form of 3k+1, where k is an integer more than 2.
In fact, when there are 3k+1 coins, no matter what SG does, it becomes in the form of 3k or 3k+2. AG can take 1 or 2 coins to make it again in the form of 3k+1. After some turns there will be 7 coins in the pile after SG takes some coins. In this case AG wins.
If the coin number has the form of 3k or 3k+2, SG wins by taking 2 or 1 coin.
Hence, the probability AG wins is 33333/100000. The answer is 133333.