Ease and Toil - Analyzing Sudoku

Ease and Toil - Analyzing Sudoku - Page 1 of 62 MCM 2008...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 of 62 MCM 2008 Team #3780 Ease and Toil: Analyzing Sudoku February 18, 2008 Look at any current magazine, newspaper, computer game package or handheld gaming device and you likely find sudoku, the latest puzzle game sweeping the nation. Sudoku is a number-based logic puzzle in which the numbers 1 through 9 are arranged in a 9 × 9 matrix, subject to the constraint that there are no repeated numbers in any row, column, or designated 3 × 3 square. In addition to being entertaining, sudoku promises valuable insight into computer sci- ence and mathematical modeling. In particular, since sudoku solving is an NP-Complete problem, algorithms to generate and solve sudoku puzzles may offer new approaches to a whole class of computational problems . Moreover, we can further explore mathematical modeling techniques through generating puzzles since sudoku construction is essentially an optimization problem. The purpose of this paper is to propose an algorithm that may be used to construct unique sudoku puzzles with four different levels of difficulty. We attempted to minimize the complexity of the algorithm while still maintaining separate difficulty levels and guar- anteeing unique solutions. In order to accomplish our objectives, we developed metrics with which to analyze the difficulty of a given puzzle. By applying our metrics to published control puzzles with spe- cific difficulty levels we were able to develop classification functions for specific difficulty ratings. We then used the functions we developed to ensure that our algorithm gener- ated puzzles with difficulty levels analogous to those currently published. We also sought out to measure and reduce the computational complexity of the generation and metric measurement algorithms. Finally, we worked to analyze and reduce the complexity involved in generating puzzles while maintaining the ability to choose the difficulty of the puzzles generated. To do so, we implemented a profiler and performed statistical hypothesis testing to streamline the algorithm .
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Page 2 of 62 MCM 2008 Team #3780 Contents 1 Introduction 3 1.1 Statement of Problem . . . . . . . . . 3 1.2 Relevance of Sudoku . . . . . . . . . 3 1.3 Goals . . . . . . . . . . . . . . . . . . 3 1.4 Rules of Sudoku . . . . . . . . . . . . 3 1.5 Terminology and Notation . . . . . . 3 1.6 Indexing . . . . . . . . . . . . . . . . 4 1.7 Formal Rules of Sudoku . . . . . . . 5 1.8 Example Puzzles . . . . . . . . . . . 5 2 Background 5 2.1 Common Solving Techniques . . . . 5 2.1.1 Naked Pair . . . . . . . . . . 5 2.1.2 Naked Triplet . . . . . . . . . 5 2.1.3 Hidden Pair . . . . . . . . . . 6 2.1.4 Hidden Triplet . . . . . . . . . 6 2.1.5 Multi-Line . . . . . . . . . . . 6 2.2 Previous Works . . . . . . . . . . . . 7 2.2.1 SudokuExplainer . . . . . . . 7 2.2.2 QQWing . . . . . . . . . . . . 7 2.2.3 GNOME Sudoku . . . . . . . 7 3 Metric Design 10 3.1 Overview . . . . . . . . . . . . . . . . 10 3.2 Assumptions . . . . . . . . . . . . . . 10 3.3 Mathematical Basis for WNEF . . . 10 3.3.1 Complexity . . . . . . . . . . . 10 4 Metric Calibration and Testing 11 4.1 Control Puzzle Sources . . . . . . . . 11 4.2 Testing Method . . . . . . . . . . . . 12 4.2.1 Defining Difficulty Ranges . . 12 4.2.2 Information Collection . . . . 12 4.2.3 Statistical Analysis of Con- trol Puzzles . . . . . . . . . . . 12 4.3 Choice of Weight Function . . . . . . . 12 5 Generator Algorithm 12 5.1 Overview . . . . . . . . . . . . . . . . 12 5.2 Detailed Description . . . . . . . . . 14 5.2.1 Completed Puzzle Generation 14 5.2.2 Cell Removal . . . . . . . . . . 14 5.2.3 Uniqueness Testing . . . . . . 15 5.3 Pseudocode . . . . . . . . . . . . . . . 15 5.3.1 Completed Board Generation 15 5.3.2 Random Masking . . . . . . . 16 5.3.3 Tuned Masking . . . . . . . . 17 5.3.4 Uniqueness Testing . . . . . .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern