Welcome, %1$s. Please login or register.

September 25, 2017, 10:02:00 AM
: 1
: Coin Pile  ( 6841 )
« : August 15, 2007, 02:34:23 PM From atul»



Coin Pile


There are two piles of coins in front of you Ist having 35 coins and 2nd having 50 coins.You are playing a game against another person where you take turns removing coins from either one or both of the piles subject to following rules:

a) You can remove any number of coins ( minimum one, maximum all) from one of the piles
b) Or you can remove equal number of coins from both piles

every person has to take a turn i.e. has to remove at least one coin. The person to removes the last coin wins the game. If you are making first turn what would your move be?


examples can be :
a) you remove all coins from 1st pile and player 2 takes all coins from 2nd pile and you lose !
b) you take 35 coins from both pile and player 2 takes remaining 15 coins from 2nd pile and  you lose !!
c)you take 15 coins from the 50 pile and player 2 takes 35 from both and you lose !!!
d) you take 34 coins from both pile leaving (1,16), Player 2 takes 14 coins from 2nd pile leaving (1,2) for you and you will lose whatever you do !!!

 
Liked It? Share it!

              


« #1 : August 15, 2007, 09:45:16 PM From preeps»

take 33 from both the piles... (2,17)
the 2nd one shud either take 2, so u take 17...
else 17 and u take 2
else 2 from each..and u take 14..
« #2 : August 15, 2007, 10:58:12 PM From spazinvader»

What if the other one takes 1 preeps?
There will be 1 and 17 right?

So i think we have to take 34.
« #3 : August 16, 2007, 01:08:56 PM From preeps»

if he takes 1..then it shud be (1,17) or (2,16)

in that case take 1 from 17 so it becomes (1,16)..
so if he takes..(1,0) or(0,16) u win...else if he takes.(1,1)
then u r left with (1,16)...so take (0,14)
so wt left it (1,2)..in this case u win...
second case..if u r left with (1,15)..u take (0,13)==even in this case
u win..i think it all depends on how u play after that..
« #4 : August 16, 2007, 11:50:52 PM From spazinvader»

Sorry.A simple mistake.
What if the other one takes (1,1)?
That is, it will make the pile as 1,16 right?
« #5 : August 16, 2007, 11:52:22 PM From spazinvader»

Got it.
We have to take 14 next and make it as (1,2).
By this way,we can win.
You are awesome preeps.
« #6 : August 17, 2007, 02:54:26 PM From atul»

Preeps:
Everthing depends on how either player plays!! you have to try to win in case the 2nd player makes the most favorable move for himself.

If you make a move to (2,17) I will take 16 from the 2nd pile reducing it to (2,1) and you would lose.

HINT:
I already told you in my examples that 1,2 is a winnin position MEANS if I can reduce piles to 1,2 and pass it to other player to make a move I will always win in the next move !
Try to find other winning positions and reduce our pile to a winning position.
« #7 : October 26, 2007, 06:21:31 PM From jaiswal»

I'll make a move (11,11) thus leaving the piles as (24,39)

As per my calculations, the winning positions are :

1,2
3,5
4,7
6,10
8,13
9,15
11,18
12,20
14,23
16,26
17,28
19,31
21,34
22,36
24,39

Whatever move B makes, I'll try to reduce it to one of the above positions.
« #8 : October 27, 2007, 01:56:11 AM From saurabh»

I think I have a better solution. If i am missing something do let me know. Suppose the name of piles are A( with 35 coins) and B (with 50 Coins)...

First Move: Remove 16 from B so that B has 34 now...

Now whatever move the other person takes, your next move should be such that pile A has exactly one coin more than B.

A      B
35      50 (initially)
35      34
23      24
3      2
2      1

So now everything boils down to the point, that u can reduce the other person to the situation of (1,2)...
 Now whatever moves he takes u win.
« #9 : October 27, 2007, 11:54:04 AM From jaiswal»

Hey Saurabh..

What if after your first move, your opponent takes out 33 coins from both piles. Then that will leave you with (2,1), so u'll loose.

35      50
35      34 --> after your move
2       1 --> after your opponent's move
« #10 : October 28, 2007, 11:02:54 PM From spazinvader»

Just maintain the balance in the pile as odd so that you can win.It will make it easier.If we left for even numbers,we cant win.
Jaiswal,
You have done a wonderful job buddy.
« #11 : November 21, 2007, 12:44:15 PM From iammilind»

Suppose Piles are named A and B. n1 and n2 are the number of coins left in A and B after the other person plays his turn.

turn  Id    A   B     comment
--------------------------------
 0     -    35  50
 1     I     3   18    (take 32 from both)
 2    he   n1   n2    (if n1<3 or n2=2, go to step 5)
 3     I     3    2     (I will blindly reduce pile B to 2)
 4    he   n1   n2    (whatever)
 5     I    2/1 1/2    (2,1 or 1,2 depending on favourable condition)
 6    he   n1   n2    (whatever)
 7     I    WIN !

Above steps are on the assumption that he will never empty a single pile or keep same coins in both piles. Because that will lead to my immediate win.
: 1
« previous next »

 

Best RatedList All>>



Latest
Random



SMF 2.0.10 | SMF © 2015, Simple Machines | Contact Webmaster | OnlineFunDb.com © 2009/10 | Legal Disclaimer