Search for a tool
Latin Square

Tool to solve or generate Latin squares (generalization of sudoku). The Latin square is a square grid of size NxN comprising N distinct symbols distributed such that each row and column also have N distinct symbols.

Results

Latin Square -

Tag(s) : Number Games

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Latin Square' tool for free! Thank you!

Latin Square

Latin Square Solver

Loading...
(if this message do not disappear, try to refresh this page)
See also: Sudoku Solver

Latin Square Generator



See also: Sudoku Solver

Answers to Questions (FAQ)

What is a latin square? (Definition)

A Latin square is a square of size $ n \ times n $ filled with exactly $ n $ distinct symbols (letters, numbers, numbers) so that each symbol appears only once per line and per column.

Example: A 3x3 Latin square:

123
312
231

How to generate a latin square?

There are several methods for generating Latin squares. Here is the shortest to explain:

1- Take an empty NxN grid,

Example:

---
---
---

2- Fill the first line with N symbols

Example:

ABC
---
---

3- Fill the next line by shifting all the symbols by 1 box to the right (and return to the beginning of the line if necessary)

Example:

ABC
CAB
---

4- Repeat step 3 until you reach the last line of the grid.

Example:

ABC
CAB
BCA

And voilà ! The square is thus valid but always identical, to obtain others:

5- Randomly swap 2 lines

6- Randomly swap 2 columns

7- Repeat steps 5 and 6 as many times as desired, the result is always a Latin square.

How to solve a latin square?

The resolution algorithm consists in noting, for each unfilled cell, the list of possible symbols respecting the rules (prohibition of 2 identical symbols on the same line or the same column), if only one symbol among the N is possible then fill in the cell with this symbol.

Why is a Latin square so called? (Origin of the name)

The Latin square name comes from Leonhard Euler who studied these grids and who used Latin letters as symbols.

What are the variants of the latin square?

The best known variant is sudoku, which uses the same bases, but adds a constraint on blocks of 3x3 (and sometimes other constraints for irregular sudoku).

Ken-ken (kendoku) is also a Latin square with constraints of mathematical calculations.

The magic square is a distant mathematical variant which takes up the fact that the sum of the rows and the columns is always identical, but it is not limited to N distinct symbols.

When latin square have been invented ?

The first written traces of work on these grids date from 1700, but the principle itself was known long before.

Source code

dCode retains ownership of the "Latin Square" source code. Except explicit open source licence (indicated Creative Commons / free), the "Latin Square" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Latin Square" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Latin Square" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Latin Square" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Latin Square on dCode.fr [online website], retrieved on 2024-05-18, https://www.dcode.fr/latin-square

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Latin Square' tool for free! Thank you!


https://www.dcode.fr/latin-square
© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.
 
Feedback