Skip to main content
Log in

Bottom-Up: a New Algorithm to Generate Random Linear Extensions of a Poset

  • Published:
Order Aims and scope Submit manuscript

Abstract

In this paper we present a new method for deriving a random linear extension of a poset. This new strategy combines Probability with Combinatorics and obtains a procedure where each minimal element of a sequence of subposets is selected via a probability distribution. The method consists in obtaining a weight vector on the elements of P, so that an element is selected with a probability proportional to its weight. From some properties on the graph of adjacent linear extensions, it is shown that the probability distribution can be obtained by solving a linear system. The number of equations involved in this system relies on the number of what we have called positioned antichains, that allows a reduced number of equations. Finally, we give some examples of the applicability of the algorithm. This procedure cannot be applied to every poset, but it is exact when it can be used. Moreover, the method is quick and easy to implement. Besides, it allows a simple way to derive the number of linear extensions of a given poset.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Ayyer, A., Klee, S., Shilling, A.: Combinatorial Markov chains on linear extensions. J. Algebr. Comb. 39(4), 853–881 (2014)

    Article  MathSciNet  Google Scholar 

  2. Bollobás, B., Brightwell, G., Sidorenko, A.: Geometrical techniques for estimating numbers of linear extensions. Eur. J. Comb. 20, 329–335 (1999)

    Article  MathSciNet  Google Scholar 

  3. Brightwell, G: The number of linear extensions of ranked posets. CDAM Research Report (2003)

  4. Brightwell, G., Tetali, P.: The number of linear extensions of the Boolean Lattice. Order 20(3), 333–345 (2003)

    Article  MathSciNet  Google Scholar 

  5. Brightwell, G., Winkler, P.: Counting linear extensions. Order 8(3), 225–242 (1991)

    Article  MathSciNet  Google Scholar 

  6. Bubley, R., Dyer, M.: Faster random generation of linear extensions. Discret. Math. 20, 81–88 (1999)

    Article  MathSciNet  Google Scholar 

  7. Choquet, G: Theory of capacities. Ann. Inst. Fourier 5, 131–295 (1953)

    Article  MathSciNet  Google Scholar 

  8. Davey, B.A., Priestley, H.A.: Introduction to Lattices and Order. Cambridge University Press, Cambridge (2002)

    Book  Google Scholar 

  9. Denneberg, D.: Non-additive Measures and Integral. Kluwer Academic, Dordrecht (1994)

    Book  Google Scholar 

  10. Devroye, L.: Non-uniform Random Variate Generation. Springer, New York (1986)

    Book  Google Scholar 

  11. Edelman, P., Hibi, T., Stanley, R.: A recurrence for linear extensions. Order 6(1), 15–18 (1989)

    Article  MathSciNet  Google Scholar 

  12. Eriksson, K., Jonsson, M., Sjöstrand, J.: Markov chains on graded posets: compatibility of up-directed and down-directed transition probabilities. Order, Online Open Access. https://doi.org/10.1007/s11083-016-9420-1 (2016)

    Article  Google Scholar 

  13. Greene, C., Nijenhuis, A., Wilf, H.: A probabilistic proof of a formula for the number of Young Tableaux of a given shape. Adv. Math. 31, 104–109 (1979)

    Article  MathSciNet  Google Scholar 

  14. Grabisch, M., Murofushi, T., Sugeno, M. (eds.): Fuzzy Measures and Integrals- Theory and Applications. Number 40 in Studies in Fuzziness and Soft Computing. Physica–Verlag, Heidelberg (2000)

  15. Huber, M.: Fast perfect sampling from linear extensions. Discret. Math. 306, 420–428 (2006)

    Article  MathSciNet  Google Scholar 

  16. Huber, M.: Near-linear time simulation of linear extensions of a height-2 poset with bounded interaction. Chic. J. Theor. Comput. Sci. 03, 1–16 (2014)

    MathSciNet  MATH  Google Scholar 

  17. Kalvin, A.D., Varol, Y.L.: On the generation of all topological sortings. J. Algorithms 4(2), 150–162 (1983)

    Article  MathSciNet  Google Scholar 

  18. Karzanov, A., Khachiyan, L.: On the conductance of order Markov chains. Order 8(1), 7–15 (1995)

    Article  MathSciNet  Google Scholar 

  19. Knuth, D.E., Szwarcfiter, J.: A structured program to generate all topological sorting arrangements. Inform. Process. Lett. 2(6), 153–157 (1974)

    Article  Google Scholar 

  20. Korsh, J.F., Lafollette, P.S.: Loopless generation of linear extensions of a poset. Order 19, 115–126 (2002)

    Article  MathSciNet  Google Scholar 

  21. Levin, D., Peres, Y., Wilmer, E.: Markov Mixing and Mixing Times. American Mathematical Society (2008)

  22. Leydold, J., Hörmann, W.: A sweep-plane algorithm for generating random tuples in simple polytopes. J. Math. Comput. 67(224), 1617–1635 (1998)

    Article  MathSciNet  Google Scholar 

  23. Matousek, J: Lectures on Discrete Geometry. Springer, New York (2002)

    Book  Google Scholar 

  24. Nakada, K., Okamura, S.: An algorithm which generates linear extensions for a generalized Young diagram with uniform probability. DMTCS, proc. AN, pp. 801–808 (2010)

  25. Neggers, J., Kim, H. S.: Basic Posets. World Scientific, Singapore (1998)

    Book  Google Scholar 

  26. Pruesse, G., Ruskey, F.: Generating linear extensions fast. SIAM J. Comput. 23(2), 373–386 (1994)

    Article  MathSciNet  Google Scholar 

  27. Ruskey, F.: Generating linear extensions of posets by transpositions. J. Comb. Theory, Ser. B 54, 77–101 (1992)

    Article  MathSciNet  Google Scholar 

  28. Stanley, R.: Two poset polytopes. Discrete Comput. Geom. 1(1), 9–23 (1986)

    Article  MathSciNet  Google Scholar 

  29. Stanley, R.: Enumerative Combinatorics. Cambridge University Press, Cambridge (2012)

    MATH  Google Scholar 

  30. Sugeno, M.: Theory of fuzzy integrals and its applications. PhD thesis, Tokyo Institute of Technology (1974)

  31. Varol, Y.L., Rotem, D.: An algorithm to generate all topological sorting arrangements. Comput. J. 24(1), 83–84 (1981)

    Article  Google Scholar 

  32. Vose, M.D.: A linear algorithm for generating random numbers with a given distribution. IEEE Trans. Softw. Eng. 17(9), 972–975 (1991)

    Article  MathSciNet  Google Scholar 

  33. Wilf, H.S.: Generating Functionology. Academic, New York (1994)

    Google Scholar 

