How this calculation works
Validate an arbitrary union-closed accessible feasible family, count its basic words, and compute the complementary convex-geometry closure. Poset ideals are only one antimatroid subclass; feasible prerequisite alternatives need not be fixed pairwise precedence.
F is accessible and union-closed; b(S)=Σ_{x∈S,S\{x}∈F}b(S\{x}), with b(∅)=1.A worked example
On labels {0,1,2}, use feasible masks [0,1,2,3,5,6,7]. Label 2 may follow either 0 or 1. The basic words are 012,021,102,120, giving count 4.
Good to know
Ground set ≤10 labels; explicit complete feasible family ≤1,024 distinct subsets; full ground set required. Basic-word count exact by subset DP; list ≤100 sample words.
Reference: Lei and Zhang: Closure System and Its Semantics, section 5.1 (opens in a new tab) ↗
Feasible-set family input
An antimatroid describes which collections of actions can already have been completed. The input is the entire feasible family, including the empty set and, under this convention, the full ground set.
Feasibility can allow alternatives: an action may become available after either of two earlier actions. Such systems need not come from one fixed list of pairwise precedence relations.
Compare this with the Linear extension count calculator for a partially ordered set. Validate an arbitrary union-closed accessible feasible family, count its basic words, and compute the complementary convex-geometry closure. Poset ideals are only one antimatroid subclass; feasible prerequisite alternatives need not be fixed pairwise precedence.
Accessibility and union closure
Accessibility requires every nonempty feasible set to lose at least one element and remain feasible. Union closure requires the union of any two feasible sets to be feasible as well.
Both checks are applied to the supplied complete family. A missing set is meaningful data, so listing only selected examples cannot be interpreted as an implicit completion problem. The default feasible family allows either of two prerequisites to unlock a third item. It is accessible and union-closed, but it need not be the ideal family of a fixed partial order. Four complete learning words respect its available intermediate states. This is the useful distinction from counting linear extensions: alternative prerequisite routes can exist without imposing one fixed pairwise precedence relation. The entire supplied family is therefore validated rather than inferred from a small list of arrows.
Basic learning words
A basic word lists every ground element once, with every prefix set feasible. The order records a complete legal learning or construction sequence rather than merely a final feasible subset.
Count these words by subsets: the number reaching S is the sum of the counts reaching feasible predecessors S without one element. The empty-set count starts at one.
Subset dynamic programming
Complements of feasible sets form the closed sets of a convex geometry. The closure of a subset is the intersection of every closed superset, making the closure operation computable from the full family.
This complementary description reverses the perspective from completed actions to remaining constraints. Closed sets and feasible sets must therefore retain their labels and complement convention in the result. Accessibility requires a nonempty feasible set to have some element whose removal remains feasible. Union closure requires the union of every two feasible sets to remain in the family. With the full ground set feasible, these properties define the antimatroid convention used here. Dynamic programming counts paths from the empty set to the full set, adding one feasible item at each step. Each path spells one basic word. Sample-word truncation leaves the exact total unchanged, so a large count should not be compared with the number of printed examples.
Complementary convex geometry
The default excludes the singleton {2} but permits {0,2} and {1,2}. Thus action 2 cannot come first, yet it can follow either action 0 or action 1.
The valid full words are 012,021,102 and 120. The other two permutations start with 2 and fail at their first prefix, giving an independently checked total of four.
Alternative-prerequisite worked example
The feasible-set diagram connects sets that differ by one legal addition. A highlighted path from empty to full corresponds to one basic word, and branch choices explain why multiple words can reach the same set.
For a Boolean feasible family every permutation is valid, giving n! words. For a single prefix chain there is one word. Poset ideal families provide another check against ordinary linear-extension counts. Complementing feasible sets produces the associated convex geometry's closed sets. The closure of a subset is the intersection of all closed sets containing it, which may add several items at once. This is a combinatorial closure, not the Euclidean convex hull of coordinate points. Duplicate subsets, omitted empty/full sets or a family missing feasible intermediate states can change the mathematical object, so they are treated as validation errors rather than silently completed by assumption.
Complete-family requirement and output limits
The exact word count can grow quickly even when the feasible-family input is small. The computation can use exact integers while listing only a bounded number of example words.
A failed union or accessibility condition must return its witness. It does not mean the listed sets are useless, only that they fail the antimatroid model required for the closure and basic-word interpretation.
A few questions, answered
How does this generalize a poset?
It allows alternative prerequisites that need not be expressible as fixed pairwise order relations.
What is a basic word?
A permutation whose every prefix set belongs to the feasible family.
Why must the feasible family be complete?
An omitted set is treated as infeasible; incomplete examples would define a different system.
What is the complementary closure operator?
It intersects all closed supersets, where closed sets are complements of feasible sets.