Find Sudoku Algorithm Solutions in Java - n Size

In summary, the person is writing a program in java and wants to find an algorithm to calculate all possible sudoku solutions for a board of size n. They do not need to know how to solve it, only the number of possibilities. The other person suggests looking into the 9x9 playing board and provides a link for reference.
  • #1
you878
9
0
I'm writing a program in java and I need to find an algorithm to calculate all possible sudoku solutions for a board of size n. I don't need to know how to solve it, just how many possibilities there are.
 
Technology news on Phys.org
  • #2
Why don't you address the 9x9 playing board?
 
  • #3
you878 said:
I'm writing a program in java and I need to find an algorithm to calculate all possible sudoku solutions for a board of size n. I don't need to know how to solve it, just how many possibilities there are.

Are you looking for something like this?
http://en.wikipedia.org/wiki/Mathematics_of_Sudoku"
 
Last edited by a moderator:

1. What is a Sudoku algorithm?

A Sudoku algorithm is a set of instructions or rules used to solve Sudoku puzzles. It is a systematic approach to finding the correct numbers to fill in each square in a Sudoku grid.

2. How does the algorithm work?

The algorithm works by analyzing the initial Sudoku grid and using logical deductions to fill in the missing numbers. It starts by identifying any numbers that are already given in the grid, and then uses techniques such as elimination and candidate counting to determine the correct numbers for each square.

3. How is the algorithm implemented in Java?

The algorithm can be implemented in Java using various data structures and programming techniques. Some common approaches include using backtracking, recursion, and object-oriented programming principles to create a Sudoku solver program.

4. Can the algorithm solve Sudoku puzzles of any size?

Yes, the algorithm can be adapted to solve Sudoku puzzles of any size. The size of the puzzle refers to the number of squares in each row and column, which can vary from the standard 9x9 grid. The algorithm can be modified to work for puzzles with larger or smaller grid sizes.

5. Are there any limitations to the algorithm?

While the algorithm is effective for solving most Sudoku puzzles, it may not be able to solve extremely difficult or complex puzzles that require advanced techniques. In such cases, human intervention or alternative solving methods may be necessary.

Similar threads

  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
1
Views
972
  • Programming and Computer Science
Replies
6
Views
987
  • Programming and Computer Science
Replies
8
Views
1K
Replies
9
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
3
Views
942
  • Programming and Computer Science
Replies
30
Views
4K
Back
Top