Constraint Satisfaction Problem solver using backtracking with degree heuristic. No two adjacent regions share the same color.
Uses CSP Backtracking with degree heuristic — assigns colors to the most-constrained region first, backtracking when a conflict is found.
Any planar map can be colored using at most 4 colors such that no two adjacent regions share the same color. Proven in 1976.
Regions: A, B, C, D
A↔B, A↔C, B↔C
B↔D, C↔D
Colors: Red, Green, Blue