Advanced maths

Delta matroid feasible set calculator with twists and symmetric exchange witnesses

Check symmetric exchange, apply a delta-matroid twist and extract lower and upper basis families.

Your numbers

Valid JSON; preserve the shown array or object structure.
Valid JSON; preserve the shown array or object structure.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A delta-matroid consists of a finite ground set and a nonempty family of feasible subsets satisfying symmetric exchange. Unlike the bases of an ordinary matroid, its feasible sets do not need a common cardinality. Allowing their sizes to vary is the central extension, not an input error.

THE FORMULAEncode subsets as bitmasks and require nonempty feasible family. For every feasible X,Y and u∈X△Y, seek v∈X△Y (v=u allowed) with X△{u,v} feasible; set{u,u} containsu ONCE, not empty. Return first violated triple or complete validity, twist allfeasible sets by XOR withA, and extract minimum- and maximum-cardinality feasible families as lower/upper matroid bases. Validate groundsetmembership, duplicates and completenessofsuppliedfamily; do not assumeallfeasiblesetsequalcardinality.

A worked example

With the prefilled inputs, isDeltaMatroid = Yes.

Good to know

Symmetric exchange allows v=u, toggling u once; lower/upper matroids are reported only after axiom validation.

Feasible sets may have different sizes

A delta-matroid consists of a finite ground set and a nonempty family of feasible subsets satisfying symmetric exchange. Unlike the bases of an ordinary matroid, its feasible sets do not need a common cardinality. Allowing their sizes to vary is the central extension, not an input error.

The submitted family is treated as complete. Omitting a feasible set can create an apparent exchange failure, while adding an unintended set can change the structure. This calculator validates the exact set system supplied rather than guessing a completion from examples.

Delta-matroid twist of the empty-and-full familyTwist the feasible family by {a}Original family∅{a, b}△ {a}Twisted family{a}{b}Twist twice by the same set to recover the original family.
Scroll across to see the full diagram.
Symmetric difference with {a} sends the empty set to {a} and {a,b} to {b}. Both displayed families satisfy symmetric exchange.

Compare with the Linear matroid circuits and flats calculator from a matrix. Validate feasible setfamilies of unequal size and twist by symmetricdifference; ordinary matroidbases must haveequalcardinality.

Use symmetric difference with a precise exchange rule

Use the prefilled input structure and preserve the declared column or index order. For feasible X and Y, choose an element u in their symmetric difference. Some element v in that same symmetric difference must make X symmetric-difference the set containing u and v feasible. The witnesses may depend on X, Y and u.

The case v=u toggles u once, because a set containing the same element twice still contains one element. Implementing this case as two bitwise toggles would cancel the operation and incorrectly make exchange trivially hold. The distinction deserves an explicit regression test.

Enumerate exchange witnesses exactly

With at most eight ground elements, bitmasks represent every feasible subset exactly. Enumerate each ordered feasible pair and every element in its symmetric difference, then search the same difference for a valid partner. Return the first failing pair and element if none exists.

When all checks pass, list enough witness information to make the validity result inspectable. The algorithm is finite and combinatorial; no numerical tolerance is needed. Duplicate feasible subsets should be normalized deliberately, while unknown ground labels and an empty family should be rejected.

Twist the empty-and-full two-element example

Take feasible sets empty and {a,b}. The nontrivial exchanges between them toggle both elements, so the family satisfies the delta-matroid axiom. Its minimum feasible size is zero, and its maximum feasible size is two.

Twisting by {a} replaces every feasible set F with its symmetric difference with {a}. The two results are {a} and {b}, now the ordinary bases of a rank-one matroid. Twisting again by the same subset returns the original family, giving a simple involution check.

Lower and upper matroids retain extreme feasible sets

The smallest feasible sets form the bases of the lower matroid, and the largest feasible sets form the bases of the upper matroid. Their ranks record the extreme cardinalities, but they need not describe every intermediate feasible set in the delta-matroid.

A static set-lattice figure should mark the supplied feasible subsets and use a separate annotation for the twist. Labels showing subset contents and cardinalities explain the example without relying on color. The lower and upper basis lists should match the extreme marked levels exactly.

Twisting is not ordinary set complementation

A twist toggles membership only in the chosen subset A. Twisting by the whole ground set is complementation, but a smaller A is a different transformation. Twists preserve the delta-matroid property, making them useful structure-changing operations rather than arbitrary edits.

Ordinary matroid basis exchange is a special equal-cardinality setting. A family can fail ordinary matroid-base rules while still be a valid delta-matroid. The result should not label varying feasible sizes as invalid or silently discard all but the largest sets before testing exchange.

Report invalidity with a concrete obstruction

A false validity result is most useful when accompanied by feasible sets X and Y and a specific u for which every permitted v fails. That obstruction can be checked directly against the input family. A bare false label hides whether the issue is parsing or actual exchange.

Validate twist involutivity, empty-versus-full examples and a family missing a necessary exchange partner. All arithmetic is exact set membership. A complete axiom test is distinct from recognizing whether the delta-matroid comes from a particular graph or field representation, which this scope does not promise. The public prefill uses numeric ground labels zero and one in place of a and b. After twisting by label zero, both feasible sets are singletons. Accordingly, the returned lowerBases and upperBases are both the twisted rank-one family; the original lower rank zero and upper rank two belong to the untwisted example, not to those output lists. Symmetric exchange allows v=u, toggling u once; lower/upper matroids are reported only after axiom validation.

A few questions, answered

Can feasible sets have different cardinalities?

Yes. Equal cardinality is not required in a delta-matroid, though the smallest and largest feasible sets separately form matroid basis families.

When v equals u, is nothing toggled?

No. The set containing u and v then contains u once, so u is toggled once. Double-XOR cancellation would implement the wrong axiom.

Does twisting preserve validity?

Yes. Twisting every feasible set by the same ground subset preserves the delta-matroid property.

Does passing exchange prove a graph representation exists?

No. It validates the set-system axiom. Representability by a particular embedded graph or matrix is a separate question.

Find your calculator

Start typing to explore the library.