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

Prepare invoice ocr and document management, Project Description: We are...

Project Description: We are seeking online invoice OCR solution. That will help us to automate accounts payable function. User should be able to use the offered pdf file or s

Array, write a function that take as parameters an array of integer and its...

write a function that take as parameters an array of integer and its size and return the sum of its value

#titlbinary searching.., Ask question #Minimum 100 words awhat is the pre c...

Ask question #Minimum 100 words awhat is the pre condition for binary searching ccepted#

Discuss polymorphism in c++, Problem 1. Discuss polymorphism in c++. ...

Problem 1. Discuss polymorphism in c++. Explaining Polymorphism 2. Write a program in c++ to read a 3X2 matrix and find smallest number in that matrix. Writin

Decodethecode, 6999066263304447777077766622337778 -----> message sent by th...

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space". Ex

Arrays, how to write a program using arrays

how to write a program using arrays

Code for design software, In this project, you will write a software for th...

In this project, you will write a software for the Registrar's office of a university called YouOIT to maintain information about students and courses at the university. The reg

Can i explicitly call a destructor if i''ve allocated my , Can I explicitly...

Can I explicitly call a destructor if I've allocated my object with new?

Last ant on rod, There are ''''n'''' ants on a ''''n+1'''' length rod. The ...

There are ''''n'''' ants on a ''''n+1'''' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are mov

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