1 / 22

9 Graphs

9 Graphs. A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes ) and E, a set of edges. Each edge has either one or two vertices associated with it, called its endpoints . An edge is said to connect its endpoints.

kobe
Download Presentation

9 Graphs

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. 9 Graphs

  2. A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated with it, called its endpoints. An edge is said to connect its endpoints. • A graph with an infinite vertex set is called an infinite graph, and a graph with finite vertex is called finite graph. In this book, we usually consider only finite graphs.

  3. Model of Computer Networks • A graph in which each edge connects two different vertices and where no two edges connect the same pair of vertices is called a simple graph. Detroit New York Denver Chicago San Francisco Washington Los Angeles

  4. Model of Computer Networks • Graphs that may have multiple edges connecting the same vertices are called multigraphs. • multiplicity of an edge Detroit New York Denver Chicago San Francisco Washington Los Angeles

  5. Sometimes a communication link connects a data center to itself for diagnosis purpose. Such edges are called loops. Graphs that includes loops and possibly multiedges are called pseudographs. Detroit New York Denver Chicago San Francisco Washington Los Angeles

  6. undirected graphs • undirected edges • simple directed graphs • directed multigraphs (multiple directed edges, multiplicity) • mixed graphs

  7. Simple directed graphs Detroit New York Denver Chicago Washington Los Angeles

  8. Directed multigraphs Detroit New York Denver Chicago Washington Los Angeles

  9. Graph Models • Niche Overlap Graphs in Ecology Hawk Owl Raccoon Squirrel Opossum Crow Mouse Woodpecker Shrew

  10. Acquaintanceship Graphs K M C D H B I M E F G A J L

  11. Influence graphs K C M D H B I M

  12. The Hollywood graph

  13. Round Robin Tournament B D C I H M

  14. Call graphs • The Web Graph • Roadmaps

  15. Precedence Graphs and Concurrent Processing S5 S6 S3 S4 S1 S2

  16. 9.2 Graph Terminology and Special Types of Graphs • Two vertices u and v in an undirected graph G are called adjacent (or neighbors) in G if u and v are endpoints of an edge of G. If e is associated with {u,v}, the edge e is called incident with the vertices u and v. The edge e is also said connect u and v. The vertices u and v are called endpoints of an edge associated with {u,v}.

  17. The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of a vertex. The degree of the vertex v is denoted by deg(v). • Example: What are the degrees of the vertices in the graphs G and H displayed below. H G c a b b d e a d g c e f

  18. Theorem: (The Handshaking Theorem) Let G = (u,v) be an undirected graph with e edges. Then • Example: How many edges are there in a graph with 10 vertices each of degree six? • 2e=610. Thus e=30

  19. Theorem: An undirected graph has an even number of vertices of odd degree. • Proof. Let V1 and V2 be the set of vertices of odd degree and the set of even degree. Thus, |V1| is even.

  20. When (u,v) is an edge of the graph G with directed edges, u is said to be adjacent to v and v is said to be adjacent from u. The vertex u is called the initial vertex of (u,v), and v is called the terminal or end vertex of (u,v). The initial vertex and the terminal vertex of a loop are the same.

  21. In a graph with directed edges the in-degree of a vertex v, denoted by deg-(v), is the number of edges with v as their terminal vertex. The out-degree of a vertex v, denoted by deg+(v), is the number of edges with v as their initial vertex. • Example: Find the in-degree and out-degree of each vertex of the following graph. a b e f d c

  22. Theorem: Let G = (V,E) be a graph with directed edges. Then

More Related