There are N egg baskets and the number of eggs in each
basket is a known quantity. Two players take turns to remove
these eggs from the baskets. On each turn, a player must
remove at least one egg, and may remove any number of eggs
provided they all belong to the same basket. The player
picking the last egg(s) wins the game. If you are allowed to
decide who is going to start first, what mathematical
function would you use to decide so that you end up on the
winning side?
Answer Posted / lokesh
if the XOR of all the numbers of eggs is zero than second
player win else first player will win.
(From NIM game(game theory))
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How do you define CONSTANT in C?
What are # preprocessor operator in c?
how to write a c program to print list of fruits in alpabetical order?
Explain what are bus errors, memory faults, and core dumps?
What is a file descriptor in c?
What is the description for syntax errors?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What does c mean?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What are the salient features of c languages?
What are the primitive data types in c?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What is clrscr in c?
What are the types of operators in c?
using only #include