d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Game Theory Help (nim) > 2 Play Game Of Nim
Add Reply New Topic New Poll
Member
Posts: 38,211
Joined: Feb 16 2009
Gold: 7,823.69
Jan 15 2014 11:34pm
rules:
1 pile containing 15 objects

on your turn you can take 1, 2, 3 of the object in the pile

whoever takes the last object loses



i need a strategy for this like what number of objects should i keep the total to be in order to be in a winning position

meow meow meow

paying for help meow meow meow
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Jan 15 2014 11:44pm
If 1 object remain, the one whose turn is on loses.
If 5 objects remain, the one whose turn is on loses : whatever he picks up, his opponent will pick up the complementary to 4 (if he picks 1, the other picks 3 ; if he picks 2, the other picks 2, if he picks 3, the other picks 1). Leaving him 1 object for the next turn.
If 9 objects remain, the one whose turn is on loses : whatever he picks up, his opponent will leave him 5 objects for the next turn.
If 13 objectrs remain etc...

1, 5, 9, 13, 17, 21, 25 ... are losing numbers.

If you start with 15 objects, the first to play will win : he takes 2 and leave 13 to his opponent (13 is a losing number).
Member
Posts: 6,038
Joined: Apr 6 2008
Gold: 31.00
Jan 17 2014 07:55pm
Quote (feanur @ Jan 16 2014 01:44am)
If 1 object remain, the one whose turn is on loses.
If 5 objects remain, the one whose turn is on loses : whatever he picks up, his opponent will pick up the complementary to 4 (if he picks 1, the other picks 3 ; if he picks 2, the other picks 2, if he picks 3, the other picks 1). Leaving him 1 object for the next turn.
If 9 objects remain, the one whose turn is on loses : whatever he picks up, his opponent will leave him 5 objects for the next turn.
If 13 objectrs remain etc...

1, 5, 9, 13, 17, 21, 25 ... are losing numbers.

If you start with 15 objects, the first to play will win : he takes 2 and leave 13 to his opponent (13 is a losing number).



very good.

i hope he gets paid ^_^
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Jan 18 2014 02:33am
Quote (rx7drifter @ Jan 18 2014 02:55am)
very good.

i hope he gets paid ^_^


Thanks !

I got a very nice donation, indeed :thumbsup:
Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Jan 18 2014 03:18am
Quote (feanur @ Jan 16 2014 01:44am)
If 1 object remain, the one whose turn is on loses.
If 5 objects remain, the one whose turn is on loses : whatever he picks up, his opponent will pick up the complementary to 4 (if he picks 1, the other picks 3 ; if he picks 2, the other picks 2, if he picks 3, the other picks 1). Leaving him 1 object for the next turn.
If 9 objects remain, the one whose turn is on loses : whatever he picks up, his opponent will leave him 5 objects for the next turn.
If 13 objectrs remain etc...

1, 5, 9, 13, 17, 21, 25 ... are losing numbers.

If you start with 15 objects, the first to play will win : he takes 2 and leave 13 to his opponent (13 is a losing number).


Lol this game was in a episode
Of cyber chase
Go Back To Homework Help Topic List
Add Reply New Topic New Poll