6.2 Initial Problem. Section 6.2 Network Problems. 6.2 Initial Problem, cont d. Weighted Graphs. Weighted Graphs, cont d. Weighted Graphs, cont d

Size: px
Start display at page:

Download "6.2 Initial Problem. Section 6.2 Network Problems. 6.2 Initial Problem, cont d. Weighted Graphs. Weighted Graphs, cont d. Weighted Graphs, cont d"

Transcription

1 Section 6.2 Network Problems Goals Study weighted graphs Study spanning trees Study minimal spanning trees Use Kruskal s algorithm 6.2 Initial Problem Walkways need to be built between the buildings on the campus pictured at right. 6.2 Initial Problem, cont d How can the walkways be constructed so that: Students can go from any building on campus to any other building without needing to walk outside. The total length of the walkways is minimized. The solution will be given at the end of the section. Weighted Graphs A graph in which each edge has a number associated with it is called a weighted graph. The number corresponding to an edge is called the weight of the edge. Weighted Graphs, cont d Typically the weights of the edges in a graph are assigned in a way that represents some physical situation or practical problem. The lengths of the edges in a graph do not have to be proportional to the stated weights. Weighted Graphs, cont d An example of a weighted graph is shown below. 1

2 Suppose Ed has: Example 1 A 35-minute drive from his home to his workplace A 15-minute drive from his workplace to his health club A 25 minute drive from his health club to his home Draw a weighted graph to represent this situation. Solution: Example 1, cont d The vertices of the graph will represent Ed s home (H), his workplace (W), and his health club (C). The weight of each edge will represent the driving time between the two places. For simplicity, we can draw all the edges as straight lines and with the same length. Example 1, cont d One possible weighted graph is shown below. Redundant Edges Redundant edges are edges that can be removed while still leaving a path between the two vertices. Example: If edge CH is removed from the previous graph, Ed can still get from home to his club by driving to work and then to the club. The edge CH is a redundant edge. Question: Are there any redundant edges in the graph? a. yes b. no A subgraph of a given graph is a set of vertices and edges chosen from among those of the original graph. Example: Removing edge CH creates the subgraph shown at right. Subgraphs 2

3 Subgraphs, cont d Example: Another subgraph could be created by removing vertex C and its two incident edges. Example 2 A bus line goes between the cities shown in the table. a) Draw a weighted graph to represent the situation. b) Find two different routes from Selma to Anniston. Example 2, cont d a) Solution: A weighted graph is shown below. Example 2, cont d b) Solution: One possible route from Selma to Anniston is SMGA, with a total weight (length) of = 203 miles. Example 2, cont d b) Solution, cont d: Another possible route from Selma to Anniston is SBA, with a total weight (length) of = 222 miles. Trees One way to recognize that a graph contains redundant edges is to find a circuit in the graph. Recall that a circuit is a path that begins at a vertex and returns to that vertex without using any edges twice. A connected graph that has no circuits is called a tree. 3

4 Question: Choose the graph that is a tree. Trees, cont d The following figure gives examples of graphs that are trees and a graph that is not a tree. a. b. c. d. Example 3 This graph is not a tree because it contains several circuits. Find a subgraph that is a tree. Example 3, cont d Solution: Circuits are highlighted and edges are removed until the remaining subgraph has no circuits left. Spanning Trees A spanning tree is a subgraph that: Contains all the original vertices of the graph. Is connected. Contains no circuits. Spanning Trees, cont d Every connected graph has at least one spanning tree. An example of a spanning tree is shown below. 4

5 Minimal Spanning Trees A spanning tree with the smallest possible total weight is called a minimal spanning tree. Since a connected, weighted graph can have multiple spanning trees, there may be one or more than one of those spanning trees with the smallest total weight. Minimal Spanning Trees, cont d For the connected, weighted graph shown below: Subgraph (b) is not a minimal spanning tree. Subgraph (c) is a minimal spanning tree. Kruskal s Algorithm A method known as Kruskal s algorithm can be used to find a minimal spanning tree of a connected, weighted graph. Kruskal s algorithm begins with all the vertices of a graph and adds edges one by one, using the idea of acceptable and unacceptable edges. Kruskal s Algorithm, cont d Acceptable edges are Edges that do not share a vertex with any edges already chosen. Kruskal s Algorithm, cont d Acceptable edges are Edges that connect two components of the subgraph. Kruskal s Algorithm, cont d Acceptable edges are Edges that connect a component of the subgraph to a new vertex. 5

6 Kruskal s Algorithm, cont d Unacceptable edges are Edges that add to a component of the subgraph, but do not add a new vertex. Kruskal s Algorithm, cont d 1) Consider only the vertices of the graph. 2) Add the edge with the smallest weight. 3) Add the acceptable edge with the smallest weight. 4) Determine whether all vertices are connected by a path. a) If so, you have a minimal spanning tree. b) If not, repeat Step 3. Construct a minimal spanning tree for the weighted graph. Example 4 Example 4, cont d Solution: Start with the 4 vertices. Add the edge with the smallest weight. Example 4, cont d All unused edges are acceptable, so we simply choose the edge with the smallest weight. Select the edge with weight 2.6. Example 4, cont d The acceptable edges at this step were the ones with weights 4.8 and 3.7. Select the edge with weight

