🎯 State Representation:
- Each state is a 3×3 grid configuration
- Represented as array: [1,2,3,4,5,6,7,8,0]
- 0 represents the blank (empty) space
- Goal state: tiles in numerical order
🔄 State Transitions:
- Move blank space: Up, Down, Left, Right
- Each move creates a new state
- Not all moves are valid (edge constraints)
- Maximum 4 transitions per state
🔍 Search Properties:
- BFS guarantees shortest path
- DFS may find longer paths
- A* uses heuristics for efficiency
- State space forms a connected graph
⚡ Complexity Analysis:
- State space size: 9!/2 = 181,440
- Branching factor: ~2.13 average
- Maximum solution depth: 31
- Most puzzles solvable in < 25 moves
💡 Key Insight:
The 8-puzzle state space is a perfect example of how complex problems can be modeled as graph search problems. Each state is a node, each legal move is an edge, and finding a solution becomes a path-finding problem in this graph.