Problem 310

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
Schattenjager
Posts: 4
Joined: Sat Nov 13, 2010 9:26 pm

Problem 310

Post by Schattenjager »

Please, help me understand Nim Square:

1) If a player takes the last stone, does it win or loose? (Both versions of nim are played.)

2)
Find the number of losing positions for the next player
-- does it mean number of winning positions for starting player? (Sorry, English is not my native language).

Thank you.

Schattenjager
harryh
Posts: 2091
Joined: Tue Aug 22, 2006 9:33 pm
Location: Thessaloniki, Greece

Re: Problem 310

Post by harryh »

Schattenjager wrote:1) If a player takes the last stone, does it win or loose? (Both versions of nim are played.)
Problem 310 (View Problem) states "normal play Nim". It means that the player who takes the last stone(s) wins.
Find the number of losing positions for the next player
-- does it mean number of winning positions for starting player?
No, it means the number of losing positions for the starting player (the starting player is the next person to play)
Schattenjager
Posts: 4
Joined: Sat Nov 13, 2010 9:26 pm

Re: Problem 310

Post by Schattenjager »

Thank you very much.
bryanwithy
Posts: 1
Joined: Thu Dec 02, 2010 9:28 pm

Re: Problem 310

Post by bryanwithy »

harryh wrote:1) If a player takes the last stone, does it win or loose? No, it means the number of losing positions for the starting player (the starting player is the next person to play)
I found this confusing at first as well, but I think I understand....
We do test the position (29,29,29),weI don't need to test the "next" possible moves after each position, right?
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 310

Post by TripleM »

Yes; assume it says 'for the starting player' rather than 'for the next player'.

'next' usually implies something had to happen first, which is why it has confused a couple of people.
malayb
Posts: 1
Joined: Fri Jan 28, 2011 11:25 am

Re: Problem 310

Post by malayb »

Can somebody confirm the following result?

f(3) = 10
f(4) = 16

thanks
StatujaLeha
Posts: 4
Joined: Wed Jan 12, 2011 2:08 pm

Re: Problem 310

Post by StatujaLeha »

malayb wrote:Can somebody confirm the following result?
f(3) = 10
f(4) = 16
The first one is correct.
chickenface
Posts: 1
Joined: Sat Aug 27, 2011 7:21 pm

Re: Problem 310

Post by chickenface »

I get the right answer for f(29) = 1160
Can someone confirm these results:

f(x) = y
f(z) = a
User avatar
hk
Administrator
Posts: 12842
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 310

Post by hk »

chickenface wrote:I get the right answer for f(29) = 1160
Can someone confirm these results:

f(x) = y
f(z) = a
(results etc snipped).
That's what I get too.
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply