Universal Elimination Pattern:
It seems that rules/methods are commonly seen as the primary objects for sudoku solving. And patterns are regarded as instances of these rules when the rule conditions are met.There are very good reasons to see patterns as the primary objects. This is the main point of this post. As rules work fine on easy and medium severe sudoku. They automate manual solving techniques. Hard and very hard ones require mostly individual procedures for solving by constraint propagation.
Also trying to put rules into a definite order is questionable and not convincing for me.
See the thread:
ordering-the-rulesThe only systematic approach is done by Denis Berthier with his braid definition. But unfortunately a generalisation to universal patterns is not obvious.
Systems of rules/methods constitute a bottom-up approach for solving. When constructing patterns top-down from larger structures rules are not helpful any more.
I ran into this problem when implementing a solver based on permutations.
Example: Consider the number planes of all candidates with numbers 2 or 5. Now we build all permutations of true and false candidate states that comply with all relevant constraints. This way we get all multiple solutions of this partial sudoku. The number of such permutations is some thousand - large but not unmanageable. Every elimination that affects these two numbers will cancel some of the permutations. Now we observe the number of still valid permutations, where a particular candidate of the planes has the value true. If this number drops to zero, the candidate is always false in the combined planes 2 plus 5 and therefore false globally. On the other hand if all candidates of the plane pair have a true value with at least one of the permutations, its impossible to find eliminations inside that planes with whatever methods, provided that only row/col/box constraints of the two planes and cell constraints connecting the planes are used.
Two things are important:
- Usually not all objects of the planes are necessary to produce the elimination.
This calls for a reduction until a minimal configuration is reached that still works.
There a many possible minimal pattern generally.
- A relationship to one of the traditional rules/methods does not exist in the general case, although in some cases a reverse engineering may find a rule that fits.
Any reduction can always be done by stripping off candidates one by one and checking the remaining permutations. This is of course not practical but nevertheless possible.
It motivates the following definition:
An Universal Elimination Pattern is a set of candidates along with a set of links connecting the candidates according to basic sudoku constraints, where
(1) exactly one designated candidate is the elimination target ( single target )
(2) the target value is false for all valid permutations of candidate values ( elimination )
(3) all candidates and all links in the set are absolutely necessary for (2) ( minimal set )
(4) there exists no subset of the defining candidate set that is a separate universal elimination pattern ( no cascading ) correctedThe attribute universal is meant programmatic of course. If anyone has a more universal definition of eliminations, I would like to hear. The definition covers all traditional elimination methods and rules – afaik, so there is no conflict.
Note that there is intentionally only one target candidate and no elimination pattern without target. The term link stands for a logical constraint equations restricted to the candidates in the set. The term pattern core will be used for the set of candidates without the target.
Another little definition:
A line is the set of all still undecided candidates belonging to a single constraint.This is also called unit elsewhere, but I am not sure if it means the same thing. A line can be a row, column, box of the same number or a cell - reduced to the unknown candidates.
Universal elimination pattern have some nice general properties:
From the definition follows immediately:
- None of the candidates of the pattern core has a fixed value.
- The candidates build a connected graph, where each candidate – including the target - has at least two neighbours.
- Assuming the target to be true creates inevitably a contradiction inside the pattern.
Most important is the following statement:
The pattern core of a universal elimination pattern is equal to the union of all lines of the pattern core. (discarded)
The pattern core of a universal elimination pattern is equal to the union of all those lines, where all line candidates are also members of the pattern core.
correctedThat says that
all candidates of the pattern core
must be also be member of some line that is fully covered by the pattern core.
editedConsequently the pattern core can be relabelled as a
set of lines. This is easy to prove.
In many cases where lines in the set do overlap some of the lines (not their candidates) are dispensable.
So a subsequent reduction of lines is possible and applied.
The remaining minimal set of lines is called base set (in appreciation of Allen Barkers ideas).
This implies:
Any (universal) elimination pattern is fully determined by enumerating its base set.This implies also that the link structure (net or queue) and other properties depend on the base set.
In other words: The base set is defining the elimination, but stop … wait …
This requires the base set to be
unique for a particular elimination pattern. That would be really great. But a proof seems not so easy. Ideas welcome.
So I put the uniqueness of the base set of an elimination pattern as a
conjecture here.
The conjecture is true for all practical cases, but I have some doubts.
Now is the time to introduce
size for universal elimination pattern. Any size function is an aspect of complexity of the pattern and relies solely on properties of the pattern itself. This is often confused with the severity of a pattern depending on properties of the solver and quantifies the difficulty to find it. The severity therefore is always relative to a solver only.
As complexity is like beauty - only in the eye of the beholder - there are many size functions.
For the next chapter I will use the
number of lines in the base set as pattern size. Its also equal to the maximal number of true candidates in the pattern core. This is not my favourite size function because it has some disadvantages. But it is easy computable and easy comparable with other results. Discussion of alternatives would overload this post and is saved for later.