Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 11: 9.4 Connectivity Paths in Undirected & Directed Graphs Graph Isomorphisms Counting Paths between Vertices 9.5 Euler and Hamilton Paths Euler.

Similar presentations


Presentation on theme: "Lecture 11: 9.4 Connectivity Paths in Undirected & Directed Graphs Graph Isomorphisms Counting Paths between Vertices 9.5 Euler and Hamilton Paths Euler."— Presentation transcript:

1 Lecture 11: 9.4 Connectivity Paths in Undirected & Directed Graphs Graph Isomorphisms Counting Paths between Vertices 9.5 Euler and Hamilton Paths Euler Paths & Circuits Hamilton Paths & Circuits Gray Code

2 Introduction of Connectedness http://farm4.static.flickr.com/3120/3409325514_68840abcb8.jpg

3 Paths in Graphs http://www.ctl.ua.edu/math103/euler/ifagraph.htm

4 Connected Components of a Graph

5 Connectedness in Directed Graphs

6 Test for Isomorphism

7 Counting Paths Between Vertices

8 The problem was to find a walk through the city that would cross each bridge once and only once. The islands could not be reached by any route other than the bridges, and every bridge must have been crossed completely every time (one could not walk half way onto the bridge and then turn around and later cross the other half from the other side). Euler showed that there is no solution. The traversal of any graph in which every edge is used exactly once is called an Euler Circuit. The Seven Bridges of Konigsberg Graph theory began with the analysis of a puzzle involving the bridges in the town of Konigsberg, Prussia (currently Kaliningrad, Russia) by the mathematician Leonhard Euler Euler observed that a necessary condition for the existence of Eulerian circuits is that all vertices in the graph have an even degree. A graph where every vertex has an even degree is called Eulerian graph. http://en.wikipedia.org/wiki/Eulerian_path

9 Graph Coloring Algorithm In graph theory, graph coloring is a special case of graph labeling; it is an assignment of labels traditionally called "colors" to elements of a graph subject to certain constraints. In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices share the same color; this is called a vertex coloring. Determining if a graph can be colored with 2 colors is equivalent to determining whether or not the graph is bipartite, and thus computable in linear time using breadth-first search.bipartitelinear timebreadth-first search Course Scheduling (Timetable) Problem as Graph Coloring - vertex = course edge = conflict color = time of course http://en.wikipedia.org/wiki/Graph_coloring A B C D E A - * * * B * - * * * C * * - * D * * * - * E * * - A B E D CA B E D C

10

11 Hamilton Circuit

12 Graph Depth-First Traversal (DFT) Algorithm Implementation pseudo-code DFT( node v k ) { // deal with current node for each node, vi { if (node_avail(v i )) then DFT(v i ) } node_avail( v i ) is a boolean function that returns true if node v i is available for traversal, which means that v i has not been traversed, and v i is adjacent to v k.

13 Gray Code 0101 1010 00110011 0 00 11 11 00 00 11 11 0 0000111100001111


Download ppt "Lecture 11: 9.4 Connectivity Paths in Undirected & Directed Graphs Graph Isomorphisms Counting Paths between Vertices 9.5 Euler and Hamilton Paths Euler."

Similar presentations


Ads by Google