4 ms·
Knuth teaches how to generate all trees in TAOCP [1]. [1] http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf
by utopcell 8y ago
Knuth teaches how to generate all trees in TAOCP [1].
[1] http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf
- shoo 8y agoKnuth also has some interesting material on BDDs (binary decision diagrams), which can be used to encode, count, enumerate and uniformly sample a variety of combinatorial structures. http://www.cs.utsa.edu/~wagner/knuth/ http://www.cs.utsa.edu/~wagner/knuth/