7 Example 4, cont d The subgraph is now connected, so this is a minimal spanning tree. The weight of the tree is = Initial Problem Solution How can a college build walkways of the minimum length possible so that students can go from any building on campus to any other building without needing to walk outside? Initial Problem Solution, cont d Create a weighted graph to represent the buildings and existing sidewalks on the campus. The weight of each edge is the distance between the two buildings. Initial Problem Solution, cont d Use Kruskal s algorithm to find a minimal spanning tree. The edges included in the minimal spanning tree represent the sidewalks that should be converted into covered walkways. Initial Problem Solution, cont d Under this plan, students can get from any building to any other building without going outside, although they may have to walk farther inside. The length of the walkways was minimized to a total of = 750 feet. 7

8 Section 6.3 Traveling-Salesperson Problem 6.3 Initial Problem Goals Study Hamiltonian circuits Study the Traveling-Salesperson Problem Use the Brute-Force Algorithm Use the Nearest-Neighbor Algorithm Use the Cheapest-Link Algorithm An author needs to find a route that will minimize the total distance she must drive between the cities. The solution will be given at the end of the section. Hamiltonian Circuits Example 1 A path that visits each vertex in a graph exactly once is called a Hamiltonian path. If a Hamiltonian path begins and ends at the same vertex, it is called a Hamiltonian circuit. The highlighted edges in the graph represent a Hamiltonian path. The path can be written AGFEDBC or CBDEFGA. Example 2 Hamiltonian Circuits, cont d The highlighted edges in the graph represent a Hamiltonian circuit. The circuit, starting at A, can be written AGFEDCBA Note: A Hamiltonian path or circuit must pass through every vertex of the graph, but it does not have to use every edge. A Hamiltonian path can be used, for example, to model a delivery truck stopping at every house in a neighborhood but not using every street. 8

9 Example 3 Find a Hamiltonian path in each graph or explain why you cannot. Example 3, cont d a) Solution: The path ABCD is a Hamiltonian path. Adding an edge to the path forms the Hamiltonian circuit ABCDA. Other Hamiltonian paths and circuits are possible. Example 3, cont d b) Solution: The path ABCD is a Hamiltonian path. There is no Hamiltonian circuit. Example 3, cont d c) There is no Hamiltonian path. Any Hamiltonian path must start at either A or F. Any path that starts at A will leave out either C, D, or F. Any path that starts at F will leave out either C, D, or A. Complete Graphs Example 4 A complete graph is a graph in which every pair of vertices is connected by exactly one edge. For each graph, determine whether or not it is complete. 9

10 Example 4, cont d Example 4, cont d a) Solution: Check each pair of vertices. There is exactly one edge between each pair of vertices, so the graph is complete. b) Solution: Check each pair of vertices. There is no edge from A to C, for example. The graph is not complete. Example 4, cont d Example 5 c) Solution: Check each pair of vertices. There are two edges from A to F, for example. The graph is not complete. Draw an example of a complete graph with five vertices. Count the number of edges in the graph. Example 5, cont d Solution: Two possible representations of such a graph are shown below. A complete graph with 5 vertices has 10 edges. Theorem on Complete Graphs The number of edges in a complete graph always follows a certain pattern. A complete graph with n vertices n always has ( n 1) edges. 2 10

11 Question: A graph has 20 vertices and 195 edges. Is the graph complete? a. yes b. no Complete Graphs, cont d In general, a graph may or may not have a Hamiltonian path or circuit. A complete graph, however, always has a Hamiltonian circuit. Any list of all the vertices in the graph will be a Hamiltonian path. Adding the starting vertex to the end of the list describing the path will create a Hamiltonian circuit. List all the Hamiltonian paths and all the Hamiltonian circuits in the graph. Example 6 Solution: Example 6, cont d Example 6, cont d Note that the complete graph in the previous example had 3 vertices and 6 different Hamiltonian circuits. This is the case because each circuit can begin at one of the 3 vertices, travel to one of 2 vertices second, and travel to the 1 remaining vertex last. There are 3(2)(1) = 6 Hamiltonian circuits. Theorem on Complete Graphs The number of Hamiltonian paths in a complete graph with n vertices is n! = n(n 1)(n 2)(n 3) (1). The symbol n! is read n factorial. 11

12 Question: How many possible Hamiltonian circuits exist in a complete graph with 9 vertices? a. 81 b. 40,320 c. 362,880 d. 3,265,920 Traveling-Salesperson Problem A salesperson who must visit various cities and then return home wants to minimize the cost (measured in distance, time, or money) of his or her trip. Because Hamiltonian circuits can be applied to find this type of least-cost trip, the problem of finding a least-cost Hamiltonian circuit is called the Traveling-Salesperson Problem. Complete Weighted Graphs The cost of a path in a weighted graph is the sum of the weights assigned to the edges in the path. When costs are assigned to each edge in a complete graph, the graph is called a complete weighted graph. Question: What is the cost of the path ABD in the graph below? a. 26 b. 14 c. 24 d. 41 Example 7 Example 7, cont d List all possible Hamiltonian paths, and their costs, in the complete weighted graph. Find the path of least cost. Solution: The graph has 4 vertices, so there are 4! = 24 different Hamiltonian paths. These paths and their costs are listed on the next slide. 12

13 Example 7, cont d Example 7, cont d There are 2 Hamiltonian paths with the lowest cost of 37. CDAB BADC Example 7, cont d List all possible Hamiltonian circuits that start and end at vertex A. Find the circuit at A of least cost. Solution: Example 7, cont d Example 7, cont d Traveling-Salesperson, cont d There are 2 leastcost Hamiltonian circuits with a cost of 74. ABCDEA AEDCBA These 2 circuits are mirror images of each other. The method used to solve the previous example is called the Brute-Force Algorithm. List all possible Hamiltonian circuits. Calculate the cost of each circuit. Find the 2 mirror image circuits of least cost. This method is very time-consuming. 13

