The play of the Sudoku consists in supplementing a square grid divided into NR areas of NR boxes, partly filled with numbers, so that in each line, each column and each area the numbers of 1 with NR appear one and only once.

A analyzes mathematical of Sudoku makes it possible to discover the various properties and problems which hide behind this play and its alternatives.

Introduction

The mathematical analysis of Sudoku is divided into two great parts: analysis of the properties of the complete grids and analysis of the resolution of a grid.

The analysis of the grids was mainly focused on the enumeration of the possible solutions for various alternatives of the play. The study of the resolution concentrates on the initial values of the grid and the stages which lead to the complete grid. These techniques call upon several disciplines: analyzes combinative, algorithmic, theory of the groups as well as the programming since the computer makes it possible quickly to solve the grids.

There is a great number of alternatives of Sudoku, in general characterized by the size of the grid (the parameter NR ) and forms it areas. Sudoku traditional have a NR equal to 9 with areas of 3x3 boxes. Rectangular Sudoku has rectangular areas of a size L × C where L is the number of lines and C the number of columns. Such Sudoku, with a size of L ×1 (or 1× C ), becomes a Carré Latin since the area is a line or a single column.

More complex alternatives exist like those with cut out areas in an irregular way ( Nanpure ), with additional constraints ( Samunamupure or Killer Sudoku , respect of unicity on the diagonals with the Kokonotsu , forced on the order of the elements with the Greater-Than ) or of the assemblies of several grids ( Samurai , Sudoku in 3D). In certain alternatives, the figures are replaced by letters. This substitution of the characters used does not change however anything with the intrinsic properties puzzle if the rules remain the same ones.

The mathematical analysis of Sudoku followed the popularity of the play. The analyzes concerning algorithm complexity and the Np-complete character of the play were documented towards the end of the year 2002, the results of enumeration made their appearance about the middle of the year 2005. The contributions of the many researchers and amateurs made it possible to update the properties of the play. The appearance of the alternatives of Sudoku all the more extends the mathematical elements to consider and explore.

Contrasting with the two principal mathematical approaches quoted at the beginning, an approach based on mathematical logic and attacking the problem of the resolution of the puzzles was proposed recently in the book of Denis Berthier, " The Hidden Logic off Sudoku" (The hidden logic of Sudoku). That made it possible to discover and formalize all generalized symmetries of the play and to discover new rules of resolution based above, like the hidden chains xy.

Mathematical context

The problem to place figures on a grid of n2×n2 including/understanding n×n areas is proven Np-complete

The resolution of a sudoku can be formalized by the problem of the Coloration of graph. The goal, in the traditional version of the play, is to apply 9 colors to a given graph, starting from a partial coloring (initial configuration of the grid). This graph has 81 tops, one by cell. Each box of the sudoku can be labelled with an ordered pair (X, there) , where X and is there entireties ranging between 1 and 9. Two distinct tops labelled by (X, there) and (X', there') are connected by an edge if and only if:

  • X = X' (the two cells belong to the same line) or,
  • there = there' (the two cells belong to the same column) or,
  • \ left \ lceil {\ frac {x-1} {3}} \ right \ rceil = \ left \ lceil \ frac {x'-1} {3} \ right \ rceil and \ left \ lceil \ frac {y-1} {3} \ right \ rceil = \ left \ lceil \ frac {y'-1} {3} \ right \ rceil (the two cells belongs with the same area). The grid is supplemented by affecting an entirety between 1 and 9 for each top, so that all the tops bound by an edge do not share the same entirety.

A grid solution is also a Carré Latin. The relation between the two theories from now on is completely known, since D. Berthier showed, in " The Hidden Logic off Sudoku" , that a first order logical formula which does not mention the blocks (or areas) is valid for Sudoku if and only if it is valid for the Latin squares.

There are notably less grids solutions than Latin squares, because Sudoku forces additional constraints (See Ci above point 4: many possible complete grids)

The maximum number of revealed without a single solution not appearing immediately, it does not matter the alternative, is the size of the grid minus 4: if two pairs of candidates are not registered and that the blank cells occupy the corners of a rectangle, and that exactly two cells are in an area, then there exist two ways of registering the candidates. The opposite of this problem, namely the minimum number of revealed to guarantee a single solution, is a problem unsolved, although enthusiastic Japanese discovered a grid 9×9 without symmetry which contains only 17 revealed (more, to see. A result published in 2007, reveals that so that a sudoku has a single solution, it is necessary that 8 of the 9 digits is revealed. and), whereas 18 is the minimum number of revealed for the symmetrical grids 9×9.

Many possible complete grids

It is obvious that the number of complete grids is lower than the number of ways of placing nine digits 1, nine digits 2…, nine digits 9 in a grid of 81 boxes. The number of grids is thus much lower than
\ frac {81!}{9! ^9} \ approx 5,31306887 \ times 10^ {70}
Indeed, in this calculation, one does not take account of any the constraints of unicity.

The number of possible complete grids is also lower than the numbers of square Latin on side 9.

Lastly, the number of possible complete grids is lower than 9! ^9 which corresponds to the number of ways of building the areas without taking account of the constraints on the lines and the columns.

In 2005, Bertram Felgenhauer and Frazer Jarvis proved that this number of grids was of:

6.670.903 752.021.072 936.960≈6,67.1021 (for more details, to see and).

This number is equal to:

9! ×722×27×27 704.267.971

The last factor is a Prime number. This result was proven thanks to a exhaustive Recherche. Frazer Jarvis then considerably simplified the proof thanks to a detailed analysis. The demonstration was validated in an independent way by ED Russell. Jarvis and Russell showed thereafter that by taking account of symmetries, there were 5.472.730 538 solutions (for more details, to see and).

On the other hand, on this date, no result exists on the number of complete grids in a super sudoku (grid 16 × 16). So now, one is interested in the numbers of problems proposables, this number is definitely more important because there exist several ways of revealing the figures of the same grid.

The problem of knowing how much boxes filled are necessary as a preliminary to make the resolution single is, to date, without answer. The best result, obtained by Japanese, is of 17 unconstrained boxes of symmetry. Nothing says that it is not possible with less numbers. Gordon Royle indicates that two resolutions are regarded as different if they cannot be transformed one towards the other (or the reverse) thanks to a combination of the following operations:

  1. permutations of the 9 numbers

  2. exchange of the lines with the columns (Transposition)
  3. permutation of the lines in only one block
  4. permutation of the columns in only one block
  5. permutation of the blocks on a line of blocks
  6. permutation of the blocks on a column of blocks

One notices the analogy with the matric operations in Linear algebra.

Terminology

A puzzle is a incomplete grid where appear of the initial values. The areas are also called blocks or zones. The square term of is avoided to raise any confusion.

A band is a succession of adjacent blocks on the horizontal axis. A pile is a succession of adjacent blocks on the vertical axis. In Sudoku of 9x9 boxes, there are thus 3 bands and 3 piles.

Correctly conceived Sudoku has one and only a solution: the final grid is single, but the resolution starting from the partial grid can however take different ways.

Formalization of the various alternatives

An area can be described by its dimensions: L X C where L is the number of lines and C the number of columns in the area. In the traditional version of Sudoku, L = C = 3. That implies that there exists L areas by band and C areas by pile. It is more practical to mention the size of the area rather than the number of elements because an area of 2x6 has the same number of boxes as that of 3x4.

Following cutting can be adopted to classify the alternatives coarsely:

  • rectangular areas
    • square areas
  • irregular areas (Polyomino)

Additional constraints make it possible to better target the type of play.

Square Sudoku of NR X NR areas has several properties respected for all its subelements, in addition to the traditional rule of the absence of doubled blooms. Indeed, each line and each column have an intersection with NR areas and division NR boxes with each one of them. The number of bands and piles is also equal to NR . It should be noted that rectangular Sudoku does not have these properties.

Sudoku with areas of 3x3 hiding place another property which is clean for him: NR is the number of sub-units considered in the play, namely three: the line, the column and the area.

Definitions

That is to say:

  • S a solution of Sudoku with specific dimensions and which satisfies the rules of original Sudoku (not of doubled blooms in the lines, columns and areas)
  • S = {S}, the whole of all the possible solutions
  • |S|, the cardinality (size) of the unit S (IE. the number of solutions)

The number of solutions depends on the size on the grid, the observed rules and the precise definition of a distinct solution. For Sudoku with areas of 3x3, conventions for the posting of the contents of the grid are the following ones: the bands are labelisées top to the bottom, the piles of the left towards the line. The areas are thus numbered left towards the line and the top downwards. This convention also applies for the rectangular grids.

