3 ms·
I'll assume we're selling fractional chickens. The problem has 5 free parameters and 2 equality constraints, and several inequality constraints, so it's underco
by throwaway_yy2Di 12y ago
I'll assume we're selling fractional chickens. The problem has 5 free parameters and 2 equality constraints, and several inequality constraints, so it's underconstrained, and its solution space is a (5-3) = 2-dimensional surface (manifold with edges). If you parameterize it by the two price parameters, x > y, it's simply a half-rectangle:
x >= 7/2 ($3.50)
0 < y <= 35/26 ($1.35 approx.)
There's a solution for any (x,y) in this region.
Using the notation that the j_th farmer has an inventory of I_j, and sells a_j fractional chickens before lunch with revenue R_j ($35), the problem is a triple of linear equations:
{ a_j*x + (I_j - a_j)*y = R_j }_{j=1..3}
with solution
a_j = (R_j - y*I_j)/(x - y)
Mathematica simplifies the set of inequalities (I count 8?)
With[{r=35, is={10,16,26}},
Simplify[(0<y<x) &&
And @@ Table[0 <= (r - i*y)/(x-y) <= i, {i,is}]]]
returns
0 < y <= 35/26 && 2x >= 7 && x > y
(the last one's redundant)