Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Need Help With Sprague-Grundy Number

Revision en3, by ivplay, 2016-06-11 10:12:42
  • I am getting hard time with this problem-lightoj 1296 — Again Stone GameThere are N-piles,each pile contains max 2^31 stones. you must have to pick at least one and you can pick at most half of the stones. I have seen solutions of this problem but I still don't understand how it works :(. I will be using term SGN as Sprague-Grundy Number. If a pile has 3 stones what should be its SGN? my analysis says it should be like-
    • SGN(1)=0,
    • SGN(2)= mex(1) = 1, since we must have to take 1 stone, we have only one choice
    • SGN(3)= mex(1) = 1, since we must have to take 1 stone, we have only one choice
    • Now the solution to this problem I have seen says SGN(3) is 0 which unfortunately, I don't understand how :(
  • I have just started to learn Sprague-Grundy Number. I am looking for help to make me understanding how the calculation of SGN is defined for this problem. May be I have misunderstood the meaning of MEX defined in SGN.
Tags game theory, sprague-grundy, math, lightoj

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English ivplay 2016-06-11 10:12:42 15
en2 English ivplay 2016-06-11 09:59:27 14
en1 English ivplay 2016-06-11 09:58:24 1028 Initial revision (published)