Contents Menu Expand Light mode Dark mode Auto light/dark mode
Yet Another Sudoku
Logo
Yet Another Sudoku
  • 1. Introduction
  • 2. Foundation
    • 2.1. Sudoku Notation
    • 2.2. Premises, Inferences and Searching
    • 2.3. Spatial Representation
    • 2.4. Links and Chains
    • 2.5. Truth, Sets and Fish
    • 2.6. Uniqueness
  • 3. Human Solvable Patterns
    • 3.1. Singles
    • 3.2. Subsets
    • 3.3. Bent Subsets
    • 3.4. Fish
    • 3.5. Chains, Loops and Nets
    • 3.6. Nearly Locked Sets
    • 3.7. Exotic Patterns
    • 3.8. Base, Link, and Cover Sets
    • 3.9. Searching
    • 3.10. Uniqueness
    • 3.11. Last Resort
  • 4. Generating Puzzles
  • 5. Grading Puzzles
  • 6. Software
    • 6.1. Programs
      • 6.1.1. Yet Another Sudoku
      • 6.1.2. Pattern Regression Tester
      • 6.1.3. Batch Puzzle Generator and Grader
      • 6.1.4. Batch Puzzle Solver
    • 6.2. File Formats
    • 6.3. Algorithms
  • 7. Glossary and Abbreviations
  • 8. References
Back to top

2.4. Links and Chains#

Two CCells that See each other are Linked, and they can be characterised according to how they see each other:

  • Weak Links

  • Strong Links

2.4.1. Weak Links#

A weak link is formed by two ccells A and B, where they are either:

  • Two of three or more same valued candidates in a House, or

  • Two of three or more candidates in a cell.

Links Example

Figure 2.8: Links Example#

Observe that candidate 7 occurs more than twice in this example row 7 of a puzzle. Notice that:

  • if 7r7c2 is True, then none of the same valued Ccells in row 7 can be True, however,

  • if 7r7c2 is False, it does not infer state of any other same valued Ccell in the row.

This is the defining characteristic of a a Weak Link.

Weak links are indicated by a “-”(dash) between the two Ccells, for example, A-B and conform to the following inferences:

Table 2.12: Weak Link Inference Table#

A  -  B

T  →  F

If A is True then B is False

F  ←  T

If B is True then A is False

F  →  ?

If A is False then B is unknown

?  →  F

If B is False then A is unknown

The conclusion drawn from weak link inferences is that if one end is True, the other end is False, and if the one end is False, the other end can be either True or False. That is, both ends can never be simultaneously True, and at least one end is always False.

Ccells see each other through weak links (directly or indirectly — e.g. Weakly Ended Chain). When any two Ccells see each other, and the one Ccell is asserted True, the other Ccell must be asserted False.

2.4.2. Strong Links#

A strong link between two Ccells A and B, exists either:
  • In a conjugate pair (like 3r7c23 in Figure 2.8: ), where two same valued Ccells are the only same valued Ccells in that house, or

  • In a Bi-value cell where the two different valued ccells are the only ccells in that cell, like 78r7c4.

In Figure 2.8: above:

  • If 3r7c2 is False, then 7r7c3 must be True, as only one of the conjugate pair must be True.

  • if 3r7c2 is True, then 7r7c3 must be False, as only one of the conjugate pair must be False

Strong links are indicated by a “=” linking the two ccells and obey the following inferences:

Table 2.13: Strong Link Inference Table#

A  =  B

T  →  F

If A is True then B is False

F  ←  T

If B is True then A is False

F  →  T

If A is False then B is True

T  ←  F

If B is False then A is True

The conclusion drawn from a Strong Links is that ends always have opposite state.

Any two Strongly Linked Ccells must be of alternate state, therefore:

  • if the one end is True the other end is False

  • Any third Ccell that can see both Strongly Linked Ccells cannot be True because the Strong link guarantees one of its ends to be True.

2.4.3. Chains, Loops, and Nets#

2.4.3.1. Chains#

A chain is simply a stream of inferences (links). Starting with an assertion of a premise (state of a Ccell is True or False) and propagating the inferences from Ccell to Ccell. It is useful to refer to Ccells in Chains as Nodes. Nodes are linked by the logical relationship (inferences) between them.

Links between nodes can either be weak or strong, and inferences between nodes propagate according to the link’s characteristics.

The only link patterns that propagate in chains are:
  • concatenated Strong Links forming Strong Link Chains (SLC), and

  • alternating Strong and Weak Links forming Alternating Inference Chains (AIC).

Concatenating Weak Links cannot propagate because it is impossible to infer the state of a next node from a False node.

