1 / 19

ICS 241

ICS 241. Discrete Mathematics II William Albritton, Information and Computer Sciences Department at University of Hawai’i at Manoa For use with Kenneth H. Rosen’s Discrete Mathematics & Its Applications (5 th Edition) Based on slides originally created by

Télécharger la présentation

ICS 241

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. ICS 241 • Discrete Mathematics II • William Albritton, Information and Computer Sciences Department at University of Hawai’i at Manoa • For use with Kenneth H. Rosen’s Discrete Mathematics & Its Applications (5th Edition) • Based on slides originally created by • Dr. Michael P. Frank, Department of Computer & Information Science & Engineering at University of Florida

  2. Section 8.2: Graph Terminology • Adjacency • Let G be an undirected graph with edge set E. Let eE be (or map to) the pair {u,v}. Then we say: • u, v are adjacent / neighbors / connected. • Edge e is incident with vertices u and v. • Edge econnectsu and v. • Vertices u and v are endpoints of edge e.

  3. Degree of a Vertex • Let G be an undirected graph, vV a vertex. • The degree of v, deg(v), is its number of incident edges. (Except that any self-loops are counted twice.) • A vertex with degree 0 is called isolated. • A vertex of degree 1 is called pendant.

  4. Handshaking Theorem • Let G be an undirected (simple, multi-, or pseudo-) graph with vertex set V and edge set E. Then • Corollary: Any undirected graph has an even number of vertices of odd degree • Note: this means that vertices of odd degrees always occur in one or more pairs

  5. Directed Adjacency • Let G be a directed (possibly multi-) graph, and let e be an edge of G that is (or maps to) (u,v). Then we say: • u is adjacent tov, v is adjacent fromu • ecomes from u, e goes to v. • e connects u to v, e goes from u to v • the initial vertex of e is u • the terminal vertex of e is v

  6. Directed Degree • Let G be a directed graph, v a vertex of G. • The in-degree of v, deg(v), is the number of edges going to v. • The out-degree of v, deg(v), is the number of edges coming from v. • The degree of v, deg(v):deg(v)+deg(v), is the sum of v’s in-degree and out-degree.

  7. Directed Handshaking Theorem • Let G be a directed (possibly multi-) graph with vertex set V and edge set E. Then: • Note that the degree of a node is unchanged by whether we consider its edges to be directed or undirected.

  8. Class Exercise • Exercise 7 (p. 555) • Each pair of students should use only one sheet of paper while solving the class exercises

  9. Special Graph Structures • Special cases of undirected graph structures: • Complete graphsKn • CyclesCn • WheelsWn • n-CubesQn • Bipartite graphs • Complete bipartite graphsKm,n

  10. Complete Graphs • For anynN, a complete graph on n vertices,Kn, is a simple graph with n nodes in which every node is adjacent to every other node:u,vV: uv{u,v}E. K1 K4 K3 K2 K5 K6

  11. Cycles • For anyn3, a cycle on n vertices, Cn, is a simple graph where V={v1,v2,… ,vn}and E={{v1,v2},{v2,v3},…,{vn1,vn},{vn,v1}}. C3 C4 C5 C6 C8 C7

  12. Wheels • For anyn3, a wheelWn, is a simple graph obtained by taking the cycle Cnand adding one extra vertex vhub and n extra edges {{vhub,v1}, {vhub,v2},…,{vhub,vn}} W3 W4 W5 W6 W8 W7

  13. n-cubes (hypercubes) • For any nN, the hypercube Qn is a simple graph consisting of two copies of Qn-1 connected together at corresponding nodes. Q0 has 1 node. • Note: this represents bit strings, in which adjacent vertices differ in exactly 1 bit position Q0 Q1 Q4 Q2 Q3

  14. Bipartite Graphs • Def’n.: A graph G=(V,E)is bipartite (two-part) if V = V1∩V2where V1V2=and eE: v1V1,v2V2: e={v1,v2}. • In English: The graph canbe divided into two partsin such a way that all edges go between the two parts. V2 V1

  15. Class Exercise • Exercises 19, 21, 23 (p. 555) • Each pair of students should use only one sheet of paper while solving the class exercises • If can traverse an ODD number of distinct edges to return to a vertex, then NOT bipartite (p. 550)

  16. Complete Bipartite Graphs • For m,nN, the complete bipartite graphKm,nis a bipartite graph where |V1| = m, |V2| = n, and E = {{v1,v2}|v1V1  v2V2}. • That is, there are m nodes in the left part, n nodes in the right part, and every node in the left part is connected to every node in the right part. K4,3

  17. Class Exercise • Exercise 25 (p. 555) • Each pair of students should use only one sheet of paper while solving the class exercises

  18. Subgraphs • A subgraph of a graph G=(V,E) is a graph H=(W,F)whereWVand FE. G H

  19. a b c a b c e d d f Graph Unions • The unionG1G2of two simple graphs G1=(V1, E1)and G2=(V2,E2)is the simplegraph(V1V2, E1E2). 

More Related