14 Traveling-Salesperson, cont d Traveling-Salesperson, cont d Instead of the Brute-Force Algorithm, faster approximation algorithms are typically used. An approximation algorithm finds a Hamiltonian circuit that is either the leastcost circuit or is one that is not much more costly than the least-cost circuit. Two approximation algorithms will be studied: The Nearest-Neighbor Algorithm The Cheapest-Link Algorithm Nearest-Neighbor Algorithm 1) Specify a starting vertex. 2) If unvisited vertices remain, go from the current vertex to the unused vertex with the lowest-cost connecting edge. 3) If no unvisited vertices remain, return to the starting vertex to finish forming the circuit. Apply the algorithm to approximate the lowest-cost Hamiltonian circuit. Example 8 Solution: Example 8, cont d Let the starting vertex be A. The unvisited vertices are B, C, D, and E. The choice of edges are AB: 13, AC: 11, AD: 17, or AE: 15. Choose edge AC and move to vertex C, the new current vertex. Example 8, cont d The unvisited vertices are B, D, and E. The choice of edges are CB: 20, CD: 12, or CE: 14. Choose edge CD. 14

15 Example 8, cont d The current vertex is now D. The unvisited vertices are B and E. The choice of edges are DB: 19 or DE: 16. Choose edge DE. Example 8, cont d The current vertex is now E. The unvisited vertex is B. Choose edge EB. Example 8, cont d The current vertex is now B. There are no unvisited vertices. Return to vertex A using edge BA. Example 8, cont d The Hamiltonian circuit is ACDEBA. Its cost is 70. This is at or near the lowest possible cost. Cheapest-Link Algorithm 1) All edges are acceptable and no edges have been selected. 2) Choose an acceptable edge of smallest weight. Cheapest-Link Algorithm, cont d 3) If a Hamiltonian circuit is not formed, determine the set of acceptable edges and repeat Step 2. Unacceptable edges are those that either share a vertex with two selected edges or that will close a circuit that is not Hamiltonian. 4) If the selected edges form a Hamiltonian circuit, this is the low-cost Hamiltonian circuit. 15

16 Apply the algorithm to approximate the lowest-cost Hamiltonian circuit. Example 9 Solution: Example 9, cont d All edges are acceptable. Select the edge of lowest cost: AC. Example 9, cont d All edges are still acceptable. Select the edge of lowest cost: CD. Example 9, cont d Edges BC, CE, and AD are unacceptable. Select the acceptable edge of lowest cost: AB. Example 9, cont d Edges BC, CE, BD, and AD are unacceptable. Select the acceptable edge of lowest cost: DE. Example 9, cont d The only remaining acceptable edge is BE. The low-cost circuit is complete, with a weight of

Topics Covered. Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm

Topics Covered. Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm Graph Theory Topics Covered Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm What is a graph? A collection of points, called vertices

More information

14 Graph Theory. Exercise Set 14-1

14 Graph Theory. Exercise Set 14-1 14 Graph Theory Exercise Set 14-1 1. A graph in this chapter consists of vertices and edges. In previous chapters the term was used as a visual picture of a set of ordered pairs defined by a relation or

More information

Sections 5.2, 5.3. & 5.4

Sections 5.2, 5.3. & 5.4 MATH 11008: Graph Theory Terminology Sections 5.2, 5.3. & 5.4 Routing problem: A routing problem is concerned with finding ways to route the delivery of good and/or services to an assortment of destinations.

More information

Warm -Up. 1. Draw a connected graph with 4 vertices and 7 edges. What is the sum of the degrees of all the vertices?

Warm -Up. 1. Draw a connected graph with 4 vertices and 7 edges. What is the sum of the degrees of all the vertices? Warm -Up 1. Draw a connected graph with 4 vertices and 7 edges. What is the sum of the degrees of all the vertices? 1. Is this graph a. traceable? b. Eulerian? 3. Eulerize this graph. Warm-Up Eulerize

More information

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. Chapter 6 Test Review Name SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. Solve the problem. 1) The number of edges in K12 is 1) 2) The number of Hamilton

More information

Chapter 14 Section 3 - Slide 1

Chapter 14 Section 3 - Slide 1 AND Chapter 14 Section 3 - Slide 1 Chapter 14 Graph Theory Chapter 14 Section 3 - Slide WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem Euler paths and Euler circuits Hamilton

More information

SEVENTH EDITION and EXPANDED SEVENTH EDITION

SEVENTH EDITION and EXPANDED SEVENTH EDITION SEVENTH EDITION and EXPANDED SEVENTH EDITION Slide 14-1 Chapter 14 Graph Theory 14.1 Graphs, Paths and Circuits Definitions A graph is a finite set of points called vertices (singular form is vertex) connected

More information

MTH-129 Review for Test 4 Luczak

MTH-129 Review for Test 4 Luczak MTH-129 Review for Test 4 Luczak 1. On each of three consecutive days the National Weather Service announces that there is a 50-50 chance of rain. Assuming that they are correct, answer the following:

More information

Mathematical Thinking

Mathematical Thinking Mathematical Thinking Chapter 2 Hamiltonian Circuits and Spanning Trees It often happens in mathematics that what appears to be a minor detail in the statement of a problem can have a profound effect on

More information

A path that visits every vertex exactly once is a Hamiltonian path. A circuit that visits every vertex exactly once is a Hamiltonian circuit.

