Chen, Lu Mentor: Zhou, Jian Shanghai University, School of Management Email: Chen213.shu.edu.cn.

Slides:



Advertisements
Similar presentations
Lecture 15. Graph Algorithms
Advertisements

Networks Prim’s Algorithm
Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
MINIMAL CONNECTOR PROBLEMS Problem: A cable TV company is installing a system of cables to connect all the towns in a region. The numbers in the network.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
1 Spanning Trees Lecture 20 CS2110 – Spring
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
CS 311 Graph Algorithms. Definitions A Graph G = (V, E) where V is a set of vertices and E is a set of edges, An edge is a pair (u,v) where u,v  V. If.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
Network Optimization Problems: Models and Algorithms This handout: Minimum Spanning Tree Problem.
Graphs and Trees This handout: Trees Minimum Spanning Tree Problem.
Minimum-Cost Spanning Tree weighted connected undirected graph spanning tree cost of spanning tree is sum of edge costs find spanning tree that has minimum.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
Graphs & Graph Algorithms 2 Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
Minimum Spanning Tree Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
SPANNING TREES Lecture 21 CS2110 – Spring
Graph Dr. Bernard Chen Ph.D. University of Central Arkansas.
COSC 2007 Data Structures II Chapter 14 Graphs III.
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Minimum Spanning Trees Suppose G = (V, E) is a undirected network. Each edge (i,j) in E has an associated ‘length’ c ij (cost, time, distance, …) Determine.
Spanning Trees CSIT 402 Data Structures II 1. 2 Two Algorithms Prim: (build tree incrementally) – Pick lower cost edge connected to known (incomplete)
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.
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Spanning Tree Algorithms William T. Trotter and Mitchel T. Keller Math 3012 – Applied Combinatorics Spring 2009.
Minimum- Spanning Trees
Graphs Upon completion you will be able to:
Lecture 19 Minimal Spanning Trees CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
COMP108 Algorithmic Foundations Greedy methods
Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008
Minimum Spanning Tree Chapter 13.6.
Short paths and spanning trees
Data Structures & Algorithms Graphs
Autumn 2016 Lecture 11 Minimum Spanning Trees (Part II)
Graph Algorithm.
Minimum-Cost Spanning Tree
Spanning Trees.
Minimum Spanning Tree.
Minimum Spanning Tree.
Autumn 2015 Lecture 11 Minimum Spanning Trees (Part II)
CSE 373 Data Structures and Algorithms
Minimum-Cost Spanning Tree
Minimum-Cost Spanning Tree
Autumn 2015 Lecture 10 Minimum Spanning Trees
Minimum Spanning Tree Algorithms
Minimum Spanning Tree.
CSE 373: Data Structures and Algorithms
CS 584 Project Write up Poster session for final Due on day of final
CSC 380: Design and Analysis of Algorithms
Networks Prim’s Algorithm
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Algorithms CSCI 235, Spring 2019 Lecture 35 Graphs IV
Spanning Trees Lecture 20 CS2110 – Spring 2015.
Minimum-Cost Spanning Tree
More Graphs Lecture 19 CS2110 – Fall 2009.
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

Chen, Lu Mentor: Zhou, Jian Shanghai University, School of Management Chen213.shu.edu.cn

The object is to minimize the total length of the links inserted into the network. Conditions:  Every pair of vertices is connected by exactly one path.  n-1 links need to be chosen.  No cycle. 2

Ⅰ Kruskal Algorithm (1956)Kruskal Algorithm (1956) Ⅱ Prim Algorithm (1957)Prim Algorithm (1957) Ⅲ Dijkstra Algorithm (1959)Dijkstra Algorithm (1959) Ⅳ Reverse Delete AlgorithmReverse Delete Algorithm Ⅴ Sollin Algorithm (1961)Sollin Algorithm (1961) 3

 G=( V, E )  w v means vertex. e means edges. w means weight. 4

1. Sort the edges by weight. 2. Examine each edge in the order of increasing weight. 3. If the edge examined does not create a cycle with the edges in the current forest, it is added to the forest; otherwise, it is discard. 5

 w 12 w 45 w 14 w 25 w 35 w 23 w 13 w 43  √ √ √ × √ × × ×

1. Select any node arbitrarily, and then connect it to the nearest distinct node. 2. Identify the unconnected node that is closest to a connected node, and then connect these two nodes. 3. Repeat step 2 until all nodes have been connected. 8

 Ties for the nearest distinct node or the closest unconnected node may be broken arbitrarily, and the algorithm must still yield an optimal solution. 10

 Special Prim algorithm  Definitions: S : Set of the nodes which have been connected by branch. S’ : The remaining nodes. d(v) : Distance from note v to S. 14

Step1: Set N={1, 2,…,n}, and d j =w 1 j. Step2: d j* =min{d j | j∈S’}=w i j* (i∈S, j*∈S’), j* add into S. Step3: d j = min{ d j , w j*j }, j∈S, return to step 2, until S=N. 15

 1. Select vertex1 as the starting point, S={1}.  2. d 2 =w 12 = 1, d 3 =7, d 4 =3 d j *=min{d 2, d 3, d 4 | j∈S’} =w 12 =w ij* = 1 j*=2,vertex 2 add into S, and S={1,2}.  3. d 4 =min{d 4, w 24 }=min{3, 4}=3 d 3 =min{d 3, w 23 }=min{7, 6}=6 d 5 =min{d 5, w 25 }=min{5, 4}=4 d j *=min{d 4, d 3, d 5 | j∈S’} =w 14 =w ij* =3 j*=4, vertex 4 add into S, and S={1,2,4} 17

( d 4 =w 14 ) 1 (d 2 =w 12 )

 4. d 3 =min{d 3, w 43 }=min{7, 8}=7 d 5 =min{d 5, w 45 }=min{5, 2}=2 d j *=min{d 4, d 3, d 5 | j∈S’} =w 45 =w ij* =32 j*=5, vertex 5 add into S, and S={1,2,4,5} 5. d 3 =min{d 3, w 53 }=min{7, 5}=5 j*=3, vertex 3 add into S. 6. S={1,2,4,5,3}=N. 19

(w 53 ) 2(w 45 ) 20 3 ( d 4 =w 14 ) 1 (d 2 =w 12 )

 It is the reverse of Kruskal’s algorithm  Also called “Tear Cycle Method” 21

1. Select a spanning tree arbitrarily 2. Add a branch in this tree, then there will be a loop in the graph. Removal the longest one. 3. Repeat step 2 until all the edges have been tested 22

 Original: Borůvka‘s algorithm ( 1926 )  Reason: Because Sollin was the only computer scientist in this list living in an English speaking country, this algorithm is frequently called Sollin's algorithm. 29

1. Every vertex signify a tree , and the original graph signify a forest. 2. Chose every vertex’s closet edge. If some vertexes’ closet edge are the same edge, these vertexes merge into a new vertex. 3. Repeat step 2 , until there is only one tree in the forest. 30

e 12 2e 12 3e 35 4e 45 5 e 45 31

,2 e 14 4,5 e 14 3 e 35 32

,2,4,5 e35 3 e35 33

35