Tuesday, September 24, 2013

Mathematics Problem: Games reaching a number



A number is given as a goal and two persons, in turn, will add any single-digit number start from 0 until they reach the number. The first person who reach the number will win the game. Develop a system that will allow you to win if you go first each game.
Solution:
We have single-digits 1 – 9. In order to win the game, we cannot let opponent has options to add 1-9 digits in the final stages before reaching the number. Take for example, given 37 as the goal, then in the end, you have to reach number 27 first so that your opponent will not has options to win the game with any digits. Furthermore, any number your opponent chooses, you will have chance to end the game. We can say that the first person who gets 27 will win the game. Therefore, you cannot let opponent has 27 first. It means you have to get 17 as soon as possible too. Before getting 17, you have to reach 7 first. So, since you go first then to win the game you should start from 7.

for example:
A and B now gonna start a game to reach 51. A get the first turn..
A: 1   sum 1
B: 8   sum 9
A: 2   sum 11
B: 7   sum 18
A: 3   sum 21
B: 1   sum 22
A: 9   sum 31
B: 5   sum 36
A: 5   sum 41 -----> B have a problem
B: 9   sum 50  ---> have no choices
A: 1   sum 51
A is the winner..

Do you have any questions?

No comments:

Post a Comment

Penulis mengharapkan komentar, kritik, dan saran agar blog ini semakin baik kedepannya :)