Download references

Acknowledgements

This paper has been supported by the Spanish Grant MTM-2015-67057.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to P. Miranda.

Appendix: Proof of Theorem 3

Appendix: Proof of Theorem 3

In an attempt to clarify the proof, we have considered some previous results before the main part of the proof. In what follows, we will denote Px := P ∖{x}.

Lemma 5

Let P be a finite poset. The following holds:

  1. i)

    For every finite posetsP and Q,e(PQ) = e(P)e(Q) and\(e(P\uplus Q)= {\vert P \vert + \vert Q \vert \choose \vert P \vert }e(P)e(Q).\)

  2. ii)

    For every\(x\in \mathcal {M}(P)\),i(Px) ≤ i(P) ≤ 2i(Px).

  3. iii)

    \(\text {pa}(P)= {\sum }_{(x,y)\in \mathcal {A}_{2}(P)} i(P \setminus \updownarrow \!\lbrace x,y \rbrace ),\)where\(\mathcal {A}_{2}(P)\)denotesthe set of antichains of two elements of P.

  4. iv)

    pa(P1P2) = pa(P1) + pa(P2).

  5. v)

    \(\text {pa}(P_{1} {\kern -.2pt}\uplus {\kern -.2pt} P_{2}) = i(P_{2}) \text {pa}(P_{1}) + i(P_{1}) \text {pa}(P_{2}) + {\sum }_{(x,y)\in P_{1} \times P_{2}} i {\kern -.2pt}({\kern -.2pt}({\kern -.2pt}P_{1} \setminus \! \updownarrow \! \lbrace x \rbrace ) \uplus (P_{2} \setminus \! \updownarrow \! \lbrace y \rbrace {\kern -.2pt}){\kern -.2pt}).\)

  6. vi)

    LetP be a poset withm(P) = 2.Suppose thatP has a minimal elementx1less than every non-minimal element inP; then,\(\text {pa}(P)=\text {pa}(P_{x_{1}})+ 1\).Therefore, ifPis a poset with an only minimum, then\(\text {pa}(P^{*} \uplus \mathbf {1})= \text {pa}(P^{*}_{x_{1}} \uplus \mathbf {1}) + 1\).

  7. vii)

    LetP be a poset withm(P) = 3.Suppose thatP has a minimal elementx1less than every non-minimal element inP; then,\(\text {pa}(P)=\text {pa}(P_{x_{1}})+ 5\).Therefore, ifPis a poset with an only minimum, then\(\text {pa}(P^{*} \uplus \mathbf {1} \uplus \mathbf {1})= \text {pa}(P^{*}_{x_{1}} \uplus \mathbf {1} \uplus \mathbf {1}) + 5\).

  8. viii)

    i(P) = i(P) and pa(P) = pa(P).

