Unit graph theory UNIT 4

Size: px
Start display at page:

Download "Unit graph theory UNIT 4"

Transcription

1 Unit graph theory UNIT 4

2 Concept Characteristics What is a Graph Really? Get in groups of three and discuss what you think a graph really is. Come up with three statements that describe the characteristics (not types) of graphs. You may want to think about these questions in your group: What do we use graphs for? What do they look like? What do the various points on a graph represent?

3 Graphs..show Relationships between people, places, events, things....can be used to demonstrate a path between places or events that...can be used to show how long something takes, how much it costs, or how far apart two things are..can model the results of a series of contests or a tournament..

4 Graph Theory Learning Objectives Part 1 project management You will understand how to model a project using graphs. You will be able to identify how many edges and vertices a graph has. You will be able to find the critical path of a project graph from start to finish and find Earliest Start Times for each task. You will be able to determine how much time it will take for a project to be complete.

5 Election Theory Project Think back to the group project in which you participated. What were the tasks that occured from start to finish? Let s make sure they are in order. Were any of the tasks able to be done simultaneously?

6 Graphs: Vertices and Edges How many Edges does this graph have? How many vertices does this graph have? The vertices are tasks and the edges show the time the task takes.

7 Imagine List the things you do each morning before you get to school. Lets make a list The things you do to before you get to school are TASKS, and the preparation/tasks you do before arriving at school are collectively called the PROJECT. Is there a way to show your project using a graph? Is this graph linear?

8 Let s take our list of things (tasks) you do before you arrive at school. Are there things that have to happen before other things? What if you can t do task B before task A is complete? What would you have to do to show this in a graph? What if tasks A and B can be done simultaneously? What if you add tasks C & D that must be done after A is complete? What if you add task E that is dependent on task B & D?

9 Directed Graph A directed graph is a graphic way using vertices and edges to show the path or paths of a project leading from task to task. A directed graph from start to finish can be thought of as a time line from beginning to end..

10 Example of a directed graph What can you guess from the graph below?

11 WARM-UP: Project: Mowing the lawn PUT THESE TASKS IN ORDER AND IDENTIFY ANY OF THE TASKS THAT CAN TAKE PLACE SIMULTANEOUSLY. TASKS TIME A. Picking up/ Clearing the lawn 15 minutes B. Mowing the lawn 45 minutes C. Gassing up the mower 5 minutes D. Start mower 3 minutes E. Getting mower out 5 minutes F. Cleaning the mower off 10 minutes G. Checking oil 5 minutes H. Putting the mower away 5 minutes

12 Graphing a Project---Project Management Where do we start? What has to be done first? Can more than one thing be done first? What task(s) come next? From where? Next? Where do we end?

13 Practical Example of a project The Central High yearbook staff has only 16 days left before the deadline for completing their yearbook. They are running behind schedule and still have several tasks left to finish. The remaining tasks and time that it takes to complete each task are listed in the following table.

14 Yearbook Tasks Is it possible to complete the project if the tasks have to be done in order? Task Time (in days) Start 0 A Buy Film 1 B Load Camera 1 C Take Club Photos 3 D Take Sports Photos 2 E Take Teacher Photos 1 F Develop Film 2 G Design the Layout 5 H Print and Mail Pages 3

15 Yearbook Tasks What if some of the jobs can be done simultaneously? Draw a graph using arrows as edges representing a task being done and vertices as tasks. Task Time (in days) Prerequisite Task Start 0 None A Buy Film 1 None B Load Camera 1 A C Take Club Photos 3 B D Take Sports Photos 2 C E Take Teacher Photos 1 B F Develop Film 2 D, E G Design the Layout 5 D, E H Print and Mail Pages 3 G, F

16 You Practice TASK TIME PREREQUISITES Start A 5 NONE B 6 A C 4 A D 4 B E 8 B, C F 4 C G 10 D, E, F FINISH

17 Warm-Up -- Graph this Project TASK TIME PREREQUISITES START A 4 NONE B 3 A C 1 A D 6 A E 2 B F 3 C, D G 3 E H 1 E, F FINISH Find the Earliest Start times Then find the Critical Path

18 Critical Path Critical path is defined as the shortest path that will take you to the completion of a project AND ensure that ALL tasks are completed as well. There s an entire profession devoted to this called Project Management.

19 Critical Path Identify the Earliest Start Time for each task! Begin at the start Label each vertex with the smallest possible time needed for that task to begin based on the prerequisites. The critical path is actually the LONGEST path..why??????

20 Practice Graph the Project Management Chart TASK TIME PREREQUISITE START A 5 NONE B 8 A, D C 9 B, I D 7 NONE E 8 B F 12 I G 4 C, E, F H 9 NONE I 5 D, H FINISH

21 Practice Draw a Graph to Represent the Project Find the Critical Path AND Minimum Time Task Time Perequisites Start A 2 NONE B 4 NONE C 3 A, B D 1 A, B E 5 C, D F 6 C, D G 7 E, F

22 Practice Problem Create the Project Management Chart/Table. Find the Earliest Start Times for Each Task.. Calculate the minimum time needed to complete this project. What is the critical path?

23 Partner Practice Create the Project Table. Find the Earliest Starting times for each task

24 Literacy Assignment Research Project Management and create a Display can be a foldable or a poster or an animation or a Prezi.. Include the following: What is Project Management? How is Graphing used in Project Management and provide an example of a PM graph. Give three examples of Professions that use project management in their jobs. With those three examples find a salary range for Project Management positions.

25 GRAPH THE PROJECT MANAGEMENT GRAPH BELOW AND FIND THE EARLIES START TIMES, THE MINIMUM TIME IT TAKES TO COMPLET THE PROJECT AND THE CRITICAL PATH TASK TIME PREREQUISITES EARLIEST START TIMES A 2 None B 4 A C 5 A D 7 A E 4 C, D F 8 B G 11 C, F H 3 E, G WARM-UP PROBLEM

26 WORKSHEET

27 Worksheet #1

28 Worksheet #2

29 Worksheet #3

30 Worksheet #3 TASK TIME PREREQUISITES E. S. T. START None --- A 4 None 0 B 5 A 4 C 6 A 4 D 10 A 4 E 5 B 9 F 8 C, E 14 G 6 B, D 14 H 6 F 24 I 4 G 20 J 8 D 14 FINISH 30

31 Make a Chart of Tasks, Times and Prerequisites---Homework Back

