3.5. Chains, Loops and Nets#

3.5.1. abcd#

3.5.1.1. lskdfjs;df#

3.5.1.1.1. Broken Wings#

http://sudopedia.enjoysudoku.com/Broken_Wing.html

https://sudoku.allanbarker.com/sweb/gen2/blacklog.htm

TOTO: Also add to solver.

Any strong linked chain, where Ccells that see both ends see it with a strong link.

3.5.1.1.2. Super Nodes#

Strong Linked Chains have a valuable additional property which greatly increases its productivity. All consecutive nodes of a Strongly linked chain will always be of opposite state. Therefore, any Ccell that is not part of the pattern that sees both an odd count Node and even count Node in the chain cannot be True and can be eliminated. This property envelops the Strong Link property because Chain End Nodes of an Even node count Strongly Linked Chain will always have opposing state.

In working with Strong Linked Chains it is useful to consecutively number the nodes from one end to the other and identify odd and even parity nodes. Similarly, odd and even parity nodes are determined by the parity of the net level count. Odd and even parity nodes will have opposing (yet to be determined) state. Therefore, any Ccell that is not part of the SL pattern that sees two nodes in the pattern of opposing parity cannot be True and can be eliminated.

All the odd parity nodes are grouped into the Odd Parity Super Node Set of the SL pattern. Similarly, the even parity are grouped int the Even Parity Super Node Set of the SL pattern. These two Super-Nodes are Strongly linked, implying all the Nodes in each set are strongly linked to all the nodes in the other set.

When solving as humans, it is useful to use different colours to distinguish parity.

3.5.1.2. Chained Strong Linked Patterns#

Developed from:

Often puzzles with multiple SL Patterns have node in each pattern that see nodes in other SL patterns. These nodes form a Weak Link between the SL pattern. From the perspective of the SL pattern being two Strongly Linked Super-Nodes, a chain of Super-Nodes is formed.

The Types 1, 2, and 3 pattern resolutions available to AI-Chains are also available to these ‘Super Node’ AI-Chains where the actual chain end nodes can be any in the end ‘Super-Nodes’.

Unlike regular SL Nets, Chained SL Nets can be of any Super Node count. Each ‘Super-Node’ set can be as small as one node.

3.5.2. Some Chain Examples#

3.5.2.1. A Two String Kite#

Sudoku Two String Kite Example

Figure 3.31: Two String Kite Example#

.81.2.+6...+4+2.+6..+89.+568..+24.+6+931+4+27+5+8+4+28+357916+1+7+5+6+8+9+3+245+1..+36+89223...84+6.+8+6.+2.....||Two String Kite||5r2c7=5r9c7-5r8c9=5r8c4,5r2c7-5r2c4-5r8c4,5r2c7-5r2c4-5r8c4|r2c4-=5|+781+92+4+6+3+5+3+4+2+7+6+5+1+89+9+568+1+3+24+7+6+931+4+27+5+8+4+28+357916+1+7+5+6+8+9+3+245+1+7+4+36+89223+9+5+784+6+1+8+6+4+2+9+1+5+7+3

The chain in this example is 5r2c7=5r9c7-5r8c9=5r8c4, source: Hodoku. This is an alternating strong/weak link chain four nodes long starting and ending with a strong link. A short chain was chosen for simplicity but the logic applies to any even node count chain.

Starting at with ccell 5r2c7, assert the premise that it is False. The strong link between 5r2c7 and 5r9c7, infers 5r9c7 True. The weak link between 5r9c7 and 5r8c9 infers 5r8c9 False. The strong link between 5r8c9 and 5r8c4 infers 5r8c4 True. Also walking the chain in the opposite direction starting with 5r8c4 as False will ultimately infer 5r2c7 True. Thus concluding neither 5r2c7 nor 5r8c4 can be simultaneously False, one or the other has to be True.

But with this AIC if 5r2c7 is asserted True, then 5r8c4 can be either True or False. For example, The premise that 5r2c7 is True, infers 5r9c7 False. Because 5r9c7 is weakly linked to 5r8c9, nothing can be inferred about its state when it is False, which breaks the inferences for the rest of the chain.

The important conclusions to be drawn from AIC/Inferred links is that same value candidates that can see both ends of the AIC can be eliminated. This is because at least one end Ccell will always be True. In this example 5 is eliminated from r2c4 (r2c4-=5).

3.5.2.2. A Skyscraper#

