Welcome to Linear Programming!

Hi there! Welcome to one of the most practical chapters in Decision Mathematics. Linear Programming (LP) is all about making the best possible decisions when you have limited resources. Whether it’s a factory trying to maximize profit or a hospital trying to minimize costs, LP is the tool they use. Don't worry if it looks like a lot of algebra at first; we will break it down into simple, logical steps!

1. Formulating a Problem

Before we can solve a problem, we need to translate English words into mathematical "code." This is called Formulation.

A. Decision Variables

These are the things you can control. We usually call them \(x\) and \(y\).
Example: Let \(x\) be the number of standard bicycles produced and \(y\) be the number of racing bicycles produced.

B. The Objective Function

This is your goal. Are you trying to make the most money (Maximize) or spend the least amount of time (Minimize)?
It usually looks like this: Maximize \(P = 10x + 15y\) (where \(P\) might be profit).

C. Constraints

These are the rules or limits you must follow. You might have a limit on budget, floor space, or raw materials.
Key Term: Non-negativity constraints. In the real world, you can’t make negative bicycles! So, we almost always include \(x \geq 0\) and \(y \geq 0\).

Step-by-Step: How to Formulate

1. Identify variables: Clearly state what \(x\) and \(y\) represent.
2. Write the objective: Decide if you are maximizing or minimizing and write the equation.
3. List the constraints: Turn each restriction into an inequality (e.g., \(2x + 3y \leq 60\)).
4. Add non-negativity: Don't forget \(x, y \geq 0\)!

Quick Review: Think of variables as your "choices," the objective as your "goal," and constraints as your "boundaries."

2. Graphical Solutions

Since we are only working with two variables (\(x\) and \(y\)), we can draw the problem on a graph to find the answer.

A. Drawing the Feasible Region

The Feasible Region (R) is the area on the graph where all the constraints are satisfied at the same time.
Common Mistake to Avoid: When drawing the line for an inequality like \(2x + 5y \leq 10\), draw the line \(2x + 5y = 10\) first. To find where it crosses the axes, set \(x = 0\) to find the \(y\)-intercept, then set \(y = 0\) to find the \(x\)-intercept.

Did you know? We usually shade the unwanted side of the line. This leaves the Feasible Region clean and white in the middle, making it much easier to see!

B. Finding the Optimal Point

Once you have your region \(R\), the "best" (optimal) point will usually be at one of the vertices (the corners of the region). There are two ways to find it:

Method 1: The Objective Line Method (The Sliding Ruler)

This is often the quickest way!
1. Pick a "target" value for your objective function (e.g., if your objective is \(P = 2x + 3y\), try drawing the line \(2x + 3y = 6\)).
2. Place your ruler on this line.
3. Slide your ruler parallel to this line across the feasible region.
4. The last point the ruler touches before leaving the region is your Maximum. The first point it touches is your Minimum.

Method 2: The Vertex Method

Don't worry if the sliding ruler feels tricky! You can use the Vertex Method instead:
1. Find the coordinates of every corner (vertex) of the Feasible Region.
2. If two lines cross, you might need to use simultaneous equations to find the exact coordinate.
3. Plug each coordinate into your Objective Function.
4. The coordinate that gives the highest value is your maximum!

Key Takeaway: The "best" solution is almost always at a corner where two or more constraints meet.

3. Integer Solutions

In many real-life problems, you can't have "half" an answer. You can't hire 4.7 workers or buy 2.3 buses. These require Integer Solutions.

If your optimal point is something like \((5.2, 7.8)\), you cannot just "round up" or "round down" normally, as that point might fall outside the feasible region!
The Trick: Test the integer points (whole numbers) closest to your optimal point that are inside the feasible region.
Example: For \((5.2, 7.8)\), you might test \((5, 7)\), \((5, 8)\), or \((6, 7)\) to see which one is allowed and gives the best result.

Summary of Common Pitfalls

1. Mixing up signs: Read carefully! "At least" means \(\geq\). "No more than" means \(\leq\).
2. Shading the wrong side: Always test a point (like \((0,0)\)) in your inequality to see if it works. If \(0 + 0 \leq 10\) is true, the side with \((0,0)\) is the "wanted" side.
3. Accuracy: Use a sharp pencil and a ruler. Small errors in drawing can lead to picking the wrong vertex!

Memory Aid: To remember the Objective Line slide, think of it as a Searchlight scanning the region for the best spot!

Final Checklist

- Have I defined my variables clearly?
- Did I include \(x, y \geq 0\)?
- Is my Feasible Region clearly labeled with an 'R'?
- If the question asks for whole numbers, have I checked integer points?

You've got this! Linear programming is just a logical puzzle. Practice drawing the regions, and the rest will fall into place.