Proof

  1. i)

    These are well-known properties of e(P). See [25, 29].

  2. ii)

    Consider \(x\in \mathcal {M}(P)\) fixed and let us define

    $$\begin{array}{cccc}F: & \mathcal{I}(P_{x}) & \rightarrow & \mathcal{I}(P) \\ & I & \mapsto & I \cup \lbrace x \rbrace \end{array} $$

    As \(x\in \mathcal {M}(P),\) if \(I\in \mathcal {I}(P_{x}),\) it follows that \(I \cup \lbrace x \rbrace \in \mathcal {I}(P)\), and F is injective, and hence the first inequality holds.

    Let us now consider the function \(G: \mathcal {I}(P) \rightarrow \mathcal {I}(P_{x})\times 2\) given by

    $$G(I) = \left\{ \begin{array}{c l} (I,0), & x \notin I\\ (I \setminus \lbrace x \rbrace,1), & x \in I \neq \lbrace x \rbrace \\ (\emptyset,1), & I=\lbrace x \rbrace \end{array} \right. $$

    Note that if xI then \(I\in \mathcal {I}(P_{x});\) on the other hand, if xI, then \(I \setminus \lbrace x \rbrace \in \mathcal {I}(P_{x});\) we conclude that G is well-defined. As G is injective, the second inequality holds.

  3. iii)

    For a fixed antichain {x, y} of two elements, the number of positioned antichains associated with {x, y} is given by i(P {x, y}). Then, \(\text {pa}(P)= {\sum }_{(x,y)\in \mathcal {A}_{2}(P)} i(P \setminus \updownarrow \!\lbrace x,y \rbrace ).\)

  4. iv)

    This result has been already shown in the proof of Prop. 1.

  5. v)

    The set \(\mathcal {P}\mathcal {A}(P_{1}\uplus P_{2})\) can be partitioned into three parts in terms of the antichain a: aP1, aP2 and a = {x, y}, xP1, yP2. Then, if \(\mathcal {A}_{2}(P)\) denotes the set of antichains of two elements of P, iii) implies that pa(P1P2) is given by

    $$\sum\limits_{(x,y)\in \mathcal{A}_{2}(P_{1})} i ((P_{1} \setminus \updownarrow \! a) \uplus P_{2}) + \sum\limits_{(x,y)\in \mathcal{A}_{2}(P_{2})} i (P_{1}\uplus (P_{2} \setminus \updownarrow \! a)) + \sum\limits_{(x,y)\in P_{1} \times P_{2}} i ((P_{1} \setminus \updownarrow \! \lbrace x \rbrace) \uplus (P_{2} \setminus \updownarrow \! \lbrace y \rbrace)). $$

    On the other hand, note that i((P1a) ⊎ P2) = i(P1a)i(P2). Therefore,

    $$\sum\limits_{(x,y)\in \mathcal{A}_{2}(P_{1})} i ((P_{1} \setminus \updownarrow \! a) \uplus P_{2})= \text{pa}(P_{1}) i(P_{2}).$$

    Similarly, \({\sum }_{(x,y)\in \mathcal {A}_{2}(P_{2})} i (P_{1}\uplus (P_{2} \setminus \updownarrow \! a))= i(P_{1}) \text {pa}(P_{2}).\)

  6. vi)

    Let x1, x2 be the minimal elements of P. Observe that x2 is the only element in P that is not related to x1. Then, every antichain of two elements a in P is related to or contains x1. Therefore, \(P\setminus \updownarrow \! a = P_{x_{1}} \setminus \updownarrow \! a\) and \(\mathcal {I}(P\setminus \updownarrow \! a)=\mathcal {I}(P_{x_{1}} \setminus \updownarrow \! a).\) Then, if (a, V ) is a positioned antichain of P such that x1a then (a, V ) is a positioned antichain of \(P_{x_{1}}\). Also, if (a, V ) is a positioned antichain of \(P_{x_{1}},\) then (a, V ) is a positioned antichain of P. Then, the positioned antichains in P are the same as \(P_{x_{1}}\) plus the positioned antichains with x1a. Since x1 is less than every element apart from x2, then the only position antichain with x1a is (a = {x1, x2}, V = ). Therefore, \(\text {pa}(P)=\text {pa}(P_{x_{1}})+ 1\).

  7. vii)

    Let x1, x2, x3 be the minimal elements of P and let us study the different kinds of positioned antichains (a, V ) in P and \(P_{x_{1}}\).

    • Suppose a contains some element in \(\uparrow \! \widehat {x_{1}}.\) Then, x1V and \(P\setminus \updownarrow \! a = P_{x_{1}} \setminus \updownarrow \! a;\) thus, V is an ideal of \(P_{x_{1}},\) and then (a, V ) is a positioned antichain for \(P_{x_{1}}\). Reciprocally, any \((a,V)\in \mathcal {P}\mathcal {A}(P_{x_{1}})\) satisfying \(a\cap \uparrow \! \widehat {x_{1}}\ne \emptyset \) can be associated with \((a,V)\in \mathcal {P}\mathcal {A}(P).\) Then,

      $$\begin{array}{cccc} f: & \mathcal{I}(P\setminus \updownarrow \! a) & \rightarrow & \mathcal{I}(P_{x_{1}}\setminus \updownarrow \! a)\\ & V & \rightarrow & V \end{array} $$

      is a bijective function.

    • Suppose on the other hand that \(a\cap \uparrow \! \widehat {x_{1}} = \emptyset \). Observe that this case only arises if a ⊂{x1, x2, x3}, since x1 is related to every non-minimal element. The possible positioned antichains are (a = {x1, x2}, V = ), (a = {x1, x3}, V = ), (a = {x1, x2}, V = {x3}), (a = {x1, x3}, V = {x2}) andthe positioned antichains for a = {x2, x3}. Note that the first four positioned antichains are not positioned antichains of \(P_{x_{1}}\).

      Let us then turn to positioned antichains with a = {x2, x3}. We have two possible choices for V in this case: either x1V or V = . In the first case, note that

      $$\begin{array}{cccc} f: & \mathcal{I}(P\setminus \updownarrow \! \lbrace x_{2},x_{3} \rbrace ) & \rightarrow & \mathcal{I}(P_{x_{1}}\setminus \updownarrow \! \lbrace x_{2},x_{3} \rbrace ) \\ & V & \rightarrow & V\setminus \{ x_{1}\} \end{array} $$

      is a bijective function. Then, the number of ideals associated with the positioned antichain a = {x2, x3} in P is the number of ideals associated with the positioned antichain a = {x2, x3} in \(P_{x_{1}}\) plus one (the remaining case V = ). This positioned antichain plus the four ones above which were not in \(P_{x_{1}}\) give us the result \(\text {pa}(P)=\text {pa}(P_{x_{1}})+ 5\).

  8. viii)

    Note that i(P) = i(P) because \(A\in \mathcal {I}(P)\Leftrightarrow A^{\mathrm {c}} \in \mathcal {F}(P)=\mathcal {I}(P^{\partial }).\)

    Let us now prove that pa(P) = pa(P). Let a be an antichain in P; then, a is an antichain in P. On the other hand, the number of positioned antichains associated with this antichain in P is i(Pa), and the number of positioned antichains associated with a in P is i(Pa). Since Pa = (Pa), then i(Pa) = i((Pa)) = i(Pa). By iii) we get pa(P) = pa(P).