32 Make a Chart of Tasks, Times and Prerequisites Task Time Prerequisites

33 Warm-up Problem Create the Project Management Chart/Table. Find the Earliest Start Times for Each Task.. Calculate the minimum time needed to complete this project. What is the critical path? C

34 Draw the Project Management Graph..Find the earliest start times.find the minimum time to complete the project..find the critical path.. Task Time Prereq E.S.T. A 6 None 0 B 8 None 0 C 6 A, H 15 D 5 A, B 8 G 11 None 0 H 4 B, G 11 I 4 C, D 21 J 9 H 15 Minimum Time to Complete the Project??? Critical Path?????

35 for each task, Critical Path AND Minimum Time to completion for the project Task Time Prerequisites Start A 13 NONE B 10 NONE C 4 A D 8 B E 6 B F 7 C, D, E G 5 F H 8 F FINISH

36 Literacy Assignment Research Project Management and create a Display can be a foldable or a poster or an animation or a Prezi.. Include the following: What is Project Management? How is Graphing used in Project Management and provide an example of a PM graph. Give three examples of Professions that use project management in their jobs. With those three examples find a salary range for Project Management positions. Due Friday April 13

37 (Game) Room Project--Partners Pretend you are planning to build a (game) room in your home. Sketch out what you want it to look like. List the tasks that need to be done to complete your project. Estimate the time it will take to do each task in your project. Determine if any task in your project is dependent on another part. From start to finish, draw a directed graph from start to finish think of this as a time line from beginning to end.. Are there parts of your project that can be done simultaneously? If so, how do you show that graphically? Due Wednesday, April 11

38 How will your Room Project be graded? Scale of 1-5 on each of the below areas with 1 being missing or very poorly done, 2 being poor, 3 is fair, 4 is good, 5 being outstanding. 1. Appearance, Neatness, Thoroughness, Timeliness and Logical Flow 2. Creativity---was there thought and consideration, use of color, flair, personality 3. Scale Drawing with Labels 4. Project Management Table: Tasks, Description of Tasks, Time, Prerequisites, Earliest Start Times 5. Project Management Graph including articulation of the Critical Path of the Project

39 Compare and Contrast these graphs with each other and with the Project Management graphs.

40 Literacy Assignment Research Project Management and create a Display can be a foldable or a poster or an animation or a Prezi.. Include the following: What is Project Management? How is Graphing used in Project Management and provide an example of a PM graph. Give three examples of Professions that use project management in their jobs. With those three examples find a salary range for Project Management positions. Due Friday April 13

41 (Game) Room Project--Partners Pretend you are planning to build a (game) room in your home. Sketch out what you want it to look like. List the tasks that need to be done to complete your project. Estimate the time it will take to do each task in your project. Determine if any task in your project is dependent on another part. From start to finish, draw a directed graph from start to finish think of this as a time line from beginning to end.. Are there parts of your project that can be done simultaneously? If so, how do you show that graphically? Due Wednesday, April 11

42 How will your Room Project be graded? Scale of 1-5 on each of the below areas with 1 being missing or very poorly done, 2 being poor, 3 is fair, 4 is good, 5 being outstanding. 1. Appearance, Neatness, Thoroughness, Timeliness and Logical Flow 2. Creativity---was there thought and consideration, use of color, flair, personality 3. Scale Drawing with Labels 4. Project Management Table: Tasks, Description of Tasks, Time, Prerequisites, Earliest Start Times 5. Project Management Graph including articulation of the Critical Path of the Project

43 Graph Theory Objectives Part 2 Describe a graph as Complete or Not Complete and explain why or why not. Find the degree or valence of a particular vertex in a graph. What is a loop? What is a multigraph? Describe the relationship between objects or tasks based on a graph. Connected vs Not Connected Adjacent vs Not Adjacent

44 So what is a graph really? A Graph is a set of points called vertices and their connecting lines called edges. We use graphs to model situations in which the vertices represent tasks or objects and the edges represent the relationship between the tasks or objects they connect. Other than the graphs we have been working with, what kind of graphs are you familiar with?

45 SORRY..THERE ARE JUST SOME TERMS YOU NEED TO KNOW.. Edge a line segment/ray that connects tasks/objects and represents the relationship between the tasks/objects and (if applicable) the time required to do the preceding task. Vertex or Vertices a vertex is a point on the graph where one or more edges converge and represents a task/object Connected Graph a graph where there is a path between each pair of vertices Adjacent (Vertices) two vertices that are connected by an edge Complete Graph a graph in which every pair of vertices is adjacent

46 MORE TERMS.. Degree (Valence) of a Vertex the number of edges that have a specific vertex as an endpoint in a graph is known as the degree or valence of that vertex. When finding the degree of a vertex on which there is a loop, the loop is counted twice. Loop is an edge that connects a vertex to itself Multigraph if a graph contains a loop or multiple edges (more than one edge between two vertices), the graph is known as a multigraph.

47 Warm-UP Find the Degree of each vertex? Are they Complete Graphs? Connected?

48 Imagine you pick five students out of a crowd at a football game. Because you pick the five students randomly, it is possible there is no relationship between them at all. Then the graph of the five and their relationships would just be five distinct points representing them as individuals. However, imagine if some of them are friends and you use edges to graph those relationships.

49 Practice Graphing by yourself Quinn bought six different types of fish. Some of the fish can live in the same aquarium, but others cannot. Guppies can live with Mollies, Swordtails can live with Guppies, Plecostomi can live with both Mollies and Guppies, Gold Rams can live with only Plecostomi, and Piranhas cannot live with any of the other fish. Draw a graph to illustrate this situation.

50 Now Consider these graphs WHAT DO THEY TELL YOU?

51 Try this with a partner Construct a graph representing the following sets of vertices and edges. V = M, N, O, P, Q, R, S E = MN, SR, QS, SP, OP What is the valence of each vertex? Is your graph a connected graph? Why or why not? Is your graph a complete graph? Why or why not?

52 Use Set Representation to describe this Graph

53 WE NEED A WAY TO DESCRIBE GRAPHS LIKE THIS Set and Matrix Representation ONE WAY IS BY NAMING THE VERTICES AND EDGES AS SETS Vertices = A, B, C, D, E Edges = AC, CB, CE, CD, BD, BE ANOTHER WAY IS WITH AN Adjacency Matrix a matrix which uses a 1 to signify there is an edge between two vertices in a graph, and a 0 to indicate there is no edge.

