Document

advertisement
Linear Programs with Totally
Unimodular Matrices
updated 19 March 2009
Basic Feasible Solutions
max
s.t.
z  5x  8 y
x  y  6 (1)
5 x  9 y  45 (2)
x,
y  0
Standard Form
max z  5 x  8 y
s.t.
x 
y

s1
5 x  9 y  s2
x,
y, s1 , s2

6
 45
 0
slide 1
Basic Feasible Solutions
max z  5 x  8 y
s.t.
x 
y

s1
5 x  9 y  s2
x,
y, s1 , s2
Solution Basic Variables

6
 45
 0
Non-Basic Variables Intersection
BFS 1
x = 2.25 & y = 3.75 s1 = s2 = 0
(1) and (2)
BFS 2
x = 6 & s2 = 15
y = s1 = 0
(1) and x-axis
BFS 3
y = 5 & s1 = 1
x = s1 = 0
(2) and y-axis
BFS 4
s1 = 6 & s2 = 45
x= y=0
x-axis and y-axis
slide 2
Vector-Matrix Representation
x y s1 s2
6
1
1
1
0


A 
b   


45
5 9 0 1
B 
x, y,
AB

B 
x, s2 ,
AB

B 
y, s1,
AB

B 
s1 , s2 ,
AB

1

5
1

5
1

9
1

0
1
,
9
0
,
1
1
,
0
0
,
1
1
B
A b 
AB1b 
AB1b 
AB1b 
2.25


3.75
6
 
15
5
 
1
6
 
45
slide 3
Example MCNFP
-2
(3, 2,5)
5
1
2
(4, 1,3)
4
(1, 0,2)
(2, 0,2)
3
-3
(4, 0,3)
0
slide 4
LP for Example MCNFP
Min 3x12 + 2 x13 + x23 + 4 x24 + 4 x34
s.t. x12 + x13
= 5
{Node 1}
x23 + x24 – x12 = -2
{Node 2}
x34 – x13 - x23 = 0
{Node 3}
– x24 - x34 = -3
{Node 4}
2  x12  5,
0  x13  2,
0  x23  2,
1  x24  3,
0  x34  3,
slide 5
Matrix Representation of Flow
Balance Constraints
 1

1
 0

 0

1 0 0 0
0 1 1 0
1 1 0 1
0 0 1 1
x 
 5
 12


 x13
 2
 
 x23   0


x 
24
 3
 


 x34
 
slide 6
Solving for a Basic Feasible Solution
 1

1
 0

 0

1 0 0  x
0 1 0  x


1 0 1  x
0 1 1  x

x 
 12
 x13
  
 x24
x 
 34

 5



 2
13
  

0
24



 3
34



12
 1 1 0
1 0 1
 0 1 0
 0 0 1
1
0  5
0  2
 0
1  
1  3
slide 7
Cramer’s Rule
Use determinants to solve x=A-1b.
x
j

B
A
j
 aij
, B j   
an1

 
ann
a
b a
a
b
12

n2
1

n
1n
Take the matrix A and replace column j with the vector b
to form matrix Bj.
slide 8
Using Cramer’s Rule to Solve for x12
x
12

5
1
0
0
2
0
1
0
0 1
0
1
3
1
0 1 1
1 0 0
1
0
1
0
0 1
0
1
0
Is
B(1, 2 )
Does

B(1, 2 )
A
0 1 1
an integer?
A  1?
slide 9
Total Unimodularity
• A square, integer matrix is unimodular if its determinant is
1 or -1.
• An integer matrix A is called totally unimodular (TU) if
every square, nonsingular submatrix of A is unimodular.
 1 1
 1 1
Not TU
 1 1 0 0
1 0
 1 0
 0 1 0
1
 0 0  1  1
TU
slide 10
Total Unimodularity
• A square, integer matrix is unimodular if its determinant is
1 or -1.
• An integer matrix A is called totally unimodular (TU) if
every square, nonsingular submatrix of A is unimodular.
 1 1 0 0


 1 0
