1 Minimum Routing Cost Tree Definition –For two nodes u and v on a tree, there is a path between them. –The sum of all edge weights on this path is called.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Trees Chapter 11.
Great Theoretical Ideas in Computer Science for Some.
3.3 Spanning Trees Tucker, Applied Combinatorics, Section 3.3, by Patti Bodkin and Tamsen Hunter.
Combinatorial Algorithms
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Concepts Approximation algorithm: An algorithm that returns near-optimal solutions (i.e. is "provably good“) is called an approximation.
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.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Great Theoretical Ideas in Computer Science.
Approximation Algorithms for the Traveling Salesperson Problem.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Approximation Algorithms
The Shortest Path Problem
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
TECH Computer Science Graph Optimization Problems and Greedy Algorithms Greedy Algorithms  // Make the best choice now! Optimization Problems  Minimizing.
V. V. Vazirani. Approximation Algorithms Chapters 3 & 22
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Graph Theory Topics to be covered:
7 -1 Chapter 7 Dynamic Programming Fibonacci sequence Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, … F i = i if i  1 F i = F i-1 + F i-2 if.
COSC 2007 Data Structures II Chapter 14 Graphs III.
May 1, 2002Applied Discrete Mathematics Week 13: Graphs and Trees 1News CSEMS Scholarships for CS and Math students (US citizens only) $3,125 per year.
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 2): Graphs  Graph Terminology (9.2)
Greedy Algorithms and Matroids Andreas Klappenecker.
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Chapter 9 Finding the Optimum 9.1 Finding the Best Tree.
Chapter 8 Maximum Flows: Additional Topics All-Pairs Minimum Value Cut Problem  Given an undirected network G, find minimum value cut for all.
LIMITATIONS OF ALGORITHM POWER
The full Steiner tree problem Theoretical Computer Science 306 (2003) C. L. Lu, C. Y. Tang, R. C. T. Lee Reporter: Cheng-Chung Li 2004/06/28.
Example Apply hierarchical clustering with d min to below data where c=3. Nearest neighbor clustering d min d max will form elongated clusters!
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
1 The instructor will be absent on March 29 th. The class resumes on March 31 st.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
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.
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.
Discrete Structures Li Tak Sing( 李德成 ) Lectures
Chapter 9 (Part 2): Graphs
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Agenda Lecture Content: Introduction to Graph Path and Cycle
12. Graphs and Trees 2 Summary
Design and Analysis of Algorithm
Introduction to Trees Section 11.1.
Great Theoretical Ideas in Computer Science
Chapter 5. Optimal Matchings
Discrete Maths 10. Trees 242/ , Semester 2, Objective
Algorithms and Complexity
1.3 Modeling with exponentially many constr.
Discrete Mathematics for Computer Science
CSE 421: Introduction to Algorithms
Robustness of wireless ad hoc network topologies
Robustness of wireless ad hoc network topologies
CS 581 Tandy Warnow.
COMPS263F Unit 2 Discrete Structures Li Tak Sing( 李德成 ) Room A
Networks Kruskal’s Algorithm
5.4 T-joins and Postman Problems
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Hamilton Paths and Hamilton Circuits
Network Simplex Animations
Bridges and Articulation Points
The Greedy Approach Young CS 530 Adv. Algo. Greedy.
Concepts of Computation
Presentation transcript:

1 Minimum Routing Cost Tree Definition –For two nodes u and v on a tree, there is a path between them. –The sum of all edge weights on this path is called the routing cost of this pair of nodes. –MRCT: Minimize the sum of routing costs between all pairs of nodes. cf. Minimum Spanning Tree

2 Example 1 Total sum of all pairs of routing costs of this tree: –RC(a,b)+RC(a,c)+RC(a,d)+RC(b,a)+RC(b,c)+RC(b,d) +RC(c,a)+RC(c,b)+RC(c,d)+RC(d,a)+RC(d,b)+RC(d,c) = = 18 a b d c b acd 111

3 Example 2 Total sum of all pairs of routing costs of this tree: –RC(a,b)+RC(a,c)+RC(a,d)+RC(b,a)+RC(b,c)+RC(b,d) +RC(c,a)+RC(c,b)+RC(c,d)+RC(d,a)+RC(d,b)+RC(d,c) = 30 a b d c a bcd 122

4 Centroid of A Tree Deleting a centroid of a tree will produce subgraphs such that each subgraph contains no more than n/2 nodes. a b m g cd h i f e

5 Centroid (2) Let T be rooted by a centroid m of T. –Every subtree of m contains no more than n/2 nodes. Consider any node v in T. The subtree containing v contains no more than n/2 nodes. –At least n/2 paths between some node u (in other subtree) and v will pass through m. m

6 Centroid (3) Note: we count every pair of nodes twice. –The path from u to v and the path from v to u will both be counted. In the routing cost of this tree, the length of the path from any node u to m will be counted at least 2(n/2) = n times. b acd 111

