chapter 6. relaxation (1) superstring ding-zhu du
TRANSCRIPT
What’s relaxation?
Min f(x)
x*
xA
f(x*) < opt = min f(x) < f(xA)
x in Ω
x in Ω
opt
xfxf
opt
optxf
opt
xf AAA *)()(1
)(1
)(
What’s relaxation?
max f(x)
x*
xA
f(x*) < opt = max f(x) < f(xA)
x in Ω
x in Ω
)*)(
)(*)(1/(1
))(*)(
1/(1))(
1/(1)(
xf
xfxf
opt
xfxf
opt
xfopt
xf
opt
A
AA
A
Traveling Salesman Problem
tour spanning graph minimum spanning graph = minimum spanning tree tour
relaxed
add 0.5 opt
So, the p.r. = 1.5
(Given a distance table for a complete graph)
Directed TSP with triangular inequality
Directed tour 1-factor (assignment) minimum assignment directed tour
relaxed
a directed tour connecting all cyclesin 1-factor
(Given a distance table for a complete digraph without loop)
TSP in Digraph
Superstring
Given n strings s1, …, sn, find a shortest string scontaining every si as a substring.
ov(s1,s2) = maximum overlapping of s1 and s2
s1 = suf(s1,s2) ov(s1,s2)
ov(s1,s2)suf(s1,s2)
s1
s2
Superstring Directed TSP
vertices: s1, …, sn, sn+1 = ε
distance: d(s1,s2) = |suf(si,sj)|
r1 r2 rt=sn+1=ε
Minimum assignment:
c1 c2 ct
d(ci) = total distance of cycle ci.
cycle (r1,r2, …, rt)
d(cycle (r1,r2, …, rt))= d(r1,r2) + ··· + d(rt-2,rt-1) + d(rt-1,rt) + d(rt,r1)= |suf(r1,r2)| + ··· + |suf(rt-2,rt-1)| + |rt-1|= superstring <r1,r2,…,rt-1>
= Σ |ri| - |ov(r1,r2)| - ··· - |ov(rt-2,rt-1)|
<r1,r2, …, rt-1>r1
r2
rt-1
ov(r1,r2)
< 2(|ov(r1,r2)| + ··· + |ov(rt-2,rt-1)|)
assume <r1*,r2*, …, r(t-1)*> is opt superstring
<r1,r2, …, rt-1> is obtained by Greedy Algorithm on overlapping:
+ 0.5(|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|)< opt
|<r1,r2, …, rt-1>|
|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|
Greedy Algorithm
S ← {s1, …, sn},
while |S| > 1 do
choose s and s’ from S to maximize |ov(s,s’)|and set S ← (S – {s,s’}) U {suf(s,s’)s’},
output unique string in S.
|<r1,r2, …, rt-1>|
= Σ |ri| - |ov(r1,r2)| - ··· - |ov(rt-2,rt-1)|
< Σ |ri| - 0.5(|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|)
+ 0.5(|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|)
< |<r1*,r2*, …, r(t-1)*>|
+ 0.5(|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|)
< opt (opt superstring for s1, …, sn)
Lemma. |ov(ri,rj)| < d(ci) + d(cj)
If it is true, then
|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|< 2 Σ d(ci) < 2 opt
Therefore, we obtain a 3-approximation:
3-approximation
Step 1. Compute a minimum assignment {c1, …, ct}.
Step 2. Choose a vertex ri from ci. But, ct = sn+1=ε
Step 3. Find an ordering (r1, …, rt-1) by greedy algorithm on overlapping.
Step 4. Merging c1, …, ct into a Hamiltonian cycle based on the ordering (r1, …, rt-1, rt).
Lemma. |ov(ri,rj)| < d(ci) + d(cj)
Proof Assume |ov(ri,rj)| > d(ci) + d(cj).
We want to show ρ(ci) = ρ(cj)
where ρ(c) is a root of c.
Root
For a nonempty string x, ρ(x) is the shortest string y such that
x = y m
for some integer m > 0.
For a set c of strings, ρ(c) is a string y such that every
string in c is a substring of y for some m.m
Property of nonempty string root
uv = vu ρ(u) =ρ(v)
Proof. (by induction on |uv|)
Case 1. |u| = |v|. We have u = v.
Case 2. |u| > |v|. Then u = vw.
So, vwv = vvw. Hence, wv = vw.
Since v ≠ ε, |wv| < |uv|.
By induction hypothesis, ρ(w)=ρ(v).Hence, ρ(u) = ρ(vw) = ρ(v).
1st Property of ρ(c) for string set c
There exists a cycle c’ connecting all strings in cSuch that d(c’) = |ρ(c)|.
ρ(c) ρ(c)
s1
s2
s3
d(s1,s2)
d(s2,s3)
s1d(s3,s1)
2nd Property of ρ(c) for string set c
For any permutation (s1, …, sk) of strings in c,
suf(s1, s2) suf(s2, s3) ··· suf(sk-1, sk)suf(sk, s1)
is a ρ(c).
s1
s2
s3
s1
3rd Property of ρ(c) for string set c
Any substring of ρ(c)ρ(c) with length |ρ(c)| is a root of c.
ρ(c) ρ(c)
|ρ(c)|
Lemma. |ov(ri,rj)| < d(ci) + d(cj)
Proof Assume |ov(ri,rj)| > d(ci) + d(cj).
We want to show ρ(ci) = ρ(cj)
If this is true, then cycles ci and cj can be merged
Into one c with ρ(c) = ρ(ci) = ρ(cj), Contradicting the minimum of assignment.
Lemma. |ov(ri,rj)| < d(ci) + d(cj)
Proof Assume |ov(ri,rj)| > d(ci) + d(cj).
We want to show ρ(ci) = ρ(cj)
ri
rj
d(cj) d(ci)
d(cj)d(ci)
u
v u
v
uv = vu !
Thanks, End