1 / 25

Networks

Networks. Terms. A B C D

Download Presentation

Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Networks

  2. Terms A B C D E F G This is a network 15 25 12 15 20 10 8 This is a graph Even vertices, here they are all order 2 Vertices (Nodes) are A, B, C, D, E, F and G Odd vertices, B has order 1 and A has order 3 etc. Edges are AB, AC, AD, DE, DF, EG and CF

  3. Terms If an edge has a directional arrow it is called an arc. This arc is called BA. 15 25 52 12 15 20 10 8 8 A B C D E F G This is a loop Adjacent vertices

  4. Connected Networks A network is connected if all the nodes can be reached by travelling along the edges. 15 25 12 10 20 A B C D E F A connected network with a unique path and without loops is called a tree These are NOT connected

  5. Spanning Trees Which line or loop would you remove from the following networks to form a tree?. A I H E J G B C K F D M N L

  6. Networks 3. A B C D E 1. A B C D E F Which networks are connected? 4. A B C D E 1, 3 and 4 2. A B C D

  7. Sketching Networks Draw a connected network which has 4 nodes and 6 edges. 2. Draw a network that is not connected, which has 4 nodes and the order of each node is 1. 3. Draw a connected network that has 4 nodes and the order of each node is 4.

  8. Properties of Networks A route (path) is an array of edges joined in sequence by nodes A circuit is a path which begins and ends at the same node

  9. Properties of Networks A Hamiltonian cycle (or Euler circuit) passes through every node (vertex) of the network and each edge only ONCE and RETURNS to its starting vertex. (all nodes must have an even order).A practical example is a mail route. A,B,C,D,A An Euler path includes every edge exactly once and traverses the entire graph. Here we traversed each edge once but in this network we ended on a different node. A,B,C,D,A,C A B C D D C B A

  10. Euler path or circuit? Start/finish Euler circuit as you can draw the graph by traversing each edge only once and ending up where you started.

  11. Weighted Networks 15 25 12 15 20 10 8 8 A B C D E F G Calculate the total weight of the route BACFDEG. 15 + 25 + 20 + 15 + 10 + 8 = 93

  12. Weighted Networks A network is drawn below. Draw the route ABFCDE and find its weight. Explain why this route forms a tree. 3+8+6+4+2=23 It is a unique route which is connected

  13. Kruskal’sAlgorithm - minimum spanning trees • Choose the edge with the smallest weight. • Remove the longest edge in each polygon. • Repeat step 2 until all vertices are connected. • It is useful to remember that, if there are n vertices in the graph, then there will be n-1 edges in the minimum spanning tree. There will often be more than one possible minimum spanning tree.

  14. What is the minimum spanning tree for this problem? • What is the minimum length of cabling required to connect all the farms? Kruskal’sAlgorithm - minimum spanning trees 18 km • Telconz is rolling out a fast broadband programme and has to lay fibre cables to collect the isolated farms at the vertices in the following graph. • The distance (weights) on the edges are the length of cabling required to connect each town. • What is the minimum spanning tree for this problem? • What is the minimum length of cabling required to connect all the farms? Start at the shortest edge. Remove the longest edge in the polygon attached to this edge. Repeat untilall polygons are removed. MOE 2011

  15. Minimum spanning trees For each of the following, draw a minimum spanning tree and calculate its length. B A 4 2 5 4 3 1 4 2 5 C

  16. Minimum spanning trees Draw a minimum spanning tree and calculate its length. A new high school is being built with 9 new classroom blocks (A to I). Contractors need to pave footpaths between these new blocks. The nodes of the network represent the new blocks and the weights of the paths represent the length of the pavement between the new blocks. What is the minimum length of footpath required to connect each of the blocks? C D B 38m 35m 22m 43m 24m I 50m 30m 58m E A 34m 32m 32m 45m H F 24m 26m G

  17. Minimum spanning trees Draw a minimum spanning tree and calculate its length. What is the minimum length of footpath required to connect each of the blocks? 22 + 32 + 24 + 26 + 30 + 24 + 35 + 43 = 236m C D B 35m 22m 43m 24m I 30m E A 32m H F 24m 26m G

  18. Shortest Paths – Dijkstra’s Algorithm • In a network, there are often many possible paths. It is often desirable (for reasons of cost, time, etc.) to find the shortest path. • In a simple network the shortest path may be found by trial and error. • Label the starting point 0 • Find all paths/routes from the start node to the finish node. • Calculate the sum of the weights of each path/route. What is the shortest path from A to F in this network? Start

  19. Practice The diagram below is a floor plan of a house. Draw a network of the floor plan and use it to determine if the owner can pass through each door of their house exactly once. C D A B F E I G H Entry

  20. Practise There are 4 odd nodes (A, F, G and H) so the network is not traversable. The owner cannot pass through each door of their house exactly once. C A B D G I H F E

  21. Practise The owners have decided to put an air vent system in the roof. Calculate the minimum cost for installation if it costs $95 a metre. C D A B F E I G H Entry

  22. Practise 12+12+8+8+6+6+12+7 = 71m Therefore 71 x $95 = $6745 to install the venting system. 12 C A B D 7 12 12 G I H F E 8 6 8 6

  23. Practise Cheapest cost = $6k

  24. A new airline is setting up a network of flights between New Zealand towns and cities. This matrix shows the towns and cities, and the distances of possible flights. Minimum spanning tree At the start of the operation the airline wants to ensure all towns and cities are connected, with a minimum total distance for the flight paths. How would the tree be adjusted if it is essential that there are flights between Auckland and Hamilton and between Auckland and Tauranga? What is the shortest distance that a customer can fly to get from Auckland to Wellington? A flight inspector is based in Wellington. He wants to fly on all the routes to inspect the flight services. Investigate this and suggest a shortest route he might take.

  25. A new theme park is planned to be constructed. Initially there will be five attractions and they will be linked by pathways. The attractions are: Archer (A), Bowman (B), Crossbow (C), Dart (D) and Experience (E). The time to walk along these paths (in seconds) is shown in the table. Draw a network for this theme park. Security needs to patrol every path every hour. The round needs to start and end at the Archer. Find the minimum time this can be done without repeating a path. Give a possible route. c) The builders have been asked to put in moving pathways along some paths so disabled visitors can move easily between attractions. This table gives the expected cost in $1000 for building these pathways. Suggest a set of pathways that should be developed to include moving pathways so that every attraction is connected in a tree and the total cost is minimum.

More Related