Description
Check intersection-size feasibility from set cardinalities.
Combinatorial counts depend on whether objects are labeled, order matters, repetitions are permitted and a prefix is already fixed. Local counts, exact integer factors and feasibility bounds answer specific questions and need not enumerate complete objects.
Check intersection-size feasibility from set cardinalities.
When to use this tool
Use Subset Fixed Intersection Budget when checking the stated word, set, multiset or composition convention.
How to use the tool and how it works
- Enter universe, subsetA, subsetB, requiredIntersection. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read minimumIntersection, maximumIntersection, feasible, unionSize. Inspect feasible before interpreting the associated values.
Check intersection-size feasibility from set cardinalities. Require whole universe >= subsetA,subsetB >= 0 and requiredIntersection >= 0; bounds are max(0,a+b-universe) and min(a,b), feasible includes both endpoints.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| universe | Universe | Required. Safe integer; minimum 0. |
| subsetA | Subset A | Required. Safe integer; minimum 0. |
| subsetB | Subset B | Required. Safe integer; minimum 0. |
| requiredIntersection | Required Intersection | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| minimumIntersection | Minimum Intersection | Required. Safe integer. |
| maximumIntersection | Maximum Intersection | Required. Safe integer. |
| feasible | Whether the stated local constraints hold; this need not establish a valid complete object or procedure. | Required. Boolean. |
| unionSize | Algebraic a+b-requiredIntersection, even when feasible=false; inspect feasibility before using it as a real cardinality. | Required. Safe integer. |
{
"input": {
"universe": 10,
"subsetA": 6,
"subsetB": 7,
"requiredIntersection": 3
},
"output": {
"minimumIntersection": 3,
"maximumIntersection": 6,
"feasible": true,
"unionSize": 10
}
} Limitations and assumptions
- unionSize = a+b-requiredIntersection is returned even for an infeasible request and is then only an algebraic placeholder.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use complete objects and an appropriate exact counting, ranking or enumeration method when the local contribution is insufficient.
References
Similar or alternative tools
- Subset Mask Cardinality Parity
Return cardinality and parity of an unsigned subset mask.
- Subset Complement Cardinality Shift
Update complement cardinality after a supplied subset change.