Knuth Algorithm X: Selecting B,D & F over A

  • Thread starter Thread starter woundedtiger4
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary

Discussion Overview

The discussion revolves around Knuth's Algorithm X, specifically addressing the selection of rows in the algorithm's example and the reasoning behind the exclusion of row "A" from the final solution while rows "B," "D," and "F" are included. Participants explore the algorithm's mechanics and the conditions for achieving an exact cover.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • Some participants question why row "A," selected at Level 1, is not part of the final solution while rows "B," "D," and "F" are included.
  • There is a discussion about the termination of the branch containing "D" at Level 1, with a participant noting that it contains specific column values (0, 1, 1, 1) and questioning why it was unsuccessful.
  • One participant explains that the goal is to find a combination of rows covering every number from 1 to 7, with each number appearing in at most one row.
  • It is proposed that the algorithm selects row "A" due to it having the most numbers, but then eliminates other rows that share numbers with "A," leaving only row "D" as a potential match.
  • Participants note that since neither row "A" nor row "D" contains the number '2', the combination of these two rows fails to meet the exact cover requirement, leading to the algorithm's termination.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the algorithm's selection process and the reasons for the termination of certain branches. There is no consensus on the interpretation of the algorithm's behavior or the implications of selecting row "A."

Contextual Notes

Participants discuss the algorithm's mechanics without resolving the underlying assumptions about the exact cover problem or the specific configurations of the rows.

woundedtiger4
Messages
188
Reaction score
0
Hi all, at http://en.wikipedia.org/wiki/Knuth's_Algorithm_X in the example I don't understand that why not "A" is in the final solution & only B, D & F are in the final solution whereas "A" was selected at Level 1
 
Technology news on Phys.org
[STRIKE]bump[/STRIKE]

plus why at the level 1 the branch containing "D" (i.e. containing 0, 1, 1, 1 in columns 2, 3, 5 & 6) was terminated unsuccessfully?
 
Last edited:
woundedtiger4 said:
Hi all, at http://en.wikipedia.org/wiki/Knuth's_Algorithm_X in the example I don't understand that why not "A" is in the final solution & only B, D & F are in the final solution whereas "A" was selected at Level 1

woundedtiger4 said:
[STRIKE]bump[/STRIKE]

plus why at the level 1 the branch containing "D" (i.e. containing 0, 1, 1, 1 in columns 2, 3, 5 & 6) was terminated unsuccessfully?

The intent, as far as I understand it, is to find a combination of rows that include every number from 1 to 7 but where each number only occurs in at most one row.

The algorithm seems to work by picking the row (A) that has the most numbers in it and then trying to find a combination of the other rows that have the numbers that aren't in A.

Having selected A (in this case), it proceeds by removing any sets that have a number in common with A (in this case, B,C,E and F). This is because any combination of B,C,E or F with A will have at least one multiple of '1', '4' or '7'. This only leaves row D as a possible match for A.

However, row D doesn't contain a '2' and neither does A, so the combination of A and D is not an exact cover, hence the algorithm terminates and goes to test for another combination.

NR
 
NemoReally said:
The intent, as far as I understand it, is to find a combination of rows that include every number from 1 to 7 but where each number only occurs in at most one row.

The algorithm seems to work by picking the row (A) that has the most numbers in it and then trying to find a combination of the other rows that have the numbers that aren't in A.

Having selected A (in this case), it proceeds by removing any sets that have a number in common with A (in this case, B,C,E and F). This is because any combination of B,C,E or F with A will have at least one multiple of '1', '4' or '7'. This only leaves row D as a possible match for A.

However, row D doesn't contain a '2' and neither does A, so the combination of A and D is not an exact cover, hence the algorithm terminates and goes to test for another combination.

NR

thank you sooooooooooo much, you really helped me in understanding it.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
3
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
7K
  • · Replies 11 ·
Replies
11
Views
5K
Replies
29
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 25 ·
Replies
25
Views
3K