Top Banner
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Approximation Algorithms Hengfeng Wei [email protected] June 03, 2019 Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 1 / 21
62

4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

Jan 04, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

4-12 Approximation Algorithms

Hengfeng Wei

[email protected]

June 03, 2019

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 1 / 21

Page 2: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 2 / 21

Page 3: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 3 / 21

Page 4: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Definition (NPO: NP Optimization)

Π = (L, sol, cost, goal)

L : l ∈ L is an instance

decidable in poly. time

sol : x ∈ sol(l) is a feasible solution of l

verifiable in poly. time

cost : cost(x) is the cost of x

computable in poly. time

goal : goal ∈ {min, max}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 4 / 21

Page 5: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Definition (NPO: NP Optimization)

Π = (L, sol, cost, goal)

L : l ∈ L is an instance

decidable in poly. time

sol : x ∈ sol(l) is a feasible solution of l

verifiable in poly. time

cost : cost(x) is the cost of x

computable in poly. time

goal : goal ∈ {min, max}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 4 / 21

Page 6: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Definition (NPO: NP Optimization)

Π = (L, sol, cost, goal)

L : l ∈ L is an instancedecidable in poly. time

sol : x ∈ sol(l) is a feasible solution of lverifiable in poly. time

cost : cost(x) is the cost of xcomputable in poly. time

goal : goal ∈ {min, max}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 4 / 21

Page 7: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

f(n)-APX: f(n)-approximationExp-APX: f(n) = O(2nc)Poly-APX: f(n) = O(nc)Log-APX: f(n) = O(log n)

APX: f(n) = c (c > 1)

PTAS: Poly. time approximation scheme▶ ∀ϵ > 0 : (1 + ϵ)-approximation▶ P : Poly(n) O((1/ϵ) · n2) O(n2/ϵ)

FPTAS: Fully poly. time approximation scheme▶ ∀ϵ > 0 : (1 + ϵ)-approximation▶ FP : Poly(n, 1/ϵ) O((1/ϵ)2 · n3)

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 5 / 21

Page 8: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

f(n)-APX: f(n)-approximationExp-APX: f(n) = O(2nc)Poly-APX: f(n) = O(nc)Log-APX: f(n) = O(log n)

APX: f(n) = c (c > 1)

PTAS: Poly. time approximation scheme▶ ∀ϵ > 0 : (1 + ϵ)-approximation▶ P : Poly(n) O((1/ϵ) · n2) O(n2/ϵ)

FPTAS: Fully poly. time approximation scheme▶ ∀ϵ > 0 : (1 + ϵ)-approximation▶ FP : Poly(n, 1/ϵ) O((1/ϵ)2 · n3)

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 5 / 21

Page 9: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(if P ̸= NP)

PO ⊊ FPTAS ⊊ PTAS⊊ APX ⊊ Log-APX ⊊ Poly-APX ⊊ Exp-APX⊊ NPO

▶ Knapsack ∈ FPTAS \ PO▶ Makespan ∈ PTAS \ FPTAS (TODAY)▶ Vertex Cover ∈ APX \ PTAS▶ Set Cover ∈ Log-APX \ APX (CLRS 35.3)▶ Clique ∈ Poly-APX \ Log-APX▶ TSP ∈ Exp-APX \ Poly-APX

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 6 / 21

Page 10: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(if P ̸= NP)

PO ⊊ FPTAS ⊊ PTAS⊊ APX ⊊ Log-APX ⊊ Poly-APX ⊊ Exp-APX⊊ NPO

▶ Knapsack ∈ FPTAS \ PO▶ Makespan ∈ PTAS \ FPTAS (TODAY)▶ Vertex Cover ∈ APX \ PTAS▶ Set Cover ∈ Log-APX \ APX (CLRS 35.3)▶ Clique ∈ Poly-APX \ Log-APX▶ TSP ∈ Exp-APX \ Poly-APX

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 6 / 21

Page 11: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Makespan Scheduling Problem (MS)▶ n jobs: J1, . . . , Jn

▶ processing time: p1, . . . , pn

▶ m ≥ 2 machines: M1, . . . , Mm ▶ goal: minimize the makespan

r = T

T ∗ ≤ 2T ≤ △

T ∗ ≥ ▽

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 7 / 21

Page 12: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Makespan Scheduling Problem (MS)▶ n jobs: J1, . . . , Jn

▶ processing time: p1, . . . , pn

▶ m ≥ 2 machines: M1, . . . , Mm ▶ goal: minimize the makespan

r = T

T ∗ ≤ 2

T ≤ △

T ∗ ≥ ▽

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 7 / 21

