I try to find out some sources to Learn Nim and grundy theorem . But I did not find any explanation , why the logic works .
- like xor(n1,n2,n3....nk)=0
- How to find grundy number with some explanation . why does this approach work ?
Please refer some problems .
This is where I first learned about Sprague-Grundy theorem and NIM.
http://www.math.ucla.edu/~tom/Game_Theory/comb.pdf
If you're familiar with HackerEarth CodeMonk series there will be also a topic about that (if you are willing to wait till that)
Here are some problems (I might search for more later)
http://www.spoj.com/problems/MMMGAME/en/
http://www.spoj.com/problems/MATGAME/
https://icpcarchive.ecs.baylor.edu/external/50/5059.pdf
http://acm.timus.ru/problem.aspx?space=1&num=1465
https://uva.onlinejudge.org/external/115/11534.pdf
Problem E from here http://codeforces.me/gym/100500
Thanks ivanilos