My trusty old SPARCstation 2 computer, vintage 1992, is able to perform approxi- mately 0.39 mega-updates per second when working on large problems and maintaining the S fields. The 120 MHz Pentium I computer that Stanford computer science faculty were given in 1996 did 1.21 mega-updates per second, and my new 500 MHz Pentium III does 5.94. Thus the running time decreases as technology advances; but it remains essentially proportional to the number of updates, which is the number of times the links do their dance. Therefore I prefer to measure the performance of algorithm DLX by counting the number of updates, not by counting the number of elapsed seconds.
Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
11–20 of 26 posts
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#12Why is he wearing, what to me looks like, traditional Sami clothing?
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#13This always struck me as very similar to early ideas in database indexing a la Ted Codd & crew (as perhaps more recently popularized in recent Python3.6 hash table impls). So, while Aho & Briggs & Torczon all deserve ongoing credit for popularization, I wonder if anyone out in HN-land knows of a reference to a database paper from the 60s or 70s introducing this? (For more complete attribution.)
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#14Why is he wearing, what to me looks like, traditional Sami clothing?
[0]: https://www.youtube.com/watch?v=jB0aeePskBg&list=PLVV0r6CmEs... [1]: https://www.youtube.com/watch?v=VnoFvUnL6xU&list=PLVV0r6CmEs...
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#15The XCC problem is designed to solve problems that are NP-hard. So algorithms that solve XCC are not known to be polynomial-time. But they're interesting because they can solve a whole swath of problems that are difficult (not known to have a poly-time algorithm) and interesting. This is in the same world as SAT-solvers, in case you already know about those.
This particular Knuth lecture shows how you can simplify his original "dancing links" algorithm to a "dancing cells" version that no longer uses as complex a linked list structure internally, but rather uses flat arrays, although it does retain some link-like structure. The dancing cells alg isn't always better than dancing links, but for most of Knuth's test cases, this new version is faster.
Ok, what is XCC? It's the "exact covering with colors" problem. (Knuth mentioned that XCC doesn't yet have a wikipedia page, and maybe it should!) It's an extension of the "exact cover" problem -- you're given a set of items that should be covered, and a set of options (sets of items) that may cover some items. Each item must be covered exactly once (no more, no less). Now I'll add the "with colors" part: You can divide items into primary (these need to be covered exactly once) and secondary: these items may be either uncovered, or have possibly-many covering options, but the "color" of the coverings must be the same.
Here's a problem to help gain some intuition for XCC: Imagine trying to build an mxn word grid with valid English words. Each option can be either a word in a row or a word in a column. In this case your primary items could be something like "each row needs a word and each column needs a word." Then your secondary items would be the individual cells and each letter is a "color;" thus the use of consistent colors is a way to ensure that you can't assign different letters to the same cell.
Another description of XCC: https://docs.rs/xcc/latest/xcc/
Word squares: https://en.wikipedia.org/wiki/Word_square
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#16This lecture covers Knuth's latest (and simplest-so-far) algorithm to solve the XCC problem; I'll describe XCC below. The XCC problem is designed to solve problems that are NP-hard. So algorithms that solve XCC are not known to be polynomial-time. But they're interesting because they can solve a whole swath of problems that are difficult (not known to have a poly-time algorithm) and interesting. This is in the same w…
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#17Why is he wearing, what to me looks like, traditional Sami clothing?
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#18This lecture covers Knuth's latest (and simplest-so-far) algorithm to solve the XCC problem; I'll describe XCC below. The XCC problem is designed to solve problems that are NP-hard. So algorithms that solve XCC are not known to be polynomial-time. But they're interesting because they can solve a whole swath of problems that are difficult (not known to have a poly-time algorithm) and interesting. This is in the same w…
It's not called "XCC" (or perhaps just "XC") as he mentioned in his talk, but there is this: https://en.wikipedia.org/wiki/Exact_cover which has a link to a Knuth algo (EDIT: and a section on what they call "generalized exact cover").
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#19This lecture covers Knuth's latest (and simplest-so-far) algorithm to solve the XCC problem; I'll describe XCC below. The XCC problem is designed to solve problems that are NP-hard. So algorithms that solve XCC are not known to be polynomial-time. But they're interesting because they can solve a whole swath of problems that are difficult (not known to have a poly-time algorithm) and interesting. This is in the same w…
Edit: as an extension of the above, the second solution mightn't work well too, in which case you'd need to repeat the above till you find a solution that you like. Very painful in practice.
Re: Donald Knuth’s 2023 Christmas Lecture: Making the Cells Dance
#20Earlier quoted context omitted.
It's not called "XCC" (or perhaps just "XC") as he mentioned in his talk, but there is this: https://en.wikipedia.org/wiki/Exact_cover which has a link to a Knuth algo (EDIT: and a section on what they call "generalized exact cover").
The 'exact cover' problem has been studied for decades, possibly centuries. The generalization to "primary" and "secondary" items is Knuth's terminology, but the idea itself is a natural one and has been considered before. It is specifically "exact covering with colors" (XCC, not "XC") that is Knuth's innovation/discovery, what a large part of the recent volume discusses, and about which he said there isn't a Wikiped…
If you feel the (also already mentioned) section on "generalized" exact cover is lacking, hey, it's Wikipedia - anyone can edit it. So, add a little material with alternate / supplementary Knuth terminology / pointers. My intent was merely to point to somewhere to make this material easier to find via search engines (eventually).