Lecture 19.pptx Graph Theory PDF
Document Details
Tags
Summary
This document covers various graph theory concepts including finding possible subgraphs and different types of graphs like simple path and close graphs. It includes examples and definitions for concepts like Euler circuits, and problems like Konigsberg bridges problem and determining connectivity.
Full Transcript
Ex: Find all possible subgraph for the following G graph e3 e1 V1 ᴏ ᴏ V2 e2 deg (V1)= , deg (V2)= , deg (G)= e2 e1 Aᴏ ᴏB...
Ex: Find all possible subgraph for the following G graph e3 e1 V1 ᴏ ᴏ V2 e2 deg (V1)= , deg (V2)= , deg (G)= e2 e1 Aᴏ ᴏB e3 Fᴏ e4 e6 ᴏC Eᴏ e7 e5 ᴏD A walk from D to A can be written as following De5Ce3 Be1 A Write the following walks E to B: A to E: A to A: C to F: Def: let G be a graph of n-vertices then: 1- A walk from V to W is a finite sequence of vertices and edges of the form: V0 e1V1e2V2...enVn where V0=V and Vn=W 2- The trivial walk on V consists only V. V0 e1V1e2V2...enVn ei e j i, j 3- A path from V to W is a walk with no repeated edges. V0 e1V i.e. 1e2V2...enVn Vi V j i, j s.t. 4- A simple path, is a path with no repeated vertices. i.e. s.t. 5- A closed walk is a walk that starts and ends at same vertex. 6- A circuit is a closed walk which has no repeated edge. Ex: e4 e2 V1ᴏ e1 ᴏ ᴏ V2 V3 e3 V1e1V2 e3V3 is a walk from to is it path? V1e1V2 e2V3e4V3e2V2 is it walk? Is it path? write a path from V3 to V1 write a simple path from V1 to V3 write a walk that is not path from V1 to V3 write a walk that is path but not simple path from V 2 to V3 write a close walk from V2 write a circuit from V3 Ex: Draw the graph for the following walk Ae1Ce2 Be5 Ee4Ce3 D Write 5 different close walk from C. Def: A simple circuit is a circuit with no repeated vertices. Ex: determine path, simple path, close, circuit or simple circuit. e4 e5 e3 ᴏ V3 ᴏ V4 e2 e6 e7 e10 V1 ᴏ ᴏ V2 e1 e8 ᴏ V5 ᴏ V6 e9 V1e1V2 e3V3e4V3e5V4 V1e1V2 e3V3e5V4 e5V3e6V5 Path: no repeated edge Simple path: no repeated vertex V2V3V4V5V3V6V2 Close: start and end with same vertex V2V3V4V5V6V2 Circuit: no repeated edge Simple circuit: no repeated vertex V2V3V4V5V6V3V2 V1 Def: let G be a graph. Two vertices V and W are connected, if a walk between V and W. the graph G is called connected, if for any two vertices, a walk. V , W V (G ) i.e. G connected a walk between V and W. Ex: For the following G, determine ᴏV4 the connectivity V2 ᴏ ᴏ V3 ᴏV5 V1 ᴏ V6 ᴏ V2 and V3 V2 and V6 The graph G Ex: determine the connectivity V4 V3 V1 and V3 G A B V1 V2 V5 F ᴏH C E D B D A F C E Def: Let G be a graph an Euler circuit for G is a circuit which contain all vertices and every edge (only once). i.e. Euler circuit 1- Circuit (close not repeated edge) 2- Use every vertex at least once 3- Use every edge exactly one time. Ex: is it an Euler circuit? ᴏV4 V2 ᴏ ᴏ V3 ᴏV5 V1 ᴏ V6 ᴏ Ex: Konigsberg bridges problem. A ᴏ Dᴏ ᴏB ᴏ C Theorem: If G is a graph having an Euler circuit, then every vertex is of even degree. ᴏV4 Ex: Does G have en Euler circuit? V2 ᴏ ᴏ V3 ᴏV5 V1 ᴏ V6 ᴏ A B Ex: Does G have en Euler circuit? D C Does every G contains even degree for all vertices an Euler circuit? Theorem: If G is connected and the degrees of all vertices are even, then G ha san Euler circuit. i.e. Euler circuit i) is even G connected + deg(V i. Ex: check the Euler circuit A D E I B C J H F K Matrix representation of a graph Def: Let G be a graph of n-vertices. The matrix adjacency of G (or adjacent matrix of G) is a matrix A of asize ij n×n whose entries ai j : is the number of edges connected vertices V and V i j ai j could be either 0 or positive integers. Ex: B F I A K C D H A B C D F H 0 I K 1 1 1 A 0 0 0 0 Ex: Let 1 2 0 1 2 0 0 1 A 1 1 1 0 1 2 0 1 Draw a graph G having A as its adjacent matrix. ai a j Remark: the adjacent matrix of a graph G is symmetric j i as Ex: Draw the graph G having 1 2 A 2 1 Ex: Draw the graph G having 1 2 1 A 2 1 3 1 2 1 I 33 Ex: Draw the identity matric