Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph.

Similar presentations


Presentation on theme: "Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph."— Presentation transcript:

1 Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph G=(V,E) loops are not allowed in simple or multi graphs Def 3: pseudograph ( loops allowed )

2 Chap 7 Graph Def 4: directed graph E : ordered pairs of element of V Def 5: directed multigraph Table 1. Graph Terminology Examples

3 Chap 7 Graph Graph Terminology  Undirected graph Def 1: adjacent : u and v are adjacent if {u,v} is an edge ; this edge is incident with u and v; u and v are endpoints. Def 2: degree of v : number of edges incident with it,except that a loop contributes twice to the degree. Example 1 Isolated vertex : degree 0

4 Chap 7 Graph Theorem 1: The handshaking theorem G=(V,E) : an undirected graph with e edges 2 e =  deg (v) Theorem 2: An undirected graph has an even number of odd-degree vertices sd vVvV

5 Chap 7 Graph  Directed graph (u,v): u:initial vertex, v:end vertex Def 3: in-degree, deg - (v) : number of edges with v as end vertex out-degree, deg + (v) Theorem 3: G=(V,E)  deg + (v) =  deg - (v) = |E| vVvVvVvV

6 Chap 7 Graph Complete graph : K n, Example 4 Cycle : C n,n>= 3, Example 5 Wheel : W n,n>= 3, Example 6 n-cube :Q n, Example 7 Def 4: bipartite: its vertex set V can be partitioned into two disjoint nonempty sets V 1 and V 2 such that every edge connects a vertex in V 1 and a vertex V 2.

7 Chap 7 Graph Example 8 C 6 : bipartite Example 9 K 3 : not bipartite Example 11 : complete bipartite Def 5: subgraph H=(W,F) of a graph G =(V,E), W  V and F  E. Example 14

8 Chap 7 Graph  Isomorphism of Graphs Def 1: G 1 =(V 1,E 1 ), G 2 =(V 2, E 2 ) are isomorphic if there is a one-to-one and onto function f from V 1 to V 2 such that a, b adjacent in G 1,iff f(a) and f(b) are adjacent in G 2,,for all a and b in V 1. Example 8 u 1 u 2 v 1 v 2 u 3 u 4 v 3 v 4 f(u 1 )= v 1, f(u 2 )= v 4, f(u 3 )= v 3, f(u 4 )= v 2

9 Chap 7 Graph Example 9 G and H are not isomorphic number of vertices, number of edges,degrees of the vertices are invariants under isomorphism Example 10 Are G and H isomorphic?

10 Chap 7 Graph  Connectivity Def 1: Path of length n from u to v ; circuit ; simple path / circuit Example 1 Def 2: An undirected graph is connected if there is a path between every pair of distinct vertices of the graph.

11 Chap 7 Graph Theorem 1 There is a simple path between every pair of distinct vertices of a connected undirected graph.  A graph that is not connected is the union of two or more connected subgraphs, each pair of which has no vertex in common. - connected components  Cut vertices  Cut edge Example 4

12 Chap 7 Graph Example 6 Are G and H isomorphic? H has a simple circuit of length 3 while G dosen’t - another invariant

13 Chap 7 Graph Example 7 Are G and H isomorphic? - satisfy all for invariants - f (u 1 )=v 3, f(u 4 )=v 2, f(u 3 )=v 1,f(u 2 )=v 5.and f(u 5 )=v 4

14 Chap 7 Graph  Euler and Hamilton Paths - Is there a simple circuit in Figure 2 that contains every edge? Def 1 : An Euler circuit and an Euler path Example 1,2 Theorem 1 A connected multigraph has an Euler circuit if and only if each of its vertices has even degree.

15 Chap 7 Graph Theorem 2 A connected multigraph has an Euler paths but not an Euler circuit if and only if it has exactly two vertices of odd degree. Def. Hamilton path : A path X 0,X 1,…. X n-1, X n in G=(V,E) is a Hamilton path if V={X 0,X 1,….X n-1,X n } and Xi =Xj, for 0 <= i <j <=n. A circuit X 0,X 1,….X n-1,X n,X 0 is a Hamilton circuit if X 0,X 1,….X n-1,X n is a Hamilton path. Figure 8,9 and Example 5

16 Chap 7 Graph  No known simple necessary and sufficient criteria for the existence of Hamilton circuits. - sufficient conditions - properties used to show that a graph has no H.C. Example 6  Shortest path problem Example 1 Algorithm 1: Dijkstra’s algorithm Example 2


Download ppt "Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph."

Similar presentations


Ads by Google