.
.
Math Central - mathcentral.uregina.ca

Summer problem 2008
Solution and computer code by
Zachary Friggstad

I solved the problem with a c++ program. I will briefly explain how it works and argue why it solves the problem. I have attached the code if you would like to see it run (it takes a fraction of a second to run on my computer).

First, the code computes every possible solution to the "chewed-up" sudoku where it assumes the lower-left 3x3 square is all blanks. Then, it partitions the solutions based on their lower-left 3x3 squares. That is, solutions are in the same partition if and only if they have the same lower-left 3x3 corner solution.

Now, we are guaranteed that there was a unique solution to the original sudoku. Clearly, this unique solution is also a feasible solution to the sudoku problem obtained by erasing all given numbers in the lower-left 3x3 corner. Furthermore, the unique solution to the original sudoku must clearly be the only member of its class in the partition of solutions to the "chewed-up" sudoku.

Given this information, the program looks at all classes of the partition that have exactly one member. It extracts the middle 3x3 square from each of these and stores each of these middle 3x3 squares.

Now, if there are different middle 3x3 squares in the solutions that are sole members of their equivalence class, then we cannot uniquely determine the passcode the brothers are trying to find. However, if all such solutions have a common middle 3x3 square, then this is the passcode.

After running the program, there is only one solution to the "chewed-up" sudoku that is in an equivalence class by itself. Thus, the middle 3x3 square of this solution must be the passcode. This middle square is:

153842697

Therefore, if one assumes the correctness of my program (and an error-free execution) then the above arguments show that the passcode I presented is the correct answer.

If you would like to run my program, then if you are on a Linux, Unix, or Mac workstation then the g++ compiler is likely installed. You can compile my code through the following simple steps:

- save the attachment 'sudoku.cc' to your machine
- open a terminal window and navigate to the directory with 'sudoku.cc'
- type 'make sudoku' (without the single quotes)

The code is executed simply by typing (from a terminal window in the same directory):

./sudoku

Download sudoku.cc

 

 


Math Central is supported by the University of Regina and the Imperial Oil Foundation.

CMS
.
* Registered trade mark of Imperial Oil Limited. Used under license.

 

Home Resource Room Home Resource Room Quandaries and Queries Mathematics with a Human Face About Math Central Problem of the Month Math Beyond School Outreach Activities Teacher's Bulletin Board Canadian Mathematical Society University of Regina Imperial Oil Foundation