1.3.6 Generating Partitions

Problem Input | Problem Output


INPUT                    OUTPUT


Input Description: An integer n .

Problem: Generate (1) all, or (2) a random, or (3) the next integer or set partitions of length n .


Implementations

  • Nijenhuis and Wilf: Combinatorial Algorithms (FORTRAN) (rating 8)
  • Combinatorica (Mathematica) (rating 7)
  • Frank Ruskey's Combinatorial Generation Resources (Pascal) (rating 7)
  • Netlib / TOMS -- Collected Algorithms of the ACM (FORTRAN) (rating 6)
  • The Stanford GraphBase (C) (rating 5)

    Related Problems

  • Generating Permutations
  • Generating Subsets
  • Random Number Generation
  • Set Data Structures


    Go to the corresponding chapter in the book
    About the Book
    Send us Mail
    Go to Main Page

    This page last modified on Tue Jun 03, 1997 .