1 / 28

Chapter 6. Relaxation

Chapter 6. Relaxation. I. Superstring. restriction. f ( y *) = min f ( y ). f ( x *) = min f ( x ). y in Γ. x in Ω. Ω. x *. y *. Γ. y. Relaxation. x A. x *. . x*. Min f(x). x in Ω. x A. f ( x* ) < opt = min f ( x ) < f ( x A ). x in Ω.

nadda
Download Presentation

Chapter 6. Relaxation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 6. Relaxation I. Superstring

  2. restriction f(y*) = min f(y) f(x*) = min f(x) y in Γ x in Ω Ω x* y* Γ y

  3. Relaxation xA x*  x* Min f(x) x in Ω xA f(x*) <opt = min f(x) <f(xA) x in Ω

  4. Relaxation (for max problems) x* max f(x) x in Ω xA f(x*) >opt = max f(x) >f(xA) x in Ω

  5. Relaxation vs. Restriction • In relaxation, we compute the optimal sol. A in the relaxed form, and then modify it to get an approx. sol. A’. (Modification is part of the algorithm.) • In restriction, we compute the optimal sol. A in the restricted form, and use it as an approx. sol. (The modification from the real opt. sol. A* to the restricted form is for analysis only.)

  6. Traveling Salesman Problem (Given a distance table for a complete graph) relaxed TSP tour  spanning graph  minimum spanning graph = minimum spanning tree  tour add 0.5 opt So, the p.r. = 1.5 (If satisfying  inequality)

  7. Matching Shortcut MST

  8. Max (Directed) HC (Given a distance table for a complete (di)graph) relaxed HC  Two or three independent matchings  maximum matching  HC a HC connecting all edges of the matching P.r. =3: The maximum matching is at least 1/3 of HC. (For Max-DHC, this is as good as the greedy algorithm.)

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

  10. Assignment: Collection of disjoint cycles that cover all vertices. • Minimum Assignment A (as min matching) can be found in polynomial time. • Modification: Find a cycle C over one vertex of each cycle of A. Then, form a TSP. • Cost <w(A) + w(C) = O(opt), if w(C) = O(opt), or if C is a linear approx to DTSP ?

  11. TSP from Min Assignment

  12. Superstring Given n strings s1, …, sn, find a shortest string s containing every si as a substring. ov(s1,s2) = maximum overlapping of s1 and s2 s1 = pref(s1,s2) ov(s1,s2) s1 pref(s1,s2) ov(s1,s2) s2

  13. Superstring Directed TSP Vertices: s1, …, sn, sn+1 = ε Distance: d(si,sj) = |pref(si,sj)| Minimum assignment: r1 r2 rt=sn+1=ε ct c1 c2 d(ci) = total distance of cycle ci.

  14. cycle (r1,r2, …, rt) d(cycle (r1,r2, …, rt)) = d(r1,r2) + ··· + d(rt-2,rt-1) + d(rt-1,rt) + d(rt,r1) = |pref(r1,r2)| + ··· + |pref(rt-2,rt-1)| + |rt-1| + 0 = |superstring <r1,r2,…,rt-1>| = Σ |ri| - |ov(r1,r2)| - ··· - |ov(rt-2,rt-1)|

  15. <r1,r2, …, rt-1> r1 ov(r1,r2) r2 rt-1

  16. Assume <r1*,r2*, …, r(t-1)*> is opt superstring and<r1,r2, …, rt-1> is obtained by greedy Algorithm on overlapping. |ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)| < 2(|ov(r1,r2)| + ··· + |ov(rt-2,rt-1)|) (from Chapter 2, by quadrilateral condition)

  17. 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 {pref(s,s’)s’}, output unique string in S.

  18. |<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)*)|) < |<r1*,r2*, …, r(t-1)*>| + 0.5(|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|) < opt (opt superstring for s1, …, sn) + 0.5(|ov(r1*,r2*)| + ··· + |ov(r(t-2)*,r(t-1)*)|)

  19. 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:

  20. 3-Approximation Algorithm Step 1. Compute a minimum assignment {c1, …, ct}. Step 2. Choose a vertex ri from ci, with rn+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).

  21. Lemma. |ov(ri,rj)| < d(ci) + d(cj) Proof |ov(ri,rj)| > d(ci) + d(cj). Assume We want to show ρ(ci) = ρ(cj) where ρ(c) is a root of c.

  22. Root For a nonempty string x, ρ(x) is the shortest string y such that m x = y for some integer m > 0. For a setc of strings, ρ(c) is a string y such that every string in c is a substring of y for some m. m

  23. Property of roots (u, v nonempty) ρ(u) =ρ(v) uv = vu 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).

  24. Property I of ρ(c) for string set c There exists a cycle c’ connecting all strings in c such that d(c’) = |ρ(c)|. ρ(c) ρ(c) s1 d(s1,s2) s2 d(s2,s3) s3 d(s3,s1) s1 We may assume all si start in the first copy of (c), then use this ordering to define c'.

  25. Property II of ρ(c) for string set c For any permutation (s1, …, sk) of strings in c, pref(s1, s2) pref(s2, s3) ··· pref(sk-1, sk)pref(sk, s1) is a ρ(c). s1 s2 s3 s1

  26. Property III of ρ(c) for string set c Any substring of ρ(c)ρ(c), with length |ρ(c)|, is a root of c. ρ(c) ρ(c) |ρ(c)|

  27. 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.

  28. |ov(ri,rj)| > d(ci) + d(cj). Proof Assume Define u =prefix of ov(ri, rj) of length d(ci) v =prefix of ov(ri, rj) of length d(cj) ri u v d(ci) d(cj) v u rj d(cj) d(ci) Note: u has length d(ci) and so ov(ri, rj)= u u … = v v … uv = vu ρ(ci) = ρ(cj)

More Related