Lemma 6

LetP be a finite poset with exactly one minimal elementx, then pa(P) = pa(Px).

Proof

Obviously, pa(P) ≥pa(Px). Now, as xy,∀yPx, for any positioned antichain (a, V ) in P, it follows that xa, xV. Consequently, any positioned antichain in P is also a positioned antichain in Px, and hence pa(P) ≤pa(Px) and thus, pa(P) = pa(Px). □

Lemma 7

LetP be a finite poset such thatm(P) ≥ 4. Then,\(\text {pa}(P) \leq {\sum }_{x \in \mathcal {M}(P)} \text {pa}(P_{x}).\)

Proof

The set \(\mathcal {P}\mathcal {A}(P)\) (resp. \(\mathcal {P}\mathcal {A}(P_{x})\)) can be partitioned into three sets, \(\mathcal {P}\mathcal {A}_{0}(P), \mathcal {P}\mathcal {A}_{1}(P), \mathcal {P}\mathcal {A}_{2}(P)\) (resp. \(\mathcal {P}\mathcal {A}_{0}(P_{x}), \mathcal {P}\mathcal {A}_{1}(P_{x}), \mathcal {P}\mathcal {A}_{2}(P_{x})\)) attending the number of minimal elements of P in the antichain. We will show that for each of these three cases the result holds.

  • Case 1: \(a=\{ a_{1},a_{2}\} , a_{1},a_{2}\not \in \mathcal {M}(P)\). Consider an element \(x(a_{1},a_{2})\in \mathcal {M}(P)\) such that \(x(a_{1},a_{2}) \in \downarrow \! \hat {a}\). Then, x(a1, a2)∉a, x(a1, a2)∉V, and hence \((a,V)\in \mathcal {P}\mathcal {A}(P_{x(a_{1},a_{2})}).\) Consequently,

    $$\text{pa}_{0}(P) \leq \sum\limits_{x \in \mathcal{M}(P)} \text{pa}_{0}(P_{x}).$$
  • Case 2: \(a=\{ x, a_{0}\} , a_{0}\not \in \mathcal {M}(P), x\in \mathcal {M}(P)\). As in the previous case, there exists an element \(x(a_{0})\in \mathcal {M}(P), x(a_{0})\ne x\) such that x(a0) ∈a. Then, x(a0)∉a, x(a0)∉V, so that \((a,V)\in \mathcal {P}\mathcal {A}(P_{x(a_{0})}).\) Consequently,

    $$\text{pa}_{1}(P) \leq \sum\limits_{x \in \mathcal{M}(P)} \text{pa}_{1}(P_{x}).$$
  • Case 3: \(a=\{ x_{i}, x_{j}\} , x_{i}, x_{j}\in \mathcal {M}(P)\). Note that for fixed {xi, xj} the number of possible positioned antichains in P (resp. Px, for \(x\in \mathcal {M}(P)\backslash \{ x_{i}, x_{j}\} )\) is given by i(P {xi, xj}) (resp. i(Px {xi, xj})). Thus, by Lemma 5 iii),

    $$\text{pa}_{2}(P) = \sum\limits_{(x_{i},x_{j}) \in \mathcal{M}(P)^{2}} i(P \setminus \uparrow \! \lbrace x_{i},x_{j} \rbrace) ,\! \sum\limits_{x\in \mathcal{M}(P)} \text{pa}_{2}(P_{x}) = \sum\limits_{x\in \mathcal{M}(P)} \sum\limits_{(x_{i},x_{j}) \in (\mathcal{M}(P)\backslash \{ x\})^{2} } i (P_{x} \setminus \uparrow \! \lbrace x_{i},x_{j} \rbrace) . $$

    Now, defining Pij = P {xi, xj}, we have

    $$\begin{array}{@{}rcl@{}} \sum\limits_{x \in \mathcal{M}(P)} \sum\limits_{(x_{i},x_{j}) \in (\mathcal{M}(P)\backslash \{ x\})^{2} } i (P_{x} \setminus \uparrow \! \lbrace x_{i},x_{j} \rbrace) & = & \sum\limits\limits_{x \in \mathcal{M}(P)} \sum\limits_{(x_{i},x_{j}) \in (\mathcal{M}(P)\backslash \{ x\})^{2} } i (P^{ij} \setminus \lbrace x \rbrace) \\ & = & \sum\limits_{(x_{i},x_{j}) \in \mathcal{M}(P)^{2}} \sum\limits_{x \in \mathcal{M}(P)\setminus \{ x_{i}, x_{j}\} } i (P^{ij} \setminus \lbrace x \rbrace) \end{array} $$

    Since there are at least four minimal elements in P, the last expression has at least two addends. If \(x^{*}_{i,j}\) is the minimal element with least \(i(P^{ij} \setminus \lbrace x^{*}_{i,j} \rbrace ) \), it follows from Lemma 5 ii)

    $$\begin{array}{@{}rcl@{}} \sum\limits_{(x_{i},x_{j}) \in \mathcal{M}(P)^{2}} \sum\limits_{x \in \mathcal{M}(P)\setminus \{ x_{i}, x_{j}\} } i (P^{ij} \setminus \lbrace x \rbrace) & \geq & \sum\limits_{(x_{i},x_{j}) \in \mathcal{M}(P)^{2}} 2 i(P^{ij} \setminus \lbrace x^{*}_{i,j} \rbrace) \\ & \geq & \sum\limits_{(x_{i},x_{j}) \in \mathcal{M}(P)^{2}} i(P^{ij}) \\ & = & \sum\limits_{(x_{i},x_{j}) \in \mathcal{M}(P)^{2}} i(P \setminus \uparrow \! \lbrace x_{i},x_{j} \rbrace) \\ & =& \text{pa}_{2}(P) \end{array} $$