A path that visits every vertex exactly once is a Hamiltonian path. A circuit that visits every vertex exactly once is a Hamiltonian circuit. Math 167 Review of Chapter 2 1 (c) Janice Epstein CHAPTER 2 BUSINESS EFFICENCY A path that visits every vertex exactly once is a Hamiltonian path. A circuit that visits every vertex exactly once is a Hamiltonian

More information

Graph Applications, Class Notes, CS 3137 1 Traveling Salesperson Problem Web References: http://www.tsp.gatech.edu/index.html http://www-e.uni-magdeburg.de/mertens/tsp/tsp.html TSP applets A Hamiltonian

More information

Study Guide Mods: Date:

Study Guide Mods: Date: Graph Theory Name: Study Guide Mods: Date: Define each of the following. It may be helpful to draw examples that illustrate the vocab word and/or counterexamples to define the word. 1. Graph ~ 2. Vertex

More information

1. Read each problem carefully and follow the instructions.

1. Read each problem carefully and follow the instructions. SSII 2014 1 Instructor: Benjamin Wilson Name: 1. Read each problem carefully and follow the instructions. 2. No credit will be given for correct answers without supporting work and/ or explanation. 3.

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

More information

a) Graph 2 and Graph 3 b) Graph 2 and Graph 4 c) Graph 1 and Graph 4 d) Graph 1 and Graph 3 e) Graph 3 and Graph 4 f) None of the above

a) Graph 2 and Graph 3 b) Graph 2 and Graph 4 c) Graph 1 and Graph 4 d) Graph 1 and Graph 3 e) Graph 3 and Graph 4 f) None of the above Mathematics 105: Math as a Liberal Art. Final Exam. Name Instructor: Ramin Naimi Spring 2008 Close book. Closed notes. No Calculators. NO CELL PHONES! Please turn off your cell phones and put them away.

More information

Finite Math A Chapter 6 Notes Hamilton Circuits

Finite Math A Chapter 6 Notes Hamilton Circuits Chapter 6: The Mathematics of Touring (Hamilton Circuits) and Hamilton Paths 6.1 Traveling Salesman Problems/ 6.2 Hamilton Paths and Circuits A traveling salesman has clients in 5 different cities. He

More information

Chapter 6. The Traveling-Salesman Problem. Section 1. Hamilton circuits and Hamilton paths.

Chapter 6. The Traveling-Salesman Problem. Section 1. Hamilton circuits and Hamilton paths. Chapter 6. The Traveling-Salesman Problem Section 1. Hamilton circuits and Hamilton paths. Recall: an Euler path is a path that travels through every edge of a graph once and only once; an Euler circuit

More information

Module 2: NETWORKS AND DECISION MATHEMATICS

Module 2: NETWORKS AND DECISION MATHEMATICS Further Mathematics 2017 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

Partha Sarathi Mandal

Partha Sarathi Mandal MA 515: Introduction to Algorithms & MA353 : Design and Analysis of Algorithms [3-0-0-6] Lecture 39 http://www.iitg.ernet.in/psm/indexing_ma353/y09/index.html Partha Sarathi Mandal psm@iitg.ernet.in Dept.

More information

A region is each individual area or separate piece of the plane that is divided up by the network.

A region is each individual area or separate piece of the plane that is divided up by the network. Math 135 Networks and graphs Key terms Vertex (Vertices) ach point of a graph dge n edge is a segment that connects two vertices. Region region is each individual area or separate piece of the plane that

More information

Lesson 5.2. The Traveling Salesperson Problem. Explore This

Lesson 5.2. The Traveling Salesperson Problem. Explore This Lesson 5.2 The Traveling alesperson Problem In Lesson 4.5, you explored circuits that visited each vertex of your graph exactly once (Hamiltonian circuits). In this lesson, you will extend your thinking

More information

UTILIZATION OF GIS AND GRAPH THEORY FOR DETERMINATION OF OPTIMAL MAILING ROUTE *

UTILIZATION OF GIS AND GRAPH THEORY FOR DETERMINATION OF OPTIMAL MAILING ROUTE * UTILIZATION OF GIS AND GRAPH THEORY FOR DETERMINATION OF OPTIMAL MAILING ROUTE * Dr. Mufid Abudiab, Michael Starek, Rene Lumampao, and An Nguyen Texas A&M University-Corpus Christi 1500 Ocean Drive Corpus

More information

How to find a minimum spanning tree

How to find a minimum spanning tree Print How to find a minimum spanning tree Definitions Kruskal s algorithm Spanning tree example Definitions Trees A tree is a connected graph without any cycles. It can also be defined as a connected graph

More information

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011 Precept 4: Traveling Salesman Problem, Hierarchical Clustering Qian Zhu 2/23/2011 Agenda Assignment: Traveling salesman problem Hierarchical clustering Example Comparisons with K-means TSP TSP: Given the

More information

Topic 10 Part 2 [474 marks]

Topic 10 Part 2 [474 marks] Topic Part 2 [474 marks] The complete graph H has the following cost adjacency matrix Consider the travelling salesman problem for H a By first finding a minimum spanning tree on the subgraph of H formed

More information

Spanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP)

Spanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP) Spanning Tree (015) Lecture1: Graph III ohyung Han S, POSTH bhhan@postech.ac.kr efinition and property Subgraph that contains all vertices of the original graph and is a tree Often, a graph has many different

More information

The Traveling Salesman Problem (TSP) is where a least cost Hamiltonian circuit is found. CHAPTER 1 URBAN SERVICES

