Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graph Theory I In today’s lesson we will look at:

Similar presentations


Presentation on theme: "Graph Theory I In today’s lesson we will look at:"— Presentation transcript:

1 Graph Theory I In today’s lesson we will look at:
what we mean by the word network what we mean by the word path how to calculate the shortest path why we are doing this!

2 What is a Network? Networks show us how things are joined together.
Networks are made up of: points, which represent things, e.g. places, atoms, electrical components, etc. lines, which represent the links between the things, e.g. roads, bonds, wires Examples of networks: Routes maps – e.g. the London Underground Map Electrical circuits Chemical structures – e.g. molecules

3 Network Examples

4 What is a Path? A path is a route through a network that:
doesn’t go through any of the points more than once doesn’t go along any of the lines more than once Most routes you will want to take in real life will be a path – e.g. if you are travelling somewhere on holiday, you won’t want to go through the same town twice or drive down the same motorway twice

5 Path Example How many paths are there from A to B?
Would all of these paths be a sensible route if you were walking from A to B?

6 Shortest Path Most of the time, we will want to find the shortest path, e.g. to take the shortest route to our destination to connect the components with the shortest amount of wire How can we work out the shortest path? Label each line between two points with the distance between those two points Find all of the possible routes between the starting point and the end point Find the total length of each path and see which is the shortest!

7 Shortest Path Example Which is the shortest path from A to B?
14 Which is the shortest path from A to B? 3 20 A 8 9 4 15 B Path 1 = = 23 Path 2 = = 26 Path 3 = = 26 Path 4 = = 19 Path 5 = = 32 Path 6 = = 35 Path 4 is the shortest path

8 Why Is This Useful? Sat Navs, Google Maps, etc. use this technique to find the shortest route between two places Computer networks, the telephone system and the internet also need to plan routes to get your messages, files and telephone calls to the right place. If you label the lines with the time taken to get between the points, rather than the distance between them, you can use the same method to find the fastest route. If you label the lines with the cost of using that link, then you can find the cheapest route – e.g. finding a route that doesn’t use any toll roads or bridges.

9 Why Not Store the Route? Why do computers or Sat Navs work out the route every time, when it’s likely that they pick the same route every time? For example, if you regularly drive from your house to London, you might always go along the M6 and the M1 – you don’t plan your route every time. What about, though, if the link between the M1 and the M6 is closed, or there is a Grand Prix at Silverstone, or there’s been an accident on the M1? The benefit of choosing the route when you need to go is that you can take into account of current conditions. You can tell that Sat Navs don’t remember the route they used, because they’ll often take you back a different way.

10 Anything Else? You might need to add extra rules – if two paths are equally good, how do you choose which one to use? My Sat Nav appears to select the best route by looking in a clockwise direction. e.g. it would take me from A to B down the A123 and take me back to A up the A456 A B A123 A456


Download ppt "Graph Theory I In today’s lesson we will look at:"

Similar presentations


Ads by Google