Other terms are useful in the case of Sudoku with areas of 3x3:

  • the triplet is a combination not-ordinate of three values present on a line or a column of an area. For example, the triplet {3, 5,7} means that values 3,5,7 appear in a line or a column of the area, but without specifying their order of appearance (one could have a line with 5,7,3 or a column with 3,7,5). The values of a triplet can be arranged in 6 different ways (3!) thanks to permutations. By convention, the elements of a triplet are written in the order ascending but that does not mean that they appear in the grid according to the same order;
    • the notation H RL indicates a triplet for the area R and the line L of the grid. The prefix H indicates that it is about a horizontal triplet;
    • in a similar way, notation v RC identifies a triplet for the area R and the column C of the grid. The prefix v indicates that it is about a vertical triplet.

For example, the notation h56 corresponds to the triplet of area 5, line 6. In English, one uses the notation R for row and C for column .

One also speaks about mini-line or of mini-column to indicate the portion presents in an area of a line or a column of the grid.

Many possible solutions

Does the answer to the question “How much y' have of Sudoku? ” depends on the definition on a solution and equivalence between several solutions. For the enumeration of all the possible solutions (IE. complete grids), the following definition is retained:

a grid has is different from a grid B, if the value of the box in has (I, J) is different from B (I, J), for any I, J (values limit by the dimension of the grid).

If a grid has is obtained by symmetry of the grid B then they are regarded as different. Rotations are also counted as new solutions.

Enumerations of the solutions symmetrically distinct

Two grids are known as symétriquement distinctes if one cannot be derived from different (by one or more operations of safeguarding of symmetry).

Safeguarding of symmetry

The following operations always transform a grid validates in another valid grid:
  • to change the label of each symbol (9!)
  • permutations of the bands (3!)
  • permutations of the piles (3!)
  • permutations of the lines in a band (3! 3)
  • permutations of the columns in a pile (3! 3)
  • reflection, transposition, rotation of 90° (with one of these operations and the permutations, it is possible to deduce the aures operations, with the result that these operations contribute only with one factor of 2).

These operations define a relation of symmetry between two equivalent grids. By excluding the change from labels, and by considering the 81 values present in the grid, these operations train a sub-group of the symmetrical group S81 with an order 3! 8×2 = 3359232.

To identify the solutions thanks to the lemma of Burnside

For a solution, the whole of the equivalent solutions which can be obtained by using these operations (except the renaming of the values), form an orbit of the symmetrical group. The number of solutions symmetrically distinct is thus the number of orbits, a value which can be calculated thanks to the lemma of Burnside. The fixed points of the method of Burnside are solutions which differ only by the renaming. Thanks to this technique, Jarvis Russell calculated the number of solutions symmetrically distinct: 5.472.730 538.

Bands of Sudoku

For values L and C broad, the method of Kevin Kilfoil (generalized thereafter) is used to estimate the number of ways of supplementing a grid. This method leaves the principle that the constraints on lines and the columns are, for a first approximation, conditionally independent random variables have regard to the constraint on the area. Calculi make it possible to lead to the formula of Kilfoil-Silver-Pettersen:

\ mbox {Many grids} \ simeq \ frac {b_ {L, C} ^C \ times b_ {C, L} ^L} {(LLC)! ^ {LLC}}

where B L, C is the number of manners of supplementing Sudoku with L areas (of a size of L X C ) horizontally adjacent. The algorithm of Pettersen, implemented by Silver is currently the known fastest technique to evaluate in an exact way the values B L, C.

The account of the bands for the problems of which " the full number of grids of Sudoku is inconnu" is given below. As in the remainder of this article, dimensions correspond to those of the areas.

# : even author but with another méthode

The expression for the case 4×C is: (4C)! (C!)^ {12} \ sum_ {has, B, C} {\ left (\ frac {C! ^2} {has! B! C!} * \ sum_ {\ begin {matrix} k_ {12}, k_ {13}, k_ {14}, \ \ k_ {23}, k_ {24}, k_ {34} \ end {matrix}} \ right) ^2}

with:

the external sum applies to all the has , B , C such as 0<= has , B , C and has + B + C =2 C
the interior sum applies to all the K 12, K 13, K 14, K 23, K 24, K 34 = 0 such as
K 12, K 34 = has     and
K 13, K 24 = B     and
K 14, K 23 = C     and
K 12+ K 13+ K 14 = has - K 12+ K 23+ K 24 = B - K 13+ C - K 23+ K 34 = C - K 14+ B - K 24+ has - K 34 = C

Sudoku with additional constraints

Several types of constraints exist on of Sudokus with areas of 3x3. The names not having been standardized, the external bonds point towards the definitions:

