Problem 629

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
tamandua
Posts: 2
Joined: Sun Oct 14, 2018 1:55 pm

Problem 629

Post by tamandua »

Got stuck with understanding the specification :
Why is f(5,2) = 3 ?
k=2 means that there are only 2 piles allowed, so IMHO only {2,3} and {1,4} are allowed. So why is there {1,1,1,2} in the list ?
And why is f(5,3) = 5 ? Why is {5} in the list which does not look similar to a split as required ?
User avatar
Animus
Administrator
Posts: 1987
Joined: Sat Aug 16, 2014 1:23 pm

Re: Problem 629

Post by Animus »

hi, tamandua

The parameter $k$ does not restrict the number of piles in the starting position nor the number of piles present after a valid move, only the number of piles a single pile may be split into. Therefore is {1,1,1,2} a valid starting position for a game with $k=2$, and happens to be a winning position (since Alice can split the pile of two into two piles of one and Bob is left without possible moves).
The same applies to the starting position {5} in $f(5,3)$.

Hope this helps clarifying.
tamandua
Posts: 2
Joined: Sun Oct 14, 2018 1:55 pm

Re: Problem 629

Post by tamandua »

THX, now I see. The magic word is "total number of stones".
Post Reply