There is a game on a tree On each move a proper subtree(i.e. any subtree but not whole tree) has to be clipped off the tree
The player who can't make a move loses.
I am thinking in terms of grundy numbers for each subtree and since each children are independent so xoring all the Gs of them to get the G of root
But this does not seem to work and in the solution they are doing G(root) = XOR(G(1 + child_i)
I don't get it why this +1 is added before xor
Could not find any good explanatory tutorial on this.
Any explanation or redirection to any relevant resources will be appreciated



