1 / 26

The swap edges of a multiple source routing tree

The swap edges of a multiple source routing tree. Bang Ye Wu* Chih-Yuan Hsiao † Kun-Mao Chao †. * 樹德資工 † 台大資工. Swap edge. For an edge of a spanning tree T of a undirected graph G Swap edge: a non-tree minimizing the routing cost of the new tree .

sadah
Download Presentation

The swap edges of a multiple source routing tree

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. The swap edges of a multiple source routing tree Bang Ye Wu* Chih-Yuan Hsiao†Kun-Mao Chao† *樹德資工 †台大資工

  2. Swap edge • For an edge of a spanning tree T of a undirected graph G • Swap edge: a non-tree minimizing the routing cost of the new tree. • Routing cost: total distance from sources to vertices

  3. Problem Definition • Given a undirected graph G=(V, E, w) with a positive edge weight function w and a spanning tree T of G, we want to find the swap edge for every tree edge e∈T

  4. Previous result • Swap edges for a single-source shortest-paths tree: Time complexity O(n2) • Constructing k-sources minimum routing cost spanning tree: • NP hard even for any constant k>1 • PTAS for k=2 and k=n • 2-approx. for arbitrary k

  5. Swap edge problem • Polynomial time solvable (for any objective function) • Direct method: Compute the costs for all possible edges and choose the best • O(kn) for computing the routing cost of a tree • O(m) possible edges • O(n) tree edges • Total: O(kmn2) O(mn3) • How to find the swap edges more efficiently?

  6. Our results • The Two-sources case • O(mlogn+n2) • The Multiple-sources case • O(mn)

  7. Two-sources case

  8. Two cases 1.The removed edges are not in the path(s1,s2): modify the one-source algorithm slightly! 2.The removed edges are in the path(s1,s2): need some tricks here!

  9. Edges not in the path We create an auxiliary graph with a super node s Then apply the single-source case algorithm!

  10. Y Y i i r r r s = r r s = r r i 1 0 1 2 k p i + 1 q e i y x f V V V V V k 0 1 p q Edges in Path(s1,s2) Our goal is to compute, for each i, min δ(f,i) =D(s2,Yi)+D(s1,Yi) among all f cross the cut

  11. Y Y i i r r r s = r r s = r r i 1 0 1 2 k p i + 1 q e i • Ex: 左端點為x的edges • For each x, compute Fx(i)=minfδ(f,i), (f in Ex) • Then, the swap cost of ei is the min of Fx(i) among all x. y x f V V V V V k 0 1 p q

  12. Y Y i i r r r s = r r s = r r i 1 0 1 2 k p i + 1 q e i y x f V V V V V k 0 1 p q • If y1 and y2 are in the same set Vq, f’1and f’2never intersect in [p,q]. • only one edge in a set Vq need considered

  13. f’1, f’2 and f’3 are in the same set Vq

  14. Y i r j r s = r 2 k r i + 1 q e i f1 f2 V V q j V k 若f1的右端點 > f2的右端點 當i增加時, 對f1必然更有利 我們證明: f2(i)-f1(i)是隨著i而monotonically increasing

  15. f’1 and f’2 are from different sets f2一但在某一點穿越f1, 就不會在回頭

  16. Merge Process • 將Ex中的edge依照右端點sorting, 由右向左逐步將f合併(取min) • Let Fi-1是前i-1個合併之function, we design an algorithm merging Fi-1 and fi • Fi-1 是由若干個interval組成, 每一個interval我們知道其最小的f為何

  17. Merging process • Claim: fiintersects Fi-1at most once, and if so, fi appears at the first interval of Fi fi Fi-1 Fi

  18. fi Fi-1 Fi • Store the intervals of Fi-1 in a link list L • Scan L from the head to find the intersection interval. Time: O(αi ) • Use binary search to find the intersection point in the interval. Time: O(log n) • Remove the intervals before the intersection interval, and break the first interval. Time: O(αi )

  19. The time complexity for scanning and removing the intervals • Li : # of intervals of Fi • αi: # of scanned intervals when merging fi • Li= Li-1-αi+1, L1=1 and Lh>0. • Σαi<=2(h-1)=O(|Fx|)

  20. Time complexity • Preprocessing: O(n2) • For a fixed x eliminating useless edges: O(|Ex|) sorting: O(|Fx|log|Fx|) merge process: O(|Fx|logn) • Total : O(mlogn+n2)

  21. Multiple-sources case

  22. Routing load T1 T2 f Routing load l(f) = s1*n2+s2*n1 Routing cost of a tree=Σl(f)*w(f) Can be computed in O(n) time

  23. Multiple sources • Naive method: n tree edges and m non-tree edges O(mn2) time • Our method: • Find the swap edges individually • For each tree edge e, after a preprocessing stage, the cost of T-e+f can be computed in O(1) time for any non-tree edge f.

  24. Observation • There are only two possible values for the routing load of an edge, depending on which side the new edge is connected to.

  25. Compute the two possible routing loads of every edge • For each vertex v, compute a value g(v): 如果new edge接在v點時, 該subtree 的routing cost • Can be done by traversing the tree twice  O(n)

  26. Future work • More efficient algorithms, especially for k>2 • Swap edges for different objective

More Related