CS 5700 UCM CSP Algorithm for Sudoku and Map Coloring Project

Introduction Implement a CSP algorithm to solve two popular problems: Sudoku and map coloring. You might want to go over the CSP lecture notes. Figure 1: Sudoku puzzle. 1 Exercise 1 Implement a CSP algorithm to solve the Sudoku puzzle that is shared in Figure 1. The rules of the Sudoku puzzle: • The Sudoku board is a 9×9 grid, divided into 9 3×3 subgrids. • Each cell in the grid must be filled with a number from 1 to 9. • No number can be repeated in any row, column, or subgrid. You should follow some rules while implementing the algorithm: • Your implementation should collect the input from the user as shown below. • Your implementation should calculate the missing squares and print out the completed board as the output. • Include comments and clear documentation in your code for clarity. • Ensure that your code is well-structured and follows best coding practices. Sample input: . . . 4 . 6 . . 3 . . 1 . . . . 6 . . 6 . . . . . 1 . 3 . . . . 1 . . 6 . . . 1 . . . . 7 6 . . . . 4 . . . . . . . . . . . 2 . . 9 . . . . . 6 1 . . . . . 5 . . Here is an example of another solved Sudoku board: 5 3 4 6 7 8 9 1 2 6 7 2 1 9 5 3 4 8 1 9 8 3 4 2 5 6 7 8 5 9 7 6 1 4 2 3 4 2 6 8 1 3 7 5 9 7 1 3 9 2 5 6 8 4 9 8 7 6 5 4 2 3 1 2 6 3 4 8 9 1 7 5 3 4 1 5 9 7 8 6 2 2 Exercise 2 You’ll exercise the map coloring problem through U.S. state graph that is shared in Figure 2. You are allowed to use the colors: R, G, B, and Y. No adjacent states will be in the same color. Please show me the steps in your solution and the Final mapping in the output screen. Figure 2: Contiguous US graph. • You can start from any state that you prefer and keep going until all of the states have been colored. • No two adjacent states will be in the same color. • Include comments and clear documentation in your code for clarity. • Ensure that your code is well-structured and follows best coding practices.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER