Download presentation
1
Structured Graphs and Applications
A talk on Solving Sudoku Puzzles as a Coloring Problem Dilip M Dwarakanath
2
Overview What is Sudoku Puzzle? Examples of Sudoku Puzzles.
Sudoku Puzzles and their characteristics. Converting Sudoku to Graph Problem. Special Properties of this Sudoku graph. Assigning colors to the Sudoku graph. Determining if a unique solution exists for the Sudoku graph. Some interesting facts and numbers.
3
Sudoku as a Coloring Problem
What is a Sudoku Puzzle? Sudoku is a logical and number placement puzzle, the objective of which is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the grid (also called "boxes", "blocks", "regions", or "sub-squares") contains all of the digits from 1 to 9. The puzzle is usually, partially completed.
4
A sample Sudoku Puzzle
5
Solution for the above Puzzle
6
Rules and Characteristics of a Sudoku Puzzle
The Sudoku Puzzle has 81 slots. Two slots will be adjacent if and only they are in the same Row, same Column or same Sub Grid. Slots have to be filled with numbers from 1 to 9. Adjacent slots cannot have same numbers. Numbers can repeat diagonally.
7
What is Graph Coloring and Chromatic Number?
Graph Coloring is the assignment of colors to vertices of a graph such that no two adjacent vertices have the same color. Chromatic Number is the smallest number of colors needed for the proper coloring of a graph.
8
Converting Sudoku to Coloring Problem
Sudoku has 81 slots, meaning it has 81 vertices. Adjacent vertices cannot have the same numbers in them. When translated to graph problem, we can easily find out that the numbers can be colors. Since adjacent vertices cannot have same colors, this makes it a coloring problem. Adjacent vertices are shown by drawing an edge between them.
9
The Graph Obtained from applying Coloring Principles to Sudoku
Firstly, divide the Sudoku Puzzle into 9 grids of 3 Rows and 3 Columns (3x3)
10
Special Properties of this Graph
Let us now study the special properties of the above graph. To do that let us consider a Subgraph of the Graph. If we notice the Subgraph below, we will find that every vertex is connected to every other vertex. Also, that the above property makes this Subgraph a clique. And the Chromatic Number of this graph cannot be less than 9.
11
When we consider the whole graph, we find out many other special properties of the graph
The vertices in each row are connected to each other, making each row a clique. The vertices in each column are connected to each other, making each column a clique. The Chromatic Number of each row cannot be less than 9. The Chromatic Number of each column cannot be less than 9. Degree of the each vertex is 20, there are a total of 810 edges.
13
Assigning colors to the Vertices in the Graph
To assign colors to the vertices, there is a formula given by N. Ram Murty and Herzberg. The formula helps in assigning each vertex a color. But this method can be applied only once and only for an empty Sudoku Graph. For a partially filled Sudoku puzzle, these numbers need to be interchanged and a solution can be obtained. Depending on the Sudoku puzzle, it can be determined if a unique solution exists or not.
14
Determining the number of unique solutions of a Sudoku Puzzle
According to research by mathematicians at MIT, the minimum number of entries that are required to make a Sudoku Puzzle have a unique solution is 17. This means, 17 Mod 9 which is equal to 8, is the minimum number of colors that have to be given to make the Sudoku graph coloring have a unique solution. We can see in the next slide as to why a grid with 7 entries cannot have a unique solution
16
Some interesting facts about Sudoku
There are approximately 6, 670, 903, 752, 021, 072, 936, 960 Sudoku Puzzles. That is 6.670x1021. This number by interchanging the position of the digits in the solution, leads us to 5, 472, 730, 538 puzzles, approximately 5.47 × 109 puzzles. Out of these, there have more than 36,000 puzzles that have been found to have a unique solution with only 17 entries. But, not one puzzle with 16 entries is found to have an unique solution. With these many number of Sudoku Puzzles, newspapers can continue publishing one Sudoku Puzzle a day for the next 14 Million years.
17
Thanks To Professor Feodor Dragan for enormous amounts of efforts trying to make me understand the complex theorems and proofs of accomplished scientists. Naser Madi for helping me understand the paper written by N Ram Murty and Herzberg.
18
References http://www.mast.queensu.ca/~murty/sudoku-ams.pdf
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.