Knuth, Donald E.. Combinatorial Algorithms. Vol. 4A. : Addison-Wesley Professional, 2011.