54 Adjacency Matrix In an Adjacency Matrix, the rows and columns are labeled with the vertices of the graph. A B C D E A B C D E and a 1 indicates there is an edge connecting the corresponding vertices..what does a zero tell you???

55 Create an Adjacency Matrix for This Graph

56 Now Use Sets to Represent the information in the graph

57 PRACTICE Use Set Representation to describe this graph? Create an adjacency matrix for this graph. What happens if the graph is directed?

58 Warm-up B C H A I D G J F E What is the degree of each vertex? Is it a connected graph? Is the graph Complete? Can you find a path that covers each edge exactly once and ends where you started?

59 Euler Paths and Circuits A PATH that uses each edge of a graph exactly once and ends at the starting vertex is call an Euler Circuit. An EULER CIRCUIT contains vertices that all have even degrees. If a connected graph has exactly two odd vertices (degree), it is possible to use each edge of the graph exactly once but to end at a vertex different from the starting vertex. Such a path is called an EULER PATH.

60 Euler paths and circuits An Euler path is a path that uses every edge of a graph exactly once. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler path starts and ends at different vertices. An Euler circuit starts and ends at the same vertex

61 Euler Path and Circuit /video

62 Practice In the graph below, determine if there is an Euler Path or an Euler Circuit and, if there is, find the path or circuit..

63 Is There a Euler Path or Circuit? P Q R S If so, can you find it? T U Degree of each vertex? Set Representation? Adjacency Matrix?

64 Warm-up B C H A I D G J F E What is the degree of each vertex? Is it a connected graph? Is the graph Complete? Can you find a path that covers each edge exactly once and ends where you started?

65 Euler Paths and Circuits A PATH that uses each edge of a graph exactly once and ends at the starting vertex is call an Euler Circuit. An EULER CIRCUIT contains vertices that all have even degrees. If a connected graph has exactly two odd vertices (degree), it is possible to use each edge of the graph exactly once but to end at a vertex different from the starting vertex. Such a path is called an EULER PATH.

66 Euler paths and circuits An Euler path is a path that uses every edge of a graph exactly once. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler path starts and ends at different vertices. An Euler circuit starts and ends at the same vertex

67 Is There a Euler Path or Circuit? Degree of each vertex?

68 Is There a Euler Path or Circuit?

69 Is There a Euler Path or Circuit?

70 Is There a Euler Path or Circuit?

71 BEGIN WHEREVER YOU WANT BUT DRAW ONLY ONE LINE THROUGH ALL OF THE DOORS AND YOU CAN ONLY GO THROUGH EACH OF THE DOORS ONCE!!!!!!

72 Warm-up---Is There a Euler Path or Circuit? If so, can you find it? Degree of each vertex? Set Representation? Adjacency Matrix?

73 Research/Literacy Project Paths and Circuits are important concepts in Graph Theory. There are two kinds of Paths and Circuits we will study. Research Leonhard Euler and Sir William Rowan Hamilton and create a twosided information/comparison guide (in the form of a 2-column Proof) to each including: 1. Who they were 2. What they did relative to graph theory 3. The primary characteristics of Euler Circuits and Paths 4. The primary characteristics of Hamiltonian Circuits and Paths 5. The primary differences between Euler and Hamilton Circuits and Paths 6. How each are used in the real world 7. How to determine if an Euler Circuit, Euler Path, Hamilton Circuit or Hamilton Path exists 8. You may submit this in hard copy or through using whatever presentation software you wish 9. Learn Things!! Due Friday, April 20!!

74 Accept the Challenge!!! Work in pairs to find a solution to the Konigsberg Challenge Work quietly and just in pairs because First three groups to find a solution and both members are able to explain the solution using graphing will receive five bonus points on the next quiz!!! Model the problem using a graph and provide your solution in writing Provide a written explanation for your answer One solution per pair, so make your submission your final solution!!!! You have 15 minutes to complete the challenge!!

75 Graphs With Direction There are many situations in the real world that graphs have a direction versus a path that can go in either direction. Can you think of an example? These are known as Digraphs. The vertices in a digraph still have degrees but beyond that, they have indegrees and outdegrees. Can you guess what that means?

76 digraphs A directed graph (or digraph) is a graph, or set of vertices connected by edges, where the edges have a direction associated with them. A directed graph is called a simple graph if it has no multiple arrows (two or more edges that connect the same two vertices) and no loops (edges that connect vertices to themselves). A directed graph is called a multigraph or multidigraph if it may have multiple arrows (and sometimes loops).

77 For Example, the Digraph Below Vertices? Ordered Edges? Indegrees? Outdegrees?

78 So how does a digraph affect the Adjacency Matrix? The adjacency Matrix for this digraph is: A A B C A B B C C

79 find the Adjacency Matrix

80 Practice Activity Create the digraph described by this adjacency matrix A B C D E A B C D E

81 How About Now? In a digraph, there is an Euler circuit if the indegree and outdegree of each vertex are equal. There is an Euler Path if: the indegree = the outdegree in all vertices but two & at one of those two vertices, the indegree is one greater than the outdegree & at the other vertex, the outdegree is one greater than the indegree

82 Fleury's Algorithm Euler Circuit Algorithm Euler's Theorems are examples of existence theorems existence theorems tell whether or not something exists (e.g. Euler circuit). but doesn't tell us how to create it! We want a constructive method for finding Euler paths and circuits Methods (well-defined procedures, recipes) for construction are called algorithms There is an algorithm for constructing an Euler circuit: Fleury's Algorithm

83 1. Pick any vertex to start 2. From that vertex pick an edge to traverse (see below for important rule) 3. Darken that edge, as a reminder that you can't traverse it again 4. Travel that edge, coming to the next vertex 5. Repeat 2-4 until all edges have been traversed, and you are back at the starting vertex At each stage of the algorithm: The original graph minus the darkened (already used) edges = reduced graph Important rule: never cross a bridge of the reduced graph unless there is no other choice

84 Fleury's Algorithm the same algorithm works for Euler paths before starting, use Euler s theorems to check that the graph has an Euler path and/or circuit to find! when you do this on paper, you can erase each edge as you traverse it this will make the reduced graph visible, and its bridges apparent

85 Fleury S Algorithm Practice Use Fleury s Algorithm to find an Euler Path or Circuit if one exists.. A B G E C F D H J

86 Practice on your own Use Fleury s Algorithm to find an Euler Circuit if one exists.

87 Euler Paths and Circuits A PATH that uses each edge of a graph exactly once and ends at the starting vertex is call an Euler Circuit. An EULER CIRCUIT contains vertices that all have even degrees. If a connected graph has exactly two odd vertices (degree), it is possible to use each edge of the graph exactly once but to end at a vertex different from the starting vertex. Such a path is called an EULER PATH.

88 Euler paths and circuits An Euler path is a path that uses every edge of a graph exactly once. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler path starts and ends at different vertices. An Euler circuit starts and ends at the same vertex

89 Is there an Euler path or Circuit? REMEMBER TO CHECK IN-DEGREES AND OUT-DEGREES FIRST! A B C D E G F H J

90 Research/Literacy Project Paths and Circuits are important concepts in Graph Theory. There are two kinds of Paths and Circuits we will study. Research Leonhard Euler and Sir William Rowan Hamilton and create a twosided information/comparison guide (in the form of a 2-column Proof) to each including: 1. Who they were 2. What they did relative to graph theory 3. The primary characteristics of Euler Circuits and Paths 4. The primary characteristics of Hamiltonian Circuits and Paths 5. The primary differences between Euler and Hamilton Circuits and Paths 6. How each are used in the real world 7. How to determine if an Euler Circuit, Euler Path, Hamilton Circuit or Hamilton Path exists 8. You may submit this in hard copy or through using whatever presentation software you wish 9. Learn Things!! Due Friday!!

91

92 Exploration Let s pretend that you are a city inspector and it is time for you to inspect the fire hydrants that are located at each of the street intersections. To optimize your route, you must find a path that begins at the garage, G, visits each intersection exactly once, and returns to the garage.

93 Exploration c d f h G e a b j i

94 One Path Works! Notice that only one path meets these criteria. It is path G, h, f, d, c, a, b, e, j, i, G. Also notice, that is not necessary that every edge of the graph be traversed when visiting each vertex exactly once.

95 Sir William Rowan Hamilton In the 19 th century, an Irishman named Sir William Rowan Hamilton ( ) invented a game called the Icosian game. The game consisted of a graph in which the vertices represented major cities in Europe.

96 Hamiltonian Theorem This theorem guarantees the existence of a Hamilton circuit for certain kinds of graphs. If a connected graph has n vertices, where n>2 and each vertex has degree of at least n/2, then the graph has a Hamilton circuit.

97 Degrees Check the degrees of the figures in the graphs below.

98 You Try Try to find the Hamiltonian circuit in each of the graphs below.

99 The Icosian Game The object of the game was to find a path that visited each of the 20 vertices exactly once. In honor of Hamilton and the his game, a path that uses each vertex of a graph exactly once is known as a Hamiltonian path. If the path ends at the starting vertex, it is called a Hamiltonian circuit.

100 Hamilton Circuits and Paths

101 Finding The Hamiltonian Circuit Since each of the five vertices of the graph has degrees of at least 5/2, the graph has a Hamiltonian circuit. Unfortunately, the theorem does not tell us how to find the circuit.

102 Hamiltonian Circuits If a graph has some vertices with degree less than n/2, the theorem does not apply. The second two of the figures that are drawn have vertices that have a degree less than 5/2, so no conclusion can be drawn. By inspection, the second figure has a Hamiltonian circuit but the last figure does not.

103 Use of Euler Circuits As with Euler circuits, it often is useful for the edges of the graph to have a direction. If we consider a competition where every player must play every other player. This can be shown by drawing a complete graph where the vertices represent the players.

104 Independent activity Suppose Four teams play in the school soccer round robin tournament. The results are as follows: Game AB AC AD BC BD CD Winner B A D B D D Draw a digraph to represent the tournament. Find a Hamiltonian path and then rank the participants from winner to loser.

105 Competition Example In this situation, a directed arrow from vertex A to vertex B would mean that player A defeated player B. This type of digraph is known as a tournament. One interesting property of such a digraph is that every tournament contains a Hamilton path which implies that at the end of the tournament it is possible to rank the teams in order, from winner to loser.

106 Example (cont d) A B Remember that a tournament results from a complete graph when direction is given to the edges. There is only one Hamiltonian path for this graph, DBAC. Therefore, D is first, B is second, A is third and C is fourth. D C

107 To determine a ranking, remember that a tournament results from a complete graph when direction is given to the edges. In this case, there is only one Hamiltonian path for the graph, D, B, A, C. Therefore, D finishes first, B is second, A is third, and C finishes fourth.

108 Practice Problems Find which have Hamiltonian circuits. If a connected graph has n vertices, where n>2 and each vertex has degree of at least n/2, then the graph has a Hamilton circuit. However, this Hamilton theorem does NOT rule out a circuit or path.

109 Practice Problems 1. Draw a tournament with five players, in which player A beats everyone, B beats everyone but A, C is beaten by everyone and D beats E. 2. Find all the directed Hamiltonian paths for the following tournaments: A B A B D C D C

110 Sir William Rowan Hamilton In the 19 th century, an Irishman named Sir William Rowan Hamilton ( ) invented a game called the Icosian game. The game consisted of a graph in which the vertices represented major cities in Europe.

111 Hamilton Circuits and Paths Hamilton Circuits hit EVERY vertex EXACTLY once! If the degree of every vertex is greater than the number of vertices divided by two in any connected graph, then there IS definitely a Hamilton Circuit. Unfortunately, this EXISTENCE theorem does NOT rule out a circuit from existing, it just clearly defined whether one DOES exist. Hamilton Circuits begin and end at the same vertex. Hamilton Paths hit EVERY vertex EXACTLY once! A Hamilton Path over the graph of a tournament will result in the rank order of the results. Hamilton Paths begin and end at DIFFERENT vertices.

112 Rock, paper, scissors Tournament Activity Groups of five. Each person plays every other person in your group. You are playing rock-paper-scissors. Keep a chart of who wins or loses and you are playing the best three out of five, and you have to play all five games. Also, keep track of how many games each person wins. From your results chart, create a digraph to represent those results and determine who finishes in first, second, third, fourth, and fifth by finding the various Hamilton Paths. If there is more than one Hamilton Path, then you should use the total games won/lost to break the ties.

113 What does it Mean to Optimize a Route?