7 1-Star A tree with only one internal node. –All other nodes are leaf nodes. …

8 Approximation Algorithm for MRCT 1 For each node i 1-1 Form a 1-star S i rooted at i 1-2 Calculate the routing cost C(S i ) 2 Return as the approximate solution

9 Time Complexity Step 1: n iterations –Step 1-1: O(n) –Step 1-2: O(n) Step 2: O(n) Total: O(n 2 )

10 Performance Ratio Let C(S) denote the cost of 1-star S. Assume T is a minimum routing cost spanning tree and m is a centroid of T. Because of the triangular inequality, w(v,m) is less than RC(v,m) of T. …

11 Can we find a better ratio? Yes. There is a PTAS.

12 PTAS for MRCT We shall use a k-star to approximate the optimal solution, and show When k=1, this is exact the 1-star case we described in the previous section. We shall use the case k=3 to illustrate the basic concept of this PTAS.

13 k-Star A k-star is a tree with exactly k internal nodes. a b j i ha c d e f

14  -separator For 0 <   ½, a  -separator of a graph G is a minimum subgraph of G whose deletion will result in subgraphs, each of which contains no more than  n nodes. –For  =1/2, the  -separator contains only one point, i.e. the controid. –We shall choose  = 2/(k+3) –For k=3,  = 1/3

15 Analysis of Routing Cost Assume T is a minimum routing cost spanning tree. Assume T is rooted at its centroid m. Then at most two subtrees of m contain more than n/3 nodes. Let a and b be the lowest nodes whose descendants have at least n/3 nodes. P: the path from node a to node b. –P is a (1/3)-separator ap q mhb r n o j k s i g df ec

16 Analysis of Routing Cost (2) Let dt(v,P) denote the path length from v to P. –This path length must be counted at least 2n/3 times because P is a (1/3)- separator. For each edge of P, the edge is counted at least (n/3)(2n/3) times in routing cost. –Each edge on P is counted (n/3 +  )(2n/3 -  ) times. –When   n/3, the above formula is always greater than or equal to 2n 2 /9. Let w(P) denote the total path length of P, we have ab

17 Partition The Nodes V a consists of nodes whose lowest ancestors on P are a. V b consists of nodes whose lowest ancestors on P are b. V m consists of nodes whose lowest ancestors on P are m. V am consists of nodes whose lowest ancestors on P are between a and m. V bm consists of nodes whose lowest ancestors on P are between b and m. ap q mh b r n o j k s i g df ec

18 Transform to 3-Star (1) For each node v in V a, V b, and V m, connect v to a, b, and m respectively. ap q mhb r n o j k s i g df ec

19 Transform to 3-Star (1) For each node v in V a, V b, and V m, connect v to a, b, and m respectively. ap q mhb r n o j k s i g df ec

20 Transform to 3-Star (2) ap q mhb r n o j k s i g df ec Replace P by a path (a,m) and (b,m). For each node v in V am, connect v to a or m, depending on which one is nearer to v. For each node v in V bm, connect v to b or m, depending on which one is nearer to v.

21 Transform to 3-Star (2) Replace P by a path (a,m) and (b,m). For each node v in V am, connect v to a or m, depending on which one is nearer to v. For each node v in V bm, connect v to b or m, depending on which one is nearer to v. a p q m h b r n o j k s i g df ec

22 Comparison with 3-Star For each edge (v,a), (v,b), (v,m) in the 3- star, it will be counted (n-1) times. For edge (a,m) or (b,m), it is counted no more than (n/2)(n/2)=(n 2 /4).

23 How to find the 3-Star Pick 3 nodes. For i+j+k=n-3, connect i nodes to a, j nodes to b, and k nodes to c. However, if we tries all combinations, it took exponential time. abc ……… i jk

24 Minimum Perfect Bipartite Matching In a bipartite graph, there are two sets of nodes, denoted as X and Y. In our case, let X = V – {a,b,c}. Y contains i copies of a, j copies of node b, and k copies of c. –If a node v in X is matched with a node u in Y, v will be connected to u in the 3-star.

25 PTAS For all (a,b,c) where a, b and c are selected from V do –For all (i,j,k) where i+j+k = n-3 and I,j,j are all positive integers, do Perform a perfect minimal bipartite matching to create a 3-star. Compute the total routing cost C of this 3-star. –Choose the 3-star with minimum cost to be our approximate solution.

26 Time Complexity Total time complexity: O ( n 8 ) –O(n 3 ) possible ways to select a,b and c. –O(n 2 ) possible ways to select I,j and k. –The perfect minimum bipartite problem can be solved in O(n 3 ) time. For k-star, it takes O(n 2k+2 ) time to obtain a solution which is less than or equal to (k+3)/(k+1) of the optimal solution. –Error ratio: 2/(k+1)

27 Mid-Term April 28 th, Thursday –9:00-12:00 –No class on April 26 th Closed Book

28 Presentation Each student chooses a journal paper about approximation algorithm and gives a 40- minute presentation.