Download presentation
Presentation is loading. Please wait.
1
Lecture 19 Linear Program
2
Recap Shortest path Minimum spanning tree Maximum matching
Common: Optimizing some objective (length of paths, weight of the tree, number of matches) Very different techniques Hope: A common technique that can solve all problems
3
Linear Relationships Inequalities that are linear in all parameters.
Example. If d[u] = shortest path distance from s to u, then for any edge (u,v) π π£ β€π π’ +π€(π’,π£)
4
Linear Relationships Example 2: Let xi,j = 1 if course i is matched to classroom j, and 0 otherwise. Each classroom is matched to at most one course. βπ π=1 π π₯ π,π β€1
5
Linear Program Optimize a linear function (objective), under a set of linear inequality constraints. max 2π₯+π¦ π₯β₯0 π¦β₯0 π₯+π¦β€1
6
Geometric Interpretation
Linear inequality ο³ Half planes x y x y x y π₯+π¦β€1 π₯β₯0 π¦β₯0
7
Geometric Interpretation
System of linear inequalities ο³ intersections Green: Feasible set. Point in Green: feasible solution. x y
8
Geometric Interpretation
Objective function ο³ Direction of gravity x y x y max 2π₯+π¦
9
Geometric Interpretation
Optimal Point ο³ Lowest point Optimal solution: (x, y) = (1, 0), value = 2. x y
10
Canonical Form min π,π₯ π΄π₯β₯π π₯β₯0 c x A x b β₯
11
Converting to Canonical Form
Equality constraints (e.g. x+y = 3) Solution: Split into two constraints π₯+π¦β₯3 π₯+π¦β€3
12
Converting to Canonical Form
Free variable: x may or may not be nonnegative. Solution: Split x into x1 and x2 π₯= π₯ 1 β π₯ 2 π₯ 1 β₯0 π₯ 2 β₯0
13
Using LP to solve graph problems
Edge (i, j): Course i can be scheduled into classroom j Courses Classrooms Solution: A set of edges that do not share any vertices. (a matching)
14
Using LP to solve graph problems
1 2 1 2 3 3 1 2 4 5 6 4 1 1 3 2 7 8 9 1 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.