1 section 8.1 introduction to graphs. 2 graph a discrete structure consisting of a set of vertices...
TRANSCRIPT
![Page 1: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/1.jpg)
1
Section 8.1
Introduction to Graphs
![Page 2: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/2.jpg)
2
Graph
• A discrete structure consisting of a set of vertices and a set of edges connecting these vertices– used to model relationships between entities in
a variety of fields– used to solve various types of problems
![Page 3: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/3.jpg)
3
Graph types: simple graph
• Consists of V, a non-empty set of vertices and E, a set of unordered pairs of distinct elements of V
• Example: V={A,B,C,D,E} E={(A,B),(B,C),(B,E),(E,C),(D,E)}
• Note that, since pairs are unordered, each could be listed either way
A B
C
D E
![Page 4: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/4.jpg)
4
Graph types: multigraph
• Consists of a set of vertices (V), a set of edges (E), and a function f from E to {{u,v} | u, v V, u v}
• Edges e1 and e2 are called multiple or parallel edges if f(e1) = f(e2)
• In a simple graph, multiple edges are not allowed, but in a multigraph they are
A B
C
D E
![Page 5: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/5.jpg)
5
Graph types: pseudograph
• Like a multigraph in which loops are allowed; to formally define, must be able to associate edges to sets containing just one vertex
• Pseudograph consists of a set V of vertices, a set E of edges, and a function f from E to {{u,v} | u,v V}
• An edge is a loop if f(e) = {u,u} = {u} for some u V
![Page 6: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/6.jpg)
6
Pseudograph
• Note that multiple edges in a pseudograph may be associated with the same pair of vertices: we say that {u,v} is an edge of graph G = {V,E} if there is at least one edge e with f(e) = {u,v}
• Example:
![Page 7: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/7.jpg)
7
Undirected graphs
• Pseudographs are the most general type - can contain loops and multiple edges
• Multigraphs are undirected graphs that may contain multiple edges but not loops
• Simple graphs are undirected graphs with no multiple edges or loops
![Page 8: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/8.jpg)
8
Directed Graphs
• A directed graph (digraph) consists of a set of vertices (V) and a set of edges (E) that are ordered pairs of elements of V
• Example: V={A,B,C,D} E={(B,A),(B,C),(C,A),(C,D),(D,C)}
![Page 9: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/9.jpg)
9
Directed Multigraph
• Directed multigraph G=(V,E) consists of a set V or vertices, a set E of edges, and a function f from E to {(u,v)|u,vV}
• Edges e1 and e2 are multiple edges if f(e1)=f(e2)
• Multiple directed edges are associated to the the same pair of vertices
• (u,v) is an edge of G=(V,E) as long as there is at least one edge e with f(e) = (u,v)
![Page 10: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/10.jpg)
10
Modeling with graphs - examples
• Niche overlap graph in ecology:– each species represented by vertex– undirected edge connects 2 vertices if the
species compete
• Influence graph:– each person in group is represented by vertex– directed edge from vertex a to vertex b when a
has influence on b
![Page 11: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/11.jpg)
11
Modeling with graphs - examples
• Round-robin tournament graph:– each team represented by vertex– (a,b) is an edge if team a beats team b
• Precedence graph:– vertices represent statements in a computer
program– directed edge between vertices means 1st
statement must be executed before 2nd
![Page 12: 1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used](https://reader035.vdocument.in/reader035/viewer/2022072006/56649d1c5503460f949f1af5/html5/thumbnails/12.jpg)
12
Section 7.1
Introduction to Graphs