Approximation Algorithms for Low Distortion Embeddings into Low
Approximation Algorithms for Low. Distortion Embeddings into Low. Dimensional Spaces Badoiu et al. (SODA 2005) Presented by: Ethan Phelps-Goodman Atri Rudra 1
Moving from Seattle to NY n Looks like a 2 hr drive q n Looks like a 10 hr plane ride q n Contraction is bad Expansion is bad “Faithful” representation 2
Metric Spaces n n Set of points Distance function q q n Non-negative Triangle Inequality Metric Graph q q 1 2 3 6 5 5 weighted graph shortest path distance 3
Embeddings (Y, d 2(¢, ¢)) (X, d 1(¢, ¢)) n n Mapping : X! Y Exp( )=maxa, b 2 X d 2( (a), (b))/d 1(a, b) Contr( )=Exp( -1) Dist( )=Exp( ) with Contr( )¸ 1 4
Edge property n n Mapping from a unwt graph G=(V, E) Exp( )=max(x, y)2 E d 2(x’, y’) q q q Exp( )=maxx 2 V, y 2 V d 2(x’, y’)/d 1(x, y) ¸ is obvious x=v 1, v 2, , v. L=y be the shortest path in G n n maxi d 2(v’i, v’i+1)¸ 1/L¢ i d 2(v’i, v’i+1) The sum ¸ d 2(x’, y’) by triangle inequality 5
Embedding into a class of metrics n n n Pick an embedding Non-contractive Minimum distortion Embedding into specific Metric [KRS 04], [PS 05] 6
Previous work n n Start with a problem in some metric space Embed inputs into another “nice” metric q q n Combinatorial in nature q n Problem is easy to solve in the nice metric For e. g. , embed graphs into trees Try to upper bound the distortion Survey by Indyk D 7
Algorithmic Task n Find embedding with min possible distortion q q Don’t care about the value of distortion Recall the map example Embed unweighted graph into R (line) as well as possible 8
What is in store for you ? n Embed unwt graph ! Line n Hardness of the algorithmic Q Approx Algo for general unwt graph Approx Algo for unwt tree What else is there in the paper ? Open problems n n 9
Hardness of Approximation n n NP-Hard to a-approximate for some a>1 Reduction from TSP on (1, 2)-metric q q n All distances are in {1, 2} NP-Hard to a-approximate for any a <5381/5380 (X, D) ) G=(X, E) q D(u, v)=1 (u, v)2 E 10
Hardness of Approximation n TSP on (1, 2)-metric q q q Input M: - (V, D(¢, ¢)) Output: - Permutation of V which is a tour M G=(V, E) G x y D(x, y)=1 (x, y)2 E 11
The Construction G n n Given metric M G Make a copy of G called G’=(V’, E’) Add a special node o connected to V[ V’ The constrcuted graph H has diameter=2 12
Showing that it works n M has a tour of len t) H embeds into R with distr · t n Let the tour be v 1, v 2, , vn, v 1 q q Start with v 1 Lay out v 2, , vn according to their distances Put in o Lay out G’ in the same way as G Non-contractive Expansion=t v 1 0 v 2 vi vi+1 D(vi, vi+1) vn o 1 v’n R 1 13
The other direction n n f embeds H into R w/ distr s ) 9 tour in M of len ·s+1 Let u 1, , u 2 n be the ordering of V[ V’ by f q q Assume “nice” ordering |f(u 2 n)-f(u 1)|· 2 s (Wlog) blue box · (2 s-2)/2=s-1 Blue box gives a tour of length · (s-1)+2=s+1 ¸ 1 R f(u 1) f(u 2 n) 14
Getting a nice ordering n Total ‘span’ still · 2 s “Boundary” nodes are at distance ¸ 2 n Swap blue and green boxes n n q Total Span still · 2 s q Still non-contractive Keep on swapping till nice ordering is reached ¸ 2 R 15
What is in store for you ? n Embed unwt graph ! Line n Hardness of the algorithmic Q Approx Algo for general unwt graph Approx Algo for unwt tree What else is there in the paper ? Open problems n n 16
Embedding a tree into R n n Create an Eulerian tour Embed according to tour q q n n preserve order preserve distances No contraction Distortion · 2 n-1 17
Embedding general graphs n Every graph embeds into R w/ O(n) distortion q n Coming Soon: c-approx algo q n Use any spanning tree c is the value of the optimal distortion Combining both gives O(n 1/2)-approx q If c· n 1/2, c-approx algo works q If c> n 1/2, spanning tree algo works 18
c -approx algorithm n Embed G=(V, E) into R n Let f* be the optimal embedding Let t 1, t 2 be the ‘end-points’ of f* t 1=v 1, v 2, , v. L=t 2 shortest path V=V 1[ V 2 [ VL n n n q x closest to vi ) x 2 Vi 19
c -approx algo (contd. ) V 1 V 2 VL-1 Vi VL R |Vi| n q n |Vi| Embed Vi (i=1, L) by the spanning tree algo q n 2|Vi| Layout vi first Recall that the max span is · 2|Vi| Leave a gap of |Vi| on each side Run for all possible values of t 1 and t 2 20
Notations n n f* is the optimal embedding c is the optimal distortion f is the computed embedding D(¢, ¢) shortest path in G 21
Analysis V 1 Vi V 2 y x |Vi| n n n 2|V | 4|Vi | i |Vi| Clm 1: D(vi, x)· c/2 Clm 2: |Vi|+|Vi+1|+ +|Vi+c-1|· 2 c 2 f* has distortion c Clm 3: Embedding is non-contracting Will now show |f(x)-f(y)|· 16 c 2 q q n VL Vj R n VL-1 |i-j|· 2 c as D(vi, vj)· D(x, vi)+D(x, y)+D(y, v+j)· c/2+1+c/2 Span= 4¢[ (|Vi|+ +|Vi+c-1|) + (|Vi+c|+ +|Vj|) ] The constructed embedding has distortion O(c 2) 22
Non-contractive embedding V 1 Vi V 2 x y y VL-1 VL Vj R |Vi| n n 2|Vi| x, y 2 Vi x 2 Vi, y 2 Vj q |f(x)-f(y)|¸ |Vi| Should be |Vj|+1 (root goes first) + 2(|Vi+1|+ |Vj-1|) +|Vj| ¸ |Vi| + |j-i| ¸ D(x, vi) + D(vi, vj) ¸ D(x, y) + |Vj| + D(vj, y) 23
Proof of Clm 1 vj vi Vj+1 x R f*(vj) n f*(vi) f*(vj+1) 2¢ D(x, vi) · ? c q D(x, vi) + D(x, vi) · D(x, vj)+D(x, vj+1) · ( f*(vj) – f*(x) ) + ( f*(x) – f*(vj+1) = f*(vj) – f*(vj+1) ·c 24
Embedding Trees into the line n n n Problem: Given an unweighted tree that embeds into the line with distortion c, find the smallest distortion line embedding. They give (c logc)1/2 -approximation, Can also be stated as O((n logn)1/3)approximation: q q If c > n 2/3 then use simple spanning tree algorithm If c < n 2/3 then use this algorithm 25
Tree Embeddings n n Similar to previous algorithm Select endpoints & compute shortest path 26
Tree Embeddings n n Similar to previous algorithm Select endpoints & compute shortest path Group every c vertices Embed each component, then concatenate 27
Local Density n Define local density by q n Then c > . q q n = maxv, r (|B(v, r)|-1)/2 r. In max density ball, there are 2 r vertices, so end points of embedding have distance at least 2 r. But max distance is 2 r, so endpoints have distortion at least . Also, any component with diameter d has at most d vertices. 28
Component Embedding n n Note: only care about order of vertices. Distances computed from shortest path Want to embed in roughly depth-first order But don’t want neighbors too far away Algorithm alternates between laying out neighbors of previously visited vertices (BFS) and DFS. 29
Component Embedding in action Ci 30
Component embedding algorithm n n Magic number g(c)= 2 (clogc)1/2 + c Pick a leftmost vertex r Let Ci be vertices visited up to round i While there are unvisited vertices q q Visit all neighbors of Ci Visit next g(c) vertices in light-path DFS order 31
Bounding the distortion n Outline: q q Bound number of iterations Bound span of neighbor step Bound total distortion in component Bound distortion from concatenation 32
Number of iterations n n Diameter of tree is at most 2 c: So total # vertices is 2 c At least g(c) added at each iteration Number of iterations is (2 c )/g(c) (clog-1 c)1/2 c c/2 33
Distortion of neighbor set or, where did g(c) come from? n n Claim: neighbor set is spanned by tree of size g(c). Idea: Vertices in neighbor set can’t be too far from “active” DFS vertices: q n n n at most (i+1) < (clog-1 c)1/2 away. So spanned by tree of size (clog-1 c)1/2 2 c 2 vertices in component, so 2 logc can be active 2 logc * (clog-1 c)1/2 + c = g(c). 34
Distortion for full component n n Vertices added in neighbor step are spanned by tree of size g(c) connected vertices added in DFS step So distortion at most 2 g(c) for each iteration 2 adjacent vertices could be on opposite ends of iteration i and i+1, so total distortion 4 g(c) over all iterations 35
Concatenating the embeddings n n There is only one edge (vi, vi+1) connecting components Xi and Xi+1 Modify the DFS ordering of Xi so that vi is last visited Doesn’t affect distortion of Xi, and distortion of edge (vi, vi+1) is at most 2 g(c) Total distortion is at most q q 4 g(c) = 8 (clogc)1/2 + 4 c 8 c 3/2 log 1/2 c + 4 c Or O((c logc)1/2) times optimal 36
Other algorithms in paper n n An exact algorithm for embedding a general graph into the line, with runtime O(nc). A geometric 3 -approximation for embedding the sphere into the plane. 37
Open questions n For lines: q q q n Better approximation ratios Lower bounds Weighted graphs (with large distortion) Bigger question: algorithmic embeddings of graphs into the plane. 38
- Slides: 38