Approximation algorithm Design a case study of MRCT

  • Slides: 41
Download presentation
Approximation algorithm Design a case study of MRCT 樹德科技大學 資訊 程系 吳邦一 (B. Y.

Approximation algorithm Design a case study of MRCT 樹德科技大學 資訊 程系 吳邦一 (B. Y. Wu)

1988 – before studying algorithms 2000 – after studying algorithms

1988 – before studying algorithms 2000 – after studying algorithms

Ron Rivest Leonard Adleman Adi Shamir RSA Last year, after Prof. Chang went to

Ron Rivest Leonard Adleman Adi Shamir RSA Last year, after Prof. Chang went to NSYSU for a speech, A student asked me for a question: 為何做演算法的人皆白髮而做security的易禿頭?

Algorithm research and NP-Complete Theorem

Algorithm research and NP-Complete Theorem

NP-hard: the barrier • Since the results of Cook (1971) , Levin(1973) & Karp

NP-hard: the barrier • Since the results of Cook (1971) , Levin(1973) & Karp (1972), many important problems have been shown to be NP-hard. Cook 1982 Turing Award Levin Karp 1985 Turing Award

The NPC Theorem • The name “NP-Complete” is due to Knuth( 高德納) • Garey

The NPC Theorem • The name “NP-Complete” is due to Knuth( 高德納) • Garey and Johnson 在 1979年所著的 Computers and Intractability: A Guide to the Theory of NP-Completeness 書中蒐列了數以百計的重要NPC問題,到今天, Knuth NPC的問題已經列不勝列了。 1974 Turing Award • According to Wikipedia(維基百科), 在 2002 年的一項調查中,一百位研究者裡面有 61位相信NP不等於P,9位相信NP=P,22位不 確定,而有8位研究者認為此問題在目前的假 設基礎下是無法證明的。 Johnson

 • For an NP-Complete or NP-hard problem, it is not expected to find

• For an NP-Complete or NP-hard problem, it is not expected to find an efficient algorithm. Or maybe you need the 1, 000 USD award • In 70 s, the life-cycle of a problem – Defined – NP-hard – Heuristic or for special data

艱困而逐漸褪色 • Life finds the ways – – – Approximation Online Distributed Mobile New

艱困而逐漸褪色 • Life finds the ways – – – Approximation Online Distributed Mobile New models • Quantum computing • Bio-computing

Approximation algorithms

Approximation algorithms

Approximation algorithms • For optimization (min/max) problem • Heuristic vs. approximation algorithms – Ensuring

Approximation algorithms • For optimization (min/max) problem • Heuristic vs. approximation algorithms – Ensuring the worst-case quality • The error – Relative and Absolute – A function k of input size n. A k-approximation: • minimization: sol/opt<=k; maximization: opt/sol<=k • The ratio is always >1

最高境界: Polynomial time approximation scheme • Some algorithms are of fixed ratio • Approximation

最高境界: Polynomial time approximation scheme • Some algorithms are of fixed ratio • Approximation scheme: allow us to make trade-off between time and quality – The more time, the better quality • PTAS: for any fixed k>0, it finds a (1+k)-approximation in polynomial time. – Usually (1/k) appears in the time complexity, e. q. O(n/k), O(n 1/k). – FPTAS if (1/k) not in the exponent,

The first PTAS (Not sure) • In Ronald L. Graham’s 1969 paper for scheduling

The first PTAS (Not sure) • In Ronald L. Graham’s 1969 paper for scheduling problem (Contribution also due to Knuth and another)

An example -- TSP • Starting at a node, find a tour of min

An example -- TSP • Starting at a node, find a tour of min distance traveling all nodes and back to the starting node. 6 8 2 15 10 5 3 2 10

The doubling tree algorithm • Find a minimum spanning tree • Output the Euler

The doubling tree algorithm • Find a minimum spanning tree • Output the Euler tour in the doubling tree of MST 6 8 2 15 10 5 3 2 10

The error ratio • MST<=TSP – MST is the minimum cost of any spanning

The error ratio • MST<=TSP – MST is the minimum cost of any spanning tree. – A tour must contain a spanning tree since it is connected. • It is a 2 -approximation

Optimum communication spanning tree Problems

Optimum communication spanning tree Problems

OCT: definition • Input: – an undirected graph with nonnegative edge lengths – a

OCT: definition • Input: – an undirected graph with nonnegative edge lengths – a nonnegative requirement for each pair of vertices • Output: – a spanning tree minimizing the total communication cost summed over all pairs of vertices, in which the cost of a vertex pair is the distance multiplied by their requirement, that is, we want to minimize Σ λi, j d. T(i, j)

First studied by T. C. Hu 1974 SICOMP First approximation appeared in Wong 1980

First studied by T. C. Hu 1974 SICOMP First approximation appeared in Wong 1980

A way to a PTAS A case study of the MRCT problem Optimum Communication

A way to a PTAS A case study of the MRCT problem Optimum Communication Spanning Trees

Minimum routing cost spanning trees • A spanning tree with minimum all-to-all distance •

Minimum routing cost spanning trees • A spanning tree with minimum all-to-all distance • NP-hard in the strong sense • Tree with short edges may have large routing cost

Approximation– comparing with a trivial lower bound • A lower bound – d(T, u,

Approximation– comparing with a trivial lower bound • A lower bound – d(T, u, v)>=d(G, u, v) (樹上距離<=原圖最短路徑) – Opt>=Σd(G, u, v) • The median of G: a node m min Σvd(G, m, v) – Since min<=mean, Σvd(G, m, v)<=(1/n) Σd(G, u, v)

 • Y : a shortest path tree rooted at m – d(Y, i,

• Y : a shortest path tree rooted at m – d(Y, i, j)<=d(Y, i, m)+d(Y, m, j) – Σd(G, u, v)<=2 nΣvd(G, m, v)<=2*OPT • A shortest path tree rooted at the median is a 2 -approximation of the MRCT. m i j j

To find an approx. • A lower bound of the optimum • An algorithm

To find an approx. • A lower bound of the optimum • An algorithm • Analyze the worst-case ratio

Metric MRCT • For easy to understand, we consider only the metric case •

Metric MRCT • For easy to understand, we consider only the metric case • The input is a metric graph: a complete graph with edge length satisfying the triangle inequality

Metric MRCT • 假設T是OPT, r是T的centroid – 一個tree的centroid是去掉它的話, 剩下的subtree 均不會超過一半的node • 在計算cost時, d(T, r, v)至少被計算n次

Metric MRCT • 假設T是OPT, r是T的centroid – 一個tree的centroid是去掉它的話, 剩下的subtree 均不會超過一半的node • 在計算cost時, d(T, r, v)至少被計算n次 – opt>=nΣvd(T, r, v) • Let Y: the star centered at r – C(Y)= 2(n-1)Σvd(Y, r, v) r – Y is a 2 -approximation >=n/2 v

 • 利用solution decomposition証得 – 存在一個star是 2 -approximation • 以窮舉法嘗試所有的star (n個)並取出最 好的, 必然是一個2 -approximatin

• 利用solution decomposition証得 – 存在一個star是 2 -approximation • 以窮舉法嘗試所有的star (n個)並取出最 好的, 必然是一個2 -approximatin • Can we do better?

δ-separator • Separator of a tree: – Centroid is a ½ separator • How

δ-separator • Separator of a tree: – Centroid is a ½ separator • How the 2 -approx. algorithm works? – Guess (try all possible) the separator – Connect the others greedily – Distance increases only for nodes in the same branch -- we don’t pay too much

 • To get better result, we try to generalize the centroid to general

• To get better result, we try to generalize the centroid to general δ-separator • Indeed, when δ↘, the error↘ • But it costs too much to obtain the exact δ -separator for δ<1/2. – For example, a 1/3 -separator may have n/3 nodes 1/3 -separator n/3

屬下犧牲了 上司也該犧牲 • We don’t need a perfect separator – Only some critical nodes

屬下犧牲了 上司也該犧牲 • We don’t need a perfect separator – Only some critical nodes are necessary • Leaves of the separator (確保下屬有個好的依歸) • Branch nodes of the separator (確保結構) δ-separator

To a k-Star • k-star: a tree with at most k internal nodes •

To a k-Star • k-star: a tree with at most k internal nodes • Need some other work to show the ratio (通常這樣的話代表了背後有慘不忍睹的內容)

 • 3 -star =>1. 5 -approximation • k-star => (k+3)/(k+1)-approxiamtion • The best

• 3 -star =>1. 5 -approximation • k-star => (k+3)/(k+1)-approxiamtion • The best k-star for fixed k can be found in polynomial time • We have a PTAS

 • 花了不少時間study Steiner tree • 先做做Spanning 的case – MRCT • 找到separator的方法 – (15/8)-approx

• 花了不少時間study Steiner tree • 先做做Spanning 的case – MRCT • 找到separator的方法 – (15/8)-approx => 1. 577 =>1. 5 =>4/3+ – 兩種extension • 這個方法在general graph上不可能做到 比 4/3+更好了

Thanks Q&A

Thanks Q&A