Hacker News new | past | comments | ask | show | jobs | submit login

The “Knuth Trees” or the “Knuth transform” that the article refers to in the first sentence is the subject of The Art of Computer Programming section 2.3.2 “Binary Tree Representation of Trees”. (This is under 2.3 “Trees” in Chapter 2 “Information Structures” of Volume 1 “Fundamental Algorithms.”) In TAOCP it is just called “the natural correspondence between forests and binary trees”.

The idea, roughly, is that corresponding to each node of the original tree (or forest), in the (resulting) binary tree, the left child denotes “first child [in original tree]” and the right child denotes “next sibling [in original tree]”. In TAOCP there are 15 pages about this idea (including exercises) (plus 4 pages of solutions). In this paper here, the author calls it the Knuth transform, and extends that idea to a larger class of graphs. (This is all in the first paragraph of the paper, but just posting this here in case the context is helpful to someone, as I didn't know all this before just now.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: