Download presentation

Presentation is loading. Please wait.

Published byCarmen Daykin Modified about 1 year ago

1
Chapter 6. Relaxation (1) Superstring Ding-Zhu Du

2
What’s relaxation? Min f(x) x* xAxA f(x*) < opt = min f(x) < f(x A ) x in Ω

3
What’s relaxation? max f(x) x* xAxA f(x*) < opt = max f(x) < f(x A ) x in Ω

4
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)

5
Directed TSP with triangular inequality Directed tour 1-factor (assignment) minimum assignment directed tour relaxed a directed tour connecting all cycles in 1-factor (Given a distance table for a complete digraph without loop)

6
TSP in Digraph

7
Superstring Given n strings s 1, …, s n, find a shortest string s containing every s i as a substring. ov(s 1,s 2 ) = maximum overlapping of s 1 and s 2 s 1 = suf(s 1,s 2 ) ov(s 1,s 2 ) ov(s 1,s 2 )suf(s 1,s 2 ) s1s1 s2s2

8
SuperstringDirected TSP vertices: s 1, …, s n, s n+1 = ε distance: d(s 1,s 2 ) = |suf(s i,s j )| r1r1 r2r2 r t =s n+1 =ε Minimum assignment: c1c1 c2c2 ctct d(c i ) = total distance of cycle c i.

9
cycle (r 1,r 2, …, r t ) d(cycle (r 1,r 2, …, r t )) = d(r 1,r 2 ) + ··· + d(r t-2,r t-1 ) + d(r t-1,r t ) + d(r t,r 1 ) = |suf(r 1,r 2 )| + ··· + |suf(r t-2,r t-1 )| + |r t-1 | = superstring = Σ |r i | - |ov(r 1,r 2 )| - ··· - |ov(r t-2,r t-1 )|

10
r1r1 r2r2 r t-1 ov(r 1,r 2 )

11
< 2(|ov(r 1,r 2 )| + ··· + |ov(r t-2,r t-1 )|) assume is opt superstring is obtained by Greedy Algorithm on overlapping: + 0.5(|ov(r 1*,r 2* )| + ··· + |ov(r (t-2)*,r (t-1)* )|)< opt | | |ov(r 1*,r 2* )| + ··· + |ov(r (t-2)*,r (t-1)* )|

12
Greedy Algorithm S ← {s 1, …, s n }, 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.

13
| | = Σ |r i | - |ov(r 1,r 2 )| - ··· - |ov(r t-2,r t-1 )| < Σ |r i | - 0.5(|ov(r 1*,r 2* )| + ··· + |ov(r (t-2)*,r (t-1)* )|) + 0.5(|ov(r 1*,r 2* )| + ··· + |ov(r (t-2)*,r (t-1)* )|) | + 0.5(|ov(r 1*,r 2* )| + ··· + |ov(r (t-2)*,r (t-1)* )|) < opt (opt superstring for s 1, …, s n )

14
Lemma. |ov(r i,r j )| < d(c i ) + d(c j ) If it is true, then |ov(r 1*,r 2* )| + ··· + |ov(r (t-2)*,r (t-1)* )| < 2 Σ d(c i ) < 2 opt Therefore, we obtain a 3-approximation:

15
3-approximation Step 1. Compute a minimum assignment {c 1, …, c t }. Step 2. Choose a vertex r i from c i. But, c t = s n+1 =ε Step 3. Find an ordering (r 1, …, r t-1 ) by greedy algorithm on overlapping. Step 4. Merging c 1, …, c t into a Hamiltonian cycle based on the ordering (r 1, …, r t-1, r t ).

16
Lemma. |ov(r i,r j )| < d(c i ) + d(c j ) ProofAssume |ov(r i,r j )| > d(c i ) + d(c j ). We want to show ρ(c i ) = ρ(c j ) where ρ(c) is a root of c.

17
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

18
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).

19
1 st Property of ρ(c) for string set c There exists a cycle c’ connecting all strings in c Such that d(c’) = |ρ(c)|. ρ(c) s1s1 s2s2 s3s3 d(s 1,s 2 ) d(s 2,s 3 ) s1s1 d(s 3,s 1 )

20
2 nd Property of ρ(c) for string set c For any permutation (s 1, …, s k ) of strings in c, suf(s 1, s 2 ) suf(s 2, s 3 ) ··· suf(s k-1, s k )suf(s k, s 1 ) is a ρ(c). s1s1 s2s2 s3s3 s1s1

21
3 rd Property of ρ(c) for string set c Any substring of ρ(c)ρ(c) with length |ρ(c)| is a root of c. ρ(c) |ρ(c)|

22
Lemma. |ov(r i,r j )| < d(c i ) + d(c j ) ProofAssume |ov(r i,r j )| > d(c i ) + d(c j ). We want to show ρ(c i ) = ρ(c j ) If this is true, then cycles c i and c j can be merged Into one c with ρ(c) = ρ(c i ) = ρ(c j ), Contradicting the minimum of assignment.

23
Lemma. |ov(r i,r j )| < d(c i ) + d(c j ) ProofAssume |ov(r i,r j )| > d(c i ) + d(c j ). We want to show ρ(c i ) = ρ(c j ) riri rjrj d(c j ) d(c i ) d(c j )d(c i ) u vu v uv = vu !

24
Thanks, End

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google