Problem Solving with Networks 18/08/2012 Jamie Sneddon

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Shortest Paths Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 9.6 Based on slides from Chuck Allison, Michael T.
Chen, Lu Mentor: Zhou, Jian Shanghai University, School of Management Chen213.shu.edu.cn.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
May 5, 2015Applied Discrete Mathematics Week 13: Boolean Algebra 1 Dijkstra’s Algorithm procedure Dijkstra(G: weighted connected simple graph with vertices.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Graph Algorithms: Minimum.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Programming for Geographical Information Analysis: Advanced Skills Online mini-lecture: Introduction to Networks Dr Andy Evans.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Lecture 12-2: Introduction to Computer Algorithms beyond Search & Sort.
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
SPANNING TREES Lecture 21 CS2110 – Spring
Slide Copyright © 2009 Pearson Education, Inc. AND Active Learning Lecture Slides For use with Classroom Response Systems Chapter 14 Graph Theory.
Graph Theory Hamilton Paths and Hamilton Circuits.
COSC 2007 Data Structures II Chapter 14 Graphs III.
May 1, 2002Applied Discrete Mathematics Week 13: Graphs and Trees 1News CSEMS Scholarships for CS and Math students (US citizens only) $3,125 per year.
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
Structures 7 Decision Maths: Graph Theory, Networks and Algorithms.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Chapter 2: Business Efficiency Lesson Plan
Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Fundamental Data Structures and Algorithms (Spring ’05) Recitation Notes: Graphs Slides prepared by Uri Dekel, Based on recitation.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,
Lecture19: Graph III Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
Mathematics in Management Science
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Chapter 6: Graphs 6.1 Euler Circuits
SPANNING TREES Lecture 21 CS2110 – Fall Nate Foster is out of town. NO 3-4pm office hours today!
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Graph Revisited Fei Chen CSCI2100B Data Structures Tutorial 12 1.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Mathematical modeling To describe or represent a real-world situation quantitatively, in mathematical language.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
Shana Norman Dec 11, 2003 Final Project
Hamilton Paths and Hamilton Circuits
Shortest Path Problems
Shortest Paths and Minimum Spanning Trees
Minimum Spanning Tree Chapter 13.6.
C.Eng 213 Data Structures Graphs Fall Section 3.
Discrete Maths 9. Graphs Objective
Refresh and Get Ready for More
Spanning Trees Discrete Mathematics.
Graph Algorithm.
Discrete Mathematics and Its Applications (5th Edition)
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Chapter 2: Business Efficiency Business Efficiency
4-4 Graph Theory Trees.
Louisiana Travels.
A path that uses every vertex of the graph exactly once.
Shortest Paths and Minimum Spanning Trees
Spanning Trees Lecture 20 CS2110 – Spring 2015.
Presentation transcript:

Problem Solving with Networks 18/08/2012 Jamie Sneddon

Networks, graphs  A graph is collection of points with lines between them  A network is a graph with positive numbers assigned to its edges as weights pointline vertex (vertices)edge nodearc

Distances in miles between some US cities

Detroit MI Columbus OH Washington DC Pittsburgh PA Philadelphia PA New York NY Rochester NY Buffalo NY Cleveland OH Toledo OH Scranton PA Harrisburg PA Distances in miles between some US cities

Detroit MI Columbus OH Washington DC Pittsburgh PA Philadelphia PA New York NY Rochester NY Buffalo NY Cleveland OH Toledo OH Scranton PA Harrisburg PA Distances in miles between NE state US cities

Detroit MI Columbus OH Washington DC Pittsburgh PA Philadelphia PA New York NY Rochester NY Buffalo NY Cleveland OH Toledo OH Scranton PA Harrisburg PA Distances in miles between NE state US cities

Distances in miles between NE state US cities 107

Detroit MI Columbus OH Washington DC Pittsburgh PA Philadelphia PA New York NY Rochester NY Buffalo NY Cleveland OH Toledo OH Scranton PA Harrisburg PA Distances in miles between NE state US cities 107

Distances in miles between NE state US cities 107 T D B R H S N Ph W Pi Cl Co

Spanning Tree with edge deletion 107 T D B R H S N Ph W Pi Cl Co

Spanning Tree with edge inclusion (1) 107 T D B R H S N Ph W Pi Cl Co

Spanning Tree with edge inclusion (2) 107 T D B R H S N Ph W Pi Cl Co Total weight = 1356 miles

Problems in networks  (0) Are all the nodes connected?  (1) What is the lowest weight (smallest) tree which connects all the nodes?  (2) What is the shortest distance from A to B?  (3) Can every edge be used exactly once?  (4) Can every node be visited exactly once?  (5) What is the shortest way to visit every node exactly once?

(0) Connectedness  It’s usually easy to tell if a real-world network is connected or not. Starting at an arbitrary node, if we list that node’s neighbours, then their neighbours, then theirs, we might eventually visit all the nodes.  [ACTIVITY]  If we don’t, it’s not c0nnected.

(1) Spanning Tree  A minimum weight spanning tree is a sub- graph without cycles which connects all the nodes.  A tree with n nodes has n-1 edges.  Sometimes it’s easier to add edges, sometimes remove them.

(2) Shortest Path  Starting at a particular node A, what is the shortest path to another vertex B (or to all other vertices).  [ACTIVITY 2]

(3) Traversability  Is it possible to start at a node A and follow a route through the network which uses every edge exactly once?  If so, does the path return to A, or end elsewhere?  Easily characterised with node parity (even/odd)

(4) Visiting nodes  Is it possible to start at a node A and follow a route through the network visits every NODE exactly once?  If so, does the path return to A, or end elsewhere?  Called Hamiltonian: no characterisation, and hard to find

(5) Travelling Salesman  What is the shortest Hamiltonian cycle/path?  This is harder still! TSP (Travelling Salesman Problem) is the definitive “hard” problem of computational mathematics

Real World / Mathematical World  Networks don’t always model the real world perfectly – what could go wrong?  One way edges  Different weight directions on edges  Variable data (time of day, day of week)  Roads branching outside towns

Questions beyond the procedural  Why did you use this algorithm?  Compare two algorithms  edge inclusion vs edge deletion  How could the network be changed to give (or remove) a property  What does this mean in relation to the given problem

How does adding/deleting nodes/edges change the shortest paths/spanning trees?

Where to add connections?  Where in the network should edges be added/removed so that it is traversable?

Optional nodes  What if we want to allow the possibility of a node outside a town?  Construct two spanning trees: with/without

For more: Wikipedia!  Prim’s Algorithm (connected sub-tree)  Kruskal’s Algorithm (partial trees)  Reverse-Delete Algorithm (remove edges)  Dijkstra’s Algorithm  Euler Path – Fleury’s Algorithm  Jamie Sneddon