Skip to content

Commit f1bb331

Browse files
Tom's Jan 24 edits of an lp lecture
1 parent 51980f6 commit f1bb331

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

lectures/lp_intro.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,9 @@ $$
698698
\end{aligned}
699699
$$
700700
701-
We then solve this dual problem by function *linprog*. Since parameters used here are defined before when solving the primal problem, we don't need to define them here.
701+
We solve this dual problem by using the function *linprog*.
702+
703+
Since parameters used here are defined before when solving the primal problem, we won't define them here.
702704
703705
```{code-cell} ipython3
704706
# Solve the dual problem
@@ -707,7 +709,11 @@ res_ex1_dual = linprog(b_ex1, A_ub=-A_ex1.T, b_ub=-c_ex1, method='revised simple
707709
res_ex1_dual
708710
```
709711
710-
The optimal of the dual problem is 27.5, which is the same as the primal problem's. This matches the strong duality. The shadow prices for materials and labor are 0.625 and 0.4375, respectively.
712+
The optimal value for the dual problem equals 27.5.
713+
714+
This equals the optimal value of the primal problem, an illustration of strong duality.
715+
716+
Shadow prices for materials and labor are 0.625 and 0.4375, respectively.
711717
712718
### Example 2: Investment Problem
713719
@@ -727,7 +733,7 @@ $$
727733
\end{aligned}
728734
$$
729735
730-
We then solve this dual problem by function *linprog*.
736+
We solve this dual problem by using the function *linprog*.
731737
732738
```{code-cell} ipython3
733739
# Objective function parameters
@@ -761,7 +767,7 @@ res_ex2_dual = linprog(c_ex2_dual, A_eq=A_eq_ex2_dual, b_eq=b_eq_ex2_dual,
761767
res_ex2_dual
762768
```
763769
764-
The optimal value for the dual problem is 141018.24, which is the same as the primal problem's.
770+
The optimal value for the dual problem is 141018.24, which equals the value of the primal problem.
765771
766772
Now, let's interpret the dual variables.
767773
@@ -781,19 +787,19 @@ We can also interpret $p_1$ as the prospective value in the end of the third ye
781787
782788
If the mutual fund can raise money at a cost lower than $p_1 - 1$, then it should raise more money to increase its revenue.
783789
784-
But if it bears a cost of funds higher than $p_1 - 1$, it shouldn't do that.
790+
But if it bears a cost of funds higher than $p_1 - 1$, the mutual fund shouldn't do that.
785791
786-
For $i = 4, 5, 6$, this means, if the amount of capital that the fund is permitted to borrow from the bank changes by one dollar, the optimal pay out at the end of the third year will change $p_i$ dollars.
792+
For $i = 4, 5, 6$, this means that if the amount of capital that the fund is permitted to borrow from the bank changes by one dollar, the optimal pay out at the end of the third year will change $p_i$ dollars.
787793
788-
Thus, for $i = 4, 5, 6$, $|p_i|$ reflects the value of one dollar that the mutual fund can borrow from the bank at the beginning of the $i-3$-th year.
794+
Thus, for $i = 4, 5, 6$, $|p_i|$ indicates the value of one dollar that the mutual fund can borrow from the bank at the beginning of the $i-3$-th year.
789795
790796
$|p_i|$ is the shadow price for the loan amount. (We use absolute value here since $p_i \le 0$.)
791797
792798
If the interest rate is lower than $|p_i|$, then the mutual fund should borrow to increase its optimal payoff; if the interest rate is higher, it is better to not do this.
793799
794800
For $i = 7$, this means that if the amount of the corporate bond the mutual fund can buy changes one dollar, then the optimal payoff will change $p_7$ dollars at the end of the third year. Again, $p_7$ is the shadow price for the amount of the corporate bond the mutual fund can buy.
795801
796-
As for numerical results,
802+
As for numerical results
797803
798804
1. $p_1 = 1.38$, which means one dollar of initial capital is worth $\$ 1.38$ at the end of the third year.
799805

0 commit comments

Comments
 (0)