Game theory 3 way of approach

Will the number of piles of a particular divisor affect the grundy number of the number above it,ie 4 has a divisor 2 and 1 so it can have 2 piles of 2 or 4 piles of 1 so does the number of these piles affect the grundy numbre of 4? if yes, please give a mathematical explanation to this.

1st of all read this line -
Player will randomly choose 1 pile whose height is A and break it into B new piles each with stones A/B such that B is a divisor of A and B != A ( 1< B < A).

and yes… for n=6 its divisors are 2 and 3 so
grudny number of n(6) = mex(grundy(3) && grundy(2))

and one more thing if number of div of n i.e. x is even then grundy for that will be 0

bdw i dont know what mathematical explanation i should give :smiley: … will you please try to elaborate this part ?

If number of divisors of a number is even its grundy number is zero why is that

2nd person will have same moves as your in those piles…and hence xor will be zero…

Yes their XOR will be zero but
The XOR calculation will be done once we complete the grundy number calculation of all those numbers using the Mex .
And then on the top level use the XOR of grundy numbers to declare who is the winner .

But why are we doing XOR even while calculating grundy numbers??

beacuse they are going to cancel out each other at last they wont contribute anything to the answer… if we take all of them our answer wont change only complexity of the Q will increase…

1 Like

Means It will give correct answer even if I take all those grundy numbers into consideration ,
Its just an optimization to make them 0 while calculation

yes :slight_smile: