Section 13.4 Trees.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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.
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.
Section 14.1 Intro to Graph Theory. Beginnings of Graph Theory Euler’s Konigsberg Bridge Problem (18 th c.)  Can one walk through town and cross all.
Minimal Spanning Trees – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Minimal Spanning Trees Reading: Kolman, Section 7.5.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
7.3 Kruskal’s Algorithm. Kruskal’s Algorithm was developed by JOSEPH KRUSKAL.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
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.
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.
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
Graph Theory Topics to be covered:
Graph Theory Hamilton Paths and Hamilton Circuits.
(CSC 102) Lecture 32 Discrete Structures. Trees Previous Lecture  Matrices and Graphs  Matrices and Directed Graphs  Matrices and undirected Graphs.
Networks.
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.3 Hamilton Paths, and Hamilton Circuits.
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.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
Union-Find  Application in Kruskal’s Algorithm  Optimizing Union and Find Methods.
Graph Theory Trees. WHAT YOU WILL LEARN Trees, spanning trees, and minimum-cost spanning trees.
M Clements Formal Network Theory. Introduction Practical problem – The Seven Bridges of Königsberg Network graphs Nodes & edges Degrees Rules/ axioms.
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.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
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.
Chinese Postman Problem
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
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.
Discrete Math 2 Weighted Graph Search Tree
Minimum Spanning Trees and Shortest Paths
Amusement park project
Section 14.3 Hamilton Paths, and Hamilton Circuits
Discrete Mathematics for Computer Science
Minimum Spanning Tree.
Minimum Spanning Trees
Connected Components Minimum Spanning Tree
Section 14.4 Trees.
CSE 373: Data Structures and Algorithms
4-4 Graph Theory Trees.
Kruskal’s Algorithm for finding a minimum spanning tree
Warm Up – Wednesday.
Networks Kruskal’s Algorithm
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Warm Up – Tuesday Find the critical times for each vertex.
Graphs, Paths, and Circuits
7 The Mathematics of Networks
Presentation transcript:

Section 13.4 Trees

What You Will Learn Upon completion of this section, you will be able to: Use trees to represent real-life problems. Solve problems involving minimum-cost spanning trees.

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 Kutztown University 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

Example 3: A Spanning Tree Problem Originally, the president of the university 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: Colorado Bicycle Paths The Colorado Park and Recreation Association wishes to build bicycle trails that connect the cities of Aurora, Boulder, Denver, Englewood, and Golden. The approximate distances, in miles, between these cities are given in the table on the next slide.

Example 7: Colorado Bicycle Paths

Example 7: Colorado Bicycle Paths a) Use Kruskal’s algorithm to determine the minimum-cost spanning tree that would link each city and create the shortest total distance for the bicycle trails. b) If the cost of building the bicycle trails is $5500 per mile, determine the cost of building the bicycle trails determined in part (a).

Example 7: Colorado Bicycle Paths Solution a) Draw five labeled vertices that represent the five cities. Note that the exact location and distance between vertices does not need to be drawn to scale.

Example 7: Colorado Bicycle Paths Solution The shortest distance listed in the tables I between Denver and Englewood, 8 miles and the next shortest distance is Aurora and Denver, 9 miles. Thus, we include edges DE and AD, respectively.

Example 7: Colorado Bicycle Paths Solution The next shortest distance, without creating a circuit, between Denver and Golden, so we include edge DG.

Example 7: Colorado Bicycle Paths Solution Next, we include the distance between Boulder and Golden, because edge BG does not create any circuits.

Example 7: Colorado Bicycle Paths Solution b.) We can see that there are 8 + 9 + 16 + 26, or 59 miles of bicycle trails needed. At a cost of $5500 per mile, the cost to create these trails is $5500 × 59, or $324,500.