Minimum Spanning Trees

Slides:



Advertisements
Similar presentations
Weighted Matching-Algorithms, Hamiltonian Cycles and TSP
Advertisements

Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
Great Theoretical Ideas in Computer Science for Some.
Approximation Algorithms for TSP
1 ©D.Moshkovitz Complexity The Traveling Salesman Problem.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Combinatorial Algorithms
Minimum Spanning Trees Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan
Great Theoretical Ideas in Computer Science.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Approximation Algorithms1. 2 Outline and Reading Approximation Algorithms for NP-Complete Problems (§13.4) Approximation ratios Polynomial-Time Approximation.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
1 Approximation Algorithms CSC401 – Analysis of Algorithms Lecture Notes 18 Approximation Algorithms Objectives: Typical NP-complete problems Approximation.
TECH Computer Science Graph Optimization Problems and Greedy Algorithms Greedy Algorithms  // Make the best choice now! Optimization Problems  Minimizing.
Minimum Spanning Tree Algorithms. What is A Spanning Tree? u v b a c d e f Given a connected, undirected graph G=(V,E), a spanning tree of that graph.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Graph Algorithms: Minimum.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Traveling Salesman Problem Approximation
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
SPANNING TREES Lecture 21 CS2110 – Spring
1 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
Minimum Routing Cost Spanning Trees Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall.
Minimal Spanning Tree Problems in What is a minimal spanning tree An MST is a tree (set of edges) that connects all nodes in a graph, using.
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung.
Approximation Algorithms for TSP Tsvi Kopelowitz 1.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Lecture 19 Minimal Spanning Trees CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
Traveling Salesman Problem DongChul Kim HwangRyol Ryu.
Approximation algorithms
Kruskal’s Algorithm for Computing MSTs Section 9.2.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Approximation Algorithms
Steiner trees: Approximation Algorithms
Optimization problems such as
Lecture 2-2 NP Class.
Minimum Spanning Tree Chapter 13.6.
An introduction to Approximation Algorithms Presented By Iman Sadeghi
School of Computing Clemson University Fall, 2012
Approximation Algorithms
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Approximation algorithms
Great Theoretical Ideas in Computer Science
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Approximation Algorithms
Computability and Complexity
Graph Algorithm.
Approximation Algorithms for TSP
Minimum Spanning Trees
Shortest-Paths Trees Kun-Mao Chao (趙坤茂)
Minimum Spanning Trees
Multiple Sequence Alignment
Minimum Spanning Trees
Spanning Trees Lecture 20 CS2110 – Spring 2015.
Approximation Algorithms
Trees Kun-Mao Chao (趙坤茂)
Multiple Sequence Alignment
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Minimum Spanning Trees Kun-Mao Chao (趙坤茂) Department of Computer Science and Information Engineering National Taiwan University, Taiwan E-mail: kmchao@csie.ntu.edu.tw WWW: http://www.csie.ntu.edu.tw/~kmchao

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.

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 work efficiently.

Its minimum spanning trees?

Some of its minimum spanning trees

Bor\r{u}vka's Algorithm (1926)

Kruskal's Algorithm (1956)

Prim’s Algorithm (1957)

A simple hybrid algorithm Bor\r{u}vka's Algorithm: O(m log n) Prim’s Algorithm: O(m + n log n) Kruskal’s Algorithm: O(m log m) A hybrid algorithm of Bor\r{u}vka's Algorithm and Prim’s Algorithm: O(m loglog n). How? Hint: First apply the contraction step in Bor\r{u}vka's Algorithm for O(loglog n) time.

Approximation algorithms

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 Heuristic or for special data

Too hard to survive? Life finds the ways Approximation Online Distributed 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 – Minimum tour (MT) 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<=MT It is a 2-approximation 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 Triangle inequality => 2-approximation for TSP (visiting each city only once) Why?

All exact science is dominated by the idea of approximation. -- Bertrand Russell (1872 - 1970)