Examples
Examples
Try the starting example
- Adults (persons)
- 2
- Children (persons)
- 2
- Eligible tickets [name,adult capacity,child capacity,price currency]; enter JSON (USD)
- [["Adult",1,0,12],["Child",0,1,7],["Family",2,2,32]]
- Lowest eligible supported ticket cost (USD or text)
- $32.00
- Ticket purchase counts (JSON)
- [0,0,1]
Try another scenario
- Adults (persons)
- 3
- Children (persons)
- 3
- Eligible tickets [name,adult capacity,child capacity,price currency]; enter JSON (USD)
- [["Adult",1,0,12],["Child",0,1,8],["Family",2,2,34]]
- Lowest eligible supported ticket cost (USD or text)
- $54.00
- Ticket purchase counts (JSON)
- [1,1,1]
Calculation method
Calculation method
Lowest eligible supported ticket cost (USD or text)
Dynamic program over covered adults 0..A and children 0..C, capped at party counts; add each eligible ticket and minimize total cost.
Ticket purchase counts (JSON)
Return counts aligned to ticket type input order; tie-break lower count vector lexicographically.
Symbols and units
- a
- Adults (persons)
- b
- Children (persons)
- c
- Eligible tickets [name,adult capacity,child capacity,price currency]; enter JSON (USD)
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
- Tickets cover up to entered adult/child counts; unlimited availability and no age/residency rules beyond supplied ticket eligibility. Exact bounded dynamic program. 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. Adults/children integers 0..50 and sum>0; <=10 ticket types; nonnegative integer capacities with positive sum; positive prices. Extra unused ticket capacity allowed; supplied eligibility must already include every external restriction.
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.