Generation of combinatorial objects
In this chapter, we deal with problems that require us to generate all the elements of some finite set one-by-one. We start with a simple example in section 2.1 (generating all sequences of fixed length composed of elements of some finite set). Then in section 2.2 we generate all permutations of a given set. It is more difficult since now the elements are not independent (no element should appear twice). Two other popular combinatorial objects are considered in sections 2.3 (subsets of fixed size) and 2.4 (partitions). Some applications (including Gray codes) are considered in section 2.5. In section 2.6 we consider some examples where elements to be generated are in one-to-one correspondence with elements of some other set (which are easier to generate). Finally, in section 2.7 we consider a classical problem where we have to count elements of some class (without generating them).
KeywordsLexicographic Order Alphabetic Order Gray Code Catalan Number Combinatorial Object
Unable to display preview. Download preview PDF.