Sudoku Skyscraper Example

Figure 3.32: Skyscraper Example#

+6+9+7.....+2..19+72.6+3..+3..679.9+12...6.+737+4+2+6.95.+8+65+7.+9.+2414+8+6+93+2+757.9.24..+6..+68.+7..+9||Skyscraper||1r1c6=1r5c6~1r5c9=1r3c9,1r1c6-1r1c7-1r3c9,1r1c6-1r1c8-1r3c9,1r1c6-1r3c4-1r3c9,1r1c6-1r3c5-1r3c9|r1c7-=1;r1c8-=1;r3c4-=1;r3c5-=1|+6+9+7+3+1+5+8+4+2+4+819+72+56+3+5+2+3+4+8679+19+12+5+4+86+3+737+4+2+6+195+8+8+65+7+3+9+1+2414+8+6+93+2+757+59+124+3+8+6+2+3+68+5+7+4+1+9

The chain in this example is 1r1c6=1r5c6~1r5c9=1r3c9, source: Hodoku. This is another AI chain of four nodes with strong end links. Note that the centre link is a Strong Link masquerading as a Weak Link.

Walking the chain exactly like the previous example, the indirect Robust link 1r1c6|~|1r2c9 is found. Recall that at least one end will always be true, therefore any Ccell that can see both ends cannot be True. Four such Ccells exist in this pattern which can be eliminated: r1c7-=1, r1c8-=1, r3c4-=1, r3c5-=1.






3.5.2.3. A Strong Linked Net (SLN) Chain#

Here is an example of three Strong Linked Nets in a Chain. Source: SudokuWiki

Sudoku Chained Strong Linked Net Type 2 Example

Figure 3.33: Chained Strong Linked Net Type 2 Example#

.7+2.+8.64..9+67..8....8+6....1...3...84681........+4.5+8.6.2+1.+8+39+4.+6+84.2...+13.+63..1..+8|r2c5-=4;r3c5-=4;r4c7-=57;r5c6-=4;r5c7-=7;r5c8-=7;r6c7-=37|Chained Strong Linked Net T2||[3r1c1e=3r1c6o=5r1c6e]<3r1c1-1r1c1>[1r1c1e=1r1c4o=1r6c4e={1r6c7o=1r4c7e=1r4c5o=1r2c5e={1r2c1o,2r2c5o},9r6c4o}]<1r2c1-4r2c1>[4r2c1e=4r2c6o=4r3c6e=4r3c1o],3r1c6-3r2c6-4r2c6|r2c6-=3|+172+98+364+5+4967+1+58+3+2+3+586+2+4+7+91+5+2+73+9+6+184681+4+7+2+3+5+9+9+34+158+26+721+58394+7684+92+6+7+513+763+5+41+9+28

The three chains are:

  • SLN1 = 3r1c1e=3r1c6o=5r1c6e

  • SLN2 = 1r1c1e=1r1c4o=1r6c4e={1r6c7o=1r4c7e=1r4c5o=1r2c5e={1r2c1o,2r2c5o},9r6c4o}

  • SLN3 = 4r2c1e=4r2c6o=4r3c6e=4r3c1o

Viewed from the perspective of Odd and Even Parity Super Nodes:

  • SLN1e = {3r1c1, 5r1c6}

  • SLN1o = {3r1c6}

  • SLN2e = {1r1c1, 1r6c4, 1r4c7, 1r2c5}

  • SLN2o = {1r1c4, 1r6c7, 1r4cp, 1r2c1, 2r2c5, 9r6c4}

  • SLN3e = {4r2c1, 4r3c6}

  • SLN3e = {4r2c6, 4r3c1}

These three chains are linked by:

  • SLN1e-SLN2e  ⇒  3r1c1-1r1c1

  • SLN2o-SLN3e  ⇒  1r2c1-4r2c1

The Super Node Chain is:

  • SLN1o=SLN1e-SLN2e=SLN2o-SLN3e=SLN3o

Because 3r1c6 in SLN1o and 4r2c6 in SLN3o are in the same house, and because of the Chain, at least one of them will be True, any Ccell (such as 3r2c6) that sees both, cannot be True and can be eliminated r2c6-=3.

3.5.3. Chain Eliminations and Placements#

3.5.3.3. Strong Linked Patterns#

Recall, SL Patterns:
  • Have alternating State Consecutive Nodes.

  • Are reversible, inferences can be traversed in either direction with same predictable results.