Page 13: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Makespan Scheduling Problem (MS)▶ n jobs: J1, . . . , Jn

▶ processing time: p1, . . . , pn

▶ m ≥ 2 machines: M1, . . . , Mm ▶ goal: minimize the makespan

r = T

T ∗ ≤ 2T ≤ △

T ∗ ≥ ▽

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 7 / 21

Page 14: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

T ∗ ≥ ▽

T ∗ ≥ 1m

∑j

pj

T ∗ ≥ maxj

pj

T ≤ △

Ji : the last job to complete

T = si + pi

≤ ?+?

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 8 / 21

Page 15: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

T ∗ ≥ ▽

T ∗ ≥ 1m

∑j

pj

T ∗ ≥ maxj

pj

T ≤ △

Ji : the last job to complete

T = si + pi

≤ ?+?

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 8 / 21

Page 16: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

T ∗ ≥ ▽

T ∗ ≥ 1m

∑j

pj

T ∗ ≥ maxj

pj

T ≤ △

Ji : the last job to complete

T = si + pi

≤ ?+?

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 8 / 21

Page 17: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

LS (List-Scheduling) Algorithm (JH 4.2.1.4)▶ Online scheduling▶ Assign job to the least heavily loaded

msi ≤∑

j

pj

si ≤ 1m

∑j

pj ≤ T ∗

T = si + pi

≤ T ∗ + T ∗

= 2T ∗

msi ≤∑j ̸=i

pj

si ≤ 1m

∑j

pj − 1m

pi

T = si + pi

≤ 1m

∑j

pj + (1 − 1m

)pi

≤ T ∗ + (1 − 1m

)T ∗

