1 / 19

MTH118

MTH118. Sanchita Mal-Sarkar. Routing Problems. The fundamental questions: Is there any proper route for the particular problem? If there are many possible routes, which one is the best (cost, distance, or time)?. Routing Problems. Examples: Mail delivery Garbage collection

carlos-wolf
Download Presentation

MTH118

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. MTH118 Sanchita Mal-Sarkar

  2. Routing Problems The fundamental questions: • Is there any proper route for the particular problem? • If there are many possible routes, which one is the best (cost, distance, or time)?

  3. Routing Problems Examples: • Mail delivery • Garbage collection • Newspaper delivery • Internet access

  4. Graphs • Graph is a picture consisting of • Dots (called vertices) • Lines (called edges) • Edges do not have to be straight lines • Edges have to connect two vertices • When an edge connects a vertex back with itself, then it is called a loop.

  5. Examples of graphs B Graph 1 D A C B A Graph 2 C D

  6. Graph represents a relationship Ron John Ruben Bob Edge represents “brother of ”

  7. Adjacent vertices/edges Two vertices are adjacent if there is an edge joining them. Two edges are adjacent if they share a common vertex. Vertices A and C are adjacent vertices AD and AC are adjacent edges

  8. Degree of a vertex deg(A) = 2, deg(B) = 1, deg(C) = 5, deg(D) = 5, deg(E) = 3

  9. Paths A sequence of vertices so that each vertex in the sequence is adjacent to the next one Vertex can appear on the path more than one. Edge cannot appear on the path more than once E, D, C, A. => A path from vertex E to vertex A E, D, C, D, A => Not a path because the edge DC appears twice

  10. Circuits A path that starts and ends at the same vertex. A, C, D, A => A circuit of length 3

  11. Connected graph A graph is connected if it is possible to travel from any vertex to any other vertex along consecutive edges of the graph Disconnected => If it is not connected Graph1, Graph4 => Connected Graph 2, Graph 3 => Disconnected

  12. Bridge Absence of the bridge (edge) will disconnect the graph BD is a bridge

  13. R R D D A A L L Euler Paths A path that travels through every edge of a graph. Edges can be traveled once since it is a path Travel every edge 1) without lifting your pencil 2) without retracing any edge Several Euler paths L,A, R, D, A, R, D, L, A No Euler paths

  14. A B F C E D Euler circuits A circuit that travels through every edge of a graph Same requirement as for an Euler path, as well as Additional requirement: starting and ending vertex be the same. Graph has Euler circuit

  15. Euler Theorem 1 • If a graph has many odd vertices, then it cannot have an Euler circuit • If a graph is connected and every vertex is an even vertex, then it has at least one Euler circuit (and usually more A E B Graph has no Euler circuit C D

  16. Euler’s Theorem 2 • If a graph has more than two odd vertices, then it cannot have an Euler path. • If a graph is connected and has exactly two odd vertices, then it has at least one Euler path (and usually more). Any such path must start at one of the odd vertices and end at the other one.

  17. Euler Theorem 2 No Euler circuit No Euler path Euler circuit Euler path No Euler circuit But, Euler path

  18. Euler’s Theorem 2 No Euler circuit But, Euler path No Euler circuit No Euler path No Euler circuit No Euler path Euler circuit Euler path

  19. Euler’s Theorem 3 • The sum of the degrees of all the vertices of a graph equals twice the number of edges • A graph always has an even number of odd vertices • A graph has seven vertices–two vertices of degree 6, four vertices of degree 5, and one vertex of degree 2. The number of edges in the graph is  17. • 2n = sum of the degree of all the vertices of a graph, n = no. of edges in the graph

More Related