Presentation is loading. Please wait.

Presentation is loading. Please wait.

9.1 Introduction to Graphs

Similar presentations


Presentation on theme: "9.1 Introduction to Graphs"— Presentation transcript:

1 9.1 Introduction to Graphs
TABLE 1: Graph Terminology Type Edges Multiple Edges Allowed? Loops Allowed? Simple graph Undirected No Multigraph Yes Pseudograph Simple directed graph Directed Directed multigraph Mixed Graph Directed and Undirected

2 Graph Models Graphs are used extensively for modeling real-world phenomena Example: Vertices are states of the US. Edge between v and w if v shares a border with w.

3 More Examples “Friend” graph for Facebook connections
Computer networks Cities and highway routes Cities and airline flights Round robin tournaments, “defeated” Statements in a program, “must be executed before” Telephone calls made in a network (“Call” graph)

4 Precedence Graphs Elaborated
S1 a:=0 S2 b:=1 S3 c:=a+1 S4 d:=b+a S5 e:=d+1 S6 e:=c+d

5 9.2 Graph Terminology Terms Adjacent: Incident: Degree: Isolated:
Pendant:

6 Example: A is adjacent to The degree of vertex b is The pendant vertices of the graph are

7 The Handshaking Theorem
Let G be a pseudograph with vertex set V and edge set E. Suppose there are e edges, i.e. |E| = e. Then In other words, “the sum of the degrees of the vertices is twice the number of edges.”

8 Corollary: An undirected graph has an even number of vertices of odd degree.

9 Directed Graph Terminology
Initial vertex, terminal vertex Indegree Outdegree

10 Example: deg − 𝑎 = deg + 𝑎 = deg − 𝑏 = deg + 𝑏 = deg − 𝑐 = deg + 𝑐 = deg − 𝑑 = deg + 𝑑 = deg − 𝑒 = deg + 𝑒 = deg − 𝑔 = deg + 𝑔 =

11 “Handshaking Theorem” for Directed Graphs
Let G be a directed multigraph with vertex set V and edge set E. Suppose there are e edges, i.e. |E| = e. Then In other words, “the sum of the indegrees of the vertices is equal to the sum of the outdegrees of the vertices, and both are equal to the number of edges.”

12 The “Underlying Undirected Graph”

13 Complete Graphs A simple undirected graph is a complete graph if all possible edges are present.

14 Other Specialized Graphs
The Cycle Cn The Wheel Wn The n-Cube Qn

15 Bipartite Graphs A graph G = (V,E) is said to be bipartite if and only if there is a two set partition {V1, V2} of V such that every edge e in E has one of its endpoints in V1 and the other in V2.

16 The Complete Bipartite Graph Kmn
𝐾 2,3 𝐾 2,1

17 Bipartite Graphs Theorem: A simple graph is bipartite if and only if it is possible to assign one of two different colors to each vertex of the graph so that no two adjacent vertices are assigned the same color

18 Subgraphs, Unions, Intersections, and Complements
A graph G = (V′, E′) is a subgraph of graph H= (V,E) if and only if V′  V and E′  E. The union of two graphs is formed using the union of the two vertex sets and the union of the two edge sets. The intersection Is defined similarly. The complement of a graph is the graph which is formed using the same vertex set as the original graph , but which has an edge between two vertices if and only if the original graph does not have such an edge.

19 Examples:


Download ppt "9.1 Introduction to Graphs"

Similar presentations


Ads by Google