Next Equivalence Class





The algorithm is called NEXEQU (Next Partition of an n-Set) in Albert Nijenhuis and Herbert Wilf, Combinatorial Algorithms, pp. 81-86.