Finding the optimal configuration of units.

12 Views Asked by At

Say I have options of selling items in a=7 or b=1 units.

What would be a good equation to help me find the optimal way to supply units for a required quantity?

E.g.

  • 21 = (3*a)
  • 9 = (1*a)+(2*b)

and so forth.

1

There are 1 best solutions below

0
On

Use the quotient and remainder in dividing $n$ (the number of units) by $7$.

That is $n=7q+r$ with $0\le r<7$.