CS275 - Discrete Mathematics Chapter 10. Graphs
Lecturer: Jiho Noh
Fall 2019
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 1 / 14 10.2. Graph Terminology and Special Types of Graphs Modifying Graphs Subgraphs
When edges and vertices are removed from a graph, without removing endpoints of any remaining edges, a smaller graph is obtained, which is called a subgraph of the original graph. A subgraph of G = (V , E) is a graph H = (W , F ), where W ⊆ V and F ⊆ E A subgraph H of G is a proper subgraph of G if H 6= G subgrpah induced by a subset W of the vertex set V
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 2 / 14 10.2. Graph Terminology and Special Types of Graphs Modifying Graphs Removing/Adding Edges
Given a graph G = (V , E) and an edge e ∈ E, we can produce a new graph as such by removing or adding the edge to G: G − e = (V , E − {e}) G + e = (V , E ∪ {e})
Union of Graphs,
G1 ∪ G2 = (V1 ∪ V2, E1 ∪ E2),
where G1 = (V1, E1) and G2 = (V2, E2) Edge contraction removes an edge e with endpoints u and v and merges u and v into a new single vertex w.
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 3 / 14 10.3. Representing Graphs and Graph Isomorphism Representing Graphs Representing Graphs
Adjacency Lists list of adjacent vertices to each vertex of a graph. Adjacency Matrices A matrix representation for a simple graph n × n zero-one matrix where the value indicates the adjacency between vertices of a graph with n vertices (Note, for multigraphs, the values represent the number of edges between vertices)
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 4 / 14 10.3. Representing Graphs and Graph Isomorphism Representing Graphs Representing Graphs
Incidence Matrices Suppose that v1, v2,..., vn represents vertices and e1, e2,..., em represnts the edges of a graph
An incidence matrix is the n × m matrix M = [mij ]
where the value 1 is when edge ej is incident with vi otherwise, 0
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 5 / 14 10.3. Representing Graphs and Graph Isomorphism Isomorphism of Graphs Isomorphism
Do graphs have the same structure when we ignore the identities of their vertices?
Isomorphism: iso → same/equal, morph → shape
G1 = (V1, E1) and G2 = (V2, E2) are isomorphic, if there exists a one-to-one and onto (‘bijective’) function from V1 to V2 that preserves the adjacency property (i.e., (u, v) ∈ E1 → (f (u), f (v)) ∈ E2) This function is called an isomorphism.
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 6 / 14 10.3. Representing Graphs and Graph Isomorphism Isomorphism of Graphs How to determine if the graphs are isomorphic?
answer: There’s no efficient algorithm for this!
There are some techniques that shows if the graphs are NOT isomorphic, by inspecting the Graph Invariants.
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 7 / 14 10.3. Representing Graphs and Graph Isomorphism Isomorphism of Graphs Graph Invariants
Isomorphic graphs MUST have: the same number of vertices the same number of edges the same degree from the correspnding vertices between the isomorphic graphs These are called graph invariants.
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 8 / 14 10.4. Connectivity Path Path
Path is a sequence of edges that begins of a vertex of a graph and travels from vertex to vertex along edges of the graph.
Terminology: length, circuit/cycle, simple path, pass through/traverse
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 9 / 14 10.4. Connectivity Connectedness in Undirected Graphs Connectedness in Undirected Graphs
An undirected graph is connected if there is a path between every pair of distinct vertices of the graph. (↔ disconnected)
A connected component of a graph G is connected subgraph of G that is not a proper subgraph of another connected subgraph of G. That is, a connected component of a graph is a maximal connected subgraph of G.
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 10 / 14 10.4. Connectivity Connectedness in Undirected Graphs Cut Vertices, Cut Edges
The removal from a graph of a vertex and all incident edges may produce a subgraph with more connected components. Such vertices are called cut vertices (or articulation points). Analogously, we call such edges cut edges (or bridge).
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 11 / 14 10.4. Connectivity Connectedness in Undirected Graphs Connectedness in Directed Graphs
A directed graph is strongly connected if there is a path from a to b and from b to a whenever a and b are vertices in the graph A directed graph is weakly connected if there is a path between every two vertices in underlying undirected graph strongly connected components — strongly connected subgraphs in directed graphs
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 12 / 14 10.4. Connectivity Connectedness in Undirected Graphs simple circuit of length k as a graph invariant
The existence of a “simple circuit of length k”, where k is a positive integer greater than 2, is an invariant under graph isomorphism. This can help in proving given two graphs are not isomorphic.
{(1, 3), (1, 4), (1, 5), (2, 3), (2, 5), (3, 4)} vs. {(1, 2), (1, 3), (1, 5), (2, 3), (3, 4), (4, 5)}
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 13 / 14 10.4. Connectivity Counting Paths Between Vertices Counting Paths Between Vertices
Thm 10.2.2 — Counting Paths Let G be a graph with adjacency matrix A with respect to the ordering v1, v2,..., vn of the vertices of the graph (with directed or undirected edges, with multiple edges and loops allowed). The number of different paths of length r from vi to vj , where r is a positive integer, equals the (i, j)th entry of Ar .
Lecturer: Jiho Noh CS275 - Discrete Mathematics Fall 2019 14 / 14