Tutorial 5 A
Tutorial 5 A
Solution.
(a) To reformulate the problem as an MILP in standard form, we
(i) multiply the objective function with 1 to obtain a minimisation
objective,
(ii) multiply the first constraint with 1 to obtain a non-negative righthand side,
(iii) multiply the second constraint with 1 to obtain a non-negative
right-hand side,
(iv) add a (continuous!) slack variable x3 to reformulate the second constraint as an equality,
(v) bring all variables in the third constraint to the left-hand side, and
(vi) add a (continuous!) slack variable x4 to reformulate the third constraint as an equality.
X
i=1
yi
We remark that using this representation, there are n ways to model
x = n for n {0, . . . , }. This redundancy typically slows down solution
techniques (such as the branch-and-bound and cutting planes techniques
discussed later in the lecture), and it indicates that we may be able to
save some binary variables with a more clever formulation.
(b) Challenge: If = 2 1 for some N, then we can use the binary
numeral system in order to represent the integer variable x using only
binary variables yi {0, 1}, i = 0, . . . , 1:
x=
1
X
2i yi .
i=0
x=
2i yi .
i=0
blog2 c + 1 = b0c + 1 = 1
blog2 c + 1 = b1c + 1 = 2
blog2 c + 1 b1.58c + 1 = 2
blog2 c + 1 = b2c + 1 = 3
blog2 c + 1 b2.32c + 1 = 3
;
;
;
;
;
x = 1y0 ,
y0 {0, 1}
x = 1y0 + 2y1 ,
y0 , y1 {0, 1}
x = 1y0 + 2y1 ,
y0 , y1 {0, 1}
x = 1y0 + 2y1 + 4y2 , y0 , y1 , y2 {0, 1}
x = 1y0 + 2y1 + 4y2 , y0 , y1 , y2 {0, 1}
Pblog c
Note that replacing x with i=0 2 2i yi everywhere is not enough in this
case. Indeed, when x {0, 1, . . . , 4}, replacing x with 1y0 + 2y1 + 4y2 ,
y0 , y1 , y2 {0, 1}, actually allows us to choose x {0, 1, . . . , 7}! So we
need the additional constraint that x , which after replacing x is
equivalent to
blog2 c
X
2i yi .
i=0
0
1
(b)
0 +1 0
A = +1 1 0
+1 0 0
(c)
1
+1
A=
0
0
1 0
0
0 +1
0 1 1 0
0
.
+1 +1 0 1 0
0
0 +1 +1 1
+1
+1
A=
0
0
+1 0
0
0 +1
0 1 1 0
0
.
+1 +1 0 1 0
0
0 +1 +1 +1
(d)
(e)
+1 1 0
0
0 +1 1 0
A=
0
0 +1 1
0
0
0 +1
(f)
+1
0
A=
0
+1
1 0
0
+1 1 0
0 +1 1
0
0 +1
Solution.
i. No, one entry is neither +1, 0, -1.
ii. Yes. The indexes of the rows for the two sets are B = {1, 2} and
C = {3}.
iii. Yes. The indexes of the rows for the two sets are B = {1, 2, 3, 4}
and C = .
iv. Yes. The indexes of the rows for the two sets are B = {1} and
C = {2, 3, 4}.
v. Yes. The indexes of the rows for the two sets are B = {1, 2, 3, 4}
and C = .
vi. No. This is similar to the previous case, but rows 1 and 4 would
need to be in separate partitions due to column 1. This would
violate the requirement that the first 4 rows need to be in the
same partition, in order to match the conditions for non-zero
entries with opposite signs.