= (2 − 1m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 9 / 21

Page 18: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

LS (List-Scheduling) Algorithm (JH 4.2.1.4)▶ Online scheduling▶ Assign job to the least heavily loaded

msi ≤∑

j

pj

si ≤ 1m

∑j

pj ≤ T ∗

T = si + pi

≤ T ∗ + T ∗

= 2T ∗

msi ≤∑j ̸=i

pj

si ≤ 1m

∑j

pj − 1m

pi

T = si + pi

≤ 1m

∑j

pj + (1 − 1m

)pi

≤ T ∗ + (1 − 1m

)T ∗

= (2 − 1m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 9 / 21

Page 19: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

LS (List-Scheduling) Algorithm (JH 4.2.1.4)▶ Online scheduling▶ Assign job to the least heavily loaded

msi ≤∑

j

pj

si ≤ 1m

∑j

pj ≤ T ∗

T = si + pi

≤ T ∗ + T ∗

= 2T ∗

msi ≤∑j ̸=i

pj

si ≤ 1m

∑j

pj − 1m

pi

T = si + pi

≤ 1m

∑j

pj + (1 − 1m

)pi

≤ T ∗ + (1 − 1m

)T ∗

= (2 − 1m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 9 / 21

Page 20: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

LS (List-Scheduling) Algorithm (JH 4.2.1.4)▶ Online scheduling▶ Assign job to the least heavily loaded

msi ≤∑

j

pj

si ≤ 1m

∑j

pj ≤ T ∗

T = si + pi

≤ T ∗ + T ∗

= 2T ∗

msi ≤∑j ̸=i

pj

si ≤ 1m

∑j

pj − 1m

pi

T = si + pi

≤ 1m

∑j

pj + (1 − 1m

)pi

≤ T ∗ + (1 − 1m

)T ∗

= (2 − 1m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 9 / 21

Page 21: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

LS (List-Scheduling) Algorithm (JH 4.2.1.4)▶ Online scheduling▶ Assign job to the least heavily loaded

msi ≤∑

j

pj

si ≤ 1m

∑j

pj ≤ T ∗

T = si + pi

≤ T ∗ + T ∗

= 2T ∗

msi ≤∑j ̸=i

pj

si ≤ 1m

∑j

pj − 1m

pi

T = si + pi

≤ 1m

∑j

pj + (1 − 1m

)pi

≤ T ∗ + (1 − 1m

)T ∗

= (2 − 1m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 9 / 21

Page 22: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(2 − 1m

) is tight

T

T ∗ = 2 − 1m

= 2m − 1m

n jobs ={

pi = 1︸ ︷︷ ︸#=m(m−1)

, pi = m︸ ︷︷ ︸#=1

}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 10 / 21

Page 23: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(2 − 1m

) is tight

T

T ∗ = 2 − 1m

= 2m − 1m

n jobs ={

pi = 1︸ ︷︷ ︸#=m(m−1)

, pi = m︸ ︷︷ ︸#=1

}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 10 / 21

Page 24: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(2 − 1m

) is tight

T

T ∗ = 2 − 1m

= 2m − 1m

n jobs ={

pi = 1︸ ︷︷ ︸#=m(m−1)

, pi = m︸ ︷︷ ︸#=1

}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 10 / 21

Page 25: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Longest Processing Time (LPT) Rule (JH 4.2.1.5)▶ Sorting non-increasingly▶ Assign job to the least heavily loaded

T = si + pi

si ≤ T ∗

si ≤ 1m

∑j

pj − 1m

pipi ≤ T ∗

∣∣∣Mi

∣∣∣ ≥ 2 =⇒ pi ≤ 12

T ∗ (Ji is on Mi)

T = si + pi ≤ 1m

∑j

pj + (1 − 1m

)pi ≤ (32

− 12m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 11 / 21

Page 26: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Longest Processing Time (LPT) Rule (JH 4.2.1.5)▶ Sorting non-increasingly▶ Assign job to the least heavily loaded

T = si + pi

si ≤ T ∗

si ≤ 1m

∑j

pj − 1m

pipi ≤ T ∗

∣∣∣Mi

∣∣∣ ≥ 2 =⇒ pi ≤ 12

T ∗ (Ji is on Mi)

T = si + pi ≤ 1m

∑j

pj + (1 − 1m

)pi ≤ (32

− 12m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 11 / 21

Page 27: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Longest Processing Time (LPT) Rule (JH 4.2.1.5)▶ Sorting non-increasingly▶ Assign job to the least heavily loaded

T = si + pi

si ≤ T ∗

si ≤ 1m

∑j

pj − 1m

pipi ≤ T ∗

∣∣∣Mi

∣∣∣ ≥ 2 =⇒ pi ≤ 12

T ∗ (Ji is on Mi)

T = si + pi ≤ 1m

∑j

pj + (1 − 1m

)pi ≤ (32

− 12m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 11 / 21

Page 28: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Longest Processing Time (LPT) Rule (JH 4.2.1.5)▶ Sorting non-increasingly▶ Assign job to the least heavily loaded

T = si + pi

si ≤ T ∗

si ≤ 1m

∑j

pj − 1m

pipi ≤ T ∗

∣∣∣Mi

∣∣∣ ≥ 2 =⇒ pi ≤ 12

T ∗ (Ji is on Mi)

T = si + pi ≤ 1m

∑j

pj + (1 − 1m

)pi ≤ (32

− 12m

)T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 11 / 21

Page 29: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

T = si + pi ≤ 1m

∑j

pj + (1 − 1m

)pi ≤ 43

− 13m

p1 ≥ · · · ≥ pi ≥ · · · ≥ pn

CASE pi ≤ 13T ∗:

T ≤ (43

− 13m

)T ∗

CASE pi > 13T ∗:

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 12 / 21

Page 30: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

T = si + pi ≤ 1m

∑j

pj + (1 − 1m

)pi ≤ 43

− 13m

p1 ≥ · · · ≥ pi ≥ · · · ≥ pn

CASE pi ≤ 13T ∗:

T ≤ (43

− 13m

)T ∗

CASE pi > 13T ∗:

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 12 / 21

Page 31: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 32: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 33: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 34: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 35: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 36: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 37: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

CASE pi > 13T ∗:

Consider p1 ≥ · · · ≥ pi >13

T ∗

Upper bound for T

T ∗ (T unchanged; T ∗ not smaller)

We show that T = T ∗.

∀i :∣∣∣Mi

∣∣∣ ≤ 2

n = 2m − h

J1, J2, · · · , Jh, Jh+1, Jh+2, · · · , Jn−1, Jn

J1, J2, · · · , Jh, (Jh+1, Jn), (Jh+2, Jn−1), · · ·

By Exchange Argument.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 13 / 21

Page 38: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(43

− 13m

) is tight

43

− 13m

= 4m − 13m

n = 2m + 1

J = {2m − 1, 2m − 1, . . . , m + 1, m + 1, m, m, m}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 14 / 21

Page 39: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(43

− 13m

) is tight

43

− 13m

= 4m − 13m

n = 2m + 1

J = {2m − 1, 2m − 1, . . . , m + 1, m + 1, m, m, m}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 14 / 21

Page 40: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

(43

− 13m

) is tight

43

− 13m

= 4m − 13m

n = 2m + 1

J = {2m − 1, 2m − 1, . . . , m + 1, m + 1, m, m, m}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 14 / 21

Page 41: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Definition (3-Partition)Instance:

A ⊆ Z+,∣∣A∣∣ = 3m

B ∈ Z+

∀a ∈ A : B/4 < a < B/2

Question: Can A be partitioned into m disjoint sets S1, . . . , Sm:

∀1 ≤ i ≤ m :∑a∈Si

a = B

A ={1, 2, 2, 3, 3, 4, 6, 7, 8

}, m = 3, B = 12{

1, 3, 8; 2, 4, 6; 2, 3, 7}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 15 / 21

Page 42: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Definition (3-Partition)Instance:

A ⊆ Z+,∣∣A∣∣ = 3m

B ∈ Z+

∀a ∈ A : B/4 < a < B/2

Question: Can A be partitioned into m disjoint sets S1, . . . , Sm:

∀1 ≤ i ≤ m :∑a∈Si

a = B

A ={1, 2, 2, 3, 3, 4, 6, 7, 8

}, m = 3, B = 12{

1, 3, 8; 2, 4, 6; 2, 3, 7}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 15 / 21

Page 43: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

3-Partition ≤p MS

MS : (J, m, t)

3-Partition : (A, B)

m = m, t = B

MS is strongly NP-complete

MS with (maxj

pj) ≤ q(n) is still NP-complete

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 16 / 21

Page 44: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

3-Partition ≤p MS

MS : (J, m, t)

3-Partition : (A, B)

m = m, t = B

MS is strongly NP-complete

MS with (maxj

pj) ≤ q(n) is still NP-complete

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 16 / 21

Page 45: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

3-Partition ≤p MS

MS : (J, m, t)

3-Partition : (A, B)

m = m, t = B

MS is strongly NP-complete

MS with (maxj

pj) ≤ q(n) is still NP-complete

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 16 / 21

Page 46: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

3-Partition ≤p MS

MS : (J, m, t)

3-Partition : (A, B)

m = m, t = B

MS is strongly NP-complete

MS with (maxj

pj) ≤ q(n) is still NP-complete

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 16 / 21

Page 47: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

3-Partition ≤p MS

MS : (J, m, t)

3-Partition : (A, B)

m = m, t = B

MS is strongly NP-complete

MS with (maxj

pj) ≤ q(n) is still NP-complete

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 16 / 21

Page 48: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

3-Partition ≤p MS

MS : (J, m, t)

3-Partition : (A, B)

m = m, t = B

MS is strongly NP-complete

MS with (maxj

pj) ≤ q(n) is still NP-complete

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 16 / 21

Page 49: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 50: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 51: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 52: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 53: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 54: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 55: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12

T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 56: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Theorem (MS ∈ PTAS \ FPTAS)No FPTAS for MS.

∃FPTAS for MS =⇒ MS ∈ P

Aϵ : ϵ = 1⌈2nq(n)⌉

Time: Poly(1ϵ

, n) = Poly(⌈2nq(n)⌉, n) = Poly(n)

T ≤ (1 + ϵ)T ∗ = T ∗ + ϵ · T ∗

≤ T ∗ + 1⌈2nq(n)⌉

· nq(n)

≤ T ∗ + 12T = T ∗

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 17 / 21

Page 57: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

TSP: worst-case complexity vs. inapproximability according toinstances

▶ TSP ∈ Exp-APX \ Poly-APX▶ ∆-TSP ∈ APX▶ Euclidean TSP ∈ PTAS

Reference▶ “Stability of Approximation Algorithms for Hard Optimization

Problems” by Juraj Hromkovič, 1999.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 18 / 21

Page 58: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Distance function (JH 4.2.3.3)

distk(G, c) =

max{

0, max{

c({u, v})∑mi=1 c({pi, pi+1})

− 1∣∣|u = p1 ; v = pm| ≤ k

}}

enumerate: k = n13

shortest paths of length ≤ k (Bellman-Ford)

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 19 / 21

Page 59: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

hindex (JH 4.2.3.4)

hindex: using canonical order

|Ballr,hindex(LI)| < ∞

δr,ϵ = max {RA(x) : x ∈ Ballr,hindex(LI)}

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 20 / 21

Page 60: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

h (JH 4.2.3.5)▶ h: infinite jumps▶ δ-approx. algorithm A for U is stable according to h

TSP U : (G, 1)

Multi-TSP U : (G, k)

h(G, k) = k − 1

A is δ-approx. for (G, 1) =⇒ A is rδ-approx. for (G, r ∈ N)

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 21 / 21

Page 61: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 21 / 21

Page 62: 4-12 Approximation Algorithms - cslabcms.nju.edu.cncslabcms.nju.edu.cn/problem_solving/images/1/19/4-12-approximation-algorithms.pdf........................................ (if P ̸=

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Office 302Mailbox: H016

[email protected]

Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 21 / 21