The Traveling Salesman Problem (TSP) is where a least cost Hamiltonian circuit is found. CHAPTER 1 URBAN SERVICES Math 167 eview 1 (c) Janice Epstein HPE 1 UN SEVIES path that visits every vertex exactly once is a Hamiltonian path. circuit that visits every vertex exactly once is a Hamiltonian circuit. Math 167 eview

More information

Math for Liberal Arts MAT 110: Chapter 13 Notes

Math for Liberal Arts MAT 110: Chapter 13 Notes Math for Liberal Arts MAT 110: Chapter 13 Notes Graph Theory David J. Gisch Networks and Euler Circuits Network Representation Network: A collection of points or objects that are interconnected in some

More information

MAS 341: GRAPH THEORY 2016 EXAM SOLUTIONS

MAS 341: GRAPH THEORY 2016 EXAM SOLUTIONS MS 41: PH THEOY 2016 EXM SOLUTIONS 1. Question 1 1.1. Explain why any alkane C n H 2n+2 is a tree. How many isomers does C 6 H 14 have? Draw the structure of the carbon atoms in each isomer. marks; marks

More information

More NP-complete Problems. CS255 Chris Pollett May 3, 2006.

More NP-complete Problems. CS255 Chris Pollett May 3, 2006. More NP-complete Problems CS255 Chris Pollett May 3, 2006. Outline More NP-Complete Problems Hamiltonian Cycle Recall a hamiltonian cycle is a permutation of the vertices v i_1,, v i_n of a graph G so

More information

For all questions, E. NOTA means none of the above answers is correct. Diagrams are NOT drawn to scale.

For all questions, E. NOTA means none of the above answers is correct. Diagrams are NOT drawn to scale. For all questions, means none of the above answers is correct. Diagrams are NOT drawn to scale.. In the diagram, given m = 57, m = (x+ ), m = (4x 5). Find the degree measure of the smallest angle. 5. The

More information

Practice Exam #3, Math 100, Professor Wilson. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Practice Exam #3, Math 100, Professor Wilson. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Practice Exam #3, Math 100, Professor Wilson MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) A tree is A) any graph that is connected and every

More information

Chapter 2 QUIZ. Section 2.1 The Parallel Postulate and Special Angles

Chapter 2 QUIZ. Section 2.1 The Parallel Postulate and Special Angles Chapter 2 QUIZ Section 2.1 The Parallel Postulate and Special Angles (1.) How many lines can be drawn through point P that are parallel to line? (2.) Lines and m are cut by transversal t. Which angle corresponds

More information

Minimal Spanning Trees

Minimal Spanning Trees Minimal Spanning Trees Lecture 33 Sections 7.1-7.3 Robb T. Koether Hampden-Sydney College Wed, Apr 11, 20 Robb T. Koether (Hampden-Sydney College) Minimal Spanning Trees Wed, Apr 11, 20 1 / 17 1 Networks

More information

Simple Graph. General Graph

Simple Graph. General Graph Graph Theory A graph is a collection of points (also called vertices) and lines (also called edges), with each edge ending at a vertex In general, it is allowed for more than one edge to have the same

More information

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc

More information

Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1

Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1 Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1 Name Period: 6. Construct a graph with three critical paths. 7. Determine the minimum project time and the critical path for the following

More information

Street-Routing Problems

Street-Routing Problems Street-Routing Problems Lecture 26 Sections 5.1-5.2 Robb T. Koether Hampden-Sydney College Wed, Oct 25, 2017 Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Wed, Oct 25, 2017 1 / 21 1

More information

Sarah Will Math 490 December 2, 2009

Sarah Will Math 490 December 2, 2009 Sarah Will Math 490 December 2, 2009 Euler Circuits INTRODUCTION Euler wrote the first paper on graph theory. It was a study and proof that it was impossible to cross the seven bridges of Königsberg once

More information

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010 Junior Circle Meeting 3 Circuits and Paths April 18, 2010 We have talked about insect worlds which consist of cities connected by tunnels. Here is an example of an insect world (Antland) which we saw last

More information

Chapter 5: The Mathematics of Getting Around

Chapter 5: The Mathematics of Getting Around Euler Paths and Circuits Chapter 5: The Mathematics of Getting Around 5.1 Street-Routing Problem Our story begins in the 1700s in the medieval town of Königsberg, in Eastern Europe. At the time, Königsberg

More information

Multi-edges, loops, and two or more pieces are all allowed. Example 4 (Not Graphs). None of the following are graphs.

Multi-edges, loops, and two or more pieces are all allowed. Example 4 (Not Graphs). None of the following are graphs. MA 111, Topic 4: Graph Theory Our last topic in this course is called Graph Theory. This is the mathematics of connections, associations, and relationships. Definition 1. A Graph is a set of points called

More information

1. trees does the network shown in figure (a) have? (b) How many different spanning. trees does the network shown in figure (b) have?

1. trees does the network shown in figure (a) have? (b) How many different spanning. trees does the network shown in figure (b) have? 2/28/18, 8:24 M 1. (a) ow many different spanning trees does the network shown in figure (a) have? (b) ow many different spanning trees does the network shown in figure (b) have? L K M P N O L K M P N

More information

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch] NP Completeness Andreas Klappenecker [partially based on slides by Jennifer Welch] Dealing with NP-Complete Problems Dealing with NP-Completeness Suppose the problem you need to solve is NP-complete. What

More information

Geometry. Practice End-of-Course Exam #3. Name Teacher. Per

