340 likes | 368 Views
Dive deep into algorithms, spanning trees, and optimization problems, exploring graph theory, approximation algorithms, and solution decomposition in computer science research. Discover how computer scientists work on solving problems efficiently with powerful algorithms.
E N D
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 • more powerful computing machines • more efficient algorithms • The problems • In computer science • In other fields
Research in algorithms Model Motivations Problem Data
Research in algorithms • Algorithm design • Algorithm analysis • Problem analysis • Data analysis
Algorithm analysis • How good an algorithm is • Mathematics • Experiments (simulation by programs) • The objectives vary with models • Time • Space • Message passing
Measurement of the goodness • Asymptotically • The Big-O notation • Tractable vs. intractable • Polynomial vs. exponential • NP-complete theory
Algorithms and Graphs • Graph: • A mathematic model for relations • Usually the binary relation • 許許多多重要的問題可以用GRAPH來描述 • 對GRAPH的研究有助於問題的解
Algorithm researchers vs. Mathematicians • M: • 在一graph中與其它點之最遠距離最小的稱為center, 一個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.
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
Special graphs • 根據graph的特性所定義 • 太多的graph class已被定義出來 • Perfect graphs • Triangulated graphs • Comparability graphs • Permutation graphs • Interval graphs • Circular- Arc graphs
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
艱困而逐漸褪色 • 逐水草而居 • Life finds the ways • Approximation • Online • Distributed • Mobile • New models • Quantum computing • Bio-computing
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
最高境界: 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 complexity, e.q. O(n/k), O(n1/k). • If (1/k) not in the exponent, FPTAS
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
A 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
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 others • Dijkstra’s algorithm
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.
Solution decomposition • 假設T是一個OPT, 我們將T做一些處理, 得到另一個解Y, 使得 • Y的cost不至於與T相差太多 • Y屬於某一種特殊類別的解, 而這類別中的最佳解是可以在polynomial time 求得的 • 注意: 我們無法得知Y, Y並不會出現在algorithm中, 只在分析中扮演一箇中計的角色
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 >=n/2 v
利用solution decomposition証得 • 存在一個star是2-approximation • 已窮舉法嘗試所有的star (n個)並取出最好的, 必然是一個2-approximatin • Can we do better?
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
Optimum Communication spanning Tree • A generalized version of MRCT • Min Σλ(u,v)d(T,u,v), λ(u,v) is the requirement • Product-requirement OCT (PROCT) • λ(u,v)=r(u)r(v) • Sum-requirement OCT (SROCT) • λ(u,v)=r(u)+r(v)
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
Spanning Trees and Optimization Problems S T O P ! Spanning Trees Optimization Problems & B.Y. Wu and K.M. Chao CRC press, 2004 即將出版