Presentation is loading. Please wait.

Presentation is loading. Please wait.

HKOI2006 Analysis and Solution Junior Q3 – Sudoku HKOI Training Team 2006-01-07.

Similar presentations


Presentation on theme: "HKOI2006 Analysis and Solution Junior Q3 – Sudoku HKOI Training Team 2006-01-07."— Presentation transcript:

1 HKOI2006 Analysis and Solution Junior Q3 – Sudoku HKOI Training Team 2006-01-07

2 Statistics Attempts: 42 (out of 69) Mean: 46.91 Max: 100 (3) Min: 0 Std Dev: 41.05

3 Statistics

4 The Problem Given an incomplete Sudoku puzzle, solve for the remaining cells Only the center 9 cells are empty

5 Observation For each test case, there is at most one solution Why?

6 Observations For any cell in the center region, there must be exactly one number that can be filled in without any violation to the rules Why? Let’s prove it by contradiction…

7 Observations Suppose ‘1’ and ‘2’ can both be filled in the center cell without violation to rules

8 Observations Fill ‘1’ into the center cell 1

9 Observations Why can ‘2’ be filled in the center cell? 1

10 Observations Because it has not appeared in the center row nor the center column 1

11 Observations So ‘2’ must be filled in somewhere in the center row, and also the column 1

12 Observations ‘2’ has to be appeared in one of the two Red cells, and also one of the two yellow cells 1

13 Observations Since all 4 colored cells are in the same region, two ‘2’s must be in the same region 1  Contradiction

14 Solutions For each cell, find if these is exactly one number to fill in “No solution” if none or >1 is found

15 Alternative Solution Exhaust all possible permutations of 1 to 9 to find in the cells, then check whether the solution is valid This solution looks stupid, but it works since there are only 9! = 362880 permutations in total

16 Common Mistakes Forgot to handle the “No solution” case Assume there are no violations in the numbers already filled in

17 Questions?


Download ppt "HKOI2006 Analysis and Solution Junior Q3 – Sudoku HKOI Training Team 2006-01-07."

Similar presentations


Ads by Google