• Title/Summary/Keyword: Sudoku solving

Search Result 7, Processing Time 0.025 seconds

Solving Sudoku as Constraint Satisfaction Problem (Sudoku 퍼즐의 구속조건만족문제 해법)

  • Lee, Seung-Won;Choi, Ho-Jin
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2006.11a
    • /
    • pp.55-58
    • /
    • 2006
  • This paper presents solving the Sudoku puzzle as a constraint satisfaction problem (CSP). After introducing the rules and characteristics of the puzzle, we formulate the puzzle as a CSP and develop various methods of solving the problem. Blind search, minimum remaining value (MRV) heuristic, and some advanced methods are investigated, and their algorithms are implemented in this undergraduate project. The performance comparisons of these methods are discussed in the paper.

  • PDF

Applying Genetic Algorithm To Randomly Creating And Solving A Sudoku Puzzle (유전 알고리즘을 이용한 스도쿠 퍼즐 생성 및 풀이 방법)

  • Hwang, Yoon Chan
    • Proceeding of EDISON Challenge
    • /
    • 2015.03a
    • /
    • pp.521-526
    • /
    • 2015
  • A Sudoku puzzle is a kind of magic square puzzle which requires a non-repeated series of numbers from 1 to 9 in each 9 rows and 9 columns. Furthermore it contains total of 9 small three-by-three matrices, which need non-repeated numbers from 1 to 9 as well. Therefore the total number of possible cases of Sudoku puzzle is finite, even though that of creating nine-by-nine square is exponentially great. Accordingly a certain set of way is need not only for solving the puzzle, but also creating a new one. In this study, the method for creating a Sudoku puzzle applying genetic algorithm is suggested and will be demonstrated. Also, it will be shown that a Sudoku puzzle can be solved by genetic algorithm.

  • PDF

A Method to Expand a Complete Binary Tree using Greedy Method and Pruning in Sudoku Problems (스도쿠 풀이에서 욕심쟁이 기법과 가지치기를 이용한 완전이진트리 생성 기법)

  • Kim, Tai Suk;Kim, Jong Soo
    • Journal of Korea Multimedia Society
    • /
    • v.20 no.4
    • /
    • pp.696-703
    • /
    • 2017
  • In this paper, we show how to design based on solving Sudoku problem that is one of the NP-complete problems like Go. We show how to use greedy method which can minimize depth based on tree expansion and how to apply heuristic algorithm for pruning unnecessary branches. As a result of measuring the performance of the proposed method for solving of Sudoku problems, this method can reduce the number of function call required for solving compared with the method of heuristic algorithm or recursive method, also this method is able to reduce the 46~64 depth rather than simply expanding the tree and is able to pruning unnecessary branches. Therefore, we could see that it can reduce the number of leaf nodes required for the calculation to 6 to 34.

Optimized Encoding of Sudoku Puzzle for SAT Solvers (SAT 처리기를 위한 수도쿠 퍼즐의 최적화된 인코딩)

  • Kwon, Gi-Hwon
    • Journal of KIISE:Software and Applications
    • /
    • v.34 no.7
    • /
    • pp.616-624
    • /
    • 2007
  • Sudoku can be regarded as a SAT problem. Various encodings are known for encoding Sudoku as a Conjunctive Normal Form (CNF) formula, which is the standard input for most SAT solvers. Using these encodings for large Sudoku, however, generates too many clauses, which impede the performance of state-of-the-art SAT solvers. This paper presents an optimized CNF encodings of Sudoku to deal with large instances of the puzzle. We use fixed cells in Sudoku to remove redundant clauses during the encoding phase. This results in reducing the number of clauses and a significant speedup in the SAT solving time.

유전 알고리즘을 이용한 스도쿠 퍼즐 생성 및 풀이 방법

  • Hwang, Yun-Chan
    • CDE review
    • /
    • v.21 no.2
    • /
    • pp.69-74
    • /
    • 2015
  • A Sudoku puzzle is a kind of magic square puzzle which requires a non-repeated series of numbers from 1 to 9 in each 9 rows and 9 columns. Furthermore it contains total of 9 small three-by-three matrices, which need non-repeated numbers from 1 to 9 as well. Therefore the total number of possible cases of Sudoku puzzle is finite, even though that of creating nine-by-nine square is exponentially great. Accordingly a certain set of way is need not only for solving the puzzle, but also creating a new one. In this study, the method for creating a Sudoku puzzle applying genetic algorithm is suggested and will be demonstrated. Also, it will be shown that a Sudoku puzzle can be solved by genetic algorithm.

  • PDF

Effect on Preprocessing in SAT with Sudoku Puzzle (수도쿠 퍼즐을 통해서 살펴본 SAT에서 전처리 효과)

  • Kwon, Gi-Hwon
    • Journal of Information Technology Services
    • /
    • v.7 no.2
    • /
    • pp.127-135
    • /
    • 2008
  • The concept of preprocessing is widely used in various computer science area such as compiler and software engineering for the purpose of macro processing and optimization. In addition, preprocessing is also used in SAT solvers in order to eliminate redundant literals and clauses to speed up its solving time before searching the state space. However, there is an unexpected run-time error such as stack-overflow during this step, in case the size of a given set of clauses is huge which impedes SAT solvers. In this case, the preprocessing should be applied at the encoding time to optimize its size. In this paper this idea is applied to several Sudoku problems. As a result, significant improvements are obtained with respect to the number of variables and clauses as well as the solving time compared to the previous works.

A New SAT Encoding for Solving Sudoku (수도쿠 풀이를 위한 새로운 SAT 인코딩)

  • Park, Jun-Kil;Choi, Jin-Young
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2007.06b
    • /
    • pp.487-492
    • /
    • 2007
  • 수도쿠를 푸는 것은 오락으로서 뿐 아니라 컴퓨터 계산 문제로서도 흥미롭다. 수도쿠는 minimal과 extended 인코딩을 통해 SAT로 변환되고, 탐색이 아닌 추론기술의 반복 적용을 통해 다항시간에 해를 찾을 수 있다. minimal과 extended 인코딩은 직관적이지만 고차 수도쿠($16\times16$ 이상)를 풀기에 충분하지 못하다. 이 논문에서는 extended 인코딩을 개선한 블록 인코딩을 제안한다. 블록 인코딩을 $16\times16$$25\times25$ 퍼즐 집합에 적용 했을 때 extended 인코딩에 비해 추론기술에 따라 1%에서 12% 더 많은 수의 퍼즐을 푸는 것을 실험을 통하여 보인다.

  • PDF