1 / 37

Decision Maths

Decision Maths. Networks Kruskal’s Algorithm. Networks. A Network is a weighted graph, which just means there is a number associated with each edge. The numbers can represent distances, costs, times in real world applications.

levi
Download Presentation

Decision Maths

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. Decision Maths Networks Kruskal’s Algorithm

  2. Networks • A Network is a weighted graph, which just means there is a number associated with each edge. • The numbers can represent distances, costs, times in real world applications. • Obvious examples include maps and similar geographical networks.

  3. Networks

  4. Minimum Connector Problem • Basically you need to travel to every node using the least total length. • Consider 4 houses in a Network shown in the diagram below. The weight on each arc represents the distance between each house. • An Electricity company wants to supply every house by using as little cable as possible. • Clearly the shortest possible route is to go from A to B to C and then to D. • So 4 + 3 + 3 = 10, there is no shorter way of supplying every house.

  5. Algorithms • The previous example was a simple one and the solution was very easy to spot. • For more complicated examples you will need to use an algorithm. • An Algorithm is simply a list of instructions that solve a particular problem. • (You will cover Algorithms in more depth later on in the course)

  6. Kruskal`s Algorithm • There are 3 steps to follow in Kruskal`s Algorithm. • Step 1 – Select the shortest arc in the network. • Step 2 – Select the shortest arc from those which are remaining. Ensure that you do not create a cycle. If you do ignore and move on to the next shortest arc. • Step 3 – If all the vertices are connected then stop. If not return to step 2.

  7. Consider the Network below. It helps to rank the arcs in increasing order. Example

  8. 1 – Start by selecting the smallest arc, AB or DE, it makes no difference. Select AB. Applying the Algorithm

  9. 2 – Now select the next smallest, which is DE. Applying the Algorithm

  10. 3 – Next we can select CF or ` DF, again it makes no difference. Lets pick DF. Applying The Algorithm

  11. Next select CF. Applying the Algorithm.

  12. Applying the Algorithm • The next smallest length is EF. However there is already a route from E to F, so this arc is not required.

  13. Applying the Algorithm • Adding CD will again create a loop so the last arc to add is AF. All vertices are now joined so the problem is complete.

  14. Question – Ex 3a pg 66 q1 • Find the minimal spanning tree and associated shortest distance for the network below:

  15. Solution – Ex 3a pg 66 q1

  16. Solution – Ex 3a pg 66 q1

  17. Solution – Ex 3a pg 66 q1

  18. Solution – Ex 3a pg 66 q1

  19. Solution – Ex 3a pg 66 q1

  20. Solution – Ex 3a pg 66 q1

  21. Solution – Ex 3a pg 66 q1

  22. Solution – Ex 3a pg 66 q4

  23. Solution – Ex 3a pg 66 q4

  24. Solution – Ex 3a pg 66 q4

  25. Solution – Ex 3a pg 66 q4

  26. Solution – Ex 3a pg 66 q4

  27. Solution – Ex 3a pg 66 q4

  28. Solution – Ex 3a pg 66 q4

  29. Solution – Ex 3a pg 66 q4

  30. Solution – Ex 3a pg 66 q4

  31. Solution – Ex 3a pg 66 q4

  32. Solution – Ex 3a pg 66 q4

  33. Solution – Ex 3a pg 66 q4

  34. Solution – Ex 3a pg 66 q4

  35. Solution – Ex 3a pg 66 q4

  36. Solution – Ex 3a pg 66 q4

  37. Solution – Ex 3a pg 66 q4

More Related