Stone game, C/C++ Programming

Assignment Help:
A game is played with three piles of stones and two players. At her turn, a player removes one or more stones from the piles. However, if she takes stones from more than one pile, she must remove the same number of stones from each of the selected piles.
In other words, the player chooses some N>0 and removes:
? N stones from any single pile; or ? N stones from each of any two piles (2N total); or ? N stones from each of the three piles (3N total).
The player taking the last stone(s) wins the game.
A winning configuration is one where the first player can force a win. For example, (0,0,13), (0,11,11) and (5,5,5) are winning configurations because the first player can immediately remove all stones.
A losing configuration is one where the second player can force a win, no matter what the first player does. For example, (0,1,2) and (1,3,3) are losing configurations: any legal move leaves a winning configuration for the second player. Consider all losing configurations (xi,yi,zi) where xi = yi = zi = 100. We can verify that S(xi+yi+zi) = 173895 for these.
Find S(xi+yi+zi) where (xi,yi,zi) ranges over the losing configurations with xi = yi = zi = 1000.

Related Discussions:- Stone game

Area, write a program to find area of curve y=f(x) between x and x=b,integr...

write a program to find area of curve y=f(x) between x and x=b,integrate between the limits a and b using c     #include float start_point, /* GL

Insert values in queue - c++ program, Insert values in queue - C++ program:...

Insert values in queue - C++ program: Write a program to insert values in queue. int main()   {         int k;     Queue timeLine;     cout     for(

Padovan string , .write a program that counts the number of occurrences of ...

.write a program that counts the number of occurrences of the string in the n-th padovan string p(n)   program in java // aakash , suraj , prem sasi kumar kamaraj college

Required code for problem, 6#666#665533999 where # is used as space.output ...

6#666#665533999 where # is used as space.output is monkey

C++, padovan string c++ program

padovan string c++ program

Last ant on rod, You are given a collection of words, say as in a dictionar...

You are given a collection of words, say as in a dictionary. You can represent it in the following compressed form: the first word will be followed by a sequence of a pair of numbe

Hungarian notation, describe how identifiers of different data type are def...

describe how identifiers of different data type are defined using this notaion?

Can you think of a condition where your program would crash , Can you think...

Can you think of a condition where your program would crash without attaining the breakball, which you set at the straining of main()? A: C++ let for dynamic initialization of g

I want packet capture analysis, I want Packet capture analysis Project D...

I want Packet capture analysis Project Description: Need assistance in debugging some packet capture Skills required is C Programming

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd