the complexity of the network design problem networks, 1978 classic paper reading 99.12

43
The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Post on 19-Dec-2015

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

The Complexity of the Network Design Problem

Networks, 1978

Classic Paper Reading 99.12

Page 2: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

2

Outline

• Introduction• NDP is NP-complete• SNDP is NP-complete• Conclusion

Page 3: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Introduction

B96902094 傅莉雯

Page 4: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

4

• Combinatorial optimization is a topic in

-theoretical computer science -applied mathematics

Page 5: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

5

• Combinatorial optimization finding the least-cost solution to a mathematical problem in which each solution is associated with a numerical cost.Ex.-finding shortest path-the traveling salesman problem -the minimum spanning tree problem-…

Page 6: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

6

P

• The class P consists of all the problems that can be solved in polynomial time.– Sorting– Exact string matching– Primes

Page 7: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

7

P v.s. NP

• P consists of the problems that can be solved in (deterministically) polynomial time.

• NP consists of the problems that can be solved in non-deterministically polynomial time.

Deterministic Non-deterministic

Accept/Reject RejectAccept

Rejectf (n) = O ( n^k )

Page 8: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

8

P v.s. NP

• P NP⊆• Any problem in NP can be solved in

(deterministically) exponential time. • Could it be the case that any problem in NP

can also be solved in (deterministically) polynomial time?P = NP?

Page 9: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

9

NP-hard

• A problem is NP-hard if it is at least as hard as all the problems in NP.

• a problem X is NP-hard if the following condition holds:If X can be solved in (deterministic) polynomial time, then all the problems in NP can be solved in (deterministic) polynomial time.

Page 10: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

10

NP-complete

• A problem is NP-complete if the following holds.– it is NP-hard – it is in NP

• An NP-complete problem is a “hardest” problem in NP.

Page 11: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

11

NP-complete

• If one proves that a NP-complete broblem can be solved by a polynomial-time algorithm, then NP = P.

• If somebody proves that a NP-complete problem cannot be solved by any polynomial-time algorithm, then NP ≠ P.

Page 12: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

12

Reduction

• Problem A can be reduced (in polynomial time) to Problem B if the following condition holds:

-we can map input to A in polynomial time to an input to B, and get A’s answer when we get B’s.– if problem B has a polynomial-time algorithm, then so does problem A.

Page 13: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

13

Network Design Problem

Input: a weighted undirected graph

Output:a subgraph which connects all the

original vertices and minimizes the sum of the shortest path weights between all vertex pairs, subject to a budget constraint on the sum of its edge weights

Page 14: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

NDP is NP-complete

R99943153 張允耀 R99943143 楊凱文

Page 15: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

NDPNETWORK DESIGN PROBLEM (NDP):Given an undirected graph EVG , , a weight function EL : , a budget B and a criterion threshold C CB, , does there

exist a subgraph ',' EVG of G with weight

',

,Eji

BjiL and criterion value

CGF ' , where 'GF denotes the sum of the weight of the shortest paths in 'G

between all vertex pairs?

Page 16: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Optimal v.s. Decision

Calculate↓

Optimal value

Calculate↓

Illegal or not?

Optimal Decision

96 100X

90O

95O

97X

96

Page 17: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Knapsack ProblemGiven positive integer baaat t ,,,,, 21 , does there exist a subset tTS ,,1

such that baSi

i

iPad0.73KG

iPhone0.137KG

iMac13.8KG

GALAXY0.38KG

Lenovo NB1.27KG

ViewSonic3.1KG

2KG

Page 18: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

NDP is NP-complete

knapsack NDPPolynomial-bounded

knapsack NP-complete NDP

reducible

NDP Knapsack

Page 19: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Given any instance of knapsack, we write

Ti

iaA and define an instance of NDP as follows:

btAC

bAB

TiaiiLiLiL

TiiiiiE

TiiiV

i

4

2

',',0,0

:',,',0,,0

:',0

Figure 1 illustrate this reduction. We claim that knapsack has a solution if and only if EVG ,

contains a subgraph with weight at most B and criterion value at most C. 7,64,53,32,21,4 t:KNAPSACK baaaa

example

Page 20: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

1 1’

3’ 3

2

2’

4

4’

0

2

2 2

5

5 5

66

6 3

33

TiiiV :',0

TiiiiiE :',,',0,,0

iaiiLiLiL ',',0,0

7,64,53,32,21,4 t:KNAPSACK baaaa 166532 A3971622 bAB

249716444 btAC

Page 21: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12
Page 22: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

KNAPSACK problem:

t = 4, a1 = 2, a2 = 3, a3 = 5, a4 = 6, b =7. t = 4, a1 = 2, a2 = 3, a3 = 5, a4 = 6, b =7.

Solution:

a1 + a3 = b

KNAPSACK has solutions <=> NDP has solutions??

Page 23: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Sum of weights = 2A = 32

Sum of the shortest path weights between all vertex pairs = 4tA = 256

2 x 2t ( a1 + a2 + a3 + a4 ) = 4tA

B = 2A+b = 39C = 4tA-b = 249

Page 24: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

B = 2A+b = 39C = 4tA-b = 249

Page 25: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

KNAPSACK problem:

t = 4, a1 = 2, a2 = 3, a3 = 5, a4 = 6, b =4.

We can’t find any solution for this KNAPSACK problem!

Another example:

Page 26: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

B = 2A+b = 36C = 4tA-b = 252

This is not a solution.

Page 27: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

There are not solutions.

B = 2A+b = 36C = 4tA-b = 252

5

Page 28: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

SNDP is NP-complete

D99922018 陳琨D98922013 吳彥緯

Page 29: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

29

Problem Formulation of SNDP

• unit edge weight• spanning tree• SNDPNP

• NDP with L({i, j}) = 1 for all {i, j}E and B = |V| 1

Simple Network Design Problem (SNDP):

Page 30: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

30

A Known NPC problem: Exact 3-cover

• Given a collection S = {1, 2, …, s} of 3-element subsets of a set T= {1, 2, …, 3t}, does there exist a subcollection S’ S of pairwise

disjoint sets such that• Example: – T = {1,2,3,4,5,6}, S={{1,2,3}, {1,2,4}, {1,2,5}, {1,2,6}}

– T = {1,2,3,4,5,6}, S={{1,2,3}, {3,4,5}, {1,2,5}, {1,2,6}}

S’={{3,4,5},{1,2,6}}

No!

Yes!

Page 31: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

31

Reduction• Given any instance of EXACT 3-COVER, we

define an instance of SNDP as follows:

= r

Page 32: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

32

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s2 s3 s4

t2 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1

t3

s2 s3 s4

t2 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1

t3

s2 s3 s4

t2 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1

t3

s2 s3 s4

t2 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1

t3

Illustration of reduction

S

T

Page 33: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

33

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

Illustration of reductionR

Page 34: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

34

Illustration of reduction

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

S

T

R

polynomial-time reduction

Page 35: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

35

Claim

has a feasible solution if and only if

G has a feasible solution

EXACT 3-COVER

SNDP

G

Sol. Sol. G

Page 36: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

36

Sol. GBeginning of the proof

• Let G’ = (V,E’) be a spanning tree of G.• Let FPQ(G’) denote the sum of the weights of

all shortest paths in G’ between vertex sets P and Q (P, Q V).

• Example:

G G’

P

Q

RP

Q

FPQ(G’)=1+1+2+2=6

SNDPG

Sol. G

SNDPG

Page 37: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

37

Sol. G

Observations• Under the mentioned reduction, any feasible G’

has 3 properties.① G’ contains all edges on 3rd floor② G’ contains all edges on 2nd floor③ G’ contains some edges on 1st floor in a specific way

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0RST

SNDPG

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

Page 38: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

38

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

?

2nd Property• If {0, }E’ for some S, then

F(G’) = FRR(G’) + FRS(G’) + FRT(G’)+FSS(G’)+FST(G’)+FTT(G’)

> FRR(G’) + FRS(G’) + FRT(G’)

CRR + CRS + 2(r+1) + CRT

> CRR + CRS + r + CRT

= CRR + CRS + CRT + r

= CRR + CRS + CRT + CSS + CST + CTT

= C

• {0, }E’ for all S– Implication: In G’, each vertex in T is adjacent to exactly one vertex

in S– FRR(G’)=CRR , FRS(G’)=CRS , FSS(G’)=CSS ,

FRT(G’)=CRT , FST(G’)=CST F(G’)<=C iff FTT(G’)=CTT

CRR = r2

CRS = 2rs + sCRT = 9rt + 6tCSS = s2 – sCST = 9st – 6tCTT = 18t2 – 12t

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

Page 39: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

39

3rd Property• Denote the number of vertices in S being

adjacent in G’ to exactly h vertices in T by Sh (h=0,1,2,3)Example: S0=2, S1=1, S2=1, S3=0

Clearly, FTT(G’) CTT=18t2-12t iff S3=t, S0=s-t, S1=S2=0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r0

t s-t

Page 40: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

40

Proved

has a feasible solution if and only if

G has a feasible solution

EXACT 3-COVER SNDP

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

s1 s2 s3 s4

t2 t3 t4 t5t1 t6

r2r1 r119 r120‧ ‧ ‧

r0

Page 41: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

Conclusion

Page 42: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

42

It is generally believed that PNP

• This justifies the development of

– Enumerative optimization methods with heuristics

– Approximation algorithms

Page 43: The Complexity of the Network Design Problem Networks, 1978 Classic Paper Reading 99.12

43

Applications• Common Issues of network construction– communication convenience– construction cost

Fire fighting network

MRT network

Sensor network