Section 14.4 Trees.

Slides:



Advertisements
Similar presentations
Lecture 15. Graph Algorithms
Advertisements

Operational Research (O.R.) case studies. What’s the problem?
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.
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.
3.3 Spanning Trees Tucker, Applied Combinatorics, Section 3.3, by Patti Bodkin and Tamsen Hunter.
1 Section 9.4 Spanning Trees. 2 Let G be a simple graph. A spanning subtree of G is a subgraph of G containing every vertex of G –must be connected; contains.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
7.3 Kruskal’s Algorithm. Kruskal’s Algorithm was developed by JOSEPH KRUSKAL.
Two Discrete Optimization Problems Problem #2: The Minimum Cost Spanning Tree Problem.
Algorithms on graphs In Decision Mathematics, a graph consists of points (called vertices or nodes) which are connected by lines (edges or arcs). Eg in.
Graphs & Graph Algorithms 2 Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Copyright © Cengage Learning. All rights reserved.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
Graph Theory Topics to be covered:
Graph Theory Hamilton Paths and Hamilton Circuits.
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.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
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.
Fundamental Data Structures and Algorithms (Spring ’05) Recitation Notes: Graphs Slides prepared by Uri Dekel, Based on recitation.
Chapter 14 Section 4 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
Union-Find  Application in Kruskal’s Algorithm  Optimizing Union and Find Methods.
AND.
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.
Walks, Paths and Circuits. A graph is a connected graph if it is possible to travel from one vertex to any other vertex by moving along successive edges.
Prims Algorithm for finding a minimum spanning tree
1) Find and label the degree of each vertex in the graph.
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.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
CSE 373: Data Structures and Algorithms Lecture 21: Graphs V 1.
Graphs 1 Neil Ghani University of Strathclyde. Where are we …. We studied lists: * Searching and sorting a list Then we studied trees: * Efficient search.
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
Minimum Spanning Trees
Minimum Spanning Tree Chapter 13.6.
Amusement park project
Graph Algorithm.
Minimum Spanning Tree.
Minimum Spanning Trees
Connected Components Minimum Spanning Tree
Graphs & Graph Algorithms 2
Graphs Chapter 11 Objectives Upon completion you will be able to:
Shortest Path.
Chapter 2: Business Efficiency Business Efficiency
4-4 Graph Theory Trees.
Kruskal’s Algorithm for finding a minimum spanning tree
Louisiana Travels.
Warm Up – Wednesday.
CSCI2100 Data Structures Tutorial
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Warm Up – Tuesday Find the critical times for each vertex.
Section 13.4 Trees.
7 The Mathematics of Networks
Presentation transcript:

Section 14.4 Trees

What You Will Learn Trees Spanning Trees Kruskal’s Algorithm

Tree A tree is a connected graph in which each edge is a bridge.

Examples Trees Not Trees

Spanning Tree A spanning tree is a tree that is created from another graph by removing edges while still maintaining a path to each vertex.

Example 3: A Spanning Tree Problem Schoolcraft College is considering adding awnings above its sidewalks to help shelter students from the snow and rain while they walk between some of the buildings on campus. A diagram of the buildings and the connecting sidewalks where the awnings are to be added is on the next slide.

Example 3: A Spanning Tree Problem Originally, the president of the college wished to have awnings placed over all the sidewalks shown, but that was found to be too costly. Instead, the president has proposed to place just enough awnings over a select number of sidewalks so that, by moving from building to building, students would still

Example 3: A Spanning Tree Problem be able to reach any location shown without being exposed to the elements. a) Represent all the buildings and sidewalks shown with a graph. b) Create three different spanning trees from this graph that would satisfy the president’s proposal.

Example 3: A Spanning Tree Problem Solution a) Using letters to represent the building names, vertices to represent the buildings, and edges to represent the sidewalks between buildings, we generate this graph.

Example 3: A Spanning Tree Problem Solution b) To create a spanning tree we remove nonbridge edges until a tree is created.

Example 3: A Spanning Tree Problem Solution b) Here are two more possibilities.

Minimum-cost spanning tree A minimum cost spanning tree is the least expensive spanning tree of all spanning trees under consideration.

Kruskal’s Algorithm To construct the minimum-cost spanning tree from a weighted graph: 1. Select the lowest-cost edge on the graph. 2. Select the next lowest-cost edge that does not form a circuit with the first edge. 3. Select the next lowest-cost edge that does not form a circuit with the previously selected edges.

Kruskal’s Algorithm 4. Continue selecting the lowest-cost edges that do not form circuits with the previously selected edges. 5. When a spanning tree is complete, you have the minimum-cost spanning tree.

Example 7 Schools in Budville, Fairplay, Happy Corners, Kieler, Louisburg, and Sinsinawa, Wisconsin, all wish to establish a fiber-optic computer network to share information and to obtain Internet access. The most efficient method of establishing such a network would be to install fiber-optic cable along roadsides.

Example 7 The weighted graph shows the distance in miles between schools along existing roads.

Example 7 a) Determine the shortest distance to link these six schools. b) The cost to install fiber-optic cable is $1257 per mile. What is the minimum cost to install the fiber-optic cable along the roadsides determined in part (a)?

Example 7 Solution a) We are seeking the minimum-cost spanning tree. Use Kruskal’s algorithm. Select edge HB, 1 mi; edge BL, 1.5 mi; edge FS, 2 mi

Example 7 Solution Selecting HL, 2.5 mi creates a circuit between H, B, L; so we must select LF, 3 mi. Finally, select edge KL, 3.5 mi.

Example 7 Solution According to Kruskal’s algorithm, this figure shows the minimum-cost spanning tree. Place the fiber-optic cable along this path.

Example 7 Solution b) From the figure, there are 1 + 1.5 + 3.5 + 3 + 2 = 11 miles of fiber-optic cable needed. At $1257 per mile, the cost is $1257 × 11 = $13,827.