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

Program for memory optimization of c / opencl code, Program for Memory Opti...

Program for Memory Optimization of C / OpenCL Code Project Description: This is possibly a very simple project for someone with an excellent knowledge of C and OpenCL. That,

Using nested if statement, write a program in c/C++ using nested if stateme...

write a program in c/C++ using nested if statement for calculating the average marks and grades of 5 subjects

MINIMUM SHELVES, Write a program to find minimum number of shelves

Write a program to find minimum number of shelves

Assignment, Classify computer systems according to capacity. How they are d...

Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

Define static storage class - computer programming, Define Static Storage C...

Define Static Storage Class in C Programming? The Static declarations have distinct and important uses. This allows the local variable to keep its previous value when the block

LOOPS, HOW CAN WE EASLY LEARN C++

HOW CAN WE EASLY LEARN C++

Program decision making instructions, Within programs we very often want to...

Within programs we very often want to execute a different section of code, depending upon various conditions within C the If statement is used to achieve this. The If statement con

Project of result management system in c language, how we write decision ta...

how we write decision tables, flowcharts,pseudocode,and algorithm in result management system

Calculate the discharge by c program, #include stdio.h #include math.h ...

#include stdio.h #include math.h float discharge(float,float); void main()   {   char prompt;      float time,out,cr;   cr = 100e-6;   for (time = 0;time   {   /* call th

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