Geometry. Practice End-of-Course Exam #3. Name Teacher. Per Geometry Practice End-of-Course Exam #3 Name Teacher Per 1 Look at the pair of triangles. A B C D Which statement is true? Ο A. The triangles are congruent. Ο B. The triangles are similar but not congruent.

More information

Graph Theory. Part of Texas Counties.

Graph Theory. Part of Texas Counties. Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.

More information

Optimal tour along pubs in the UK

Optimal tour along pubs in the UK 1 From Facebook Optimal tour along 24727 pubs in the UK Road distance (by google maps) see also http://www.math.uwaterloo.ca/tsp/pubs/index.html (part of TSP homepage http://www.math.uwaterloo.ca/tsp/

More information

What Time Where Muddy City 10 min MSTLessonPlan.docx MSTWorksheets.pptx Discussion 5 min MSTLessonPlan.docx

What Time Where Muddy City 10 min MSTLessonPlan.docx MSTWorksheets.pptx Discussion 5 min MSTLessonPlan.docx MST Lesson Plan Overview Minimal Spanning Trees Summary Many networks link our society: telephone networks, utility supply networks, computer networks, and road networks. For a particular network there

More information

A C E. Applications. Applications Connections Extensions

A C E. Applications. Applications Connections Extensions A C E Applications Connections Extensions Applications 1. At an evergreen farm, the taller trees are braced by wires. A wire extends from 2 feet below the top of a tree to a stake in the ground. What is

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 3 Definitions an undirected graph G = (V, E)

More information

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions Introduction Chapter 9 Graph Algorithms graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 2 Definitions an undirected graph G = (V, E) is

More information

1.4 Euler Diagram Layout Techniques

1.4 Euler Diagram Layout Techniques 1.4 Euler Diagram Layout Techniques Euler Diagram Layout Techniques: Overview Dual graph based methods Inductive methods Drawing with circles Including software demos. How is the drawing problem stated?

More information

10/30/2013. Chapter 7: The Mathematics of Networks. Network. Network. Network. Network. Optimal Network. 7.1 Networks and Trees

10/30/2013. Chapter 7: The Mathematics of Networks. Network. Network. Network. Network. Optimal Network. 7.1 Networks and Trees Network Chapter 7: The Mathematics of Networks Our definition of a network is going to be really simple essentially, a network is a graph that is connected. In this context the term is most commonly used

More information

UNIT Name the different ways of representing a graph? a.adjacencymatrix b. Adjacency list

UNIT Name the different ways of representing a graph? a.adjacencymatrix b. Adjacency list UNIT-4 Graph: Terminology, Representation, Traversals Applications - spanning trees, shortest path and Transitive closure, Topological sort. Sets: Representation - Operations on sets Applications. 1. Name

More information

Park Forest Math Team. Meet #3. Self-study Packet

Park Forest Math Team. Meet #3. Self-study Packet Park Forest Math Team Meet #3 Self-study Packet Problem Categories for this Meet (in addition to topics of earlier meets): 1. Mystery: Problem solving 2. : Properties of Polygons, Pythagorean Theorem 3.

More information

The Travelling Salesman Problem

The Travelling Salesman Problem The Travelling Salesman Problem The travelling salesman problem cannot be solved directly without vast amounts of processing power, since every possible Hamiltonian cycle would need to be measured. For

More information

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem Chapter 6 Hamilton Joins the Circuit Outline/learning Objectives To identify and model Hamilton circuit and Hamilton path problems. To recognize complete graphs and state the number of Hamilton circuits

More information

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem Chapter 6 Hamilton Joins the Circuit Outline/learning Objectives To identify and model Hamilton circuit and Hamilton path problems. To recognize complete graphs and state the number of Hamilton circuits

More information

Section Graphs, Paths, and Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Section Graphs, Paths, and Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.1 Graphs, Paths, and Circuits What You Will Learn Graphs Paths Circuits Bridges 14.1-2 Definitions A graph is a finite set of points called vertices (singular form is vertex) connected by line

More information

CS 440 Theory of Algorithms /

CS 440 Theory of Algorithms / CS 440 Theory of Algorithms / CS 468 Algorithms in Bioinformaticsi Brute Force. Design and Analysis of Algorithms - Chapter 3 3-0 Brute Force A straightforward approach usually based on problem statement

More information

Sec 2. Euler Circuits, cont.

Sec 2. Euler Circuits, cont. Sec 2. uler ircuits, cont. uler ircuits traverse each edge of a connected graph exactly once. Recall that all vertices must have even degree in order for an uler ircuit to exist. leury s lgorithm is a

More information

Introduction to Graphs

Introduction to Graphs Graphs Introduction to Graphs Graph Terminology Directed Graphs Special Graphs Graph Coloring Representing Graphs Connected Graphs Connected Component Reading (Epp s textbook) 10.1-10.3 1 Introduction

More information

c. Suppose you continue adding triangles to the wheel. Which triangle will have a hypotenuse of length 5 units? 4 ft 10 in.

c. Suppose you continue adding triangles to the wheel. Which triangle will have a hypotenuse of length 5 units? 4 ft 10 in. Applications 1. The hypotenuse of a right triangle is 15 centimeters long. One leg is centimeters long. How long is the other leg? 2. The Wheel of Theodorus in Problem 4.1 includes only the first 11 triangles

More information

Note that there are questions printed on both sides of each page!