More is gained by working with SL Net patterns than SL Chain patterns.
  • Net patterns typically capture more nodes than string patterns.

  • A Ccell can only be a member of a single SL Net, whereas, the same Ccell can be a member of multiple SL Chains.

  • A Puzzle typically contains fewer larger SL-Nets than chains, thereby reducing the search effort for similar outcomes.

Recall further:
  • SL Patterns members can be divided into two Super-Nodes of even and odd parity. SL Chain parity is found by assigning count numbers to each consecutive nodes. SL Node parity is found by assigning the level number to the Node. In both cases, all odd and even Nodes to their respective Super-Node.

  • Either all the Even or all the Odd Parity nodes will True. Which it is, is yet to be determined.

  • A Strong link exists between the odd and even Super-Nodes of SL patterns. Any node in the one Super-Node set is strongly linked to all nodes in the other Super Node.

3.5.3.3.1. Type 1: Same State Nodes See Each Other#

Sudoku Strong Linked Net Type 1 Example

Figure 3.40: Strong Linked Net Type 1 Example#

1..+4.58..4..2.+7.....2...47......6..3....7.91.29.........4...2...+2..48.5....1...8+4||Strong Linked Net T1||2r1c8e=2r1c9o=2r5c9e=2r5c6o=2r9c6e=2r9c5o=2r4c5e=2r4c8o=4r4c8e=4r4c2o=4r5c2e=4r5c6o=4r6c6e=4r6c8o=6r6c8e,2r5c6o-4r5c6o|r1c8:=2;r5c9:=2;r9c6:=2;r4c5:=2;r4c8:=4;r5c2:=4;r6c6:=4;r6c8:=6|1+3+7+4+958+2+64+5+82+6+7+3+9+1+9+62+3+8+147+5+7+8+1+9+26+5+43+6+4+5+87+391+229+3+5+1+4+7+6+8+8+14+6+5+92+3+7+3+2+6+748+15+9+5+7+91+3+2+68+4

The puzzle pattern on the right is the SL Net: 2r1c8e=2r1c9o=2r5c9e=2r5c6o=2r9c6e=2r9c5o =2r4c5e=2r4c8o=4r4c8e=4r4c2o=4r5c2e=4r5c6o =4r6c6e=4r6c8o=6r6c8e,2r5c6o-4r5c6o. Even Ccells are highlighted green and Odd Ccells highlighted blue. Two odd parity (same state) Ccells 2r5c6 and 4r5c6 are present in cell r5c6. As it is impossible for two Ccells to be True in the Same cell, these two odd Ccells must be False, and so must all the other odd Ccells. That means all the even Ccells are True and can be placed: r1c8:=2;r5c9:=2;r9c6:=2;r4c5:=2;r4c8:=4;r5c2:=4;r6c6:=4;r6c8:=6.






3.5.3.3.2. Type 2: All Candidates in a Cell See Same State Nodes#

Sudoku Strong Linked Net Type 2 Example

Figure 3.41: Strong Linked Net Type 2 Example#

+2..3+5..8.5...+81..38+36.4..+1.4..83...2+6.2.+1+43..9.+3.72..1+3+2+5+46+81+977+6+81+9+3..4+19+4+7+25.+3.|r6c7-=6|Strong Linked Net T2||5r5c4e=5r6c4o=6r6c4e={6r6c8o,6r2c4o=6r1c6e=6r4c6o=9r4c6e=9r4c7o=9r5c9e=9r5c4o},9r1c9-9r5c9e,6r1c9-6r1c6e|r6c4:=5;r6c8:=6;r2c4:=6;r4c6:=6;r4c7:=9;r5c4:=9|+2+4+13+5+7+68+95+7+9+6+81+2+438+36+24+9+7+1+54+1+783+6+9+52+6+52+9+1+43+7+89+8+3+572+4+61+3+2+5+46+81+977+6+81+9+3+5+24+19+4+7+25+8+3+6

