Constant Time Generation of Integer Partitions

In this paper we give a simple algorithm to generate all partitions of a positive integer n. The problem is one of the basic problems in combinatorics, and has been extensively studied for a long time. Our algorithm generates each partition of a given integer in constant time for each without repetition, while best known algorithm generates each partition in constant time on “average.” Also, we propose some algorithms to generate all partitions of an integer with some additional property in constant time.

[1]  John McKay,et al.  Algorithm 371: Partitions in natural order [A1] , 1970, Commun. ACM.

[2]  Frank Ruskey,et al.  The advantages of forward thinking in generating rooted and free trees , 1999, SODA '99.

[3]  Trevor I. Fenner,et al.  A Binary Tree Representation and Related Algorithms for Generating Partitions , 1980, Comput. J..

[4]  Leslie Ann Goldberg,et al.  Efficient algorithms for listing combinatorial structures , 1993 .

[5]  Herbert S. Wilf,et al.  Combinatorial Algorithms: An Update , 1987 .

[6]  A. Nijenhuis Combinatorial algorithms , 1975 .

[7]  Trevor I. Fenner,et al.  An analysis of two related loop-free algorithms for generating integer partitions , 2004, Acta Informatica.

[8]  Sandra Mitchell Hedetniemi,et al.  Constant Time Generation of Rooted Trees , 1980, SIAM J. Comput..

[9]  Carla D. Savage Gray Code Sequences of Partitions , 1989, J. Algorithms.

[10]  Ivan Stojmenovic,et al.  Fast algorithms for genegrating integer partitions , 1998, Int. J. Comput. Math..

[11]  Shin-Ichi Nakano Enumerating Floorplans with n Rooms , 2001, ISAAC.

[12]  Shin-Ichi Nakano,et al.  Constant Time Generation of Trees with Specified Diameter , 2004, WG.

[13]  John McKay Algorithm 263: Partition generator , 1965, CACM.

[14]  Deborah Evelyn An Introduction to Computational Combinatorics , 1979 .

[15]  Carla Savage,et al.  A Survey of Combinatorial Gray Codes , 1997, SIAM Rev..

[16]  T. V. Narayana,et al.  An Algorithm for Generating Partitions and Its Applications , 1971, J. Comb. Theory, Ser. A.

[17]  R. Read Every one a Winner or how to Avoid Isomorphism Search when Cataloguing Combinatorial Configurations , 1978 .

[18]  Carla D. Savage,et al.  Gray Code Enumeration of Families of Integer Partitions , 1995, J. Comb. Theory, Ser. A.

[19]  Brendan D. McKay,et al.  Isomorph-Free Exhaustive Generation , 1998, J. Algorithms.

[20]  Frank Ruskey,et al.  Simple Combinatorial Gray Codes Constructed by Reversing Sublists , 1993, ISAAC.

[21]  Shin-Ichi Nakano,et al.  Efficient generation of plane trees , 2002, Inf. Process. Lett..

[22]  Martyn Amos,et al.  RCN algorithms for the uniform generation of combinatorial structures , 1996, SODA '96.

[23]  Shin-Ichi Nakano,et al.  Efficient Generation of Plane Triangulations without Repetitions , 2001, ICALP.

[24]  Brendan D. McKay,et al.  Constant Time Generation of Free Trees , 1986, SIAM J. Comput..

[25]  Dennis E. White,et al.  Combinatorial Gray codes , 1980, SIAM J. Comput..

[26]  Shin-Ichi Nakano,et al.  Constant Time Generation of Set Partitions , 2005, IEICE Trans. Fundam. Electron. Commun. Comput. Sci..