Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

You must login to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Passionable Logo Passionable Logo
Sign InSign Up

Passionable

Passionable Navigation

  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • New Questions
  • Trending Questions
  • Must read Questions
  • Hot Questions
Home/ Questions/Q 1787
In Process
Alek Richter
  • 0
Alek RichterEnlightened
Asked: November 8, 20212021-11-08T05:19:54+00:00 2021-11-08T05:19:54+00:00

How hard is binary Sudoku puzzle?

  • 0

Sudoku is a well-known puzzle that is NP-complete. Binary Sudoku is a variant that only allows the numbers 0 and 1

. The rules are as follows.

  1. Each row and each column must contain an equal number of zeros and ones.
  2. Each row and each column is unique.
  3. No row or column contains consecutive triples of zeros or ones (111
  4. is a consecutive triple of ones).

The input is a N×N square partially filled with zeros and ones. To solve the puzzle, each cell in the N×N square must be filled by either 0 or 1

while respecting the above rules. I was not able to find any intractability result for solving the Binary Sudoku puzzle.

How hard is solving the Binary Sudoku puzzle? Is it NP-complete?

Also, I’m interested in the complexity of a related problem.

Given a fully filled N×N

square that respects only rules 1 and 2 above,

how hard is it to find a permutation of rows and columns such that the resulting square respects rule 3?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
    • Report
  • Share
    Share
    • Share on Facebook
    • Share on Twitter
    • Share on LinkedIn
    • Share on WhatsApp

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Alek Richter Enlightened
    2021-11-08T05:20:40+00:00Added an answer on November 8, 2021 at 5:20 am

    EDIT: I quickly completed the amateur proof that I started a few months ago and never finished.

    You can download it in PDF format on my blog … nobody has checked it yet, so refutations, comments and suggestions are welcome.

    I don’t know if there is an official proof, but a few months ago I built the gadgets to mimic a planar 3-CNF formula; for example the OR, SPLIT and TURN gadgets are:

    enter image description here

    I built/checked the gadgets using a simple constraint solver program.

    The uniqueness of each row/column (rule 2) can be achieved marking them with a unique “binary number” using a 2×2 block that acts like a “digit”:

    01 = 0 10 = 1
    10 01

    And the equal number of 1s and 0s (rule 3) can be achieved mirroring the whole puzzle, and inverting the 0s with 1s (using special walls in the middle that allow the transition without breaking the rules):

    3CNF simulation | wall | 3CNF sim. with | 0000 (using 2×2 blocks)
    | | 0,1 inverted | 0001
    ——————–+ +—————–+ 0010
    wall wall | ….
    ——————–+ +—————–+ ….
    3CNF sim. with | wall | 3CNF simulation |
    0,1 inverted | | |
    ——————–+——–+—————–+
    0101 …. (using 2×2 blocks)
    0011 ….
    0000 ….

    So deciding if a partially filled N×N

    Binary Puzzle board has a solution, is NP-hard.

    Like other similar puzzles it’s not immediate to say that it is in NP (see for example the discussion on succinct Nurikabe on cstheory). However if the initial board is given as a full string {0,1,⊥}N×N
    (the representation is not succinct), and you drop the the unique solution constraint (which is another rule of the game), then the problem is in NP (and thus NP-complete).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 4k
  • Best Answers 0
  • Users 200
  • Popular
  • Answers
  • Alek Richter

    How do I update/upgrade pip itself from inside my virtual ...

    • 2 Answers
  • Alek Richter

    Truth value of a Series is ambiguous. Use a.empty, a.bool(), ...

    • 2 Answers
  • Alek Richter

    What is a NullPointerException, and how do I fix it?

    • 2 Answers
  • Alek Richter
    Alek Richter added an answer Pandas DataFrame columns are Pandas Series when you pull them… January 13, 2022 at 2:21 pm
  • Alek Richter
    Alek Richter added an answer The handshake failure could have occurred due to various reasons:… January 13, 2022 at 2:19 pm
  • Alek Richter
    Alek Richter added an answer Mac OS X doesn't have apt-get. There is a package… January 13, 2022 at 2:18 pm

Top Members

Alek Richter

Alek Richter

  • 4k Questions
  • 1k Points
Enlightened
fayemolloy0

fayemolloy0

  • 0 Questions
  • 20 Points
Begginer
NikolaZex

NikolaZex

  • 0 Questions
  • 20 Points
Begginer

Trending Tags

questin question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • New Questions
  • Trending Questions
  • Must read Questions
  • Hot Questions

© 2021 Passionable. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.