The puzzle pattern on the right is the SL Net: 5r5c4e=5r6c4o=6r6c4e={6r6c8o,6r2c4o=6r1c6e =6r4c6o=9r4c6e=9r4c7o=9r5c9e=9r5c4o}, 9r1c9-9r5c9e,6r1c9-6r1c6e. Even Ccells are highlighted green and Odd Ccell highlighted blue. The Ccells 6r1c9 and 9r1c9 in r1c9, both see even Nodes 6r1c6 and 9r5c9 respectively. If the Even Nodes of the pattern are True, then neither 6r1c9 and 9r1c9 can be True. This is impossible as there will be no Truth in r1c9; therefore, the Even Nodes must be False. This in turn makes the Odd Nodes True which can be placed: r6c4:=5;r6c8:=6;r2c4:=6;r4c6:=6;r4c7:=9;r5c4:=9.







3.5.3.3.3. Type 3: Ccells See Opposing State Nodes#

Sudoku Strong Linked Net Type 2 Example

Figure 3.42: Strong Linked Net Type 3 Example#

+6.159.....+5+3+2+6..9..2+9.736..+342+9+56+1789+1+6.875....+5.+2..+695+9+8+61274313+7+8+4...+6+2+6+4+7+3....||Strong Linked Net T3||1r3c8e=1r9c8o=1r9c9e=5r9c9o=5r3c9e=5r3c8o,5r3c8e-8r3c8-5r3c8o|r3c8-=8|+6+7159+8+4+3+2+4+5+3+2+6+1+89+7+82+9+4736+1+5+342+9+56+1789+1+6+3875+2+4+7+8+5+1+2+4+3+695+9+8+61274313+7+8+4+9+2+5+6+2+6+4+7+3+5+9+8+1

The puzzle pattern on the right is the SL Net: 1r3c8e=1r9c8o=1r9c9e=5r9c9o=5r3c9e=5r3c8o, 5r3c8e-8r3c8-5r3c8o. Even Ccells are highlighted green and Odd Ccells are highlighted blue. Ccell 8r3c8 sees both Even Node 1r3c8 and Odd Node 5r3c8. Because either the Even Node or the Odd Node will be True, 8r3c8 cannot be True and can be eliminated: r3c8-=8.

It doesn’t matter whether the Even Node, Odd Node, and Ccell that sees both are in the same Group or Cell; it only matters that the Ccell sees both and Odd and Even Ndoe that results in its demise.

3.5.4. Sub Chains#

Source: http://forum.enjoysudoku.com/x-chain-optimalisation-t38330.html.

An important observation about AI Chains with 6 or more Nodes. Any lesser Even Node count sub chain is also a valid chain.

3.5.5. AI Loops#

An AI loop is an AI Chain that loops back on itself. An even length AIC looping back on itself has the same strong and weak link count. An odd length AIC that loops back on itself can either have an extra strong link or extra weak link in the loop; an odd count loop has either two adjacent strong links or two adjacent weak links.

These three loop types result in different eliminations or placements.

3.5.5.1. Even AI Loops#

Consider the following Even AI-Loop:

A = B – C = D –

The ending dash indicates a weak link looping back to Node A. If Node A is False, the AI Chain ensures D is True. If Node A is True, the looped weak link to Node D ensures that Node D is False. Thus, the Weak link between Nodes D and A is made Strong by the loop. The same is said for the Weak link between Nodes B and C.

Since the Loop strengthens all the Weak links in the AI Chain, The same eliminations and placements that apply to Strong Linked Patterns, apply to Even AI Chains.

3.5.5.2. Strong AI Loops#

Consider the following Strong AI-Loop:

A = B – C = D – E =

The ending ‘=’ indicates a strong link looping back from Node E to node A. Node A is the only node in the chain sporting two strong links.

If Node A is False, then both Nodes B and E are True because of the Strong Links. But B and E cannot be simultaneously True because B - C = D - E is a WE-AIC. A contradiction exists when Node A is False. Therefore, Node A must be True and can be placed.

3.5.5.3. Weak AI Loops#

Consider the following Weak AI Loop:

A = B – C = D – E –

The ending dash indicates a weak link looping back from Node E to Node A. Node E is the only node in the chain sporting two weak links.

If Node E is True, then both Nodes A and D are False because of the Weak Links. But A and D cannot be simultaneously True because A = B - C = D is a SE-AIC. A contradiction exists when Node E is True. Therefore, Node A can only be False and can be eliminated.

Observe that this is a narrower pattern than an AI-Chain Type 1. Ccell E sees both ends of an SE-AIC, and therefore, cannot be True and can be eliminated. A SE-AIC Type 1 deals with all Ccells that can see both chain ends at once, whereas the Weak Loop deals with each Ccell that sees both chain ends individually.