Question: 1 d solitaireOne - dimensional solitaire is played on an infinite strip of 'holes' in which there are initially some pegs. A move is a
d solitaireOnedimensional solitaire is played on an infinite strip of 'holes' in which there are
initially some pegs. A move is a hop of one peg over another adjacent peg into a hole;
the peg that has been hopped over is removed. You win the game if you can remove all
pegs but one. Some games are winnable and some are not.
For instance, with pegs pegs denoted by and holes denoted by
can be won but
cannot.
Task
By hand work out the number of distinct winnable starting positions with pegs. By
'distinct' we mean that we regard a position and its mirror image as being the same. Report on your methods and findings, and
list the winnable starting positions.
Then:
Write a program to find the number of distinct winnable starting positions with
pegs.
Print out the winnable starting positions in an easily understandable way.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