All Sudokus are valid (unicity of the numbers in the lines, columns and areas) after the application of the operations which preserve the properties of the group of Sudoku. Certains Sudoku is special in the direction where certain operations have the same effect as the renaming of the figures:

Minimal number of figures in the grid

The correctly produced grids must have one and only one solution. A grid is known as irreducible or minimal if it is valid and if the withdrawal of an additional figure involves its disability (IE. she does not admit any more a single solution). It is possible to create minimal grids with a number different of initial values. This section describes the properties relative to this problem.

Traditional Sudoku

Traditional Sudoku with a grid of 9x9, is 81 boxes, is for the moment limited by a terminal lower by 17 initial values, or 18 when the positions of the initial figures can be turned of 90°. There exists a conjecture which stipulates that this terminal of 17 is the best possible one, but there does not exist formal evidence, only one exhaustive research with random grids:
  • Gordon Royle compiled a list of grids with 17 values, which are single. Among these 39422 grids, none of them is isomorphic with another grid or contains a solution with 16 initial values.

  • a construction independent of 700 distinct grids made it possible to discover 33 other grids which did not appear in the list of Royle. An estimate according to the maximum of probability, makes it possible to deduce that the number of these minimal grids amounts to approximately 34550. If the methods are really random and independent, then the probability of finding a construction valid with 16 initial values is weak. Indeed, only one of these hypothetical grids would make it possible to obtain 65 new grids with 17 initial values, results which did not appear in preceding research. But in the absence of an formal evidence, this fact cannot be confirmed or cancelled.
  • Of other random research provided grids which were already in the list of Royle, which reinforces the idea of the quasi-complétude of the unit provided by Royle.

Sudoku with other constraints

Additional constraints (with of Sudoku whose areas make 3×3) change the number of minimal values necessary to lead to a single solution:
  • 3doku: no result to date known (2006)
  • disjoined Groups, of the grids with 12 values were shown by Glenn Fowler. Nothing indicates that this minimal terminal cannot be lowered.
  • Hypercube, of the grids with 8 values was proposed by Guenter Stertenbrink.
  • Magic Sudoku, an example with 7 values was published by Guenter Stertenbrink. Here still, it is not known if it is truly about the minimal terminal.
  • Sudoku X, Gordon Royle gave an example with 17 values, limits presumedly minimal.
  • NRC Sudoku, Andries Brouwer discovered an example with 11 values. It is not known if it is possible to better do.

Sudoku with irregular areas

The Of-sum-oh the replace the areas of 3×3 (or more generally L×C) by irregular areas with a fixed size. Bob Harris proved that it was always possible to create of-sum-ohs the with NR -1 initial values on a grid of NR by NR . It gave several examples.

Killer Sudoku

In the Samunamupure or Killer Sudoku , the areas have not only irregular forms but also of the different sizes. The rules of unicity of the numbers in the lines, areas and columns always apply. The initial indications are given in the form of sums of values in the areas (for example, an area of 4 cells with a sum of 10 will contain figures 1,2,3,4 according to a certain order). The minimal number of values necessary to begin the grid is not known, nor not conjectured.

An alternative suggested by Miyuki Misawa replaces the sums by relations: the indications are symbols = , < , > , showing the relative values for certain adjacent areas. An example with only 8 relations is given, but it is not known if this number is the lower limit.

Method of Felgenhauer/Jarvis for the enumeration of the grid of 9×9

The approach described here is historically the first strategy employed to enumerate the solutions of a traditional grid of Sudoku (areas of 3x3 in a grid of 9x9). She was proposed by Felgenhauer and Jarvis.

Outline

The analysis begin with the study from the permutations from the first band used in valid solutions. Once the class of equivalence and symmetries of this band, for partial solutions, are identified, one is interested in the two other bands which are built and counted for each class of equivalence. By carrying out the sum of the whole of the combinations, one obtains the full number of solutions, that is to say 6.670.903 752.021.072 936.960 (approximately 6.67×1021).

In order to reduce the space of research, one leaves the principle that the renaming (for example to change the “1” into “2” and vice versa) of the boxes produces an equivalent solution. A grid authorizes 9! = 362880 renamings of this type: a figure chosen among the 9 possible figures is allotted to the first type of box, a figure among the 8 remainders is allotted to the second type of box, a figure among the 7 remainders is allotted to the third type of box, etc

References

Random links:Debt | Blazon of Vaucluse | Saint-Elphège | Abdul Al-Hazred | Faye-l' Abbess

© 2007-2008 speedlook.com; article text available under the terms of GFDL, from fr.wikipedia.org