Jambura Journal of Mathematics
Vol 4, No 2: July 2022

Formulation of Sudoku Puzzle Using Binary Integer Linear Programming and Its Implementation in Julia, Python, and Minizinc

Fahren Bukhari (Department of Mathematics, Faculty of Science and Mathematics, IPB University, Jl. Meranti, Kampus IPB Dramaga, Bogor 16680)
Sri Nurdiati (Department of Mathematics, Faculty of Science and Mathematics, IPB University, Jl. Meranti, Kampus IPB Dramaga, Bogor 16680)
Mohamad Khoirun Najib (Department of Mathematics, Faculty of Science and Mathematics, IPB University, Jl. Meranti, Kampus IPB Dramaga, Bogor 16680)
Nandika Safiqri (Department of Mathematics, Faculty of Science and Mathematics, IPB University, Jl. Meranti, Kampus IPB Dramaga, Bogor 16680)



Article Info

Publish Date
25 Jun 2022

Abstract

Sudoku is a number puzzle game popular among people with various difficulty levels (easy, medium, hard, and extremely hard). Sudoku can be modeled as a linear programming problem in mathematics, particularly binary integer linear programming (BILP). Completing Sudoku using BILP is quite tricky because it requires many iterations. Therefore, this study aims to analyze the Sudoku problem using the BILP formulation and implement the problem using Julia, Python, and MiniZinc. Out of 15 cases for each difficulty level, Julia performs better than Python and MiniZinc based on computation time. Moreover, Sudoku with easy difficulty levels is solved with a longer computation time than the other three difficulty levels. The computation time for solving BILP is getting faster as the difficulty level of the Sudoku problem increases. This is because Sudoku problems with easy difficulty levels have more known values as clues and generate more constraints than other difficulty levels.

Copyrights © 2022






Journal Info

Abbrev

jjom

Publisher

Subject

Mathematics

Description

Jambura Journal of Mathematics (JJoM) is a peer-reviewed journal published by Department of Mathematics, State University of Gorontalo. This journal is available in print and online and highly respects the publication ethic and avoids any type of plagiarism. JJoM is intended as a communication forum ...