Question
An 8-puzzle game consists of 8 sliding tiles, numbered by digits from 1 to 8 and arranged in a 3x3 array of nine cells. A
An 8-puzzle game consists of 8 sliding tiles, numbered by digits from 1 to 8 and arranged in a 3x3 array of nine cells. A configuration in the puzzle refers to some specific arrangement of the tiles in the array, where each digit is arranged into a different cell. One of the cell is empty (represented by a "*") and any adjacent tile can be moved into the empty cell. An example below
c | 1 | 2 | 3 b | 4 | * | 5 a | 6 | 7 | 8 ------------------ Y/X a b c
We use a 3-tuple (number, X, Y) to represent the position of a digit, where number is the actual digit, and (X,Y) is the coordinate value of the digit in the current configuration (e.g., in the configuration above, we have (5,c,b), meaning the digit 5 is at the position of (c,b)). Hence the configuration in the example can be represented as: [(1,a,c), (2,b,c), (3,c,c), (4,a,b), (5,c,b), (6,a,a), (7,b,a), (8,c,a)]. Any move of an adjacent tile into the empty cell moves the current configuration into the one adjacent to it.
(a) How many different configurations for this game?
(b) List all the adjacent configurations from the example above.
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