Introduction To Discrete Optimization: Spring 2009 Solutions 3
Introduction To Discrete Optimization: Spring 2009 Solutions 3
Exercise 1
Consider a school district with I neighborhoods, J schools and G grades at each school. Each
school j has a capacity of C j g for grade g . In each neighborhood i , the student population of
grade g is S i g . Finally the distance of school j from neighborhood i is d i j . Formulate a linear
programming problem whose objective is to assign all students to schools, while minimizing
the total distance traveled by all students. (You may ignore the fact that numbers of students
must be integer.)
Solution
Let x i j g be the amount of students from neighborhood i of grade g travelling to school j .
Then for an assignment of students to schools, the total distance travelled by all students is
given as XX X
di j xi j g .
i I j J g G
For a feasible assignment, every student of every neighborhood and grade must be as-
signed to a school, this gives the constraint
X
x i j g = S i g i I , g G.
j J
The number of students each school can take of the respective grades is bounded by C j g ,
thus X
xi j g C j g j J , g G
i I
must hold. Finally there can be no negative numbers of assignments: x 0. This gives the
following linear program:
P P P
min i I j J g G d i j x i j g
P
subject to j J xi j g = S i g i I , g G
P
i I xi j g C j g j J,g G
x 0
Exercise 2
Consider the vectors
3 1 2 2 1
x1 = 1 , x2 = 2 , x3 = 0 , x4 = 4 , x5 = 1 .
2 5 1 3 1
1
Let A = {x 1 , . . . , x 5 }. Find two disjoint subsets A 1 , A 2 A such that
conv(A 1 ) conv(A 2 ) 6= ;.
The vectors of A 0 are linearly dependent and we can compute a nontrivial linear combination
of the all zero vector.
5
xi
i
X
0= .
i =1
1
As shown in the proof, if the define sets P := {i : i 0} and N := {i : i < 0}, then the sets
A 1 := {x i : i P } and A 2 := {x i : i N } have the desired property.
To compute a nontrivial linear combination of the all zero vector using points from A 0 , we
solve the following linear program:
31 + 2 + 23 + 24 + 5 = 0
1 + 22 + 44 + 5 =0
21 + 52 + 3 + 34 + 5 = 0
1 + 2 + 3 + 4 + 5 =0
Using standard methods, e.g. gaussian elimination, one can compute the solution set as:
3 1
S = (a, 0, a, a, a) : a R .
2 2
We take the solution (1, 0, 32 , 21 , 1) S which gives the nontrivial linear combination
x1 x2 3 x3 1 x4 x5
0= +0 + .
1 1 2 1 2 1 1
As shown in the proof of Radons lemma, the sets A 1 := {x 1 , x 2 , x 5 } and A 2 := {x 3 , x 4 } have the
required property, i.e conv(A 1 ) conv(A 2 ) 6= ;.
As a certificate the proof gives that
2
1 1 3 1
v = x1 + x5 = x3 + x4 = 1
2 2 4 4
1.5
2
Exercise 3
Consider the vectors
3 1 2 2 1
x1 = 1 , x2 = 2 , x3 = 0 , x4 = 4 , x5 = 1 .
2 5 1 3 1
The vector
15
v = x 1 + 3x 2 + 2x 3 + x 4 + 3x 5 = 14
25
is a conic combination of the x i .
Write v as a conic combination using only three vectors of the x i .
Hint: Recall the proof of Carathodorys theorem
Solution
Let X = {x 1 , . . . , x n }. Observe that v cone(X ). Since x 1 , . . . , x 5 R3 , Carathodorys theorem
states that we can write v as a conic combination using at most three vectors of X .
How to compute this conic combination? Recall the proof of Carathodorys theorem.
The number of vectors in the conic combination v = 5i =1 i x i can be reduced by one with
P
the following method: Compute a nontrivial linear combination of the all zero vector, i.e.
compute 1 , . . . , 5 R, not all of them zero such that 5i =1 i x i = 0 holds.
P
P5
Thus v = i =1 (i i )x i for each > 0. As described in the proof, one can find an such
that i i 0 for each i = 1, . . . , 5 and i i = 0 for at least one i . Thus we get a new
conic combination of v using one vector less than before.
We now applying the idea to the exercise. We first compute a nontrivial linear combination
of the all zero vector by solving the following system of linear equations:
31 + 2 + 23 + 24 + 5 = 0
1 + 22 + 44 + 5 =0
21 + 52 + 3 + 34 + 5 = 0.
Using standard methods, e.g. gaussian elimination, one can compute the solution set as:
S = {(4a b, 0, 5a + b, a, b) : a, b R}
We take the solution (5, 0, 6, 1, 1) S which gives a nontrivial linear combination, i.e. 0 =
5x 1 + 6x 3 + x 4 + x 5 .
What is the maximal such that
v = (1 + 5)x 1 + 3x 2 + (2 6)x 3 + (1 )x 4 + (3 )x 5
3
Observe that since the coefficient of x 3 is zero, we can remove it from the conic combination.
We need to remove one more vector to get a conic combination using only three vectors.
Again we compute a nontrivial linear combination of the all zero vector using the remaining
vectors (x 1 , x 2 , x 4 , x 5 ):
31 + 2 + 24 + 5 =0
1 + 22 + 44 + 5 =0
21 + 52 + 34 + 5 = 0.
S 0 = {(a, 0, a, 5a) : a R}
We take the solution (1, 0, 1, 5) S 0 which gives a nontrivial linear combination, i.e. 0 =
x 1 x 3 + 5x 5 .
What is the maximal such that
8 2 8
v = ( + )x 1 + 3x 2 + ( + )x 4 + ( 5)x 5
3 3 3
8
is a conic combination? It is given by = 15 .
The new conic combination is
8 8 2 8 8 8
v = ( + )x 1 + 3x 2 + ( + )x 4 + ( 5 )x 5
3 15 3 15 3 15
16 6
= x 1 + 3x 2 + x 4 + 0x 5 .
5 5
Since the coefficient of x 5 is zero, we can remove it and obtain the desired convex combina-
tion of v using only three vectors.
Exercise 4
Show that a basic solution can be associated to two different bases, i.e. give an example of
a solution x to a linear program min{c T x : Ax = b, x 0} such that there are two bases A B
and A B 0 with A B x B = b, A B 0 x B 0 = b and x (i ) = 0 i { j = 1, . . . , n : j B B 0 }.
Solution
Consider the linear program
Pn
min i =1 x i
Ax =b
x 0
Where
1 0 1 1
A := and b = .
0 1 1 0
Let B = {1, 2} and B 0 = {1, 3}.
Set x := (1, 0, 0)T . Observe that x has all desired properties.
4
Exercise 5
Recall the naive algorithm given in the lecture to solve a linear program by generating all
basic solutions. Consider linear programs of the form
min{c T x : Ax = b, x 0},
1. one minute
2. one day