Note that there are questions printed on both sides of each page! Math 1001 Name: Fall 2007 Test 1 Student ID: 10/5/07 Time allowed: 50 minutes Section: 10:10 11:15 12:20 This exam includes 7 pages, including this one and a sheet for scratch work. There are a total of

More information

Notes for Recitation 9

Notes for Recitation 9 6.042/18.062J Mathematics for Computer Science October 8, 2010 Tom Leighton and Marten van Dijk Notes for Recitation 9 1 Traveling Salesperson Problem Now we re going to talk about a famous optimization

More information

A Theorem of Ramsey- Ramsey s Number

A Theorem of Ramsey- Ramsey s Number A Theorem of Ramsey- Ramsey s Number A simple instance Of 6 (or more) people, either there are 3 each pair of whom are acquainted or there are 3 each pair of whom are unacquainted Can we explain this without

More information

Graph and Digraph Glossary

Graph and Digraph Glossary 1 of 15 31.1.2004 14:45 Graph and Digraph Glossary A B C D E F G H I-J K L M N O P-Q R S T U V W-Z Acyclic Graph A graph is acyclic if it contains no cycles. Adjacency Matrix A 0-1 square matrix whose

More information

Unit 8: Similarity. Part 1 of 2: Intro to Similarity and Special Proportions

Unit 8: Similarity. Part 1 of 2: Intro to Similarity and Special Proportions Name: Geometry Period Unit 8: Similarity Part 1 of 2: Intro to Similarity and Special Proportions In this unit you must bring the following materials with you to class every day: Please note: Calculator

More information

MEI Further Mathematics Support Programme

MEI Further Mathematics Support Programme Further Mathematics Support Programme the Further Mathematics Support Programme www.furthermaths.org.uk Modelling and problem solving with Networks Sharon Tripconey Let Maths take you Further Nov 2009

More information

Undirected Network Summary

Undirected Network Summary Undirected Network Summary Notice that the network above has multiple edges joining nodes a to d and the network has a loop at node d. Also c is called an isolated node as it is not connected to any other

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 101, Winter 018 D/Q Greed SP s DP LP, Flow B&B, Backtrack Metaheuristics P, NP Design and Analysis of Algorithms Lecture 8: Greed Class URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ Optimization

More information

ECE 242 HOMEWORK 5. In the figure below, one can go from node B to A but not from A to B.

ECE 242 HOMEWORK 5. In the figure below, one can go from node B to A but not from A to B. ECE 242 HOMEWORK 5 Question 1: Define the following terms. For lines with multiple terms,differentiate between the terms. Also draw a figure illustrating each term. (a) Directed graph and undirected graph

More information

Medium Term Plan Year 4

Medium Term Plan Year 4 Wk Unit Strands Objectives 1 Block B2.c: Classify and sketch 2D shapes according to the concept of symmetry Rehearse the concept of line symmetry Classify polygons according to their lines of symmetry

More information

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1 Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. NOTE: Router E should only be used for Internet traffic. Router A Router

More information

What is a minimal spanning tree (MST) and how to find one

What is a minimal spanning tree (MST) and how to find one What is a minimal spanning tree (MST) and how to find one A tree contains a root, the top node. Each node has: One parent Any number of children A spanning tree of a graph is a subgraph that contains all

More information

Worksheet for the Final Exam - Part I. Graphs

Worksheet for the Final Exam - Part I. Graphs Worksheet for the Final Exam - Part I. Graphs Date and Time: May 10 2012 Thursday 11:50AM~1:50PM Location: Eng 120 Start with the Self-Test Exercises (pp.816) in Prichard. 1. Give the adjacency matrix

More information

DEFINITIONS. Perpendicular Two lines are called perpendicular if they form a right angle.

DEFINITIONS. Perpendicular Two lines are called perpendicular if they form a right angle. DEFINITIONS Degree A degree is the 1 th part of a straight angle. 180 Right Angle A 90 angle is called a right angle. Perpendicular Two lines are called perpendicular if they form a right angle. Congruent

More information

14 More Graphs: Euler Tours and Hamilton Cycles

14 More Graphs: Euler Tours and Hamilton Cycles 14 More Graphs: Euler Tours and Hamilton Cycles 14.1 Degrees The degree of a vertex is the number of edges coming out of it. The following is sometimes called the First Theorem of Graph Theory : Lemma

More information

Coping with the Limitations of Algorithm Power Exact Solution Strategies Backtracking Backtracking : A Scenario

Coping with the Limitations of Algorithm Power Exact Solution Strategies Backtracking Backtracking : A Scenario Coping with the Limitations of Algorithm Power Tackling Difficult Combinatorial Problems There are two principal approaches to tackling difficult combinatorial problems (NP-hard problems): Use a strategy

More information

Excursions in Modern Mathematics Sixth Edition. Chapter 5 Euler Circuits. The Circuit Comes to Town. Peter Tannenbaum

Excursions in Modern Mathematics Sixth Edition. Chapter 5 Euler Circuits. The Circuit Comes to Town. Peter Tannenbaum Excursions in Modern Mathematics Sixth Edition Chapter 5 Peter Tannenbaum The Circuit Comes to Town 1 2 Outline/learning Objectives Outline/learning Objectives (cont.) To identify and model Euler circuit

More information

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.3 Hamilton Paths, and Hamilton Circuits What You Will Learn Hamilton Paths Hamilton Circuits Complete Graphs Traveling Salesman Problems 14.3-2 Hamilton Paths A Hamilton path is a path that

More information

[Y2] Counting and understanding number. [Y2] Counting and understanding number. [Y2] Counting and understanding number

