34
樹樹樹樹樹樹 樹樹樹樹樹 樹樹樹樹樹樹 樹樹樹樹樹 樹樹樹樹(B. Y. Wu) (B. Y. Wu) Research in Research in Algorithms Algorithms -- -- Spanning Trees and Spanning Trees and Optimization Problems Optimization Problems

Research in Algorithms -- Spanning Trees and Optimization Problems

  • Upload
    hansel

  • View
    26

  • Download
    1

Embed Size (px)

DESCRIPTION

Research in Algorithms -- Spanning Trees and Optimization Problems. 樹德科技大學 資訊工程系 吳邦一 (B. Y. Wu). 他們在做些什麼. 做 Algorithm 的是不食人間煙火的 從實驗室設備來觀察 … Algorithm 的研究僅需要一枝筆與一張紙. What the computer scientists work for?. Solving problems by computation Efficiently and correctly - PowerPoint PPT Presentation

Citation preview

Page 1: Research in Algorithms --  Spanning Trees and Optimization Problems

樹德科技大學 資訊工程系樹德科技大學 資訊工程系吳邦一 吳邦一 (B. Y. Wu)(B. Y. Wu)

Research in AlgorithmsResearch in Algorithms-- -- Spanning Trees and Optimization Spanning Trees and Optimization

ProblemsProblems

Research in AlgorithmsResearch in Algorithms-- -- Spanning Trees and Optimization Spanning Trees and Optimization

ProblemsProblems

Page 2: Research in Algorithms --  Spanning Trees and Optimization Problems

他們在做些什麼• 做 Algorithm 的是不食人間煙火的• 從實驗室設備來觀察 …• Algorithm 的研究僅需要一枝筆與一張

Page 3: Research in Algorithms --  Spanning Trees and Optimization Problems

What the computer scientists work for?

• Solving problems by computation• Efficiently and correctly

– more powerful computing machines– more efficient algorithms

• The problems– In computer science– In other fields

Page 4: Research in Algorithms --  Spanning Trees and Optimization Problems

Research in algorithms

Motivations

Model

Problem Data

Page 5: Research in Algorithms --  Spanning Trees and Optimization Problems

Research in algorithms • Algorithm design• Algorithm analysis• Problem analysis• Data analysis

Page 6: Research in Algorithms --  Spanning Trees and Optimization Problems

Algorithm analysis• How good an algorithm is

– Mathematics – Experiments (simulation by programs)

• The objectives vary with models– Time– Space– Message passing

Page 7: Research in Algorithms --  Spanning Trees and Optimization Problems

Measurement of the goodness

• Asymptotically– The Big-O notation

• Tractable vs. intractable– Polynomial vs. exponential

• NP-complete theory

Page 8: Research in Algorithms --  Spanning Trees and Optimization Problems

Algorithms and Graphs• Graph:

– A mathematic model for relations– Usually the binary relation

• 許許多多重要的問題可以用 GRAPH 來描述

• 對 GRAPH 的研究有助於問題的解

Page 9: Research in Algorithms --  Spanning Trees and Optimization Problems

Algorithm researchers vs. Mathematicians

• M: – 在一 graph 中與其它點之最遠距離最小的稱為 cen

ter, 一個 tree 中必然存在 center 但可能有一個或兩個 center

• A: given a tree Twhile T has more than two nodes do

Remove all leaves in T;output the remaining nodes as the centers of T

– The centers of a tree can be found in linear time.

Page 10: Research in Algorithms --  Spanning Trees and Optimization Problems

Special graphs• DATA 對問題難度的影響

– Find the distance in a graph– Find the distance in a tree

• A solution for all data– We hope but not always possible– 退而求其次– Motivation

Page 11: Research in Algorithms --  Spanning Trees and Optimization Problems

Special graphs• 根據 graph 的特性所定義• 太多的 graph class 已被定義出來

– Perfect graphs– Triangulated graphs– Comparability graphs– Permutation graphs– Interval graphs– Circular- Arc graphs

Page 12: Research in Algorithms --  Spanning Trees and Optimization Problems

Approximation Approximation algorithmsalgorithms

Approximation Approximation algorithmsalgorithms

Page 13: Research in Algorithms --  Spanning Trees and Optimization Problems

NP-hard: the barrier• Since Cook (1971) & Karp (1972),

many important problems have been shown to be NP-hard.

• The life-cycle of a problem– Defined– NP-hard– Heuristic or for special data

Page 14: Research in Algorithms --  Spanning Trees and Optimization Problems

艱困而逐漸褪色• 逐水草而居• Life finds the ways

– Approximation – Online – Distributed– Mobile – New models

• Quantum computing• Bio-computing

Page 15: Research in Algorithms --  Spanning Trees and Optimization Problems

