Knuth's Algorithm X: Difference between revisions

Content deleted Content added
Corrected and clarified introductory paragraph. Made clear where the name came from and its context.
Implementations: Distinguish correctly between DLX and dancing links. Added more information with proper citation.
Line 360:
 
== Implementations ==
[[DancingDonald LinksKnuth]],'s commonlymain knownpurpose asin DLX,describing isAlgorithm theX techniquewas suggestedto bydemonstrate the utility of [[DonaldDancing Knuth|KnuthLinks]]. to efficientlyKnuth implementshowed histhat Algorithm X can be implemented efficiently on a computer. using [[Dancing Links]] implementsin a process Knuth calls ''"DLX"''. DLX uses the matrix usingrepresentation circularof the [[exact cover]] problem, implemented as [[doubly linked list]]s of the 1s inof the matrix. There is a list of 1s for: each row and each column. Each 1 in the matrixelement has a link to the next 1 above, below, to the left, and to the right of itself. (Technically, because the lists are circular, this forms a torus). Because exact cover problems tend to be sparse, this representation is usually much more efficient in both size and processing time required. DLX then uses [[Dancing Links]] to quickly select permutations of rows as possible solutions and to efficiently backtrack (undo) mistaken guesses.<ref name="knuth" />
 
== See also ==