Adding up these three cases, the result holds. □

It is not difficult to find examples showing that there are not similar results to Lemmas 6 and 7 when m(P) = 2 and m(P) = 3. However, there are special cases where a similar result holds.

Lemma 8

LetP be a finite poset such thatm(P) = 2 andP has at least two maximal elements which are both non-minimal elements.Then:

$$\text{pa}(P) \leq \text{pa}(P_{x_{1}}) + \text{pa}(P_{x_{2}}).$$

Proof

The proof is quite similar to the previous one. The set \(\mathcal {P}\mathcal {A}(P)\) (and \(\mathcal {P}\mathcal {A}(P_{x_{1}}), \mathcal {P}\mathcal {A}(P_{x_{2}})\)) can be partitioned into three sets, \(\mathcal {P}\mathcal {A}_{0}(P), \mathcal {P}\mathcal {A}_{1}(P), \mathcal {P}\mathcal {A}_{2}(P)\) (resp. \(\mathcal {P}\mathcal {A}_{0}(P_{x_{i}}), \mathcal {P}\mathcal {A}_{1}(P_{x_{i}}), \mathcal {P}\mathcal {A}_{2}(P_{x_{i}})\)) attending the number of minimal elements of P in the antichain. The first two cases can be treated as in the previous lemma. In particular, if we consider M1 and M2 maximal and non-minimal elements then ({M1, M2}, V = ) is linked to ({M1, M2}, ) in, say, \(\mathcal {P}\mathcal {A}(P_{x_{1}})\), with x1 {M1, M2}.

