|
| 1 | +# 📈 Graphical Solution to the Linear Programming (LP) Problem |
| 2 | + |
| 3 | +**Objective:** |
| 4 | + |
| 5 | +Maximize |
| 6 | +$$ |
| 7 | +Z = 4x_1 + 3x_2 |
| 8 | +$$ |
| 9 | + |
| 10 | +**Subject to:** |
| 11 | + |
| 12 | +$$ |
| 13 | +\begin{cases} |
| 14 | +x_1 + 3x_2 \leq 7 \\ |
| 15 | +2x_1 + 2x_2 \leq 8 \\ |
| 16 | +x_1 + x_2 \leq 3 \\ |
| 17 | +x_2 \leq 2 \\ |
| 18 | +x_1 \geq 0, \quad x_2 \geq 0 |
| 19 | +\end{cases} |
| 20 | +$$ |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Step 1: Plot the Constraints |
| 25 | + |
| 26 | +Convert inequalities into equalities to draw the lines: |
| 27 | + |
| 28 | +1. $x_1 + 3x_2 = 7$ |
| 29 | + - If $x_1 = 0 \Rightarrow x_2 = \frac{7}{3} \approx 2.33$ |
| 30 | + - If $x_2 = 0 \Rightarrow x_1 = 7$ |
| 31 | + |
| 32 | +2. $2x_1 + 2x_2 = 8$ |
| 33 | + - If $x_1 = 0 \Rightarrow x_2 = 4$ |
| 34 | + - If $x_2 = 0 \Rightarrow x_1 = 4$ |
| 35 | + |
| 36 | +3. $x_1 + x_2 = 3$ |
| 37 | + - If $x_1 = 0 \Rightarrow x_2 = 3$ |
| 38 | + - If $x_2 = 0 \Rightarrow x_1 = 3$ |
| 39 | + |
| 40 | +4. $x_2 = 2$ → horizontal line |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +## Step 2: Identify the Feasible Region |
| 45 | + |
| 46 | +- The feasible region is the intersection of all shaded regions that satisfy the constraints. |
| 47 | +- Must include $x_1 \geq 0$ and $x_2 \geq 0$. |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## Step 3: Find Intersection Points (Vertices) |
| 52 | + |
| 53 | +1. Intersection of $x_1 + 3x_2 = 7$ and $2x_1 + 2x_2 = 8$: |
| 54 | + - Multiply first by 2: $2x_1 + 6x_2 = 14$ |
| 55 | + - Subtract: $4x_2 = 6 \Rightarrow x_2 = 1.5$, $x_1 = 2.5$ |
| 56 | + - Point: **(2.5, 1.5)** |
| 57 | + |
| 58 | +2. Intersection of $x_1 + 3x_2 = 7$ and $x_1 + x_2 = 3$: |
| 59 | + - Subtract: $2x_2 = 4 \Rightarrow x_2 = 2$, $x_1 = 1$ |
| 60 | + - Point: **(1, 2)** |
| 61 | + |
| 62 | +3. Intersection of $x_1 + x_2 = 3$ and $x_2 = 2$: |
| 63 | + - $x_1 = 1$ |
| 64 | + - Point: **(1, 2)** |
| 65 | + |
| 66 | +4. Intersection of $2x_1 + 2x_2 = 8$ and $x_2 = 2$: |
| 67 | + - $x_1 = 2$ |
| 68 | + - Point: **(2, 2)** |
| 69 | + |
| 70 | +5. $x_1 + x_2 = 3$ and $x_1 = 0 \Rightarrow x_2 = 3$ ❌ (Invalid since $x_2 \leq 2$) |
| 71 | + |
| 72 | +6. $x_1 + 3x_2 = 7$ and $x_1 = 0 \Rightarrow x_2 = 7/3 \approx 2.33$ ❌ (Invalid since $x_2 \leq 2$) |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## Step 4: Evaluate Objective Function at Each Vertex |
| 77 | + |
| 78 | +Feasible Vertices: |
| 79 | + |
| 80 | +- A: (0, 0) |
| 81 | +- B: (0, 2) |
| 82 | +- C: (1, 2) |
| 83 | +- D: (2, 2) |
| 84 | +- E: (2, 0) |
| 85 | +- F: (3, 0) |
| 86 | + |
| 87 | +| Point | $x_1$ | $x_2$ | $Z = 4x_1 + 3x_2$ | |
| 88 | +|:-----:|:-----:|:-----:|:-----------------:| |
| 89 | +| A | 0 | 0 | 0 | |
| 90 | +| B | 0 | 2 | 6 | |
| 91 | +| C | 1 | 2 | 10 | |
| 92 | +| D | 2 | 2 | 14 ❌ | |
| 93 | +| E | 2 | 0 | 8 | |
| 94 | +| F | 3 | 0 | 12 | |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Step 5: Check Feasibility |
| 99 | + |
| 100 | +- **(2,2)** violates: $x_1 + 3x_2 = 2 + 6 = 8 > 7$ ❌ |
| 101 | +- All others: ✅ |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## ✅ Final Step: Choose the Best Feasible Point |
| 106 | + |
| 107 | +| Point | $Z$ | Feasible | |
| 108 | +|:-----:|:---:|:--------:| |
| 109 | +| A | 0 | Yes | |
| 110 | +| B | 6 | Yes | |
| 111 | +| C | 10 | Yes | |
| 112 | +| E | 8 | Yes | |
| 113 | +| F | 12 | ✅ Best | |
| 114 | +| D | 14 | No | |
| 115 | + |
| 116 | +--- |
| 117 | + |
| 118 | +## 🏁 Conclusion |
| 119 | + |
| 120 | +- **Optimal solution:** $x_1 = 3$, $x_2 = 0$ |
| 121 | +- **Maximum value:** $Z = 12$ |
0 commit comments