Approximation algorithms

• Heuristic vs. approximation algorithms– Ensuring the worst-case quality

• The error ratio– Relative and Absolute – A k-approximation:

minimization: sol/opt<=k;maximization: opt/sol<=k

– The ratio is always >1

Page 16: Research in Algorithms --  Spanning Trees and Optimization Problems

最高境界 : Polynomial time approximation scheme• For any fixed k>0, it finds a

(1+k)-approximation in polynomial time.– Usually (1/k) appears in the time comple

xity, e.q. O(n/k), O(n1/k).– If (1/k) not in the exponent, FPTAS

Page 17: Research in Algorithms --  Spanning Trees and Optimization Problems

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

min distance traveling all nodes and back to the starting node.

10

15

8

3

2

5

2

6

10

Page 18: Research in Algorithms --  Spanning Trees and Optimization Problems

A doubling tree algorithm

• Find a minimum spanning tree• Output the Euler tour in the

doubling tree of MST

10

15

8

3

2

5

2

6

10

10

15

8

3

2

5

2

6

10

Page 19: Research in Algorithms --  Spanning Trees and Optimization Problems

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

Page 20: Research in Algorithms --  Spanning Trees and Optimization Problems

Spanning Trees & Spanning Trees & Optimization Optimization

ProblemsProblems

Spanning Trees & Spanning Trees & Optimization Optimization

ProblemsProblems

Page 21: Research in Algorithms --  Spanning Trees and Optimization Problems

Two classical problems• Minimum spanning trees (MST)

– Minimum building cost – Prim’s & Kruskal’s algorithm

• Shortest-paths trees (SPT)– Shortest paths from one node to all the o

thers– Dijkstra’s algorithm

Page 22: Research in Algorithms --  Spanning Trees and Optimization Problems

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

Page 23: Research in Algorithms --  Spanning Trees and Optimization Problems

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)

Page 24: Research in Algorithms --  Spanning Trees and Optimization Problems

• 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.

Page 25: Research in Algorithms --  Spanning Trees and Optimization Problems

Solution decomposition• 假設 T 是一個 OPT, 我們將 T 做一些處理 , 得

到另一個解 Y, 使得– Y 的 cost 不至於與 T 相差太多– Y 屬於某一種特殊類別的解 , 而這類別中的最佳解

是可以在 polynomial time 求得的• 注意 : 我們無法得知 Y, Y 並不會出現在 algori

thm 中 , 只在分析中扮演一箇中計的角色

Page 26: Research in Algorithms --  Spanning Trees and Optimization Problems

>=n/2

Metric MRCT• 假設 T 是 OPT, m 是 T 的 centroid

– 一個 tree 的 centroid 是去掉它的話 , 剩下的subtree 均不會超過一半的 node

• 在計算 cost 時 , d(T,m,v) 至少被計算 n 次– opt>=nΣvd(T,m,v)

• Let Y: the star centered at m– Y is a 2-approximation

m

v

Page 27: Research in Algorithms --  Spanning Trees and Optimization Problems

• 利用 solution decomposition 証得– 存在一個 star 是 2-approximation

• 已窮舉法嘗試所有的 star (n 個 ) 並取出最好的 , 必然是一個 2-approximatin

• Can we do better?

Page 28: Research in Algorithms --  Spanning Trees and Optimization Problems

• 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

Page 29: Research in Algorithms --  Spanning Trees and Optimization Problems

Optimum Communication spanning Tree

• A generalized version of MRCT• Min Σλ(u,v)d(T,u,v), λ(u,v) is the requireme

nt• Product-requirement OCT (PROCT)

– λ(u,v)=r(u)r(v)• Sum-requirement OCT (SROCT)

– λ(u,v)=r(u)+r(v)

Page 30: Research in Algorithms --  Spanning Trees and Optimization Problems
Page 31: Research in Algorithms --  Spanning Trees and Optimization Problems

Multiple sources• Single source: shortest-paths tree• All sources: MRCT• Multiple source: k-MRCT

– 2-MRCT is also NP-hard– 2-MRCT admits a PTAS

Page 32: Research in Algorithms --  Spanning Trees and Optimization Problems
Page 33: Research in Algorithms --  Spanning Trees and Optimization Problems

Steiner tree

Page 34: Research in Algorithms --  Spanning Trees and Optimization Problems

B.Y. Wu and K.M. ChaoB.Y. Wu and K.M. ChaoCRC press, 2004CRC press, 2004

S T O P !Spanning Trees OptimizationProblems&

Spanning Trees and Spanning Trees and Optimization Optimization

ProblemsProblems

Spanning Trees and Spanning Trees and Optimization Optimization

ProblemsProblems

即將出版即將出版即將出版即將出版