Skip to content

Commit 262d0a0

Browse files
committed
improving definition of supergreedy
1 parent 0148485 commit 262d0a0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/sage/combinat/posets/linear_extensions.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ def is_supergreedy(self):
256256
r"""
257257
Return ``True`` if the linear extension is supergreedy.
258258
259-
A linear extension `[x_1,x_2,...,x_t]` of a finite ordered
260-
set `P=(P, <)` is *super greedy* if it can be obtained using
261-
the following procedure: Choose `x_1` to be a minimal
262-
element of `P`; suppose `x_1,...,x_i` have been chosen;
263-
define `p(x)` to be the largest `j\leq i` such that `x_j<x`
264-
if such a `j` exists and 0 otherwise; choose `x_{i+1}`
265-
to be a minimal element of `P-\{x_1,...,x_i\}` which
266-
maximizes `p`.
259+
A linear extension of a Poset `P` with elements `\{_1,x_2,...,x_t\}`
260+
is *super greedy*, if it can be obtained using the following
261+
algorithm: Choose `x_1` to be a minimal element of `P`;
262+
suppose `X = \{x_1,...,x_i\}` have been chosen; let `M` be
263+
the set of minimal elements of `P/X`. If there is an element
264+
of `M` which covers an element `x_j` in `X`, then let `x_{i+1}`
265+
be one of these such that `j` is maximal; otherwise, choose `x_{i+1}
266+
to be any element of `M`.
267267
268268
Informally, a linear extension is supergreedy if it "always
269269
goes up and receedes the least"; in other words, supergreedy

0 commit comments

Comments
 (0)