1

I have two different solutions for the following LPP:
"Suppose that $f(x)=ax+b$.If $f(0)\leq2,f(1)\geq0,f(2)\leq4$ find maximum value of $f(10)$"
Solution 1(Correct):
$$f(10)=10a+b=9(2a+b)-8(a+b)\leq 9\times4-8\times0=36$$
Solution 2(Incorrect in fact):
$$2a+b\leq4 , 0\leq a+b \Rightarrow 2a+b\leq 4+a+b \Rightarrow a\leq4,b\leq 2$$ $$\Rightarrow 10a\leq40 \Rightarrow 10a+b\leq 42$$
I DO know the second result is not optimum and so wrong,but DO NOT understand why??

Please help!

Hamid Reza Ebrahimi
  • 3,445
  • 13
  • 41
  • 2
    Adding two constraints is hardly optimal. Say we had $x≤2,x≤4$. If you add those you get $2x≤6$ or $x≤3$ which is true (of course) but not optimal. – lulu Dec 31 '17 at 18:42

1 Answers1

1

You can graph the points $(0,2)$, $(1,0)$ and $(2,4)$, and then consider that we want a line passing between these points, and reaching the highest possible value at $x=10$. It's clear that the best such line will pass through the points $(1,0)$ and $(2,4)$, so you see that the $b\le 2$ bound does not really play a role in the optimal solution.


Considering this as a linear programming problem in the variables $a,b$, we have three contraints, which provide a triangular feasible region in the $ab$-plane. The object function will be optimized at a vertex, so we consider all three:

1. $b=2, a+b=0\implies (a,b)=(-2,2)\implies 10a+b=-18$

2. $b=2, 2a+b=4\implies (a,b)=(1,2) \implies 10a+b=12$

3. $a+b=0, 2a+b=4\implies (a,b)=(4,-4)\implies 10a+b=36$


As for what went wrong in your second solution.... it's true that $a\le 4$ and that $b\le 2$, and it is true that $10a+b\le 42$, however, we can't actually obtain equality there, because we can't have $a=4$ and $b=2$ at the same time. This would violate the condition that $2a+b\le 4$. Looking at that condition, if $b=2$, then $a\le 1$, while if $a=4$ then $b\le -4$.

G Tony Jacobs
  • 31,218