The number of ideals of a poset may be exponential in the size of the poset. We have already seen that the ideals of a poset form a distributive lattice under the relation. In this chapter, we explore different ways in which the lattice of ideals may be traversed, in order to enumerate all the ideals of a poset.
We explore the following three orders of enumeration:
- Breadth-first search (BFS): This order of enumeration corresponds to the BFS traversal of the lattice of ideals.
- Depth-first search (DFS): This order corresponds to the DFS traversal of the lattice of ideals.
- Lex order: This order corresponds to the “dictionary” order.
We first illustrate the above-mentioned three orders of enumeration by means of an example. Consider the poset shown in Figure 14.1(a). Figure 14.1(b) shows the lattice of ideals corresponding to this poset. In this figure, we have used the first digit and the second digit to indicate the number of events included in the ideal from the first chain and the second chain, respectively. For example, the ideal is denoted by .