Haitao Wang Utah State University WADS 2017, St. John’s, Canada

Slides:



Advertisements
Similar presentations
Triangle partition problem Jian Li Sep,2005.  Proposed by Redstar in Algorithm board in Fudan BBS.  Motivated by some network design strategy.
Advertisements

 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Data Structures Using C++
Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.
Sequential Timing Optimization. Long path timing constraints Data must not reach destination FF too late s i + d(i,j) + T setup  s j + P s i s j d(i,j)
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Chapter 3 The Greedy Method 3.
1 Reduction between Transitive Closure & Boolean Matrix Multiplication Presented by Rotem Mairon.
1 Processing & Analysis of Geometric Shapes Shortest path problems Shortest path problems The discrete way © Alexander & Michael Bronstein, ©
Data Transmission and Base Station Placement for Optimizing Network Lifetime. E. Arkin, V. Polishchuk, A. Efrat, S. Ramasubramanian,V. PolishchukA. EfratS.
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
Chapter 9 Graph algorithms. Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
Vertex Cover, Dominating set, Clique, Independent set
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Algorithms All pairs shortest path
Tirgul 13. Unweighted Graphs Wishful Thinking – you decide to go to work on your sun-tan in ‘ Hatzuk ’ beach in Tel-Aviv. Therefore, you take your swimming.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
1 Shortest Path Calculations in Graphs Prof. S. M. Lee Department of Computer Science.
The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each decision is locally optimal. These.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Chapter 5 Dynamic Programming 2001 년 5 월 24 일 충북대학교 알고리즘연구실.
Chapter 2 Graph Algorithms.
© 2015 JW Ryder CSCI 203 Data Structures1. © 2015 JW Ryder CSCI 203 Data Structures2.
The Lower Bounds of Problems
Minimum weight spanning trees
Spectral Sequencing Based on Graph Distance Rong Liu, Hao Zhang, Oliver van Kaick {lrong, haoz, cs.sfu.ca {lrong, haoz, cs.sfu.ca.
Graph Theory. undirected graph node: a, b, c, d, e, f edge: (a, b), (a, c), (b, c), (b, e), (c, d), (c, f), (d, e), (d, f), (e, f) subgraph.
Introduction to NP Instructor: Neelima Gupta 1.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
1 Approximation Algorithms for Low- Distortion Embeddings into Low- Dimensional Spaces Badoiu et al. (SODA 2005) Presented by: Ethan Phelps-Goodman Atri.
The Theory of NP-Completeness
Vishwani D. Agrawal James J. Danaher Professor
Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by recurrences with overlapping subproblems.
Chapter 8 Dynamic Programming
Vertex Cover, Dominating set, Clique, Independent set
Chapter 5. Optimal Matchings
Planarity Testing.
Graphs & Graph Algorithms 2
Bart M. P. Jansen June 3rd 2016, Algorithms for Optimization Problems
Applied Combinatorics, 4th Ed. Alan Tucker
Quickest Visibility Queries in Polygonal Domains
Analysis of Algorithms
Covering Uncertain Points in a Tree
On the Geodesic Centers of Polygonal Domains
Minimizing the Aggregate Movements for Interval Coverage
3. Brute Force Selection sort Brute-Force string matching
Processing an Offline Insertion-Query Sequence with Applications
An O(n log n)-Time Algorithm for the k-Center Problem in Trees
Optimal Point Movement for Covering Circular Regions
Range Queries on Uncertain Data
Danny Z. Chen1, Yan Gu2, Jian Li2, and Haitao Wang1
Aggregate-Max Nearest Neighbor Searching in the Plane
Danny Z. Chen and Haitao Wang University of Notre Dame Indiana, USA
Haitao Wang Utah State University SoCG 2017, Brisbane, Australia
Danny Z. Chen and Haitao Wang University of Notre Dame Indiana, USA
CSE 373: Data Structures and Algorithms
Computing Shortest Paths among Curved Obstacles in the Plane
Visibility and Ray Shooting Queries in Polygonal Domains
Weak Visibility Queries of Line Segments in Simple Polygons
Lecture 19 Linear Program
The Greedy Approach Young CS 530 Adv. Algo. Greedy.
Chapter 9 Graph algorithms
Analysis of Algorithms
INTRODUCTION A graph G=(V,E) consists of a finite non empty set of vertices V , and a finite set of edges E which connect pairs of vertices .
Data Structures and Algorithms
Presentation transcript:

Haitao Wang Utah State University WADS 2017, St. John’s, Canada An Improved Algorithm for Diameter-Optimally Augmenting Paths in a Metric Space Haitao Wang Utah State University WADS 2017, St. John’s, Canada

A path graph in a metric space P: a path graph of n vertices v1, v2, …, vn Each edge e(vi,vi+1) has a length |vivi+1| Assume all vertices are in a metric space Triangle inequality: |vivj| + |vjvk| ≤ |vivk|, for any three vertices vi, vj, vk What is the diameter of P? The length of the entire path between v1 and vn |v2v4| + |v4v6| ≤ |v2v6| v7 v1 v2 v6 v3 v5 v4

The diameter-optimally augmenting path problem Add an edge e(vi,vj) to connect two vertices vi and vj, so that the diameter of the resulting graph is minimized The length of the new edge is |vivj|, which can be obtained in O(1) time What is the diameter of the new graph? Previous work O(n log3 n) time, Große et al., ICALP 2015 Our result O(n log n) time v7 v1 v2 v6 v3 v5 v4

Related work If P is in the Euclidean space Rd, for a constant d O(n+1/ε3) time to find a (1+ε)-approximate solution, Große et al., ICALP 2015 If P is in the Euclidean plane R2 O(n) time, De Carufel et al. SWAT 2016 to minimize the continuous diameter, defined with respect to all points of P, not just the vertices For a geometric tree T of n vertices embedded in the Euclidean plane R2 O(n log n) time for continuous diameter, De Carufel et al. WADS 2017 Our problem is for discrete diameter in a metric space

Overview of our approach λ*: the optimal objective value the diameter in an optimal solution The decision problem Given any value λ, determine whether λ ≥ λ*, determine whether we can add an edge to P so that the diameter is at most λ if yes, λ is called a feasible value Previous work: O(n log n) time, Große et al., ICALP 2015 Our result: O(n) time

Overview of our approach: solving the original optimization problem Goal: compute λ* Previous work: parametric search, O(n log3 n) time, Große et al., 2015 Our approach Identify a set S of candidate values that contains λ* λ* is the smallest feasible value of S Find λ* in S, e.g., sort S and then binary search using the decision algorithm Difficulty |S| = Ω(n2), cannot afford to compute S explicitly Our solution: Reduce the size of S in several steps Eventually |S| = O(n) and can be computed in O(n log n) time Each step takes O(n log n) time using our decision algorithm

The diameter of the new graph G(i,j): the new graph after adding e(vi,vj) to P C(i,j): the cycle of G(i,j) D(i,j): the diameter of G(i,j) α(i,j): the largest shortest path length from v1 to vk for all i ≤ k ≤ j β(i,j): the largest shortest path length from vn to vk for all i ≤ k ≤ j δ(i,j): the shortest path length between v1 and vn γ(i,j): the largest shortest path length between vl and vk for i ≤ l ≤ k ≤ j D(i,j) = max{α(i,j), β(i,j), δ(i,j), γ(i,j)} vn v1 vi vj

Computing α(i,j), β(i,j), γ(i,j), δ(i,j) With O(n) time preprocessing, for any (i,j) α(i,j) can be computed in O(log n) time β(i,j) can be computed in O(log n) time δ(i,j) can be computed in O(1) time How about γ(i,j)? γ(i,j) is the diameter of C(i,j) O(n) time, trivial but not good enough The main obstacle for solving the problem Call it “γ-computation difficulty” vn v1 vi vj

Solving the decision problem Given λ, determine whether λ is a feasible value Our approach For each 1 ≤ i ≤ n, determine whether there exists i ≤ j ≤ n, such that max{α(i,j), β(i,j), δ(i,j), γ(i,j)} ≤ λ

Notation Ii(α): the largest j such that α(i,j) ≤ λ Ii(β): the smallest j such that β(i,j) ≤ λ Ii(δ): the smallest j such that δ(i,j) ≤ λ Ii(γ): the largest j such that γ(i,j) ≤ λ β(i,j) δ(i,j) α(i,j) γ(i,j) λ λ j j Ii(β) Ii(α) Ii(δ) Ii(γ)

Solving the decision problem For each i, determine whether there exists i ≤ j ≤ n, such that max{α(i,j), β(i,j), δ(i,j), γ(i,j)} ≤ λ This is true iff there is a vertical line whose intersections with all four functions are below the horizontal line at λ which is true iff [1, Ii(α)]∩[Ii(β), n] ∩[Ii(δ),n] ∩[1,Ii(γ)] ≠ ∅ Computing Ii(α), Ii(β), Ii(δ) for all 1 ≤ i ≤ n can be done in O(n) time This is not true for Ii(γ) due to the γ-computation difficulty λ Ii(β) j Ii(α)

Our algorithm Compute [1, Ii(α)], [Ii(β), n],[Ii(δ),n] for all 1 ≤ i ≤ n For each i, Whether Qi = [1, Ii(α)]∩[Ii(β), n] ∩[Ii(δ),n] ∩[1,Ii(γ)] is empty? If [1, Ii(α)]∩[Ii(β), n]∩[Ii(δ),n] = ∅, then Qi is empty Else ai: the smallest index in [1, Ii(α)]∩[Ii(β), n]∩[Ii(δ),n] Observation: Qi is not empty iff γ(i,ai) ≤ λ How to determine whether γ(i,ai) ≤ λ? Note: do not have to compute the exact value γ(i,ai) γ(i,j) λ j ai Ii(γ)

Determine whether γ(i,ai) ≤ λ d(vk,vl): the shortest path length between vk and vl dP(vk,vl): the path length between vk and vl along P Determine whether the diameter of the cycle C(i,ai) is at most λ Whether d(vk,vl) ≤ λ, for all i ≤ k ≤ l ≤ ai A sub-problem: For each k, whether d(vk,vl) ≤ λ for all k ≤ l ≤ ai k’: the smallest index with dP(vk,vk’) > λ Observation: Only need to check whether the length of the path from k to k’ containing the new edge is at most λ Check whether dP(vk,vk’) ≥ |C(i,ai)| - λ Sufficient to find the index k with the smallest dP(vk,vk’) O(1) time by a range-minima data structure Total time for the decision problem: O(n) λ i k k’ ai

The optimization problem Goal: compute λ*

The candidate sets D(i,j) = max{α(i,j), β(i,j), δ(i,j), γ(i,j)} Sα = {α(i,j) | 1 ≤ i ≤ j ≤ n} Define Sβ, Sδ, Sγ similarly S = the union of the above four sets λ* must be in S λ* is the smallest feasible value of S |S| = Ω(n2), too large to compute Our solution: Reduce the size of S in several steps Eventually |S| = O(n) and can be computed in O(n log n) time

Defining λα, λβ, λδ, λγ S = Sα ∪ Sβ ∪ Sδ ∪ Sγ λα: the smallest feasible value of Sα Define λβ, λδ, λγ similarly λ* = min{λα, λβ, λδ, λγ} How to compute λα, λβ, λδ, λγ? The values of Sα can be organized into a sorted matrix so that each element can be computed in O(log n) time λα can be computed in O(n log n) time By a sorted matrix searching technique Using our decision algorithm This is also true for λβ and λδ, but not for λγ due to the γ-computation difficulty S = Sα ∪ Sβ ∪ Sδ ∪ Sγ

Computing λγ λ’ = min{λα, λβ, λδ} Assumption: λγ < λ’ λ*= λγ

Notation Ii(α): the largest j such that α(i,j) ≤ λ Ii(β): the smallest j such that β(i,j) ≤ λ Ii(δ): the smallest j such that δ(i,j) ≤ λ Ii(γ): the largest j such that γ(i,j) ≤ λ β(i,j) δ(i,j) α(i,j) γ(i,j) λ λ j j Ii(β) Ii(α) Ii(δ) Ii(γ)

Define similar notation with respect to “< λ’” I’i(α): the largest j such that α(i,j) < λ’ I’i(β): the smallest j such that β(i,j) < λ’ I’i(δ): the smallest j such that δ(i,j) < λ’ I’i(γ): the largest j such that γ(i,j) < λ’ Computing I’i(α), I’i(β), I’i(δ) for all 1 ≤ i ≤ n can be done in O(n log n) time Not true for I’i(γ) due to the γ-computation difficulty β(i,j) δ(i,j) α(i,j) γ(i,j) λ’ λ’ j j I’i(β) I’i(α) I’i(δ) I’i(γ)

A key observation Suppose e(i,j) is an optimal edge the edge added to P in an optimal solution λ*= λγ = D(i,j) ai: the smallest index in [1, I’i(α)]∩[I’i(β), n]∩[I’i(δ),n] Observation: j = ai Corollary: λγ is the smallest feasible value of S’={γ(i,ai)|1≤i≤ n} |S’| = O(n) Compute λγ in S’ Still cannot compute S’ in O(n log n) time due to the γ-computation difficulty Our solution: Follow the similar scheme as the decision algorithm Total time: O(n log n)

Thank you for your attention!