Answered step by step
Verified Expert Solution
Question
1 Approved Answer
One - dimensional solitaire is played on an infinite strip of 'holes' in which there are initially some pegs. A move is a hop of
Onedimensional 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,
eg is the same as
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started