114 Optimization Cost! is related to.. Distance! Time! So if we are going to optimize a route we need to have a graph that gives us more information than just where there is a relationship between the vertices or a direction of those relationships. One of the most famous problems in modern mathematics is called the Travelling Salesman Problem

115 The traveling salesperson problem Think of this problem as a way to find the cheapest or shortest route.or some other criteria that will be given..and the processes are designed to find the optimal route.

116 So what do the numbers mean? First, the numbers can be distance..or they can be cost.or they can be some other unit of measure that is important to the decision of the salesperson like time. In this case, the numbers are the cost of traveling between cities along that route. This type of labeling creates a weighted graph

117 The Travelling Salesman Problem The Greedy Algorithm Optimizing

118 The traveling salesperson problem Since the salesman is always trying to minimize costs, how would he cover all four cities for the least amount of cost?

119 Brute force method Step 1: List every possible circuit along with its cost Since this particular problem has only four vertices, how many options are there for the circuit Step 2: Use a tree diagram to show them. Can you guess how many options there are if the salesman has 25 different cities to visit? There are over 19 million..so how practical is that? Maybe there is a better way

120 The traveling salesperson problem How about the Nearest Neighbor Algorithm?

121 Nearest neighbor algorithm Step 1: From your starting vertex, go the next nearest vertex (city/neighbor). Step 2: Then the next, and the next and next until you have exhausted all other vertices and returned home. Does this give you the cheapest route?

122 Warm-Up Problem A C D B Use the Nearest Neighbor Algorithm to find a Hamilton Circuit for the traveling salesman to follow if he begins in the middle at Point D

123 Graph Theory Unit Vocabulary Adjacent Breadth First Algorithm Cheapest Link Algorithm Complete Graph Connected Graph Critical Path Cycle Degree/Valence Dijkstra s Shortest Path Algorithm Directed Graph/Digraph Earliest Start Time Edge Euler Circuit Euler Path Graph Hamiltonian Circuit Hamiltonian Path Indegrees Kruskgal s Algorithm Multigraph Nearest Neighbor Algorithm Optimal/Optimization Outdegrees Prerequisites Program Management Minimum Spanning Tree Tasks Tree Graph Vertex/Vertices Weighted Graph

124 Brute force versus nearest neighbor Beginning at Point A What is Different if you begin At Point D?

125 A Warm-Up D C 47 B Use the nearest neighbor algorithm to find the shortest circuit from your starting point, D and find it weight.

126 How about this one?

127 partners Problem A delivery person must visit each of his warehouses daily. His delivery route begins and ends at his garage (G). The table below shows the approximate travel time (in minutes) between stops. Draw a weighted complete graph to represent this information. Use the nearest neighbor algorithm to find the quickest route. How much time does this route take? G A B C D G A B C D

128 Cheapest Link Algorithm Choose the edge with the smallest weight (the "cheapest" edge), randomly breaking ties Keep choosing the "cheapest" edge unless it (a) closes a smaller circuit OR (b) results in 3 selected edges coming out of a single vertex Continue until the Hamilton Circuit is complete The resulting path is a Hamilton Circuit.

129 Cheapest Link Algorithm

130 Cheapest Link Algorithm 1.Here is how this algorithm works with our example.pick edge CE, weight 165. Mark it. 2.pick edge AD, weight 185. Mark it. 3.pick edge AC, weight 200. Mark it. 4.jump edge AE, weight 205. It will result in three edges coming out of vertex A. 5.jump edge ED, weight 302. It will close a small circuit. 6.jump edge CB, weight 305. It will result in three edges coming out of vertex C. 7.jump edge CD, weight 320. It will result in three edges coming out of vertex C. 8.pick edge BE, weight 340. Mark it. 9.pick edge BD, weight 360. Mark it. 10.we have picked five edges we have to stop. 11.calculate the weight of the circuit, i.e., add the weights of the five edges that were marked. This comes to = This approximates the solution within 2.5% from the optimal answer of Brute-Force. 12.exhibit the circuit. Our circuit is :A-D-B-E-C-A. The circuit is shown below.

131 Use the Cheapest Link Algorithm to find the optimal circuit

132 Graph Theory Unit Vocabulary Adjacent Breadth First Algorithm Cheapest Link Algorithm Complete Graph Connected Graph Critical Path Cycle Degree/Valence Dijkstra s Shortest Path Algorithm Directed Graph/Digraph Earliest Start Time Edge Euler Circuit Euler Path Hamiltonian Circuit Hamiltonian Path Indegrees Kruskgal s Algorithm Multigraph Nearest Neighbor Algorithm Optimal/Optimization Outdegrees Prerequisites Program Management Minimum Spanning Tree Tasks Vertex/Vertices Weighted Graph

133 Use the Nearest Neighbor algorithm to find a Hamilton circuit of reasonably minimal weight in each of the following graphs. For each, start at A, name the circuit and find its total weight. Practice Problem Now us the Cheapest Link Algorithm and compare the circuits

134 " Use the Nna from vertex C to find the optimal Route for the travelling salesman Then use the Cheapest Link Algorithm to determine the Hamilton Path. Compare the Two Routes you found. Why do they differ? If they do

135 DIJKSTRA S ALGORITHM FOR SHORTEST ROUTE So imagine that you want to find the shortest route from one vertex (location) to another vertex (location) but you don t have to go to EVERY location in the graph. Think about this how many routes can you draw from Cox Mill High School to your house? Each turn represents a new vertex. What if you draw those routes and estimate the minutes each edge takes..an edge is from where you are until you make a turn..the next edge is from that turn to the next turn.

136 Dijkstra s Shortest Path (route) Algorithm Many more problems than you might at first think can be cast as shortest path problems, making Dijkstra s algorithm a powerful and general tool used the real world more than almost every other graph theory algorithm.. Can you think of any?

137 Dijkstra s algorithm is applied to automatically find directions between physical locations, such as driving directions on websites like Mapquest or Google Maps. In a networking or telecommunication applications, Dijkstra s algorithm has been used for solving the mindelay path problem (which is the shortest path problem). For example in data network routing, the goal is to find the path for data packets to go through a switching network with minimal delay. It is also used for solving a variety of shortest path problems arising in plant and facility layout, robotics, transportation, and other design problems

138 DIJKSTRA S ALGORITHM FOR SHORTEST ROUTE Step 1 Label the start vertex as 0. Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Box this number (permanent label). Label each vertex that is connected to the start vertex with its distance (temporary label). Box the smallest number. From this vertex, consider the distance to each connected vertex. If a distance is less than a distance already at this vertex, cross out this distance and write in the new distance. If there was no distance at the vertex, write down the new distance. Repeat from step 4 until the destination vertex is boxed.

