Presentation is loading. Please wait.

Presentation is loading. Please wait.

Networks.

Similar presentations


Presentation on theme: "Networks."— Presentation transcript:

1 Networks

2 Terms This is a network 15 25 This is a graph 12 15 20 10 8
12 10 8 A B C D E F G 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. 12 10 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. 12 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 H I E G J B C D F K M N L

6 Networks 1. A B C D E F 3. A B C D E 1 2 3 4 Number of nodes
Number of edges 1 2 3 4 Number of nodes 6 5 Number of edges 8 Which networks are connected? 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 A B C D E F G
12 10 8 A B C D E F G Calculate the total weight of the route BACFDEG. = 93

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

13 minimum spanning trees
Kruskal’s Algorithm - 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 minimum spanning trees
What is the minimum spanning tree for this problem? What is the minimum length of cabling required to connect all the farms? Kruskal’s Algorithm - 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 until all polygons are removed. MOE 2011

15 Minimum spanning trees
For each of the following, draw a minimum spanning tree and calculate its length. A B 2 4 4 5 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? B C D 38m 35m 22m 43m 24m I A 50m 30m 58m E 34m 32m 32m 45m H F 24m G 26m

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? = 236m B C D 35m 22m 43m 24m I A 30m E 32m H F 24m G 26m

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? ABD 1+3=4 ACBD 2+1+3=6 ACD 2+1=3 ABCD 1+1+1=3 AB 1 ACB 2+1=3 ACDF 2+1+3=6 ABCDF =6 ABEF 1+2+3=6 Go to network skill practice worksheet. Network practice answers 3. Start ABE 1+2=3 ACBE 2+1+2=5 ACE 2+2=4 ABCE 1+1+2=4 AC 2 ABC 1+1=2

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 H G 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. A B C 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. A B C D E F G H I 12 14 7 6 8 C D A B F E I H G Entry

22 Practise A B C D G I H F E 12+12+8+8+6+6+12+7 = 71m
Therefore 71 x $95 = $6745 to install the venting system. A 12 B C D 7 12 12 G I H 8 8 F E 6 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. Auckland Tauranga Whakatane Hamilton Rotorua Wellington 150 160 70 120 90 65 80 350 400 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. Minimum spanning tree

25 Archer (A), Bowman (B), Crossbow (C), Dart (D) and Experience (E).
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. A B C D E 480 540 280 470 - 460 380 700 560 400 600 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. A B C D E 48 54 28 47 - 46 38 70 56 40


Download ppt "Networks."

Similar presentations


Ads by Google