lec2

advertisement
Home task discussion
The SPLP is NP-hard in the strong sense.
A problem is said to be strongly NP-complete (NP-complete in strong sense),
if it remains NP-complete even when all of its numerical parameters are
bounded by a polynomial in the length of the input.
Node Cover Problem;
Knapsack Problem;
Maximal Clique Problem.
Lecture 2
1
The traveling salesman problem
min ∑ ∑ 𝑐𝑖𝑗 π‘₯𝑖𝑗
𝑗∈𝐽 𝑖∈𝐼
s.t.
∑ π‘₯𝑖𝑗 = 1, 𝑗 ∈ 𝐽;
𝑖∈𝐼
∑ π‘₯𝑖𝑗 = 1, 𝑖 ∈ 𝐼;
𝑗∈𝐽
𝑒𝑖 − 𝑒𝑗 + 𝑛π‘₯𝑖𝑗 ≤ 𝑛 − 1, 𝑖, 𝑗 = 2, … , 𝑛;
π‘₯𝑖𝑗 ∈ {0,1}, 𝑒𝑖 ≥ 0, 𝑖 = 1, … , 𝑛.
Lecture 2
2
Lecture 2.
Basic facility location models
ο‚· The simple plant location problem
ο‚· The 𝑝-median problem
ο‚· The 𝑝-center problem
ο‚· The set covering problem
Lecture 2
3
Combinatorial formulations
Proposition 1. The SPLP has the single assignment property (π‘₯𝑖𝑗 = 1 ∨ 0).
Proof. For each customer 𝑗 ∈ 𝐽 we select a cheapest deliverer 𝑖: π‘₯𝑖 = 1.
SPLP: combinatorial formulation
min {∑ min 𝑐𝑖𝑗 + ∑ 𝑓𝑖 }
𝑃⊆𝐼
Lecture 2
𝑗∈𝐽
𝑖∈𝑃
𝑖∈𝑃
4
The 𝒑-median problem
min {∑ min 𝑐𝑖𝑗 }
𝑃⊂𝐼,|𝑃|=𝑝
𝑗∈𝐽
𝑖∈𝑃
Mixed integer programming model:
min ∑ ∑ 𝑐𝑖𝑗 π‘₯𝑖𝑗
𝑗∈𝐽 𝑖∈𝐼
subject to:
∑ π‘₯𝑖𝑗 = 1, 𝑗 ∈ 𝐽;
𝑖∈𝐼
𝑦𝑖 ≥ π‘₯𝑖𝑗 , 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽;
∑ 𝑦𝑖 = 𝑝;
𝑖∈𝐼
𝑦𝑖 ∈ {0,1}, π‘₯𝑖𝑗 ≥ 0, 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽.
Has the 𝑝-median problem the Single Assignment Property?
Lecture 2
5
The 𝒑-center problem
min {max min 𝑐𝑖𝑗 }
𝑃⊂𝐼,|𝑃|=𝑝 𝑗∈𝐽 𝑖∈𝑃
Mixed integer linear programming model:
min 𝐷
subject to:
𝐷 ≥ 𝑐𝑖𝑗 π‘₯𝑖𝑗 , 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽;
∑ π‘₯𝑖𝑗 = 1, 𝑗 ∈ 𝐽;
𝑖∈𝐼
𝑦𝑖 ≥ π‘₯𝑖𝑗 , 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽;
∑ 𝑦𝑖 = 𝑝;
𝑖∈𝐼
𝑦𝑖 ∈ {0,1}, π‘₯𝑖𝑗 ≥ 0, 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽.
How about relaxation π‘₯𝑖𝑗 ∈ {0,1} ⇒ 0 ≤ π‘₯𝑖𝑗 ≤ 1 ?
Why we discuss the relaxations?
Lecture 2
6
Suppose that we have an algorithm for the 𝑝-median problem.
ο‚· Can we solve the 𝑝-center problem by using this algorithm?
ο‚· What is computational complexity of your approach?
ο‚· Can we say that the 𝑝-center problem is NP-hard?
Lecture 2
7
The set covering problem
Let 𝐴 = {π‘Žπ‘–π‘— } be an 0–1 matrix:
1 if facility 𝑖 can service customer 𝑗
0 otherwise
A subset 𝑃 ⊆ 𝐼 of facilities defines a cover of 𝐽 if ∑𝑖∈𝑃 π‘Žπ‘–π‘— ≥ 1 for all 𝑗 ∈ 𝐽.
π‘Žπ‘–π‘— = {
The set covering problem is to find a cover of minimal cost:
min ∑ 𝑓𝑖 𝑦𝑖
𝑖∈𝐼
subject to
∑ 𝑦𝑖 π‘Žπ‘–π‘— ≥ 1, 𝑗 ∈ 𝐽;
𝑖∈𝐼
𝑦𝑖 ∈ {0,1}, 𝑖 ∈ 𝐼.
Can we claim that this problem is NP-hard?
Lecture 2
8
Pseudo-Boolean reformulations
For a vector 𝑔 = (𝑔1 , … , π‘”π‘š ) with ranking 𝑔𝑖1 ≤ 𝑔𝑖2 ≤ β‹― ≤ π‘”π‘–π‘š
we introduce a vector βˆ†π‘” = (βˆ†π‘”0 , … , βˆ†π‘”π‘š ) in the following way:
βˆ†π‘”0 = 𝑔𝑖1
βˆ†π‘”π‘™ = 𝑔𝑖𝑙+1 − 𝑔𝑖𝑙 , 1 ≤ 𝑙 < π‘š;
βˆ†π‘”π‘š = π‘”π‘–π‘š .
Lemma. For each 0-1 vector 𝑧 = (𝑧1 , … , π‘§π‘š ), 𝑧 ≠ (1, … ,1) we have
π‘š−1
min 𝑔𝑖 = βˆ†π‘”0 + ∑ βˆ†π‘”π‘™ 𝑧𝑖1 … 𝑧𝑖𝑙 .
𝑖|𝑧𝑖 =0
𝑙=1
Example. 𝑔 = (10,8,5,7,1,9); βˆ†π‘” = (1, 4=5-1, 2=7-5, 1=8-7, 1=10-9);
𝑧 = (1,1,0,0,1,0), 𝑧 = (1,1,0,0,0,0), 𝑧 = (1,1,1,1,1,0).
Lecture 2
9
Pseudo-Boolean reformulation for SPLP
Let the ranking for column 𝑗 of the matrix (𝑐𝑖𝑗 ) be
𝑐𝑖 𝑗 𝑗 ≤ 𝑐𝑖 𝑗 𝑗 ≤ β‹― ≤ 𝑐𝑖 𝑗 𝑗
1
π‘š
2
Using Lemma, we can get a pseudo-boolean function for the SPLP:
𝑧𝑖 = 1 − 𝑦𝑖 , 𝑖 ∈ 𝐼;
π‘š−1
min {∑ 𝑓𝑖 (1 − 𝑧𝑖 ) + ∑ ∑ βˆ†π‘π‘™π‘— 𝑧𝑖 𝑗 … 𝑧𝑖 𝑗 }.
𝑧
𝑖∈𝐼
Example. 𝐼 = 𝐽 = {1,2,3}; 𝑓𝑖 =
𝑗∈𝐽 𝑙=0
10
(10);
10
𝑐𝑖𝑗 =
0
(5
10
1
𝑙
3 10
0
0 );
20 7
We get the pseudo-boolean function:
𝑏(𝑧) = 10(1 − 𝑧1 ) + 10(1 − 𝑧2 ) +
+10(1 − 𝑧3 ) + (5𝑧1 + 5𝑧1 𝑧2 ) + (3𝑧2 + 17𝑧1 𝑧2 ) + (7𝑧2 + 3𝑧2 𝑧3 ) =
= 15 + 5(1 − 𝑧1 ) + 0(1 − 𝑧2 ) + 10(1 − 𝑧3 ) + 22𝑧1 𝑧2 + 3𝑧2 𝑧3 .
Lecture 2
10
Correspondence “many to one”
Theorem. The minimization problem for the pseudo-boolean function 𝑏(𝑧) for
𝑧 ≠ (1, … ,1) and the SPLP are equivalent. For optimal solutions 𝑧 ∗ , 𝑃 ∗ of these
problems we have
𝐹 (𝑃∗ ) = 𝑏(𝑧 ∗ ) and 𝑧𝑖∗ = 0 ⇔ 𝑖 ∈ 𝑃∗ for all 𝑖 ∈ 𝐼.
Example. Optimal solutions for these instances are the same or not?
0
5
𝑓 = ( 0 ) 𝑐𝑖𝑗 = ( 0
22
10
Lecture 2
3
4
5
0) and 𝑓 = ( 2 ) 𝑐𝑖𝑗 = (0
0
1
10
1
0)
23
11
Reduction of the set 𝑱
Theorem. For the minimization problem of the pseudo-boolean function 𝑏(𝑧)
with positive coefficients in the nonlinear terms, the equivalent instance of the
SPLP with minimal number of customers can be found in polynomial time from
𝑛 and π‘š.
Lecture 2
12
Sketch of proof. Consider a pseudo-boolean function 𝑏(𝑧) define by
𝑏(𝑧) = ∑ 𝛼𝑖 (1 − 𝑧𝑖 ) + ∑ 𝛽𝑙 ∏ 𝑧𝑖 ,
𝑖∈𝐼
𝑙∈𝐿
𝑖∈𝐼𝑙
where 𝛽𝑙 > 0 and 𝐼𝑙 ⊂ 𝐼 for all 𝑙 ∈ 𝐿.
The family of subset {𝐼𝑙 }𝑙∈𝐿 of the set I with order relation 𝐼𝑙′ < 𝐼𝑙′′ ⟺
𝐼𝑙′ ⊂ 𝐼𝑙′′ forms a partially ordered set (poset). An arbitrary sequence of subsets 𝐼𝑙1 < β‹― < πΌπ‘™π‘˜ is called a chain. An arbitrary partition of the family {𝐼𝑙 }𝑙∈𝐿
into nonoverlapping chains induces a matrix (𝑐𝑖𝑗 ) for the UFLP. Each element
of the partition corresponds a user. The requirement to find an instance of
UFLP with a minimal number of users is equivalent to finding a partition of the
poset into the minimal number of nonoverlapping chains. This is a well-known
problem which can be solved in polynomial time. β–„
Lecture 2
13
Example:
Function 𝑏(𝑧) = 𝑧1 𝑧2 + 𝑧1 𝑧3 + 𝑧1 𝑧4 + 𝑧1 𝑧5 + 𝑧3 𝑧4 + 𝑧3 𝑧5 + 𝑧4 𝑧5 +
𝑧1 𝑧2 𝑧3 + 𝑧1 𝑧3 𝑧4 + 𝑧1 𝑧4 𝑧5 + 𝑧1 𝑧2 𝑧3 𝑧4 + 𝑧2 𝑧3 𝑧4 𝑧5 + 𝑧1 𝑧3 𝑧4 𝑧5 −
10𝑧1 − 10 𝑧2 − 5𝑧3 − 5𝑧4 − 6 𝑧5 .
Generate an equivalent SPLP instance: 𝐼 = {1, … , 5}, 𝐽 = {1, … ? }.
What can we say about the integrality gap for the minimization
problem for the pseudo-boolean function?
Lecture 2
14
Paradox
Integrality gap for the SPLP can be arbitrary close to 1 (see lecture 1) but for
the minimization problem 𝑏(𝑧) the gap equals 𝟎.
Theorem. The set of optimal solutions of the minimization problem for
arbitrary pseudo-boolean function with continuous variables contains a pure
integer solution.
Proof. For boolean variable 𝑧, we have 𝑧 = 𝑧 2 (0 = 02 , 1 = 12 ). So, we may
assume that pseudo-boolean function has not 𝑧 2 , 𝑧 3 , … . All nonlinear terms
are product of different variables.
Let 𝑧 ∗ be the optimal solution for 𝑏(𝑧) and assume that 𝑧1∗ ≠ 0 ∨ 1. We can
rewrite 𝑏(𝑧):
𝑏(𝑧) = 𝑏1 (𝑧2 , … , π‘§π‘š ) + 𝑧1 𝑏2 (𝑧2 , … , π‘§π‘š ).
∗
If 𝑏2 (𝑧2∗ , … π‘§π‘š
) is positive, then we can improve our optimal solution by
∗)
decreasing 𝑧1∗ to 0. If it is negative, we put 𝑧1∗ = 1. Hence, 𝑏2 (𝑧2∗ , … , 𝑧𝑀
=0
and we can put 𝑧1∗ = 1 ∨ 0. ∎
Lecture 2
Can it helps us to solve the problem?
15
Boolean linear and nonlinear optimization
Boolean linear problem:
(BL):
min 𝑐π‘₯
𝐴π‘₯ ≥ 𝑏;
π‘₯ ∈ 𝐡𝑛 .
It is NP-hard problem (SPLP).
Note that 𝑦 ∈ {0,1} ⇔ 𝑦(1 − 𝑦) = 0.
Hence, the BL is equivalent to
(NLP):
Lecture 2
min 𝑐π‘₯
𝐴π‘₯ ≥ 𝑏;
π‘₯𝑖 (1 − π‘₯𝑖 ) = 0, 𝑖 = 1, … , 𝑛;
π‘₯ ∈ 𝑅𝑛 .
16
Hometask 1
In the SPLP we have 𝐼 = 𝐽 = {Altus, Ardmore, Bartlesville, Duncan, Edmond, Enid},
𝑛=π‘š=6
𝑐𝑖𝑗 =
0
169
291
88
153
208
169
0
248
75
112
199
291
248
0
231
146
132
88
75
231
0
93
137
153
112
146
93
0
88
208
199
132
137
88
0
𝑓𝑖 =
150
150
150
100
100
100
Find the equivalent minimization problem for a pseudo-boolean function.
Lecture 2
17
Hometask 2
For the following instance of the set covering problem:
{1, … ,4} , 𝑓𝑖 =1 for 𝑖 ∈ 𝐼, and
π‘Žπ‘–π‘— =
1
1
0
0
0
0
1
1
0
0
1
0
1
0
1
𝐼 = {1, … ,5}, 𝐽 =
1
0
0
1
1
find the equivalent minimization problem for a pseudo-boolean function.
Lecture 2
18
Questions
1. Suppose that we have an algorithm for the set covering problem. Can we
solve the 𝑝-center problem using this algorithm?
2. The set covering problem is NP-hard in the strong sense. If the previous reduction is correct, can we claim that the 𝑝-center problem is NP-hard in the
strong sense?
3. The minimization problem for arbitrary pseudo-boolean function is NP-hard
in the strong sense or not?
Lecture 2
19
Download