139 Let s Try the Dijkstra Shortest Path Algorithm From A to G A D F C G B 7 E 5

140 Try it From on Albany your to Ladue own What if you have to go through Fenton first to deliver a package?

141 Practice problem Use Dijkstra s Shortest Path Algorithm to find the shortest from Pensacola to Pendleton Pendleton Pueblo Phoenix Peoria Pierre Pensacola Pittsburgh Princeton 2

142 Let s Try the Dijkstra Shortest Path Algorithm Find the Shortest Path from A to every other vertex A D F C G B 16 E

143 Shortest Path/Route Algorithms Literacy Activity Due Monday 1.Research the three shortest route/path algorithms we have been studying: a. Nearest Neighbor Algorithm b. Cheapest Link Algorithm c. Dijkstra s Shortest Path Algorithm 2. Write a brief summary of each algorithm, including its origins and how it relates to Hamilton Circuits and Paths. 3. Write a step-by-step process to follow when using the algorithm 4. Draw a graph and provide a detailed example of how each particular algorithm is implemented in your graph: a. Your graph must have at least 8 vertices and 16 edges. b. Your graph edge weights must be at least 3 and no more than 19. c. No edge weight may be used more than three times in your graph d. You may designate a starting point for the NNA and Dijkstra s Algorithm but not for the Cheapest Link

144 partners Problem A delivery person must visit each of his warehouses daily. His delivery route begins and ends at his garage (G). The table below shows the approximate travel time (in minutes) between stops. Draw a weighted complete graph to represent this information. Use the Cheapest Link Algorithm to find the quickest route. How much time does this route take? Is it different than the NNA Route you found the other day? G A B C D G A B C D

145 What if you have a digraph? Find the shortest path from A to F.

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

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

Chapter 4 Answers. Lesson 4.1. Chapter 4 Answers 1

Chapter 4 Answers. Lesson 4.1. Chapter 4 Answers 1 Chapter 4 Answers Lesson 4.1 1. 2. 3. 4. Chapter 4 Answers 1 5. Answers vary. Sample answer: a. A: 2, none; B: 4, A; C: 3, B; D: 7, C; E: 5, A; F: 10, E; G: 8, A; H: 3, A; I: 4, D, F, G, and H b. c. In

More information

Unit 7 Day 2 Section Vocabulary & Graphical Representations

Unit 7 Day 2 Section Vocabulary & Graphical Representations Unit 7 Day 2 Section 4.3-4.4 Vocabulary & Graphical Representations 1 Warm Up ~ Day 2 List the tasks and earliest start times in a table. Determine the minimum project time and all the critical paths.

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

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

Finite Math A, Chapter 8: Scheduling 1

Finite Math A, Chapter 8: Scheduling 1 Finite Math A, Chapter 8: Scheduling 1 Finite Math A Chapter 8 The Mathematics of Scheduling Chapter 8: The Mathematics of Scheduling Pd 2 & 6 Pd 4 & 7 Lesson Homework Tues Wed 8.1, 8.2 The Basic Elements

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

1. The Highway Inspector s Problem

1. The Highway Inspector s Problem MATH 100 Survey of Mathematics Fall 2009 1. The Highway Inspector s Problem The Königsberg Bridges over the river Pregel C c d e A g D a B b Figure 1. Bridges f Is there a path that crosses every bridge

More information

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006 Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006 THE KIT: This kit contains materials for two Instant Insanity games, a student activity sheet with answer key and this instructor

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

EECS 203 Lecture 20. More Graphs

EECS 203 Lecture 20. More Graphs EECS 203 Lecture 20 More Graphs Admin stuffs Last homework due today Office hour changes starting Friday (also in Piazza) Friday 6/17: 2-5 Mark in his office. Sunday 6/19: 2-5 Jasmine in the UGLI. Monday

More information

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ -  artale/z CHAPTER 10 GRAPHS AND TREES Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/z SECTION 10.1 Graphs: Definitions and Basic Properties Copyright Cengage Learning. All rights reserved. Graphs: Definitions

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

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

Worksheet 28: Wednesday November 18 Euler and Topology

Worksheet 28: Wednesday November 18 Euler and Topology Worksheet 28: Wednesday November 18 Euler and Topology The Konigsberg Problem: The Foundation of Topology The Konigsberg Bridge Problem is a very famous problem solved by Euler in 1735. The process he

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

AQR UNIT 7. Circuits, Paths, and Graph Structures. Packet #

AQR UNIT 7. Circuits, Paths, and Graph Structures. Packet # AQR UNIT 7 NETWORKS AND GRAPHS: Circuits, Paths, and Graph Structures Packet # BY: Introduction to Networks and Graphs: Try drawing a path for a person to walk through each door exactly once without going

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

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

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

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

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

More information

Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz

Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz Warm-Up Phones OFF & in Blue Pockets! Get out paper for notes! Agenda Notes first, Then do practice and HW questions Quiz at the end Notes:

More information

CSE 21 Spring 2016 Homework 5. Instructions

CSE 21 Spring 2016 Homework 5. Instructions CSE 21 Spring 2016 Homework 5 Instructions Homework should be done in groups of one to three people. You are free to change group members at any time throughout the quarter. Problems should be solved together,

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

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

Unit 7 Day 6. Section 5.2 Traveling Salesman Problem & Section 5.3 Finding the Shortest Route

Unit 7 Day 6. Section 5.2 Traveling Salesman Problem & Section 5.3 Finding the Shortest Route Unit 7 Day 6 Section 5.2 Traveling Salesman Problem & Section 5.3 Finding the Shortest Route 1 Warm Up Day 7: 1. Draw a planar graph with 6 vertices. 2. Is a K 9,3 graph planar? Explain your reasoning.

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

0.0.1 Network Analysis

0.0.1 Network Analysis Graph Theory 0.0.1 Network Analysis Prototype Example: In Algonquian Park the rangers have set up snowmobile trails with various stops along the way. The system of trails is our Network. The main entrance

More information

When the boundaries or names of countries

When the boundaries or names of countries CHAPTER Graphs as Models 4 When the boundaries or names of countries change, cartographers have to be prepared to provide the public with new maps. For years, mapmakers and mathematicians alike have wondered

More information

