• 沒有找到結果。

Minimum Spanning Trees

N/A
N/A
Protected

Academic year: 2021

Share "Minimum Spanning Trees"

Copied!
17
0
0

加載中.... (立即查看全文)

全文

(1)

Minimum Spanning Trees

Kun-Mao Chao ( 趙坤茂 )

Department of Computer Science an d Information Engineering

National Taiwan University, Taiwan

E-mail: kmchao@csie.ntu.edu.tw

(2)

2

Minimum Spanning Trees

• A minimum spanning tree (MST) of a weighted graph G is a spanning tree of G whose edges sum to minimum weight.

• In other words, a minimum spanning tree is a tree formed from a subset of the edges in a given

undirected graph, with two properties:

– it spans the graph, i.e., it includes every vertex in the graph, and

– it is a minimum, i.e., the total weight of all the edges is as low as possible.

(3)

3

Minimum Spanning Trees

The minimum spanning tree problem is always included in algorithm textbooks since

• it arises in many applications,

• it is an important example where greedy

algorithms always deliver an optimal solution, and • clever data structures are necessary to make it

(4)

4

(5)

5

(6)

6

Bor\r{u}vka's

Algorithm

(7)

7

Kruskal's

Algorithm

(8)

8

Prim’s Alg

orithm

(9)
(10)

10

NP-hard: the barrier

• Since Levin & Cook (1971) & Karp (1972),

many important problems have been shown

to be NP-hard.

• The life-cycle of a problem

– Defined – NP-hard

(11)

11

Too hard to survive?

Life finds the ways

– Approximation – Online – Distributed – Mobile – New models • Quantum computing • Bio-computing

(12)

12

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

(13)

13

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

(14)

14

An example – Minimum tour (MT)

• 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

(15)

15

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

(16)

16

The error ratio

• MST<=MT

– MST is the minimum cost of any spanning tree. – A tour must contain a spanning tree since it is c

onnected.

• It is a 2-approximation

• Triangle inequality => 2-approximation for

TSP (visiting each city only once) Why?

(17)

17

All exact science is dominated by the

idea of approximation.

參考文獻

相關文件

Primal-dual approach for the mixed domination problem in trees Although we have presented Algorithm 3 for finding a minimum mixed dominating set in a tree, it is still desire to

(c) If the minimum energy required to ionize a hydrogen atom in the ground state is E, express the minimum momentum p of a photon for ionizing such a hydrogen atom in terms of E

Miroslav Fiedler, Praha, Algebraic connectivity of graphs, Czechoslovak Mathematical Journal 23 (98) 1973,

Given a connected graph G together with a coloring f from the edge set of G to a set of colors, where adjacent edges may be colored the same, a u-v path P in G is said to be a

The vertex-cover problem is to find a vertex cover of minimum size in a given undirected graph. • 此問題的decision版本為NP-Complete

• Definition: A max tree is a tree in which the key v alue in each node is no smaller (larger) than the k ey values in its children (if any). • Definition: A max heap is a

Lecture by baluteshih Credit by zolution... Minimum

• 下面介紹三種使用greedy algorithm產生minimum cost spanning