CompSci 6 30.1 Problem Solving: Sudoku  Rules of the Game Sudoku is played with a 9 by 9 "board" consisting of nine 3 by 3 sub-boards. The symbols 1 -

Slides:



Advertisements
Similar presentations
Can you master it?. Sudoku Hype Sudoku is a logic-based number placement puzzle. The objective is to fill a 9×9 grid so that each column, each row, and.
Advertisements

Strategy to solve complex problems
How to play SUDOKU adapted from Tilda Rosander.
CS162 Week 2 Kyle Dewey. Overview Continuation of Scala Assignment 1 wrap-up Assignment 2a.
Number puzzles in the paper Did you know there’s a whole range of number puzzles you can try in most newspapers? Click on the puzzles below to complete.
Playing Fair at Sudoku Joshua Cooper USC Department of Mathematics.
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
CompSci 100e Program Design and Analysis II March 3, 2011 Prof. Rodger CompSci 100e, Spring
Eight queens puzzle. The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture.
Backtracking COP Backtracking  Backtracking is a technique used to solve problems with a large search space, by systematically trying and eliminating.
BINGO! Topic Create Your Game Card You will need a blank piece of paper.
A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.
The Mathematics of Sudoku Helmer Aslaksen Department of Mathematics National University of Singapore
Algorithm design techniques
Solving Sudoku Mark PTTLS Micro teach. Solving Sudoku What is a Sudoku? A Sudoku is a number puzzle based on a 9x9 grid made up from smaller 3x3 blocks.
CS194 Project: Sudoku Difficulty Kha Chu Advisor: Professor Sahai.
SOLVING SUDOKU WITH MATLAB VERIFICATION FUNCTION correctness verification of the puzzle: checks if the current element appears twice in the same line,
SUDOKU Via Relaxation Labeling
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
Announcements.
Sudoku Taryn, Jin, Jehsang, Phil, and Matt. Outline What is Sudoku? –The game of Sudoku –The website Sudoku UI Prototype How to use the site (use cases)
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
CSE 143 Lecture 17 More Recursive Backtracking reading: "Appendix R" on course web site slides created by Marty Stepp and Hélène Martin
CSE 143 Lecture 17 More Recursive Backtracking reading: "Appendix R" on course web site slides created by Marty Stepp and Hélène Martin
2009/11/14GPW20091 Analysis of the Behavior of People Solving Sudoku Puzzles Reijer Grimbergen School of Computer Science, Tokyo University of Technology.
1 N -Queens via Relaxation Labeling Ilana Koreh ( ) Luba Rashkovsky ( )
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
Computing Science 1P Large Group Tutorial 20 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Whiteboardmaths.com © 2008 All rights reserved
Announcements This Wednesday, Class and Labs are cancelled! The last lab is due this Wednesday … how many people are planning on doing it? Finally posted.
Data Structures Using C++ 2E1 Recursion and Backtracking: DFS Depth first search (a way to traverse a tree or graph) Backtracking can be regarded as a.
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
Sudoku Jordi Cortadella Department of Computer Science.
HandoutMay 2007Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Department of Computer Science 1 Recursion & Backtracking 1.The game of NIM 2.Getting out of a maze 3.The 8 Queen’s Problem 4.Sudoku.
To create a program, written in C++, that could generate a Sudoku. Elements to take into consideration: The Sudoku created must have one unique solution.
CPS Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze  Certain mazes can be solved using the “right-hand”
1 CSC 427: Data Structures and Algorithm Analysis Fall 2006 See online syllabus (also available through Blackboard): Course goals:
CompSci 100e 6.1 Plan for the week l More recursion examples l Backtracking  Exhaustive incremental search  When we a potential solution is invalid,
CompSci 100 Prog Design and Analysis II Oct 26, 2010 Prof. Rodger CPS 100, Fall
How Do I Solve This Thing?. You are familiar with Sudoku puzzles. For this variation, place the integers 1 – 9 into each row or column such that the.
CSE 143 Lecture 18 More Recursive Backtracking slides created by Marty Stepp
Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9x9 grid with digits so that each column, each row, and each.
Monster (“Mega”) Sudoku
Backtracking & Brute Force Optimization Intro2CS – weeks
Introduction to State Space Search
CompSci Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze ä Certain mazes can be solved using the.
© 2006 Pearson Addison-Wesley. All rights reserved 6-1 Chapter 6 Recursion as a Problem- Solving Technique.
Chomp. How is the game played Human player goes first choose a square, all to the right and down are “eaten” computer takes a turn whoever is forced to.
CPS Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze ä Certain mazes can be solved using the “right-hand”
By Luke. What is Sudoku? Sudoku is a number game it has 81 squares. The only numbers you can use are 1,2,3,4,5,6,7,8 and 9.
NUMBER THEORY. ARRAY A set of objects (or numbers) ARRANGED in rows and columns.
CPS 100, Spring Search, Backtracking,Heuristics l How do you find a needle in a haystack?  How does a computer play chess?  Why would you write.
Going Krazee With Sudoku By Professor Cindy Caldwell A.K.A. “Crazy Lady” Caldwell A.K.A. Cindy Susan…FOCUS!
CSE 143 read: 12.5 Lecture 18: recursive backtracking.
Name: Aimee McLaughlin
Monster (“Mega”) Sudoku
Intro to Computer Science II
Constraint Satisfaction Problem
Analysis and design of algorithm
Exercise: fourAB Write a method fourAB that prints out all strings of length 4 composed only of a’s and b’s Example Output aaaa baaa aaab baab aaba baba.
Jordi Cortadella Department of Computer Science
Modeling Sudoku as a CNF Formula
adapted from Recursive Backtracking by Mike Scott, UT Austin
CSE (c) S. Tanimoto, 2001 Search-Introduction
Sudoku (数独 sūdoku?), also known as Number Place or Nanpure, is a logic-based placement puzzle. The objective is to fill the grid so that every column,
Sudoku.
Exercise: Dice rolls Write a method diceRoll that accepts an integer parameter representing a number of 6-sided dice to roll, and output all possible arrangements.
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
Backtracking, Search, Heuristics
Presentation transcript:

CompSci Problem Solving: Sudoku  Rules of the Game Sudoku is played with a 9 by 9 "board" consisting of nine 3 by 3 sub-boards. The symbols (any 9 unique symbols could be used, e.g., A - I) are placed on the board with the following constraints. 1. Each symbol may appear only once in each row. 2. Each symbol may appear only once in each column. 3. Each symbol may appear only once in each sub-board. In a typical game, you are given a partially filled board and are required to fill out the rest of the squares consistent with the rules.

CompSci Problem Solving: Sudoku  Many sites on web. For example: 

CompSci Problem Solving: Sudoku  What Could a Computer Program Do?  Basic validity checking. Make sure the rules are not broken.  Book-keeping that helps a human play the game.  Suggest moves that are forced  Suggest moves that are fairly obvious  Higher Level strategies. What are they?  Search when no strategies are known o try a series of moves o backtrack if they do not pan out o (this is often done using recursion)

CompSci Sudoku Lab  What Could a Computer Program Do?  Write a program that checks a 9x9 array of Strings to see if all of the rules are being followed.  Could use sets or more basic techniques