Approximation algorithm Design a case study of MRCT

1 / 41

Approximation algorithm Design a case study of MRCT - PowerPoint PPT Presentation

Approximation algorithm Design a case study of MRCT. 樹德科技大學 資訊工程系 吳邦一 (B. Y. Wu). 1988 – before studying algorithms. 2000 – after studying algorithms. Ron Rivest. Leonard Adleman. Adi Shamir. RSA. Last year, after Prof. Chang went to NSYSU for a speech,

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

PowerPoint Slideshow about 'Approximation algorithm Design a case study of MRCT' - carlos-ruiz

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Approximation algorithm Design a case study of MRCT

1988 – before studying algorithms

2000 – after studying algorithms

Ron Rivest

RSA

Last year, after Prof. Chang went to NSYSU for a speech,

A student asked me for a question:

Algorithm research and NP-Complete Theorem

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

Karp

1985 Turing Award

Cook

1982 Turing Award

Levin

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問題，到今天，NPC的問題已經列不勝列了。
• According to Wikipedia（維基百科）, 在2002 年的一項調查中，一百位研究者裡面有61位相信NP不等於P，9位相信NP=P，22位不確定，而有8位研究者認為此問題在目前的假設基礎下是無法證明的。

Knuth

1974 Turing Award

Johnson

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

• Life finds the ways
• Approximation
• Online
• Distributed
• Mobile
• New models
• Quantum computing
• Bio-computing

Approximation algorithms

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

• 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(n1/k).
• FPTAS if (1/k) not in the exponent,
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 distance traveling all nodes and back to the starting node.

6

8

2

15

10

5

3

10

2

The doubling tree algorithm
• Find a minimum spanning tree
• Output the Euler tour in the doubling tree of MST

6

6

8

8

2

2

15

15

10

10

5

5

3

3

10

10

2

2

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

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 dT(i,j)

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 Spanning Trees

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

m

j

j

i

To find an approx.
• A lower bound of the optimum
• An algorithm
• Analyze the worst-case ratio
Solution decomposition
• 假設T是一個OPT, 我們將T做一些處理, 得到另一個解Y, 使得
• Y的cost不至於與T相差太多
• Y屬於某一種特殊類別的解, 而這類別中的最佳解是可以在polynomial time 求得的
• 注意: 我們無法得知Y, Y並不會出現在algorithm中, 只在分析中扮演一個中繼的角色
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次
• opt>=nΣvd(T,r,v)
• Let Y: the star centered at r
• C(Y)= 2(n-1)Σvd(Y,r,v)
• Y is a 2-approximation

r

>=n/2

v

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

δ-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 δ-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

n/3

• 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
• Need some other work to show the ratio(通常這樣的話代表了背後有慘不忍睹的內容)
Solution decomposition
• 從一個OPT開始，我們設法將他改造成一個k-star，並證明此k-star是一個不錯的approximation
• 設計一個演算法可以求得最好的k-star，既然他是最好，當然不比那個改造的差
• 精緻的分析是重要的，「好，要說的出口」
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

• Evolutionary tree reconstruction
• 給一個n個物種的距離矩陣，找一個tree以此n個物種為leaves, 使得兩兩物種之間在樹上的距離>=給定的距離且最小化距離總合
• 這個問題比較難，因為樹的中間節點是可以任意給的
• Steiner tree vs. Spanning tree

• 先做做Spanning 的case
• MRCT
• 找到separator的方法
• (15/8)-approx => 1.577 =>1.5 =>4/3+
• 兩種extension
• 這個方法在general graph上不可能做到比4/3+更好了

• 如果是metric graph就有可能做到更好
• 但是metric graph的case還不知是不是NP-hard
• 對於證明NPC實在是很厭煩了
• 把Garey & Johnson的書翻了又翻
• 遠在天邊 近在眼前
• 把general case transform 到metric case
• 不只解決NP-hard的疑問, 證明了metric上的approx. 可以用在general case 上

• 意外的插曲
• 研究是很競爭的
• 提心吊膽 難以入眠
• 謎底揭曉的那一刻
• 1997年，我做到了兩年來作夢都夢不到的事
• 更多的extension

• 做行政是在千百次成功中等待一次失敗
• 研究之路很迷人，如果有人結伴而行則更加美好（當學生很幸福啊！）
• 李老師告訴我說：沒有計畫，只有方向
• 研究如此，人生何嘗不是

Q&A