Let us then deal with the case of \(\mathcal {P}\mathcal {A}_{2}(P).\) In this case, the only positioned antichain is given by (a = {x1, x2}, V = ). Then, we can link this positioned antichain to \((a=\{ M_{1},M_{2}\} ,V=\emptyset ) \in \mathcal {P}\mathcal {A}(P_{x_{2}}),\) which has not been linked to any other positioned antichain. □

Lemma 9

Let P be a finite poset such that \(\mathcal {M}(P)=\{ x_{1}, x_{2}, x_{3}\} \) and P has at least three maximal elements which are non-minimals. Then,

$$\text{pa}(P) \leq \text{pa}(P_{x_{1}}) + \text{pa}(P_{x_{2}})+ \text{pa}(P_{x_{3}}).$$

Proof

The proof is very similar to the previous proofs. The set \(\mathcal {P}\mathcal {A}(P)\) (and \(\mathcal {P}\mathcal {A}(P_{x_{i}}), x_{i} \in \mathcal {M}(P)\)) can be partitioned into three sets, \(\mathcal {P}\mathcal {A}_{0}(P), \mathcal {P}\mathcal {A}_{1}(P), \mathcal {P}\mathcal {A}_{2}(P)\) (resp. \(\mathcal {P}\mathcal {A}_{0}(P_{x_{i}}), \mathcal {P}\mathcal {A}_{1}(P_{x_{i}}), \mathcal {P}\mathcal {A}_{2}(P_{x_{i}})\)) attending the number of minimal elements of P in the antichain a. The first two cases can be treated as in Lemma 7. In particular, if we denote by M1, M2, M3 three maximal non-minimal elements, the positioned antichain (a = {Mi, Mj}, V = ) is linked to \((a, V)\in \mathcal {P}\mathcal {A}(P_{x(M_{i}, M_{j})})\) for a x(Mi, Mj) ∈ {Mi, Mj}.

Let us then deal with the situation where a = {xi, xj} and consider the positioned antichain (a, V ). In this case, either V = or xkV, where xk is the minimal outside a. If xkV, we link (a, V ) to \((a, V\setminus \{ x_{k}\} )\in \mathcal {P}\mathcal {A}(P_{x_{k}}).\) If V = , we link (a = {xi, xj}, V = ) to \((a=\{ M_{i},M_{j}\} ,V=\emptyset )\in \mathcal {P}\mathcal {A}(P_{x^{*}(M_{i}, M_{j})})\) for x(Mi, Mj)≠x(Mi, Mj).□

Lemma 10

LetP be a finite poset with 2 minimalsx1andx2and such thatP ∖{x1, x2} is neither the empty set nora chain. Then,

$$\sum\limits_{x\in P} i(P \setminus \updownarrow \! x) \leq (\vert P \vert -1)e(P)$$

Proof

