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

Slides:



Advertisements
Similar presentations
Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Advertisements

Set Cover 資工碩一 簡裕峰. Set Cover Problem 2.1 (Set Cover) Given a universe U of n elements, a collection of subsets of U, S ={S 1,…,S k }, and a cost.
* Bellman-Ford: single-source shortest distance * O(VE) for graphs with negative edges * Detects negative weight cycles * Floyd-Warshall: All pairs shortest.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Approximation Algorithms for TSP
Graph Traversals Visit vertices of a graph G to determine some property: Is G connected? Is there a path from vertex a to vertex b? Does G have a cycle?
1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA.
Combinatorial Algorithms
Lecture 21 Approximation Algorithms Introduction.
Chapter 10 Complexity of Approximation (1) L-Reduction Ding-Zhu Du.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Great Theoretical Ideas in Computer Science.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Jim Anderson Comp 122, Fall 2003 Single-source SPs - 1 Chapter 24: Single-Source Shortest Paths Given: A single source vertex in a weighted, directed graph.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Coloring Algorithms and Networks. Coloring2 Graph coloring Vertex coloring: –Function f: V  C, such that for all {v,w}  E: f(v)  f(w) Chromatic number.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Assignment 4. (Due on Dec 2. 2:30 p.m.) This time, Prof. Yao and I can explain the questions, but we will NOT tell you how to solve the problems. Question.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
TECH Computer Science Graph Optimization Problems and Greedy Algorithms Greedy Algorithms  // Make the best choice now! Optimization Problems  Minimizing.
9/10/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 8 Greedy Graph.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
5. 最短路問題 Shortest Path Problem Problem Definition(1) Given : digraph G=(V, A) w:A →R (length w(a) of each arc a) W=(a 1, a 2, … a k ): a directed walk.
5.4 Shortest-path problem  Let G=(V,E,w) be a weighted connected simple graph, w is a function from edges set E to position real numbers set. We denoted.
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
1 A -Approximation Algorithm for Shortest Superstring Speaker: Chuang-Chieh Lin Advisor: R. C. T. Lee National Chi-Nan University Sweedyk, Z. SIAM Journal.
1 Combinatorial Algorithms Parametric Pruning. 2 Metric k-center Given a complete undirected graph G = (V, E) with nonnegative edge costs satisfying the.
Chapter 6: Geometric Analysis: The Gap Property By azam sadeghian 1.
Chapter 2 Greedy Strategy I. Independent System Ding-Zhu Du.
Chapter 24: Single-Source Shortest Paths Given: A single source vertex in a weighted, directed graph. Want to compute a shortest path for each possible.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
Master Method (4. 3) Recurrent formula T(n) = a  T(n/b) + f(n) 1) if for some  > 0 then 2) if then 3) if for some  > 0 and a  f(n/b)  c  f(n) for.
Introduction to Algorithms Jiafen Liu Sept
CSE 2331 / 5331 Topic 12: Shortest Path Basics Dijkstra Algorithm Relaxation Bellman-Ford Alg.
Introduction to Graph Theory
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Approximation Algorithms Greedy Strategies. I hear, I forget. I learn, I remember. I do, I understand! 2 Max and Min  min f is equivalent to max –f.
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
Trees.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Design and Analysis of Approximation Algorithms
Proof technique (pigeonhole principle)
Lecture 2-2 NP Class.
Richard Anderson Lecture 26 NP-Completeness
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Advanced Algorithms Analysis and Design
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Chapter 5. Optimal Matchings
Lecture 5 NP Class.
Graph Algorithms Using Depth First Search
Autumn 2016 Lecture 11 Minimum Spanning Trees (Part II)
Approximation Algorithms for TSP
Lecture 24 NP-Complete Problems
Autumn 2015 Lecture 11 Minimum Spanning Trees (Part II)
Approximation Algorithms
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Lecture 24 Vertex Cover and Hamiltonian Cycle
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

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

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

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

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 cycles in 1-factor (Given a distance table for a complete digraph without loop)

TSP in Digraph

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

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.

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

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

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

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.

| | = Σ |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 )

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:

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

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.

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

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 )

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

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

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.

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 !

Thanks, End