[Y2] Counting and understanding number. [Y2] Counting and understanding number. [Y2] Counting and understanding number Medium Term Plan : Year 2 Autumn Term Block A1.a: Count on and back in 1s or 10s from a 2- digit number; write figures up to 100 Block A1.b: Begin to count up to 100 objects by grouping in 5s or 10s; estimate

More information

Building Roads. Page 2. I = {;, a, b, c, d, e, ab, ac, ad, ae, bc, bd, be, cd, ce, de, abd, abe, acd, ace, bcd, bce, bde}

Building Roads. Page 2. I = {;, a, b, c, d, e, ab, ac, ad, ae, bc, bd, be, cd, ce, de, abd, abe, acd, ace, bcd, bce, bde} Page Building Roads Page 2 2 3 4 I = {;, a, b, c, d, e, ab, ac, ad, ae, bc, bd, be, cd, ce, de, abd, abe, acd, ace, bcd, bce, bde} Building Roads Page 3 2 a d 3 c b e I = {;, a, b, c, d, e, ab, ac, ad,

More information

Unit 7 Day 2 Section Vocabulary & Graphical Representations Euler Circuits and Paths

Unit 7 Day 2 Section Vocabulary & Graphical Representations Euler Circuits and Paths Unit 7 Day 2 Section 4.3-4.5 Vocabulary & Graphical Representations Euler Circuits and Paths 1 Warm Up ~ Day 2 List the tasks and earliest start times in a table, as in exercise #1. Determine the minimum

More information

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1 Version 1 1. (20 Points) Given the class A network address 119.0.0.0 will be divided into a maximum of 15,900 subnets. a. (5 Points) How many bits will be necessary to address the 15,900 subnets? b. (5

More information

Chapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1

Chapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs 2011 Pearson Addison-Wesley. All rights reserved 14 A-1 Terminology G = {V, E} A graph G consists of two sets A set V of vertices, or nodes A set E of edges A subgraph Consists of a subset

More information

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v. Graph Adjacent Endpoint of an edge Incident Neighbors of a vertex Degree of a vertex Theorem Graph relation Order of a graph Size of a graph Maximum and minimum degree Let G = (V, E) be a graph. If u,

More information

PBW 654 Applied Statistics - I Urban Operations Research. Unit 3. Network Modelling

PBW 654 Applied Statistics - I Urban Operations Research. Unit 3. Network Modelling PBW 54 Applied Statistics - I Urban Operations Research Unit 3 Network Modelling Background So far, we treated urban space as a continuum, where an entity could travel from any point to any other point

More information

Combinatorics Summary Sheet for Exam 1 Material 2019

Combinatorics Summary Sheet for Exam 1 Material 2019 Combinatorics Summary Sheet for Exam 1 Material 2019 1 Graphs Graph An ordered three-tuple (V, E, F ) where V is a set representing the vertices, E is a set representing the edges, and F is a function

More information

Unit 5 Applying Similarity of Triangles

Unit 5 Applying Similarity of Triangles Unit 5 Applying Similarity of Triangles Lesson 1: Proof of the Triangle Side Splitter Theorem Opening Exercise We are going to construct a proof designed to demonstrate the following theorem: A line segment

More information

Minimum spanning trees

Minimum spanning trees Carlos Moreno cmoreno @ uwaterloo.ca EI-3 https://ece.uwaterloo.ca/~cmoreno/ece5 Standard reminder to set phones to silent/vibrate mode, please! During today's lesson: Introduce the notion of spanning

More information

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60 CPS 102: Discrete Mathematics Instructor: Bruce Maggs Quiz 3 Date: Wednesday November 30, 2011 NAME: Prob # Score Max Score 1 10 2 10 3 10 4 10 5 10 6 10 Total 60 1 Problem 1 [10 points] Find a minimum-cost

More information

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck Theory of Computing Lecture 10 MAS 714 Hartmut Klauck Seven Bridges of Königsberg Can one take a walk that crosses each bridge exactly once? Seven Bridges of Königsberg Model as a graph Is there a path

More information

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.3 Hamilton Paths, and Hamilton Circuits INB Table of Contents Date Topic Page # September 11, 2013 Section 14.3 Examples/Handout 18 September 11, 2013 Section 14.3 Notes 19 2.3-2 What You Will

More information

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Graph Theory CS/Math231 Discrete Mathematics Spring2015 1 Graphs Definition 1 A directed graph (or digraph) G is a pair (V, E), where V is a finite set and E is a binary relation on V. The set V is called the vertex set of G, and its elements are called vertices

More information

Indirect Measurement Application of Similar Triangles. Identify similar triangles to calculate. indirect measurement

Indirect Measurement Application of Similar Triangles. Identify similar triangles to calculate. indirect measurement Indirect Measurement Application of Similar Triangles. LEARNING GOALS In this lesson, you will: Identify similar triangles to calculate indirect measurements. Use proportions to solve for unknown measurements.

More information

MST & Shortest Path -Prim s -Djikstra s

MST & Shortest Path -Prim s -Djikstra s MST & Shortest Path -Prim s -Djikstra s PRIM s - Minimum Spanning Tree - A spanning tree of a graph is a tree that has all the vertices of the graph connected by some edges. - A graph can have one or more

More information

MA 111 Review for Exam 3

MA 111 Review for Exam 3 MA 111 Review for Exam 3 Exam 3 (given in class on Tuesday, March 27, 2012) will cover Chapter 5. You should: know what a graph is and how to use graphs to model geographic relationships. know how to describe

More information