Week 10: Colouring graphs, and Euler s paths. 14 and 16 November, 2018

Week 10: Colouring graphs, and Euler s paths. 14 and 16 November, 2018 MA284 : Discrete Mathematics Week 10: Colouring graphs, and Euler s paths http://www.maths.nuigalway.ie/ niall/ma284/ 14 and 16 November, 2018 1 Colouring The Four Colour Theorem 2 Graph colouring Chromatic

More information

CSE 21 Spring 2016 Homework 5. Instructions

CSE 21 Spring 2016 Homework 5. Instructions CSE 21 Spring 2016 Homework 5 Instructions Homework should be done in groups of one to three people. You are free to change group members at any time throughout the quarter. Problems should be solved together,

More information

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

Examples of Tasks from Course 1, Unit 4

Examples of Tasks from Course 1, Unit 4 Examples of Tasks from Course 1, Unit 4 What Solutions are Available? Lesson 1: page 258, Modeling Task 1; page 260, Modeling Task 4; page 261, Organizing Task 1; page 271, Modeling Task 2; page 272, Modeling

More information

Introduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow

Introduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow Introduction to Engineering Systems, ESD.00 Lecture 7 Networks Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow The Bridges of Königsberg The town of Konigsberg in 18 th century

More information

IE 102 Spring Routing Through Networks - 1

IE 102 Spring Routing Through Networks - 1 IE 102 Spring 2017 Routing Through Networks - 1 The Bridges of Koenigsberg: Euler 1735 Graph Theory began in 1735 Leonard Eüler Visited Koenigsberg People wondered whether it is possible to take a walk,

More information

CS1 Lecture 31 Apr. 3, 2019

CS1 Lecture 31 Apr. 3, 2019 CS Lecture 3 Apr. 3, 209 HW6 due Fri. Q3: think carefully about overlaps draw pictures Think dimension by dimension three D problems if they don t overlap in x, they don t overlap» Express this in terms

More information

3 Euler Tours, Hamilton Cycles, and Their Applications

3 Euler Tours, Hamilton Cycles, and Their Applications 3 Euler Tours, Hamilton Cycles, and Their Applications 3.1 Euler Tours and Applications 3.1.1 Euler tours Carefully review the definition of (closed) walks, trails, and paths from Section 1... Definition

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

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

CHAPTER 10 GRAPHS AND TREES. Copyright Cengage Learning. All rights reserved.

CHAPTER 10 GRAPHS AND TREES. Copyright Cengage Learning. All rights reserved. CHAPTER 10 GRAPHS AND TREES Copyright Cengage Learning. All rights reserved. SECTION 10.1 Graphs: Definitions and Basic Properties Copyright Cengage Learning. All rights reserved. Graphs: Definitions and

More information

The Human Brain & Graph Theory

The Human Brain & Graph Theory The Human Brain & Graph Theory Graph Theory A graph is a collection of vertices (or points) that are connected by edges (or lines) Edges may overlap Graphs do not need edges Graphs can be directed with

More information

Notebook Assignments

Notebook Assignments Notebook Assignments These six assignments are a notebook using techniques from class in the single concrete context of graph theory. This is supplemental to your usual assignments, and is designed for

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

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

The Traveling Salesman Problem

The Traveling Salesman Problem The Traveling Salesman Problem Hamilton path A path that visits each vertex of the graph once and only once. Hamilton circuit A circuit that visits each vertex of the graph once and only once (at the end,

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

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques. Graph theory Po-Shen Loh June 013 1 Basic results We begin by collecting some basic facts which can be proved via bare-hands techniques. 1. The sum of all of the degrees is equal to twice the number of

More information

7 Next choice is 4, not 3...

7 Next choice is 4, not 3... Math 0 opics for rst exam Chapter 1: Street Networks Operations research Goal: determine how to carry out a sequence of tasks most eciently Ecient: least cost, least time, least distance,... Example: reading

More information

Grades 7 & 8, Math Circles 31 October/1/2 November, Graph Theory

Grades 7 & 8, Math Circles 31 October/1/2 November, Graph Theory Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grades 7 & 8, Math Circles 31 October/1/2 November, 2017 Graph Theory Introduction Graph Theory is the

More information

The Bridges of Konigsberg Problem Can you walk around the town crossing each bridge only once?

The Bridges of Konigsberg Problem Can you walk around the town crossing each bridge only once? The Bridges of Konigsberg Problem Can you walk around the town crossing each bridge only once? Many people had tried the walk and felt that it was impossible, but no one knew for sure. In 1736, Leonard

More information

An Introduction to Graph Theory

An Introduction to Graph Theory An Introduction to Graph Theory Evelyne Smith-Roberge University of Waterloo March 22, 2017 What is a graph? Definition A graph G is: a set V (G) of objects called vertices together with: a set E(G), of

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics An Introduction to Graph Theory. Introduction. Definitions.. Vertices and Edges... The Handshaking Lemma.. Connected Graphs... Cut-Points and Bridges.

More information

Majority and Friendship Paradoxes

Majority and Friendship Paradoxes Majority and Friendship Paradoxes Majority Paradox Example: Small town is considering a bond initiative in an upcoming election. Some residents are in favor, some are against. Consider a poll asking the

More information

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)

More information

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions Brief History Graph Theory What is a graph? It all began in 1736 when Leonhard Euler gave a proof that not all seven bridges over the Pregolya River could all be walked over once and end up where you started.

More information

Graph Theory and its Applications

Graph Theory and its Applications Department of Mathematics and Statistics deeringj@goldmail.etsu.edu October 17, 2012 What is a Graph? Introduction Graphs Graph Theory Simply a modeling tool or set of relationships Graphs Graph Theory

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

Graph Theory. Chapter 4.

Graph Theory. Chapter 4. Graph Theory. Chapter 4. Wandering. Here is an algorithm, due to Tarry, that constructs a walk in a connected graph, starting at any vertex v 0, traversing each edge exactly once in each direction, and

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

Elements of Graph Theory

Elements of Graph Theory Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered

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

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

Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III

Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III 1 Eulerian Graphs Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III Let s begin this section with a problem that you may remember from lecture 1. Consider the layout of land and water

More information

Section 3.4 Basic Results of Graph Theory

Section 3.4 Basic Results of Graph Theory 1 Basic Results of Graph Theory Section 3.4 Basic Results of Graph Theory Purpose of Section: To formally introduce the symmetric relation of a (undirected) graph. We introduce such topics as Euler Tours,

