Unit5
Straight Lines and Planes
Equation of a straight line in intercept form: (1). This form highlights where the line intersects the x-axis at point a and the y-axis at point b.
Equation of a plane in intercept form: (2). This form shows the intersections with the x, y, and z axes at points a, b, and c respectively.
If , the plane becomes: for all (3). This represents a plane or a straight line parallel to the z-axis because the plane never intersects the z-axis.
Family of Curves
Consider a family of curves: , where is negative and fixed, and varies. This generates parallel lines with the same slope but different y-intercepts.
Example 1: (4)
Example 2: (5)
Example 3: (6)
Identify regions between lines using inequalities; for instance, the region above the line can be described by y > -2x + 3.
Linear Inequalities
Algebra focuses on equations (e.g., determinants, eigenvalues), providing exact solutions.
Analysis often deals with inequalities, which describe ranges and bounds rather than specific values.
Linear programming is centered on inequalities and decision-making, optimizing outcomes within given constraints.
Three approaches:
Intuitive geometry: Visualizing inequalities and feasible regions.
Computational simplex method: An algorithmic approach to solving linear programming problems.
Algebraic duality: Transforming and solving related optimization problems to gain insights or find solutions.
Geometric Meaning
An inequality divides n-dimensional space into two halfspaces: one where the inequality holds and one where it doesn't. This division is fundamental in understanding feasible regions.
Example: (7)
The boundary between the halfspaces is the line . Points on this line satisfy the equality condition.
Strict vs. Tight Inequalities
Strict inequalities: Exclude equality (e.g., <, >). Example: x < 5. The solution set does not include .
Tight inequalities: Allow equality (e.g., ). Example: (equality holds when ). This inequality is always true, and the equality condition helps identify specific cases.
Halfspaces
Equations define lines and planes, while inequalities define halfspaces. Halfspaces represent all points on one side of a plane.
In n-dimensional space, a plane has dimension . For instance, in 3D space, a plane is 2-dimensional.
Non-Negativity Constraint
Fundamental constraint in linear programming: variables are nonnegative, reflecting real-world scenarios where quantities cannot be negative.
(8)
(9)
These inequalities produce additional halfspaces, restricting solutions to the first quadrant or higher-dimensional equivalent.
Feasible Set and Cost Function
Imposing multiple inequalities creates a feasible set (intersection of halfspaces). The feasible set contains all points that satisfy all constraints simultaneously.
A feasible set consists of solutions to a set of linear inequalities, such as . Non-negativity constraints, , add more halfspaces, further refining the feasible set.
More constraints reduce the size of the feasible set, potentially leading to a single point, an empty set, or a bounded region.
Examples of Feasible Sets
Example 1: Feasible set defined by forms a small triangle in the first quadrant.
Example 2: and shrinks the set to a straight line, specifically the line .
Example 3: results in an empty set because and are non-negative, so their sum cannot be less than -2.
Aspects of Linear Inequalities
Feasible set: The region defined by all constraints.
Feasible point: A point within the feasible set. An optimal feasible point maximizes or minimizes a cost function.
Cost Function
Cost function: e.g., , which represents a family of parallel lines. The cost function is what we aim to optimize.
Minimum cost is achieved when the line first intersects the feasible set, indicating the lowest possible cost that satisfies all constraints.
Optimal Solution
The intersection occurs at a corner (e.g., point B) where and . Corners are critical in linear programming as they often represent optimal solutions.
The minimum cost is . This is the minimized value of the cost function.
The vector is feasible (lies in the feasible set) and optimal (minimizes the cost function). It is the solution to the linear programming problem.
The minimum cost, 6, is the value of the program, representing the best possible outcome given the constraints.
System of Equations
General form: (10) where A is a matrix of coefficients, x is the vector of variables, and b is the vector of constants.
Matrix representation:
\begin{bmatrix}
a{11} & \cdots & a{1n} \
\vdots & \ddots & \vdots \
a{m1} & \cdots & a{mn}
\end{bmatrix} \times \begin{bmatrix}
x1 \ \vdots \ xn
\end{bmatrix} = \begin{bmatrix}
b1 \ \vdots \ bm
\end{bmatrix}
(11)
Cost Function in 3D
Example:
Vector representation:
\begin{bmatrix} 2 & 3 & 4 \end{bmatrix} \times \begin{bmatrix} x \
y \
z \end{bmatrix}
(12). This notation simplifies the representation and manipulation of cost functions in higher dimensions.
Linear Programming Components
Constraint: Conditions that limit the feasible solutions, such as resource availability or requirements.
Cost function: The function to be minimized or maximized, representing the objective (e.g., cost, profit).
Feasible set: The set of all possible solutions that satisfy all constraints.
Optimal solution: Minimize or maximize the cost function within the feasible set. This is the goal of linear programming.
The optimal vector is found at a corner of the feasible set. This is a key property that simplifies the search for optimal solutions.
The first contact with the feasible set must occur along its boundary. This means the optimal solution lies on the edge or corner of the feasible region.
Methods for Finding Optimal Solutions
Simplex method: An iterative algorithm that moves from one corner of the feasible set to another until the optimal solution is found.
Interior point method: Algorithms that move through the interior of the feasible region to find the optimal solution, often more efficient for large problems.
Important Considerations
A different cost function may result in multiple optimal points, especially if the cost function is parallel to an edge of the feasible set.
If the cost function is, e.g., , the entire edge between points B and A could be optimal, indicating multiple solutions with the same cost.
The minimum cost is for all optimal vectors on this edge. All points on this edge yield the same minimum cost.
The maximum problem may have no solution if the cost can increase indefinitely (unbounded). This occurs when the feasible region extends infinitely in the direction of increasing cost.
Categories of Linear Programming Problems
Infeasible: The feasible set is empty, meaning there are no solutions that satisfy all constraints.
Unbounded: The cost function is unbounded on the feasible set, meaning the cost can increase or decrease without limit.
Optimal: The cost reaches its minimum (or maximum) on the feasible set, providing a specific solution.
Empty and unbounded cases are uncommon but important to recognize as they indicate issues with the problem formulation.
Slack Variables
Convert an inequality to an equation, allowing easier manipulation and solution.
Example: (13)
Introduce slack variable : (14)
Constraint: (15)
Slack variables improve problem definition by transforming inequalities into manageable equations.
Primal Problem
Minimize subject to and (16). This is a standard formulation of a linear programming problem.
The Diet Problem
Two protein sources:
Steak
Peanut butter
Each pound of peanut butter provides 1 unit of protein.
Each pound of steak provides 2 units of protein.
Requirement: At least 4 units of protein needed to meet nutritional needs.
Problem Formulation for Diet Problem
A diet with pounds of peanut butter and pounds of steak must satisfy , along with and . This defines the feasible set within the context of the diet.
Objective: Minimize the cost of the diet while meeting the protein requirement.
Cost:
Peanut butter: $2 per pound.
Steak: $3 per pound.
Total cost: . This linear cost function needs to be minimized.
Duality
Every linear program has a dual, which provides an alternative perspective on the problem.
If the original problem is a minimization, its dual is a maximization, and vice versa.
The minimum in the primal problem equals the maximum in its dual, offering a powerful tool for problem-solving and validation.
Protein Pills and the Dual Problem
Consider an alternative: synthetic protein pills. This leads to the concept of a dual problem.
The druggist wants to maximize the pill price subject to constraints, representing an optimization from a different angle.
Constraints:
Synthetic protein must not cost more than protein from peanut butter ($2 per unit).
Synthetic protein must not cost more than protein from steak ($3 for two units).
The price must be nonnegative, ensuring a realistic scenario.
Since 4 units of protein are required, the druggist's income will be . This is the objective function for the dual problem.
Dual Problem Formulation
Maximize subject to , , and (17). This is the mathematical formulation of the dual problem.
Linear Programming
Minimize or maximize a linear cost function subject to linear constraints. A fundamental optimization technique with broad applications.
The Simplex Method
Linear programming with unknowns and constraints .
Best approach: Put the problem in matrix form.
matrix A.
Column vector b with m components.
Row vector c (cost vector) with n components.
Cost:
Simplex Algorithm Steps
Standard Form:
Transform objective function to maximization. If minimizing, negate the cost function.
Convert constraints to inequalities. Reverse inequalities by multiplying by -1.
Ensure all variables are non-negative. Add non-negativity constraints if necessary.
Introduce Slack Variables:
Convert inequalities to equations by adding slack variables (unused constraint portion). These variables represent the difference between the left and right sides of the inequality.
Initial Simplex Tableau:
Tabular representation with coefficients from objective function, constraints, and slack variables. Organize coefficients in a matrix to facilitate calculations.
Pivot Selection:
Pivot Column:
Maximization: Most negative entry in the Z-row (objective function row). This indicates the variable to increase to improve the objective function.
Minimization: Most positive entry. Choose the column that will decrease the objective function the most.
Pivot Row:
Calculate ratios of right-hand side values (b-values) to corresponding pivot column values. These ratios determine how much the entering variable can increase.
Smallest non-negative ratio determines the leaving variable. This ensures that the constraints remain satisfied.
Pivot Operation:
Use row operations to transform the pivot element to 1 and other entries in the pivot column to 0. This updates the tableau to reflect the change in the solution.
Iteration:
Repeat steps 4 and 5 until all entries in the Z-row are non-negative (maximization) or non-positive (minimization). This indicates that the optimal solution has been reached.
Optimal Solution:
Decision variable values in columns with 1s and 0s represent the optimal solution. Read the values from the right-hand side of the tableau.
Optimal objective function value is in the Z-row, bottom right-hand corner of the tableau. This is the maximum or minimum value of the objective function.
Geometry of the Simplex Method
The method moves from corner to corner along edges of the feasible set, systematically improving the objective function until the optimal corner is reached.
Slack Variables and Pivoting
Standard Maximization Problem:
Linear objective function to be maximized.
Non-negative variables.
Structural constraints of the form , where . These constraints define the boundaries of the feasible region.
Example:
Maximization: (18) becomes (19), where is the slack variable.
Minimization: (20) becomes (21), where is the surplus variable.
Problem: Feasible Set and Corners
Sketch the feasible set with constraints: . Graph the constraints to visualize the feasible region.
Find the coordinates of the corners of this set. These corners are potential optimal solutions.
Minimizing a Cost Function
On the feasible set, what is the minimum value of the cost function ? Determine the objective.
Draw the line that first touches the feasible set. This line represents the cost function, and its intersection with the feasible set indicates the minimum cost.
What points minimize the cost functions and ? Different cost functions will lead to different optimal points.
Standard Maximization Problem Example
Maximize (22)
Subject to:
(23)
(24)
(25)
(26)
Reduced Row Echelon Form
Duality (Primal and Dual Problems)
Primal Problem:
Minimize subject to and (27)
In the dual problem, b and c are switched, and the inequality direction is reversed.
The dual unknown y is a row vector with m components.
Feasible set: instead of . The constraints are transformed accordingly.
Dual Problem:
Maximize subject to and (28). This is the dual formulation of the linear programming problem.
Example: Primal and Dual Problems
Minimize:
Subject to:
Maximize:
Subject to:
Converting a Minimization Problem to its Dual
Minimize:
Subject to:
Maximize:
Subject to:
System of Equations (Repeated)
(29)
Matrix representation:
\begin{bmatrix}
a{11} & \cdots & a{1n} \
\vdots & \ddots & \vdots \
a{m1} & \cdots & a{mn}
\end{bmatrix} \times \begin{bmatrix}
x1 \ \vdots \ xn
\end{bmatrix} = \begin{bmatrix}
b1 \ \vdots \ bm
\end{bmatrix}
(30)
Cost Function in 3D (Repeated)
Example:
Vector representation:
\begin{bmatrix} 2 & 3 & 4 \end{bmatrix} \times \begin{bmatrix} x \
y \
z \end{bmatrix}
(31)
Linear Programming (Repeated)
Minimize or maximize a linear cost function subject to linear constraints.
The Simplex Method (Repeated)
Linear programming with unknowns and constraints .
Best approach: Put the problem in matrix form.
matrix A.
Column vector b with m components.
Row vector c (cost vector) with n components.
Cost:
Simplex Algorithm Steps (Repeated)
Standard Form:
Transform objective function to maximization.
Convert constraints to inequalities.
Ensure all variables are non-negative.
Introduce Slack Variables:
Convert inequalities to equations by adding slack variables (unused constraint portion).
Initial Simplex Tableau:
Tabular representation with coefficients from objective function, constraints, and slack variables.
Pivot Selection:
Pivot Column:
Maximization: Most negative entry in the Z-row (objective function row).
Minimization: Most positive entry.
Pivot Row:
Calculate ratios of right-hand side values (b-values) to corresponding pivot column values.
Smallest non-negative ratio determines the leaving variable.
Pivot Operation:
Use row operations to transform the pivot element to 1 and other entries in the pivot column to 0.
Iteration:
Repeat steps 4 and 5 until all entries in the Z-row are non-negative (maximization) or non-positive (minimization).
Optimal Solution:
Decision variable values in columns with 1s and 0s represent the optimal solution.
Optimal objective function value is in the Z-row, bottom right-hand corner of the tableau.
Standard Maximization Problem Example (Repeated)
Maximize (32)
Subject to:
(33)
(34)
(35)
(36)
Geometric Solution
Calculate the value of the objective function at the four corners of the feasible region.
or
Corner
(0,0)
(5,0)
(4,2)
(0,4)
Simplex Tableau
Initial tableau:
x | y | s1 | s2 | f |
|---|---|---|---|---|
1 | 2 | 1 | 0 | 0 |
2 | 1 | 0 | 1 | 0 |
-6 | -4 | 0 | 0 | 1 |
Choose the pivot column: The most negative entry in the objective function row.
Choose the pivot row: The smallest ratio.
x | y | s1 | s2 | f |
|---|---|---|---|---|
1 | 2 | 1 | 0 | 0 |
2 | 1 | 0 | 1 | 0 |
-6 | -4 | 0 | 0 | 1 |
Perform row operations:
x | y | s1 | s2 | f |
|---|---|---|---|---|
0 | 1.5 | 1 | -0.5 | 0 |
1 | 0.5 | 0 | 0.5 | 0 |
0 | -1 | 0 | 3 | 1 |
Choose the pivot column and row again.
x | y | s1 | s2 | f |
|---|---|---|---|---|
0 | 1.5 | 1 | -0.5 | 0 |
1 | 0.5 | 0 | 0.5 | 0 |
0 | -1 | 0 | 3 | 1 |
1.5 is the pivot element.
Perform row operations:
x | y | s1 | s2 | f |
|---|---|---|---|---|
0 | 1 | 2/3 | -1/3 | 0 |
1 | 0 | -1/3 | 2/3 | 0 |
0 | 0 | 2/3 | 8/3 | 1 |
All entries are non-negative in the optimal function row; stop iteration.
The columns with 1s and 0s give the optimal solution.
Pivot Selection
If another quotient is taken in pivot selection, it results in an infeasible point.
Maximization Problem Example
Maximize (37)
Subject to:
(38)
(39)
(40)
(41)
(42)
Initial Tableau
or
x | y | z | s1 | s2 | f |
|---|---|---|---|---|---|
0.1 | 0.25 | 0 | 1 | 0 | 0 |
0.22 | 0.3 | 0.4 | 0 | 1 | 0 |
-4 | -2 | -3 | 0 | 0 | 1 |
Row Operations
x | y | z | s1 | s2 | f |
|---|---|---|---|---|---|
1 | 2.5 | 0 | 10 | 0 | 0 |
0 | -0.25 | 0.4 | -2.2 | 1 | 0 |
0 | 8 | -3 | 40 | 0 | 1 |
More Row Operations
x | y | z | s1 | s2 | f |
|---|---|---|---|---|---|
1 | 2.5 | 0 | 10 | 0 | 0 |
0 | -0.6 | 1 | -5.5 | 2.5 | 0 |
0 | 6.1 | 0 | 23.5 | 7.5 | 1 |
LP Problem with No Solution
Pivot element does not exist.
Negative number and negative column
Maximize (43)
Subject to:
(44)
(45)
(46)
(47)
LP Problem with Edge Solution
Maximize (48)
Subject to:
(49)
(50)
(51)
(52)
Corner Solutions
corner
(0,0)
(0,4)
(4,2)
(5,0)
Simplex Tableau and calculations
x | y | s1 | s2 | f |
|---|---|---|---|---|
1 | 2 | 1 | 0 | 0 |
2 | 1 | 0 | 1 | 0 |
-6 | -3 | 0 | 0 | 1 |
1st column is pivot column and 1st row is pivot row.
Perform row operations:
x | y | s1 | s2 | f |
|---|---|---|---|---|
0 | 1.5 | 1 | -0.5 | 0 |
1 | 0.5 | 0 | 0.5 | 0 |
0 | 0 | 0 | 3 | 1 |
Newton’s Method and Definitions
Convex Sets and Functions
Convex Set: A set where the line segment between any two points in the set is entirely within the set. Mathematically, for any two points in the set and any , the point must also be in the set.
Convex Function: A function where the line segment connecting any two points on its graph lies on or above the graph itself. For any in the domain and any , .
Quadratic functions (like ) and exponential functions (like ) are convex. The second derivative of a convex function is non-negative.
A convex function is continuous and its value at the midpoint of every interval does not exceed the arithmetic mean of its values at the ends of the interval. This property is a key characteristic of convex functions.
Concave Functions
A function f is concave if -f is convex. The graph