For Alternating Inference Chains to be productive, they must either begin and end with strong links or weak links. This can only be achieved with an even number of Nodes and one less Link. A Strongly linked chain can only have strong ends. The collective propagation of links The ends of these chains are effectively linked which can lead to eliminations.

2.4.3.2. Loops#

A Node can only be used once in the construction of a chain. If a node in a chain is encountered a second time in a chain, then a loop is identified. The power in loops is their ability to create a larger collective Truth that leads to eliminations.

2.4.3.3. Nets#

A Net is a chain where at least one node is linked to two or more other nodes. Any node has the possibility of seeing other nodes in rows, columns, boxes and the same cell. Nets propagate out multiple ends at an exponential rate to a maximum of the forth power. As each leaf to root is a chain in its own right, nets are very efficient in seeking chains that yield eliminations.

The fixed alternating True / False nature in both directions makes Strong Linked nets productive in their own right too.

2.4.4. Indirect Links#

A direct link describes the relationship between two nodes that see themselves directly. An indirect link describes the relationship between two end nodes of a chain that see each other through the inferences of the chain.

2.4.4.1. Weak Link Patterns#

Consider two end Nodes A and B connected with AI Linked six node Chain, where the end links are Weak.

A - W = X - Y = Z - B

The chain’s inferences are described in the following table.

Table 2.14:  A |-| B:  Weak Link Ended AIC Inference Table#

A  -  W  =  X  -  Y  =  Z  -  B

T  →  F  →  T  →  F  →  T  →  F

If A is True then B is False

F  ←  T  ←  F  ←  T  ←  F  ←  T

If B is True then A is False

F  →  ?  →  ?  →  ?  →  ?  →  ?

If A is False then B is unknown

?  ←  ?  ←  ?  ←  ?  ←  ?  ←  F

If B is False then A is unknown

A WE-AIC has an Even Node count to preserve the weak end link requirement of the chain. If an End Node is True, the other is False, and if the other end is True, then the first is False. The chain identifies a reversible opposing inference relationship (True to False) between the End Nodes. The ends of WE-AIC behave exactly the same as Weak Links.

With an Odd Node count chain, if the one end is True, so is the other. But the chain is not reversible. The other starting link is Strong, and a True assertion from that end does not propagate passed the second link. This passing forward of the True state in one direction may be useful. But it is this reversible opposing inference relationship found in Even Node Count chains that gives them the same behaviour as Weak Links. And like weak links, can be used in the characterisation of Truths.

The symbol "|-|" describes the indirect linkage of the end Nodes of a WE-AIC. The bars indicating indirectly related end nodes.

2.4.4.2. Robust Link_patterns#

Consider two end Nodes A and B connected with AI Linked six node Chain, where the end links are Strong Links.

A = W - X = Y - Z = B

The chain’s inferences are described in the following table.

Table 2.15:  A |~| B:  Strong Link Ended AIC Inference Table#

A  =  W  -  X  =  Y  -  Z  =  B

T  →  F  →  ?  →  ?  →  ?  →  ?

If A is True then B is unknown

?  ←  ?  ←  ?  ←  ?  ←  F  ←  T

If B is True then A is unknown

F  →  T  →  F  →  T  →  F  →  T

If A is False then B is True

T  ←  F  ←  T  ←  F  ←  T  ←  F

If B is False then A is True

A SE-AIC has an Even node count to preserve the strong end link requirement of the chain. If an End Node is False, the other is True, and if the other is False then the first is True. The chain identifies a reversible opposing inference relationship (False to True) between the end Nodes. However, unlike Strong Links, if the one end is True, it is not possible to determine the state of the other end. Although the Sudoku literature terms this link Strong, it clearly is not. Here this behavior is termed a Robust link.

With an Odd Node count chain, if the one end is False so is the other. But the chain is not reversible. The other starting link is Weak and a False assertion from that end does not propagate. This False to False one way passing forward may be useful. But it is this reversible opposing inference relationship found in Even Node count chains that give it the behavior of Robust Links.

The Robust Link symbol "|~|" describes the indirect linkage of the end Nodes of a SE-AIC. The bars indicating that the end nodes are indirectly related.

Because at least one end of a Robust link is always True, any Ccell, cannot be True and can be eliminated.

2.4.4.3. Strong Links#

Chain Patterns are one of Chains, Nets or Loops.

Consider two end Nodes A and B, connected by Strongly Linked six node chain:

A = W = X = Y = Z = B

The end Nodes behave exactly as a Direct Strong Link. This relationship is indicated with a "|=|" symbol to differentiate this Link type from a Direct Strong Link

Table 2.16:  A |=| B:  Strongly Linked Chain Inference Table#