More information

Fundamental Properties of Graphs

Fundamental Properties of Graphs Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,

More information

PSD1A. DESIGN AND ANALYSIS OF ALGORITHMS Unit : I-V

PSD1A. DESIGN AND ANALYSIS OF ALGORITHMS Unit : I-V PSD1A DESIGN AND ANALYSIS OF ALGORITHMS Unit : I-V UNIT I -- Introduction -- Definition of Algorithm -- Pseudocode conventions -- Recursive algorithms -- Time and space complexity -- Big- o notation --

More information

11-5 Networks. Königsberg Bridge Problem

11-5 Networks. Königsberg Bridge Problem Section 11-5 Networks 1 11-5 Networks In the 1700s, the people of Königsberg, Germany (now Kaliningrad in Russia), used to enjoy walking over the bridges of the Pregel River. There were three landmasses

More information

Chapter 3: Paths and Cycles

Chapter 3: Paths and Cycles Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk

More information

Unit 7 Day 1. Task Graphs and Critical Paths

Unit 7 Day 1. Task Graphs and Critical Paths Unit 7 Day 1 Task Graphs and ritical Paths Remember that ollege Tour ctivity is due at the beginning of class tomorrow!! Notes Day 1 Task Graphs and ritical Paths GRPH PPLITIONS How does a building contractor

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

#30: Graph theory May 25, 2009

#30: Graph theory May 25, 2009 #30: Graph theory May 25, 2009 Graph theory is the study of graphs. But not the kind of graphs you are used to, like a graph of y = x 2 graph theory graphs are completely different from graphs of functions.

More information

Basics of Graph Theory

Basics of Graph Theory Basics of Graph Theory 1 Basic notions A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Simple graphs have their

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

GRAPHS Lecture 17 CS2110 Spring 2014

GRAPHS Lecture 17 CS2110 Spring 2014 GRAPHS Lecture 17 CS2110 Spring 2014 These are not Graphs 2...not the kind we mean, anyway These are Graphs 3 K 5 K 3,3 = Applications of Graphs 4 Communication networks The internet is a huge graph Routing

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

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs CS 70 Discrete Mathematics for CS Spring 2008 David Wagner Note 13 An Introduction to Graphs Formulating a simple, precise specification of a computational problem is often a prerequisite to writing a

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

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

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Chapter 7 & 8 Test Review Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Solve the problem. 1) Which of the following four graphs is a tree?

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

Ma/CS 6a Class 8: Eulerian Cycles

Ma/CS 6a Class 8: Eulerian Cycles Ma/CS 6a Class 8: Eulerian Cycles By Adam Sheffer The Bridges of Königsberg Can we travel the city while crossing every bridge exactly once? 1 How Graph Theory was Born Leonhard Euler 1736 Eulerian Cycle

More information

context. (Similarly, we write ν for ν(g), etc. if there is no risk of confusion.) For a subset A V we write N G (A) = {v V ( w A)(v w)} (the set of

context. (Similarly, we write ν for ν(g), etc. if there is no risk of confusion.) For a subset A V we write N G (A) = {v V ( w A)(v w)} (the set of Graph Theory CMSC-27500 Spring 2015 http://people.cs.uchicago.edu/ laci/15graphs Homework set #4. First batch posted 4-9, 8am, updated 10:20am. Problems 4.16 4.31 added at 11:30pm. Due Tuesday, April 14

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

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

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

Week 11: Eulerian and Hamiltonian graphs; Trees. 15 and 17 November, 2017

Week 11: Eulerian and Hamiltonian graphs; Trees. 15 and 17 November, 2017 (1/22) MA284 : Discrete Mathematics Week 11: Eulerian and Hamiltonian graphs; Trees http://www.maths.nuigalway.ie/~niall/ma284/ 15 and 17 November, 2017 Hamilton s Icosian Game (Library or the Royal Irish

More information

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0). CS4234: Optimisation Algorithms Lecture 4 TRAVELLING-SALESMAN-PROBLEM (4 variants) V1.0: Seth Gilbert, V1.1: Steven Halim August 30, 2016 Abstract The goal of the TRAVELLING-SALESMAN-PROBLEM is to find

More information

MATH 101: Introduction to Contemporary Mathematics

MATH 101: Introduction to Contemporary Mathematics MATH 101: Introduction to Contemporary Mathematics Sections 201-206 Instructor: H. R. Hughes Course web page: http://www.math.siu.edu/hughes/math101.htm Summer 2013 Lecture sessions meet: MTWF 12:10-1:10

More information

Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009.

Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009. Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009. Describing Graphs (8.2) A graph is a mathematical way of describing

More information

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4) S-72.2420/T-79.5203 Basic Concepts 1 S-72.2420/T-79.5203 Basic Concepts 3 Characterizing Graphs (1) Characterizing Graphs (3) Characterizing a class G by a condition P means proving the equivalence G G

More information

Graph Theory: Starting Out

Graph Theory: Starting Out Graph Theory: Starting Out Administrivia To read: Chapter 7, Sections 1-3 (Ensley/Crawley) Problem Set 5 sent out; due Monday 12/8 in class. There will be two review days next week (Wednesday and Friday)

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

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 7 Graph properties By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-2: Eulerian

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

Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015

Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015 Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015 The Seven Bridges of Königsberg In

More information

Graph Algorithms. A Brief Introduction. 高晓沨 (Xiaofeng Gao) Department of Computer Science Shanghai Jiao Tong Univ.

Graph Algorithms. A Brief Introduction. 高晓沨 (Xiaofeng Gao) Department of Computer Science Shanghai Jiao Tong Univ. Graph Algorithms A Brief Introduction 高晓沨 (Xiaofeng Gao) Department of Computer Science Shanghai Jiao Tong Univ. 目录 2015/5/7 1 Graph and Its Applications 2 Introduction to Graph Algorithms 3 References

More information

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory Math.3336: Discrete Mathematics Chapter 10 Graph Theory Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall

More information

Chapter 4 Review. 1. Write a summary of what you think are the important points of this chapter. 2. Draw a graph for the following task table.

Chapter 4 Review. 1. Write a summary of what you think are the important points of this chapter. 2. Draw a graph for the following task table. hapter Review 1. Write a summary of what you think are the important points of this chapter.. raw a graph for the following task table. Task Time Prerequisites Start 0 None 1 5,, I, inish. a. List the

More information