We are going to build an injective function F from \(\bigcup _{x \in P}\mathcal {I}(P\setminus \updownarrow \! x) \times \lbrace x \rbrace \) to \(\mathcal {L}(P) \times \lbrace 1,2, \ldots ,\vert P \vert -1 \rbrace \). Define f : P →{1, 2,…,|P|− 1} such that f(x1) = f(x2) = 1, f(P ∖{x1, x2}) = {2,...,|P|− 1} (i.e. f is a bijection between P ∖{x1, x2} and {2,...,|P|− 1}) and such that f(i) < f(j) if ij.

Take xP ∖{x1, x2} and consider \((I, x)\in \mathcal {I}(P\setminus \updownarrow \! x) \times \lbrace x \rbrace .\) We define F(I, x) = (𝜖, f(x)), where 𝜖 is a linear extension given by \(\epsilon :=(\downarrow \! \hat {x},I, x, R)\) where R := P ∖ (Ix) and such that the order in the elements of each part are given according to f and x1 is placed before x2 when they are in the same part. F is well-defined: note that Ix = and there is no contradiction with the order if we place elements of I after elements of \(\downarrow \! \hat {x}.\) Indeed, if \(y\in I, z\in \downarrow \! \hat {x}, y\preceq z,\) then yx, and hence yIx = , that is not possible. Also, if xy then x would be related to some element of I which is in Px, what is impossible, so we can place x after I. Similarly, there is no contradiction placing elements of R after I or x. Note that F is injective so far. Indeed, as f is bijective on P ∖{x1, x2}, the value f(x) provides element x. And then, I can be found as the elements placed before x and outside \(\downarrow \! \hat {x}.\)

Consider now \((I, x_{k})\in \mathcal {I}(P\setminus \updownarrow \! x_{k}) \times \lbrace x_{k} \rbrace .\) We define F(I, xk) = (𝜖, 1). Let us then define 𝜖:

  • If I (then I contains a minimal element) then we define 𝜖 = (I, xk, R) where elements in I and in R are placed in increasing order according to f .

  • Finally, F(, x1) = (x1, x2, R) and F(, x2) = (x2, x1, R), where R is a linear extension of P ∖{x1, x2} such that it is not in increasing order according to f . Note that this is always possible as P ∖{x1, x2}≠ and it is not a chain.

Note that this function is injective. □

Now we can prove the principal theorem of this appendix.

Proof of Theorem 3

We are going to prove it by induction on n = |P|.

For n = 1 the only poset is 1 with pa(1) = 0 < 1 = e(1).

