Cafe cup-lid compatibility tally calculator

Calculate cup-to-lid assignments and cups without matching lid with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use cup-to-lid assignments and cups without matching lid to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Allowed zero-based lid type indices per individual cup; enter JSON
[[0],[0],[1],[1]]
Available compatible lids by type (counts)
3,1
Cup-to-lid assignments (JSON)
[1,1,2,null]
Cups without matching lid (count)
1

Try another scenario

Allowed zero-based lid type indices per individual cup; enter JSON
[[0],[0,1],[1],[1],[1]]
Available compatible lids by type (counts)
2,3
Cup-to-lid assignments (JSON)
[1,1,2,2,2]
Cups without matching lid (count)
0
Calculation method

Calculation method

Cup-to-lid assignments (JSON)

Maximum-cardinality bipartite matching on supplied compatibility.

Cups without matching lid (count)

Count unmatched individual cups.

Symbols and units
a
Allowed zero-based lid type indices per individual cup; enter JSON
b
Available compatible lids by type (counts)

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Compatibility is entered by cup SKU; no inferred manufacturer lid fit. One lid per cup. Supported limits: All numeric inputs and computed intermediates must remain finite. Supported numeric input magnitude is zero or 1e-12 through 1e12 in absolute value; reject values outside this bounded range. All lists/JSON record tables are limited to 100 records unless a stricter bound is stated; reject malformed record arity and wrong member types. At most 100 individual cups/lids; indices exist; capacities integer>=0.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.