. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Approximation Algorithms Hengfeng Wei [email protected] June 03, 2019 Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 1 / 21
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
4-12 Approximation Algorithms
Hengfeng Wei
June 03, 2019
Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 1 / 21
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 2 / 21
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 3 / 21
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
(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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
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
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 21 / 21
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Office 302Mailbox: H016
Hengfeng Wei ([email protected]) 4-12 Approximation Algorithms June 03, 2019 21 / 21