Assume pa(P) ≤ e(P) holds if |P|≤ n and let us prove the result for a poset with n + 1 elements. We have several cases:

  • Case 1: m(P) = 1. Applying the induction hypothesis and Lemma 6, if x is the minimum,

    $$\text{pa}(P) = \text{pa}(P_{x}) \leq e(P_{x})=e(P),$$

    hence the result.

  • Case 2: m(P) ≥ 4. Applying the induction hypothesis and Lemma 7

    $$\text{pa}(P) \leq \sum\limits_{x \in \mathcal{M}(P)} \text{pa}(P_{x}) \leq \sum\limits_{x \in \mathcal{M}(P)} e(P_{x})=e(P),$$

    hence the result.

  • Case 3: m(P) = 2. We consider several cases in terms of the number of maximal elements that are not minimal in P. Let us denote this set by S.

    • If |S| = 0, then \(P=\overline {2}\) and \(\text {pa}(\overline {2})= 1<2=e(\overline {2})\).

    • If |S| = 1, then either P has a maximum or P = P1, where P has an only minimum and an only maximum. If P has a maximum, applying pa(P) = pa(P) (Lemma 5 viii)), e(P) = e(P) and the first case,

      $$\text{pa}(P)=\text{pa}(P^{\partial}) \leq e(P^{\partial}) =e(P).$$

      Otherwise, if P = P1, where P has an only minimum, we can apply Lemma 5 i), vi) and the induction hypothesis, so that

      $$\text{pa}(P^{*} \uplus 1)=\text{pa}(P^{*}_{x_{1}} \uplus \mathbf{1})+ 1 \leq e(P^{*}_{x_{1}} \uplus \mathbf{1})+ 1= (\vert P^{*}_{x_{1}} \vert + 1)e(P^{*}_{x_{1}})+ 1 $$
      $$\leq (\vert P^{*}_{x_{1}} \vert + 1)e(P^{*}_{x_{1}}) + e(P^{*}_{x_{1}}) = (\vert P^{*}_{x_{1}} \vert + 2)e(P^{*}_{x_{1}}) = (\vert P^{*} \vert + 1)e(P^{*}) = e(P^{*} \uplus \mathbf{1}).$$
    • If |S|≥ 2, then we can use Lemma 8 and the induction hypothesis to conclude

      $$\text{pa}(P)\leq \text{pa}(P_{x_{1}}) + \text{pa}(P_{x_{2}}) \leq e(P_{x_{1}}) + e(P_{x_{2}})=e(P).$$
  • Case 4: m(P) = 3. In this last case we can suppose that P has exactly 3 maximal elements because otherwise we can apply Lemma 5 viii), e(P) = e(P) and the corresponding case studied before to conclude:

    $$\text{pa}(P)=\text{pa}(P^{\partial}) \leq e(P^{\partial})=e(P).$$

    Then, let us suppose that P has three maximal elements; let us denote by S the set of maximal elements of P that are not minimal. We consider different cases in terms of |S|.

    • If |S| = 0, then \(P=\overline {3}\) and \(\text {pa}(\overline {3})= 6=e(\overline {3}).\)

    • If |S| = 1, then P = P11, where P has just one minimal x1. Then, applying Lemma 5 vii) and the induction hypothesis,

      $$\text{pa}(P)=\text{pa}(P_{x_{1}})+ 5 \leq e(P_{x_{1}})+ 5.$$

      We will prove that in this case \(e(P_{x_{1}})+ 5 \leq e(P)\). To prove this, observe that if we take any linear extension of \(P_{x_{1}}\), it can be obtained from a linear extension of P removing x1. Then, the map

      $$\begin{array}{cccc} G:& \mathcal{L}(P) & \rightarrow & \mathcal{L}(P_{x_{1}}) \\ & (\epsilon_{1}, ..., \epsilon_{i}, x_{1}, \epsilon_{i + 2}, ..., \epsilon_{n}) & \rightarrow & (\epsilon_{1}, ..., \epsilon_{i}, \epsilon_{i + 2}, ..., \epsilon_{n}) \end{array}$$

      is a surjective function. Note that:

      $$\begin{array}{@{}rcl@{}} G(x_{1},x_{2},x_{3},z,\ldots) \!\!&=&\!\! G(x_{2},x_{1},x_{3},z,\ldots) = G(x_{2},x_{3},x_{1},z,\ldots) = (x_{2},x_{3},z,{\ldots} ).\\ G(x_{1},x_{3},x_{2},z,\ldots) \!\!&=&\!\! G(x_{3},x_{1},x_{2},z,\ldots) = G(x_{3},x_{2},x_{1},z,\ldots) = (x_{3},x_{2},z,\ldots).\\ G(x_{1},x_{3},z,x_{2},\ldots) \!\!&=&\!\! G(x_{3},x_{1},z,x_{2},\ldots) = (x_{3},z,x_{2},\ldots). \end{array} $$

      Thus, \(e(P)\geq e(P_{x_{1}}) + 5\) and the result holds.

    • If |S| = 2, then P = P1, where P is a poset with 2 minimal elements and two (different) maximal elements. Then, we can apply Lemma 5 v), Lemma 10 and the induction hypothesis to conclude

      $$\text{pa}(P^{*} \uplus \mathbf{1}) = 2\text{pa}(P^{*})+\sum\limits_{x \in P^{*}} i(P^{*} \setminus \updownarrow \! x) \leq 2e(P^{*}) + \sum\limits_{x \in P^{*}} i(P^{*} \setminus \updownarrow \! x) $$
      $$\leq 2e(P^{*}) + (\vert P^{*} \vert -1)e(P^{*})=(\vert P^{*} \vert + 1)e(P^{*})=e(P^{*} \uplus \mathbf{1}).$$
    • If |S| = 3, we can use Lemma 9 and the induction hypothesis to conclude

      $$\text{pa}(P)\leq \text{pa}(P_{x_{1}}) + \text{pa}(P_{x_{2}}) + \text{pa}(P_{x_{3}}) \leq e(P_{x_{1}}) + e(P_{x_{2}}) + e(P_{x_{3}})=e(P).$$

Therefore we have proved the inductive step for any P with n + 1 elements, and then by induction the result holds. □

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

García-Segador, P., Miranda, P. Bottom-Up: a New Algorithm to Generate Random Linear Extensions of a Poset. Order 36, 437–462 (2019). https://doi.org/10.1007/s11083-018-9476-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11083-018-9476-1

Keywords

Navigation