Skip to main content

Questions tagged [sudoku]

This challenge is directly related to solving, creating, or otherwise working with sudoku puzzles.

Filter by
Sorted by
Tagged with
14 votes
5 answers
3k views

Sudoku as a SAT problem

Background An interesting way to solve a Sudoku puzzle is to represent it as a Boolean satisfiability problem, and then feed it to a SAT solver. A Boolean Satisfiability Problem (abbreviated as SAT ...
alephalpha's user avatar
  • 48.7k
3 votes
3 answers
483 views

Sudoku Solver Diagonal Constraint

This is the follow up question to standard Sudoku solver. You are given a Sudoku grid where . represents an empty cell and the other cells are filled with numbers <...
Arya Singh's user avatar
12 votes
2 answers
764 views

Solving an easy Sudoku in increasing digit order

Introduction: I'm old-fashioned and still read a physical newspaper in the morning while eating my breakfast. Although I don't like Sudoku that much, I do solve the Light-complexity ones, which are ...
Kevin Cruijssen's user avatar
15 votes
2 answers
646 views

Validate Sudoku on a Mobius Strip

@BeastlyGerbil presents, the world's very first MOBIUS SUDOKU: Google Sheets version (The left most square backs onto the right most square, and the middle squares back onto each other. The ends are ...
Taco's user avatar
  • 521
10 votes
4 answers
329 views

Counting valid Binary Sudoku boards

Sequel of Counting valid Binary Sudoku rows. Background Binary Sudoku, also known as Takuzu, Binario, and Tic-Tac-Logic, is a puzzle where the objective is to fill a rectangular grid with two ...
Bubbler's user avatar
  • 77.5k
26 votes
14 answers
2k views

Counting valid Binary Sudoku rows

Background Binary Sudoku, also known as Takuzu, Binario, and Tic-Tac-Logic, is a puzzle where the objective is to fill a rectangular grid with two symbols (0s and 1s for this challenge) under the ...
Bubbler's user avatar
  • 77.5k
16 votes
3 answers
329 views

Is this board Latin-style?

Inspired by Flow Fit: Sudoku, a brand-new mobile puzzle game (as of Nov 2019). Background A Latin square is a square grid of side length \$ n \$ filled with \$ n \$ different symbols, where each row ...
Bubbler's user avatar
  • 77.5k
36 votes
12 answers
19k views

The fastest Sudoku solver

Winner found It seems as if we have a winner! Unless anyone plans on contesting the world's current fastest Sudoku solver, user 53x15 wins with the staggeringly fast solver Tdoku. For anyone still ...
maxb's user avatar
  • 6,897
-1 votes
1 answer
284 views

Morse sudo-ku-de

Hehe, see what I did with the title? Anyways... Your job is to create a sudoku solver that accepts input in Morse code and creates output in Morse code. Here's the Morse code numbers for reference: <...
moltarze's user avatar
  • 2,570
16 votes
1 answer
613 views

Maximize Sudoku King's tour

Background Sudoku is a number puzzle where, given an \$ n \times n \$ grid divided into boxes of size \$ n \$, each number of \$ 1 \$ to \$ n \$ should appear exactly once in each row, column and box....
Bubbler's user avatar
  • 77.5k
27 votes
29 answers
5k views

Output a Sudoku board

Today's challenge is simple: Without taking any input, output any valid sudoku board. In case you are unfamiliar with sudoku, Wikipedia describes what a valid board should look like: The objective ...
DJMcMayhem's user avatar
  • 59.3k
0 votes
0 answers
161 views

Validate Sudoku (N by N) [duplicate]

Challenge : Create a random (pseudo random) Sudoku board with dimension n x n Input : Given : ...
Muhammad Salman's user avatar
20 votes
14 answers
5k views

Draw a sudoku board using line drawing characters

This is code golf. For this challenge, I will accept a method (you don't need a full program), but the method signature does count towards the byte count and I want to see the full signature (not a ...
Joel Coehoorn's user avatar
8 votes
4 answers
710 views

Find the rows which make each column have one True (was: Knuth's Algorithm X)

Task Given a Boolean matrix, find one (or optionally more) subset(s) of rows which have exactly one True in each column. You may use any algorithm, but must support very large matrices, like the last ...
Adám's user avatar
  • 30.6k
8 votes
5 answers
401 views

Retrieve all possible marks that can be placed in a Sudoku puzzle [closed]

Given a Sudoku puzzle, find all possible marks that can be filled into each empty cell. Test case Input: ...
driima's user avatar
  • 461
68 votes
7 answers
6k views

Regex Golf: Verify a Sudoku Solution

Write a regex which matches any valid sudoku solution and doesn't match any invalid sudoku solution. The input is an unrolled version of the sudoku, i.e. there are no line delimiters. E.g. the ...
Martin Ender's user avatar
9 votes
2 answers
709 views

Create a diagonal sudoku board

A Diagonal Sudoku board is a special case of Latin squares. It has the following properties: The board is a 9-by-9 matrix Each row contains the numbers 1-9 Each ...
Stewie Griffin's user avatar
11 votes
2 answers
619 views

Y-Wing Strategy for Sudoku

I recently got a new Sudoku app that produces really hard Sudoku's, which can't be solved using the standard strategies. So I had to learn a few new ones. One of these strategies is the Y-Wing ...
Jakube's user avatar
  • 21.9k
15 votes
5 answers
1k views

Build a minimum-clue Sudoku unsolver

My attempt at stating this question, but with a more objective solving criterion. Your task is to build a program or function that takes a solved Sudoku grid S in ...
Joe Z.'s user avatar
  • 35k
36 votes
16 answers
7k views

Sudoku Compression

Your job is to write a program (or two separate programs) in any language that: Can take a completed Sudoku board as input (in any logical format) and compress it into a string of characters Can take ...
kukac67's user avatar
  • 2,179
10 votes
1 answer
1k views

How many Sudoku puzzles exist?

This is not a Sudoku solver, nor a Sudoku checker. Your challenge is to write a function or script that, given as input the "block" size of a 2D Sudoku puzzle (which is 3 for the classic 9x9 board, 4 ...
Tobia's user avatar
  • 5,681
24 votes
22 answers
6k views

Create a sudoku solution CHECKER

Create a Sudoku solution CHECKER There are oodles of Sudoku SOLVERS here, but I want you to create a solution CHECKER as small as humanly possible (code-golf). A valid entry will be able to either ...
David Wilkins's user avatar
10 votes
3 answers
6k views

Build a Killer Sudoku Solver

You thought regular sudoku was hard, now try Killer Sudoku! In the game of Killer Sudoku, you aren't given any numbers at all. Instead, you're given regions that are said to add up to a certain ...
Joe Z.'s user avatar
  • 35k
8 votes
0 answers
1k views

Minimal Sudoku Generator [closed]

Ask questions if you need to, I'll elaborate on anything that needs clarified. My challenge is to unsolve a sudoku to a minimal state. Basically take a supplied, solved, sudoku board and unsolve it ...
Rob's user avatar
  • 307
6 votes
1 answer
2k views

Sudoku board generator [closed]

A program that randomly generates a Sudoku game board with varying degrees of difficulty (however you decide to measure difficulty). Sudoku requires that there is only one solution, so your program ...
Jim McKeeth's user avatar
19 votes
1 answer
1k views

Unique Sudoku Finder

Challenge: Given a Sudoku board on standard input, find the minimum number of numbers added to make the board unique. Specifics/Rules: The input is formatted as follows (all whitespace is ...
Root Infinity's user avatar
25 votes
13 answers
6k views

Implement a Brute Force Sudoku Solver

Implement the shortest Sudoku solver using guessing. Since I have received a few request I have added this as an alternative question for those wishing to implement a brute force sudoku solver. ...
snmcdonald's user avatar
29 votes
4 answers
3k views

Implement a Non-Guessing Sudoku Solver

Implement the shortest Sudoku solver. Sudoku Puzzle: ...
snmcdonald's user avatar