A  =  W  =  X  =  Y  =  Z  =  B

T  →  F  →  T  →  F  →  T  →  F

If A is True then B is False

F  ←  T  ←  F  ←  T  ←  F  ←  T

If B is True then A is False

F  →  T  →  F  →  T  →  F  →  T

If A is False then B is True

T  ←  F  ←  T  ←  F  ←  T  ←  F

If B is False then A is True

Because one end of a Strongly Linked Chain is always True, any other Ccell, cannot be True and can be eliminated.

However, an SL Pattern requires a straight traversal of at least 4 links for a Ccell to potentially see two links of opposing polarity in the Net.

2.4.5. Strong Links Masquerading as Weak#

Strong links possesses all the attributes of a Weak Link. That is if one end is True, the other is False. Therefore, it is possible to substitute a Strong Link for a Weak Link to identify patterns.

Weak links do not possess the link attributes of Strong Links. That is if one end is False, it is impossible to determine the state of the other end. Therefore, it is not possible to substitute a Weak Link for a Strong or Robust Link.

When a Strong link is substituted for a weak link, it is masquerading as a Weak link. The ~ symbol is used to indicate a masqueraded weak link.

2.4.6. Cannibalistic Eliminations#

A cannibalistic elimination is where the identified condition (say both ends of a Strong AI chain) results in the eliminations that break the identifying pattern (say interior links of the chaing)

Does a cannibalistic elimination also break the condition? To answer this we need to distinguish between the condition and the pattern used to identify the condition.

The condition is the state(s) of Ccell(s) in relation to the state(s) of other Ccell(s). This is consistent irrespective of how the condition was found.

The pattern, in contrast, is a tool used to find the condition. The pattern is evident because of the current organisation of Ccells, and may not have been apparent in prior solving steps, or be apparent in following solving steps.

It is the condition that drives the pattern, not the pattern driving the condition. The condition exists irrespective of the pattern.

If a discovered condition results in the elimination of Ccells that break that pattern, the condition still exists, even though the pattern does not.

Therefore, patterns such as AI Chains can be cannibalistic and consume their interior links.

Sudoku Cannibalistic AI-Chain Example

Figure 2.9: Cannibalistic AI Chain Example#

9.+8...+1.33..89+12.+6.61....8...+3+2.9.18.92...36.81.3......8....63..+39.24+8+577.......1|r1c2-=5;r1c4-=67;r1c5-=47;r1c6-=7;r3c1-=5;r3c4-=5;r3c5-=45;r3c6-=5;r3c7-=47;r3c9-=4;r4c5-=7;r5c4-=45;r5c5-=45;r5c6-=5;r6c5-=7;r6c6-=7;r6c8-=47;r7c5-=5;r9c5-=56;r9c6-=56;r9c8-=4|AI-Chain T1||4r5c9=4r5c1-4r3c1=2r3c1~2r7c1=2r7c9-4r7c9=4r9c7,4r5c9~4r7c9=4r9c7|r4c7-=4;r6c7-=4;r7c9-=4|9+2+8+4+6+5+1+733+7+589+12+4+6+461+7+3+2+98+5+6+4+3+2+59+718+592+1+7+836+481+73+4+6+5+9+2+28+4+5+1+763+9+1+39+624+8+577+5+6+9+8+3+4+21

The AI Chain 4r5c9=4r5c1-4r3c1=2r3c1~2r7c1=2r7c9- 4r7c9=4r9c7,4r5c9~4r7c9=4r9c7 identifies the Robust link 4r5c9|~|4r9c7. The Ccells that see both ends of this Robust link, can be eliminated are r4c7-=4, 6c7-=4, and r7c9-=4. <Mong4r7c9</mong>,the second last link of the AI-Chain gets consumed.`

Source: https://www.youtube.com/c/SudokuSwami








Next
2.5. Truth, Sets and Fish
Previous
2.3. Spatial Representation
Copyright © 2024, Jonathan Marks, Commit Tag: bdb5d8e*, Wed, 03 Jan 2024, 10:03:13
Made with Sphinx and @pradyunsg's Furo
On this page
  • 2.4. Links and Chains
    • 2.4.1. Weak Links
    • 2.4.2. Strong Links
    • 2.4.3. Chains, Loops, and Nets
      • 2.4.3.1. Chains
      • 2.4.3.2. Loops
      • 2.4.3.3. Nets
    • 2.4.4. Indirect Links
      • 2.4.4.1. Weak Link Patterns
      • 2.4.4.2. Robust Link_patterns
      • 2.4.4.3. Strong Links
    • 2.4.5. Strong Links Masquerading as Weak
    • 2.4.6. Cannibalistic Eliminations