Trees Section 6.5 6.5 Trees 2 Trees Definition Examples Two Examples.

Slides:



Advertisements
Similar presentations
Decision Maths Networks Kruskals Algorithm Wiltshire Networks A Network is a weighted graph, which just means there is a number associated with each.
Advertisements

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.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
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.
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.
Discrete Structures Lecture 13: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
9.2 The Traveling Salesman Problem. Let us return to the question of finding a cheapest possible cycle through all the given towns: We have n towns (points)
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
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:
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
Spanning Trees.
3/29/05Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 4.2 Minimal Spanning Trees Prepared by Amanda Dargie and Michele Fretta.
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.
Two Discrete Optimization Problems Problem #2: The Minimum Cost Spanning Tree Problem.
Chapter 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
ECE 250 Algorithms and Data Structures Douglas Wilhelm Harder, M.Math. LEL Department of Electrical and Computer Engineering University of Waterloo Waterloo,
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Minimum Spanning Tree in Graph - Week Problem: Laying Telephone Wire Central office.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
GRAPH Learning Outcomes Students should be able to:
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Copyright © Cengage Learning. All rights reserved.
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.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
The Traveling-Salesman Problem. Born August 4, 1805 in Dublin, Ireland Died September 2, 1865 in Dublin, Ireland Made many contributions to the Physics.
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.
Spring 2015 Mathematics in Management Science Traveling Salesman Problem Approximate solutions for TSP NNA, RNN, SEA Greedy Heuristic Algorithms.
© 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.
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.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
Mathematics in Management Science
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
Introduction to Graph Theory
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.
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Unit 2 Hamiltonian Circuits. Hamiltonian Circuit: A tour that starts at a vertex of a graph and visits each vertex once and only once, returning to where.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
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.
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
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Chapter 2: Business Efficiency Lesson Plan
Chapter 2: Business Efficiency Lesson Plan
Spanning Trees Discrete Mathematics.
Discrete Math: Hamilton Circuits
Graph Algorithm.
Spanning Trees.
Graph Algorithm.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Section 14.4 Trees.
Chapter 2: Business Efficiency Business Efficiency
4-4 Graph Theory Trees.
Warm Up – Friday.
Outline This topic covers Prim’s algorithm:
Connectivity Section 10.4.
Networks Kruskal’s Algorithm
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Section 13.4 Trees.
7 The Mathematics of Networks
Presentation transcript:

Trees Section 6.5

6.5 Trees 2 Trees Definition Examples Two Examples

6.5 Trees 3 3 Topics 1.Minimal Cost Spanning Trees 2.Counting Trees 3.Searching Trees Animations

6.5 Trees 4 Minimal Cost Spanning Tree Example: A planned community Build a road system to begin for a 1000-acre planned community. It will include a convenience store, golf course, tennis courts, and three condo units The developer has two goals 1. 2.

6.5 Trees Golf S Condo 1 Condo 3 Tennis Condo 2 Units in $1,000’s

6.5 Trees 6 Best of the 3 animations was $72,000. You can do better. Click when you find one Golf S Condo 1 Condo 3 Tennis Condo 2 Units in $1,000’s 1.Got it 0 of 30

6.5 Trees Yes No, loop Yes No, loop Yes Stop $, Golf S Condo 1 Condo 3 Tennis Condo 2 Units in $1,000’s

6.5 Trees 8 Summarize the Algorithm Resulting set of edges is called a minimal cost spanning tree Joseph Kruskal

6.5 Trees 9 Understanding the terms “Minimal cost” = Obvious “Spanning” = No isolated vertices “Tree” = A graph with no loops

6.5 Trees 10 Continental Cable Vision will have to spend 1. $405, $456, $505, $528, None of the above Avon Simsbury Suffield Bloomfield Vernon South Windsor Granby Units in $1,000’s 0 of 30

6.5 Trees Counting Two teams, A and B, play a “best-of 5” game series. For example, here are some ways that A could win: In how many different ways can A win the series?

6.5 Trees 12 And the answer is…? of 30

6.5 Trees 13 A “Tree” Solution

6.5 Trees 14 “Red Sox vs. Yanks” The Red Sox play the Yanks in an unusual 4-game series. If the visiting team (in this case the beloved Red Sox) wins two games, they win the series. The home team must win three games to win the series For example: In how many different ways can the series be played?

6.5 Trees 15 And the answer is…? 1. 4 ways 2. 6 ways 3. 8 ways ways

6.5 Trees 16

6.5 Trees 17 A red chip, a white chip, and a blue chip are placed in a container. A person blindly picks one chip, notes its color, and then replaces it in the container. The person then chooses a second chip from the container and notes its color. Use a tree to determine the number of ways in which exactly one of the two chips drawn is the blue chip

6.5 Trees Searching You secretly choose an integer from I claim that I can find your number after I ask you X “yes/no” questions. What is X? More than 20

6.5 Trees 19 Range# Questions 1 - 1,000, , , ,

End of 6.5

6.5 Trees Units are in $1,000’s $0$30,000$57,000$87,000$115,000$131,000

6.5 Trees Units are in $1,000’s $0$30,000$53,000$67,000$94,000$122,000

6.5 Trees Units are in $1,000’s $0 $11,000 $21,000 $35,000 $54,000 $72,000

6.5 Trees 24 Family Trees

6.5 Trees 25 Zork

6.5 Trees 26 Minimal Cost Spanning Trees Joseph B. Kruskal

Meta - Material

6.5 Trees 28 0 / 30 A tree has ten vertices of degree 2, ten vertices of degree 3, ten vertices of degree 4, one vertex of degree 5, and its remaining vertices have degree 1. How many vertices are in the graph? 1. Matt????

6.5 Trees 29 Cheapest Link Like NN start with two closest vertices, but keep on selecting pairs of vertices with the shortest distance between them. Not just the ones adjacent to the already selected pairs. Restrictions: don’t complete a circuit until all vertices are included A link may not be added if it results in more than two edges coming from the same vertex

6.5 Trees 30 Nearest Insertion Start once again with two closest vertices Then make a circuit using those two and a third vertex, namely the one that is nearer to either one of the original two vertices Now include the unused vertex closest to any of the three.

6.5 Trees 31 Bonus questions Jack and Jill were at a party with three other married couples. As people were introduced a good deal of handshaking took place. No one shook hands with his or her spouse No none shook hands with herself or himself No one shook hands with anyone more than once. When leaving the party, Jill asked the other seven people how many hands they had shaken aand received 7 different answers. How many hands did Jill shake at the party? How many handshakes for Jack?

6.5 Trees 32 Ex. 3 Oil Pipeline A pipeline is to be constructed to take oil across the northern part of Canada Find the minimum cost to ship the oil between connecting points

6.5 Trees 33 A B C G E D F Units in $10,000’s

6.5 Trees 34 0 / 30 And, the answer is ….. (Choose the closest answer) 1. $49, $55, $59, $69, $73,000

6.5 Trees 35 0 / 30 Test question? If there are N locations (vertices), how many edges are there? 1. N 2. N N –

6.5 Trees 36 Cable Service Continental Cable Vision wishes to bring their services to 7 towns in CT. Every pair of towns must be connected by the service. Construct a minimal cost-spanning tree to solve the problem Avon Simsbury Suffield Bloomfield Vernon South Windsor Granby Units in $1,000’s

6.5 Trees 37