Knuth's Algorithm X: Difference between revisions

Content deleted Content added
Sunnan (talk | contribs)
it's older than 2000, c.f. Knuth's paper on dancing links among others (where k. refers to dlx being used in 1999). it's just knuth's name for "trial-and-error"
m Delete duplicated word and tidy using AWB
Line 1:
[[Donald Knuth]]'s '''Algorithm X''' is a [[recursion (computer science)|recursive]], [[Nondeterministic_algorithm|nondeterministic]], [[depth-first]], [[backtracking]] [[algorithm]] that finds all solutions to the [[exact cover]] problem represented by a matrix ''A'' consisting of 0s and 1s. The goal is to select a subset of the rows so that the digit 1 appears in each column exactly once.
The goal is to select a subset of the rows so that the digit 1 appears in each column exactly once.
 
Algorithm X functions as follows:
Line 320 ⟶ 319:
|}
 
::: Column 2 has a 1 in row ''F''; and column 7 has a 1 in row ''F''. Thus row ''F'' is is to be removed and columns 2 and 7 are to be removed:
 
::::{| border="1" cellpadding="5" cellspacing="0"