Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CMSC 250 Discrete Structures CMSC 250 Lecture 1 January 28, 2008.

Similar presentations


Presentation on theme: "1 CMSC 250 Discrete Structures CMSC 250 Lecture 1 January 28, 2008."— Presentation transcript:

1 1 CMSC 250 Discrete Structures CMSC 250 Lecture 1 January 28, 2008

2 2 CMSC 250 Chapter 10, Graph Theory

3 3 CMSC 250 Definitions l The formal definition of graph G is 2 finite sets: –V(G) = a set of vertices –E(G) = a set of edges l Example: –V(H) = {a,b,c,d,e} E(H) = {{a,c},{c,e},{e,b},{b,d},{d,a}} –V(K) = {a,b,c,d} E(K)= {(a,b),(b,a),(a,d),(d,a),(c,c)} l Subgraph: H is a subgraph of G iff V(H)  V(G) and E(H)  E(G)

4 4 CMSC 250 Graph isomorphism l G is isomorphic to H iff t here exists a bijective function f 1 :(V(G))  V(H) and a bijective function f 2 :(E(G))  E(H)

5 5 CMSC 250 Variations of graphs l The edges of a digraph are ordered tuples. l The edge list of a multigraph is a multiset (bag), not a set. l A simple graph has no parallel edges and no loops (reflexive edges). l In a connected graph any vertex is reachable from any other one. l A complete graph has an edge between every pair of vertices. l A complete bipartite graph has two subsets of vertices (u and v), an edge from each vertex in u to each vertex in v, and no edges connecting any vertices in v to others in v, or connecting any vertices in u to others in u.

6 6 CMSC 250 Counting in graphs l Number of edges possible –complete (simple) graph –complete bipartite graph l Degree of a vertex = number of times that vertex is the endpoint of an edge = number of edges incident on it with self-loops counted twice

7 7 CMSC 250 Traversing a Graph NameRepeated EdgesRepeated Verticies Same end/start Walkallowed PathNOallowed Simple PathNO Closed Walkallowed YES CircuitNOallowedYES Simple CircuitNOonly the start/endYES

8 8 CMSC 250 Euler circuit l A circuit that contains every edge and every vertex –starts and stops at the same point –uses every vertex at least once –uses every edge exactly once l G has an Euler circuit iff G is a connected graph and every vertex of G has even degree

9 9 CMSC 250 Hamiltonian circuit A simple circuit that contains every vertex. –starts and stops at the same point –uses every vertex exactly once (except the first and last) –does not repeat an edge

10 10 CMSC 250 How hard are these problems? l Finding a Hamiltonian circuit is thought to be a hard problem. l How does it compare with the problem discussed in the first lecture of finding a satisfying assignment for the variables of a Boolean formula?


Download ppt "1 CMSC 250 Discrete Structures CMSC 250 Lecture 1 January 28, 2008."

Similar presentations


Ads by Google