A florist sells bouquets of flowers. He has $5$ types of flowers and keeps $8$ flowers in each bouquet. There can be no more than two flowers of each type in a bouquet. If he has $80$ daffodils,$110$ tulips,$120$ irises,$130$ lillies,$150$ roses, find the number of bouquets he can make?
My try:
Obviously exhausting all flowers is not possible because, if $n$ is the number of bouquets, then total number of flowers is $8n$, but the total $80+110+120+130+150$ is not a multiple of $8$.
There are two possibilities a bouquet can have. The first possibility is, it can have $4$ types of flowers, $2$ from each. The second possibility is, the bouquet can have $3$ types, $2$ from each and another $2$ types, $1$ from each.
So essentially, in the first possibility one of the types is unused. In the second possibility all the types are used.
Now let there ne $n$ bouquets that can be made. Among these let $x$ number of bouquets has first possibility and $y$ number of bouquets has second possibility.
Now i am stuck from here?
Let indices $0,1,2,3,4$ stand for daffodil, tulip, iris, lily and rose respectively. Let $a_i$ denote the number of bouquets with two of each flower type except type $i$ and $b_{ij}$ the number of bouquets with one each of types $i,j$ and two each of the other three.
This is an integer linear program where the variables are as above and the constraints correspond to the number of flowers available of each type. Solving shows that it is possible to achieve the trivial upper bound of $\lfloor590/8\rfloor=73$ bouquets: $$a_3=5,b_{01}=36,b_{02}=24,b_{03}=6,b_{24}=2$$ (All other variables are zero and six roses are left over.)