Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms Spanning Trees
Advertisements

Lecture 15. Graph Algorithms
Math for Liberal Studies.  A cable company wants to set up a small network in the local area  This graph shows the cost of connecting each pair of cities.
10.4 Spanning Trees. Def Def: Let G be a simple graph. A spanning tree of G is a subgraph of G that is a tree containing every vertex of G See handout.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
Minimum Spanning Tree CSE 331 Section 2 James Daly.
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.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
Spanning Trees.
Spanning Trees. 2 Spanning trees Suppose you have a connected undirected graph Connected: every node is reachable from every other node Undirected: edges.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
Design and Analysis of Algorithms Minimum Spanning trees
Spanning Trees. Spanning trees Suppose you have a connected undirected graph –Connected: every node is reachable from every other node –Undirected: edges.
Minimum Spanning Trees
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.
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.
Minimum Spanning Trees What is a MST (Minimum Spanning Tree) and how to find it with Prim’s algorithm and Kruskal’s algorithm.
Minimum Spanning Tree in Graph - Week Problem: Laying Telephone Wire Central office.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Minimum Spanning Trees and Clustering By Swee-Ling Tang April 20, /20/20101.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Graph Algorithms: Minimum.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Lecture 12-2: Introduction to Computer Algorithms beyond Search & Sort.
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.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we can find a path that goes over all.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Aim: Graph Theory - Trees Course: Math Literacy Do Now: Aim: What’s a tree?
Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.4 Trees.
Minimum Spanning Trees Prof. Sin-Min Lee Dept. of Computer Science, San Jose State University.
Prim's Algorithm This algorithm starts with one node. It then, one by one, adds a node that is unconnected to the new graph to the new graph, each time.
Fundamental Data Structures and Algorithms (Spring ’05) Recitation Notes: Graphs Slides prepared by Uri Dekel, Based on recitation.
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
Lecture19: Graph III Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)
Chapter 14 Section 4 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
Graph Theory Trees. WHAT YOU WILL LEARN Trees, spanning trees, and minimum-cost spanning trees.
Trees Dr. Yasir Ali. A graph is called a tree if, and only if, it is circuit-free and connected. A graph is called a forest if, and only if, it is circuit-free.
Prims Algorithm for finding a minimum spanning tree
Minimum Spanning Tree What is a Minimum Spanning Tree.
Lecture 19 Minimal Spanning Trees CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
1) Find and label the degree of each vertex in the graph.
© M. Winter COSC/MATH 4P61 - Theory of Computation Minimum-weight Spanning Tree Weighted Graph Spanning.
Tree Diagrams A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!
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.
Unit 11 Graphs (2) King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
Graph Search Applications, Minimum Spanning Tree
Minimum Spanning Trees
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Minimum Spanning Tree Chapter 13.6.
Spanning Tree A spanning tree is any tree that consists solely of edges in G and that includes all the vertices in G. Example.
Spanning Trees Discrete Mathematics.
Graph Algorithm.
Minimum Spanning Tree.
Minimum Spanning Trees
Connected Components Minimum Spanning Tree
Minimum Spanning Tree.
Section 14.4 Trees.
Spanning Trees.
4-4 Graph Theory Trees.
Kruskal’s Algorithm for finding a minimum spanning tree
A path that uses every vertex of the graph exactly once.
Networks Kruskal’s Algorithm
CSE 373: Data Structures and Algorithms
Minimum spanning trees
Minimum Spanning Trees (MSTs)
Kruskal’s Algorithm AQR.
Presentation transcript:

Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University

A graph in which there is at least one path between each pair of vertices. What is a connected graph This is a connected graph.This is NOT a connected graph.

A path that starts and ends at the same vertex and does not use any edge more than once. IT DOES NOT HAVE TO USE ALL THE EDGES. This graph has NO cycles. This graph has 3 cycles. What is a cycle

We call a graph a tree if the graph is connected and contains no cycles. Trees: Not Trees: Not connected Has a cycle What is a tree

A tree that includes every vertex of the original. Graph G The following are two different spanning trees of Graph G. What is a spanning tree

A spanning tree that has minimum (lowest) total weight. ◦Technically it is a minimum-weight spanning tree. What is a minimum spanning tree (MST) Graph G The following are two different spanning trees of Graph G, however the first one is the minimum spanning tree.

Methods to computing a minimum spanning tree: We could try to detect cycles and remove edges, but Kruskal’s algorithm builds them from the bottom-up starting with vertices and drawing only the necessary edges. Kruskal’s Algorithm – starts with a graph of only the vertices and then adds the edge with the minimum weight to connect two vertices. What is Kruskal’s Algorithm Step 1: Put all of the weights in a list from smallest to largest. Step 2: Find the smallest weight in the list and draw the associated edge and two vertices AS LONG AS IT DOES NOT CREATE A CYCLE!!! Step 3: Remove this weight from the list. Step 4: Repeat steps 2 and 3 until ALL the vertices are CONNECTED.

Extra Information Minimum-cost spanning trees have many applications. ◦Building cable networks that join n locations with minimum cost. ◦Building a road network that joins n cities with minimum cost. ◦Obtaining an independent set of circuit equations for an electrical network. ◦In pattern recognition minimal spanning trees can be used to find noisy pixels.