Beyond 0 and 1, the binary sudoku

Image by Eva Gorobets retrieved from Unsplash

Binary Sudoku (also known as Takuzu or Binairo) is a logic puzzle played on an $n \times n$ grid board, where $n$ is an even number. The goal is to fill all empty cells with only zeros and ones while respecting three fundamental rules:

  1. Balance: Each row and each column must contain exactly the same number of zeros and ones.
  2. Consecutive limit: No more than two identical numbers can be adjacent (neither horizontally nor vertically).
  3. Uniqueness: No two rows and no two columns can be identical.

A Binary Sudoku puzzle starts with some cells already filled with initial values. Below is an example of an $8 \times 8$ board:

Would you like to try solving it logically before looking at its mathematical formulation?


Binary Sudoku can be formulated as a binary linear optimization model, do you dare to try it?


Want to keep exploring the world of Operations Research? Discover more posts on the topic here.




If you found this useful, please cite this as:

Martín-Campo, F. Javier (Jul 2026). Beyond 0 and 1, the binary sudoku. https://www.fjmartincampo.com/blog/2026/binarysudoku/.

or as a BibTeX entry:

@misc{martín-campo2026beyond-0-and-1-the-binary-sudoku,
  title   = {Beyond 0 and 1, the binary sudoku},
  author  = {Martín-Campo, F. Javier},
  year    = {2026},
  month   = {Jul},
  url     = {https://www.fjmartincampo.com/blog/2026/binarysudoku/}
}



Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • A crime has been committed... in a sudoku!
  • The harmony of digits in solving Kakuro
  • Killer Sudoku, the empty board challenge that math can solve
  • Solving the Number Sums board using mathematical optimization
  • Building bridges with linear optimization, the Hashi puzzle