0% found this document useful (0 votes)
20 views15 pages

JAVA Project Sudoku Solver

The document outlines a project focused on solving Sudoku puzzles using computer science, detailing the rules of Sudoku, the advantages of using computer algorithms, and the challenges faced in solving puzzles. It includes an introduction to Sudoku, a description of algorithms used, and a flow chart illustrating the solving process. The conclusion emphasizes the efficiency and user-friendliness of Sudoku solvers, highlighting their ability to handle varying difficulty levels.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views15 pages

JAVA Project Sudoku Solver

The document outlines a project focused on solving Sudoku puzzles using computer science, detailing the rules of Sudoku, the advantages of using computer algorithms, and the challenges faced in solving puzzles. It includes an introduction to Sudoku, a description of algorithms used, and a flow chart illustrating the solving process. The conclusion emphasizes the efficiency and user-friendliness of Sudoku solvers, highlighting their ability to handle varying difficulty levels.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

SUDOKU SOLVER

Subtitle - Solving Sudoku Puzzles Using Computer Science


Team Members
NAME UID

Jayant Chauhan 22BCS14502

Ridhima Gulati 22BCS14507

Jagriti 22BCS14515
Table of Contents

About The Project Rules Solve Sudoku with


01 • Brief introduction 02 Show a step-by-step 03 Computers
• Discuss the
to Sudoku demonstration of complexity of solving
• Define Sudoku solving a Sudoku Sudoku
and its origins. puzzle using a • benefits of using
computer program. computer algorithms
to solve Sudoku
Algorithms and
Flow Chart Chalanges conclusion
04 • Overview and 05 Here you could 06 Where we are in this
Backtracking Algorithm describe the topic of game
• Create a flow chart of
the section
sudoku game
-
INTRODUCTION

• Sudoku is a popular and challenging number puzzle game that has captured the
interest of puzzle enthusiasts and mathematicians alike.

• It's a classic example of a logic-based game that requires a combination of strategy


and problem-solving skills.

• Sudoku is a number puzzle originating from Japan. It involves a 9x9 grid where
players place numbers 1 to 9, ensuring no repetition in rows, columns, or 3x3 regions.
The puzzle gained international recognition in the 1980s but was created by Swiss
mathematician Leonhard Euler in the 18th century.
RULES OF SUKOKU GAME
The rules of Sudoku are straightforward:

1. Grid: Sudoku is played on a 9x9 grid, divided into nine


3x3 regions, Consisting of 81 cells.

2. Numbers: Fill the grid with numbers from 1 to 9. No


other numbers are allowed.

3. Initial Clues: Some cells are pre-filled with numbers as


"clues." These initial placements are strategically set to
ensure a solvable puzzle.

4. No Repeats: Ensure that no number repeats in any row,


column, or 3x3 region.
5. Deduction: Use logical deduction to place the remaining
numbers, completing the grid without breaking the no-
repeats rule.

6. Candidates: Many players use a list of "candidates" for


each empty cell, indicating possible numbers. Candidates
are continually refined as the puzzle is solved.

7. Elimination: Use the numbers already present in the same


row, column, and region to eliminate possibilities when
deciding where to place a number.

8. Completion: Sudoku is solved when all cells are filled, the


entire grid contains numbers 1 to 9 with no repeats in
rows, columns, or regions.
SUDOKU WITH COMPUTER

 Software or algorithm designed to


automatically solve Sudoku puzzles.

 Uses logic and deduction to complete the grid


without manual input.

 Can generate, solve, and check Sudoku puzzles


at various difficulty levels.

 A helpful tool for players stuck on a puzzle.

 Speeds up the puzzle-solving process.


ADVANTAGE OF SUDOKU
WITH COMPUTER
Speed: Computers solve Sudoku puzzles quickly.

Accuracy: Eliminate human errors in solutions.

Handling Difficulty Levels: Suitable for all skill levels.

Multiple Solutions: Identifies all valid solutions.

Instant Feedback: Offers hints and error detection


ALGORITHMS
• Define a method called is PresentInCol(), this will take • Define a method called findEmptyPlace(), this will take row
call and num and col
• for each row r in the grid, do • for each row r in the grid, do
• for each column c in the grid, do
• if grid[r, col] = num, then return true • if grid[r, c] = 0, then return true

• return false otherwise • return false


• Define a method called is PresentInRow(), this • Define a method called is ValidPlace(), this will take row,
will take row and num col, num
• for each column c in the grid, do • if is PresentInRow(row, num) and is PresentInCol(col, num)
and is PresntInBox(row – row mod 3, col – col mod 3, num)
• if grid[row, c] = num, then return true all are false, then return true
• Define a method called solveSudoku(), this will take the
• return false otherwise grid
• Define a method called is PresentInBox() this • if no place in the grid is empty, then return true
will take boxStartRow, boxStartCol, num • for number 1 to 9, do
• for each row r in boxStartRow to next 3 rows, do
• if is ValidPlace(row, col, number), then
• for each col r in boxStartCol to next 3 columns, • grid[row, col] := number
do • if solveSudoku = true, then return true
• if grid[r, c] = num, then return true • grid[row, col] := 0
• return false otherwise • return false
FLOW CHART
TARGET
These targets are important because they
Targets of a Sudoku solver allow Sudoku solvers to be used in a variety
of applications-

• Find a unique solution to the Sudoku • teaching people how to solve Sudoku
puzzle. puzzles.

• Solve Sudoku puzzles of different • Providing a challenge for experienced


difficulty levels. Sudoku solvers.

• Generate new Sudoku puzzles for users • Generating new Sudoku puzzles for people
to solve. to solve.

• Be easy to use for both beginners and • Verifying the correctness of Sudoku
experienced Sudoku solvers. solutions.
CHALLENGES

• Solving difficult puzzles

• Handling errors in input

• Solving puzzles with constraints

• Solving puzzles with multiple solutions

• Being efficient
PROJECT TIMELINE
August September October
November

Planning About
The Project Topic

Code Implementation
And Follow-ups and
testing submission
Research and
Solution to problem
CONCLUSION
A Sudoku solver efficiently finds
valid solutions to Sudoku puzzles,
accommodating varying difficulty
levels. It employs logic and
techniques like naked/hidden
singles, pairs, and advanced
strategies. User-friendliness, speed,
and the ability to mimic human-
solving are essential considerations.
Solvers can be open source or
commercial, each with distinct
advantages.
THANK
YOU

You might also like