1 0


 0 1 0
1


 0 0  1  1
1 0
1 1
 1
slide 11
Sufficient Conditions for TU
An integer matrix A is TU if
1. All entries are -1, 0 or 1
2. At most two non-zero entries appear in any column
3. The rows of A can be partitioned into two disjoint sets
M1 and M2 such that
•
•
If a column has two entries of the same sign, their rows are
in different sets.
If a column has two entries of different signs, their rows are
in the same set.
slide 12
The Matrix of Flow Balance Constraints
x 
12
 1

 5


1
0
0
0

  x13


0 1 1 0    2
1
x
23
 0 1 1

 0

0
1

  


x
24
 0
 3
0 0 1 1  



 x34
 
• Every column has exactly one +1 and exactly one -1.
• Conditions 1 and 2 are satisfied.
• Let the row partition be M1 = {all rows} and M2 = {}.
• Condition 3 is satisfied.
• Therefore, the flow balance constraint matrix is TU.
slide 13
Using Cramer’s Rule to Solve for x12
x
12

5
1
0
0
2
0
1
0
0 1
0
1
3
1
0 1 1
1 0 0
1
0
1
0
0 1
0
1
0
Is B(1, 2 ) an integer?
Does A  1? Yes.

B(1, 2 )
A
0 1 1
slide 14
Expansion by Minors: 4-by-4 Matrix
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a a
a
a
a a
a
a
a
a
a
a
a
a
a
a
a
a
a
11
21
31
41
12
22
32
42
22
11
23
24
12
31
13
14
13
23
33
43
32
33
34
22
23
24
14
24
11

34
43
14

44
42
43
44
12
13
44
42
a
a
a
a
a
a
a
a
a
a a
a
a
a a
a
21
22
23
24
12
21
13
14

12
41
13
14
a
a
a
a
31
32
33
34
a
a
a
a
a
a
32
33
34
22
23
24
a
a
a
a
a
a
a
a
a
a
41
42

43
44
42
43

44
32
33
34
slide 15
Expansion by Minors: 3-by-3 Matrix
a a
a a
a a
11
12
21
22
31
32
a
a a
22
11
32
a
a
a
13
23

33
a
a
23
 a12 a 21
a
33
31
a
a
23
33
 a13 a 21
a
31
a
a
22

32
a a a  a a  
11
22
33
23
32
a a a  a a  
12
21
33
23
31
a a a  a a 
13
21
32
22
31
slide 16
Using Cramer’s Rule to Solve for x12
x
12

5
1
0
0
2
0
1
0
0 1
0
1
3
1
0 1 1
1 0 0
1
0
1
0
0 1
0
1
0
Is
B(1, 2 )
Does

B(1, 2 )
A
0 1 1
an integer?
A  1? Yes.
slide 17
Using Cramer’s Rule to Solve for x12
5 1 0 0
5 2 0 3
 2 0 1 0  1 0 1 0
0 1 0 1
0 1 0 1
 3 0 1 1
0 0 1 1
• When we expand along minors, the determinants of the
submatrices will be +1, -1, or 0.
• Therefore, the determinant will be an integer:
(5)(+1, -1, or 0) + (-2) (+1, -1, or 0) + 0 + (-3) (+1, -1, or 0).
slide 18
Using Cramer’s Rule to Solve for x12
x
12

5
1
0
0
2
0
1
0
0 1
0
1
3
1
0 1 1
1 0 0
1
0
1
0
0 1
0
1
0
Is
B(1, 2 )
Does

B(1, 2 )
A
0 1 1
an integer? Yes.
A  1? Yes.
slide 19
TU Theorems
•
•
Matrix A is TU if and only if AT is TU.
Matrix A is TU if and only if [A, I] is TU.
–
•
•
I is the identity matrix.
If the constraint matrix for an IP is TU, then its
LP relaxation has an integral optimal solution.
The BFSs of an MCNF LP are integer valued.
slide 20
Download