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

1d solitaireOne-dimensional 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 7 pegs (pegs denoted by *, and holes denoted by )
000***0****000
can be won but
000***000****000
cannot.
Task
By hand work out the number of distinct winnable starting positions with 7 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
20 pegs.
Print out the winnable starting positions in an easily understandable way.
 1d solitaireOne-dimensional solitaire is played on an infinite strip of 'holes'

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!