Title: Another Formulation
1Another Formulation
- Consider the Assignment Problem
2Another TSP Formulation
- Consider the Assignment Problem
55
3Another TSP Formulation
- Consider the Assignment Problem
59
4Another TSP Formulation
- Consider the Assignment Problem
58
5Another TSP Formulation
- Consider the Assignment Problem
40
6Another TSP Formulation
- Consider the Assignment Problem
A solution is generally a collection of disjoint
cycles.
40
3
4
1
2
7Another TSP Formulation
- Consider the Assignment Problem
A solution is generally a collection of disjoint
cycles. But if solution happens to be one cycle,
it is an optimal tour.
40
3
4
1
2
8Another TSP Formulation
- Consider the Assignment Problem
A solution is generally a collection of disjoint
cycles. But if solution happens to be one cycle,
it is an optimal tour. The Assignment Problem is
a special Integer Programthe solution to the LP
relaxation is the solution to the IP!
40
We can compute it for the subgraph at each node
and use the solution for TSP
9Another TSP Formulation
- Consider the Assignment Problem
Not only does the value of the assignment problem
provide a lower bound to the optimal tour cost,
but it can define a useful state space. At each
node of the state space we identify a graph
H(V,A). The root node is associated with the
original graph.
40
10Another TSP Formulation
- Consider the Assignment Problem
Not only does the value of the assignment problem
provide a lower bound to the optimal tour cost,
but it can define a useful state space. At each
node of the state space we identify a graph
H(V,A). The root node is associated with the
original graph.
To find the children nodes, we construct a set of
subgraphs by solving the assignment problem,
choosing one of the resulting cylces (suppose the
cycle contains r nodes), then building a graph
for each of the r nodes. These r subgraphs
define the children nodes in the state space.
11Another TSP Formulation
- Consider the Assignment Problem
Let Ww1, w2, , wr be the nodes of the cycle.
Define Now define the edge sets
To find the children nodes, we construct a set of
subgraphs by solving the assignment problem,
choosing one of the resulting cylces (suppose the
cycle contains r nodes), then building a graph
for each of the r nodes. These r subgraphs
define the children nodes in the state space.
12Another TSP Formulation
- Consider the Assignment Problem
Let Ww1, w2, , wr be the nodes of the cycle.
Define Now define the edge sets
The r children of the current node correspond to
the graphs (V, Ei), 1ltiltr. Compute the
assignment problem for each child, expand the
child with lowest score.
13Another TSP Formulation
- Consider the Assignment Problem
14Another TSP Formulation
- Consider the Assignment Problem
21
15Another TSP Formulation
- Consider the Assignment Problem
1
9
8
21
2
10
6
4
3
12
7
(1,4), (4,3), (3,2), (2,5), (5,1)
4
Assignment is a single cycle, so this method
finds the optimal tour for this instance in one
shot without expanding any children !
16Linear Programming
- We use graphs and trees as useful modeling
abstractions to help us develop computational
solutions for a wide variety of problems - A linear program is simply another modeling
abstraction (tool in your toolbox) - Developing routines that solve general linear
programs allows us to embed them in sophisticated
algorithmic solutions to difficult problems (e.g.
like we did for TSP) - The cutting edge algorithmic solutions to many
problems use the ideas from mathematical
programming, linear programming forming the
foundation
17Example Design of Radiation Therapy
Bladder and Tumor
Femur, part of pelvis, etc.
Rectum, coccyx, etc.
18Example Design of Radiation Therapy
19Example Design of Radiation Therapy
y
15
10
5
0
x
5
10
15
20Example Design of Radiation Therapy
y
15
10
5
0
x
5
10
15
21Example Design of Radiation Therapy
y
15
10
(6,6)
5
(7.5,4.5)
0
x
5
10
15
22Example Design of Radiation Therapy
y
15
10
(6,6)
5
(7.5,4.5)
0
x
5
10
15
23Example Design of Radiation Therapy
y
15
10
(6,6)
5
(7.5,4.5)
0
x
5
10
15
24Example Design of Radiation Therapy
y
15
10
(6,6)
5
(7.5,4.5)
0
x
5
10
15
25Example A Linear Program
26Example A Linear Program
y
20
0
x
27Example A Linear Program
y
20
15
(5,5)
0
x
28Example A Linear Program
y
20
15
(5,5)
0
x
29Example A Linear Program
y
20
15
(5,5)
0
x
30Example A Linear Program
y
20
15
0
x
31Example A Linear Program
y
20
15
(5,5)
0
x
32Example A Linear Program
The linear inequalities form a simplex. The
linear cost function creates a hyperplane. The
solution to a general LP is either a unique
vertex or a face of the simplex, including more
than one vertex.
y
20
15
(5,5)
0
x
The simplex method is a greedy algorithm that
moves from one vertex of the feasible set to
another until an optimum is attained.
33The Simplex Method
Transform Linear Program into a system of linear
equations using slack variables
34The Simplex Method
x y s1 s2 P RHS
35The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
36The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
37The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
38The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
39The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
40The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
41The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
Pivoting means solve for that variable, Then
substitute into the other equations.
42The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
Pivoting means solve for that variable, Then
substitute into the other equations.
43The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P
RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
Pivoting means solve for that variable, Then
substitute into the other equations.
44The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
Pivoting means solve for that variable, Then
substitute into the other equations.
45The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
We have moved from (0,0) to (20/3,0) and
increased the profit from 0 to 400/3. Can we do
better?
46The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing x can increase P
- the most (x coefficient has
- larger magnitude than the
- y coefficient)
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
We have moved from (0,0) to (20/3,0) and
increased the profit from 0 to 400/3. Can we do
better? Yes! Repeat the procedure.
47The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
We have moved from (0,0) to (20/3,0) and
increased the profit from 0 to 400/3. Can we do
better? Yes! Repeat the procedure.
48The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
20
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
5
49The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
5
50The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
5
Pivoting means solve for that variable, Then
substitute into the other equations.
51The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2
P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
Pivoting means solve for that variable, Then
substitute into the other equations.
52The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
Pivoting means solve for that variable, Then
substitute into the other equations.
53The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
We have moved from (0,0) to (20/3,0) and
increased the profit from 0 to 400/3. We then
moved from (20/3,0) to (5,5), Increasing the
profit from 400/3 to 145. Can we do better?
54The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
- At (0,0), P 0
- Increasing y can increase P
- the most (s1 can only hurt
- the total profit P).
- Compute check ratios to find
- pivot row (smallest ratio)
- Pivot around the element in
- both pivot column and row
We have moved from (0,0) to (20/3,0) and
increased the profit from 0 to 400/3. We then
moved from (20/3,0) to (5,5), Increasing the
profit from 400/3 to 145. Can we do better? No!
Increasing s1 or s2 will only make things
worse. We are optimal.
55The Simplex Method
Basic Idea Start from a vertex (x0, y0)
Move to next vertex that increases
profit as much as possible
x y s1 s2 P RHS
y
20
15
We have moved from (0,0) to (20/3,0) and
increased the profit from 0 to 400/3. We then
moved from (20/3,0) to (5,5), Increasing the
profit from 400/3 to 145. Can we do better? No!
Increasing s1 or s2 will only make things
worse. We are optimal.
(5,5)
0
x
56Weve Come Full Circle