Kernel: SageMath 10.0
The Chicken Wing Problem
Problem: Determine the minimal cost for ordering wings using this restaurant's prices.
Below is a script for solving a generic integer programming problem.
In [1]:
Importing the price data.
In [2]:
Function that computes a minimal solution (there could be many).
In [7]:
An example.
In [8]:
Out[8]:
Total wing count: 74
Optimal (min) value: 82.8
Order Size Count
------------ -------
6 wings 1
9 wings 2
50 wings 1
In [9]:
Out[9]:
Total wing count: 75
Optimal (min) value: 83.4
Order Size Count
------------ -------
25 wings 3
In [10]:
Out[10]:
Total wing count: 76
Optimal (min) value: 84.55
Order Size Count
------------ -------
26 wings 1
50 wings 1
In [0]: