Chapter 6: Graphs and Trees

Section 6.1 Graphs and Their Representations



Graph Terminology

Graphs are formal mathematical representations of networks, collections of objects, events, or set elements that lead naturally from one to another.

Before proceeding, we need some terminology about graphs. Surprisingly, although there is a large body of literature in graph theory, the terminology is not completely standard. Therefore other books may give slightly different variations of some of these terms.

Adjacent Vertices

Two vertices are said to be adjacent if there is an edge(arc) connecting them.

source

Adjacent Edges

Adjacent edges are edges that share a common vertex.

(1) Edge (A,C) and (A,D) are adjacent edges, they share a common vertex: A.
(2) Edge (A,C) and (B,D) are not adjacent edges, they don't have common vertex.

Loop

A loop is an edge that connects a vertex to itself. A graph with no loops is loop free .


A graph with a loop on vertex 1

Application in Real-World of Loop:


Parallel Arcs

Two arcs with the same endpoints are parallel arcs . Parallel arcs share the same pair of start and end vertices.

Application in Real-World of Parallel Arcs:


Simple Graph

A simple graph is an unweighted, undirected graph that does not have more than one edge between any two vertices and no edge starts and ends at the same vertex. In other words, a simple graph is a graph without loops and without parallel arcs.

Isolated Node

An isolated node is adjacent to no other node.

Real-World Examples:

Degree of a Vertex

The degree of a vertex is the number of arcs incident with that vertex.

Complete Graph

A complete graph is a simple undirected graph in which each pair of distinct vertices is connected by a unique edge.

Complete graphs on \(n\) vertices, for \(n\) between 1 and 12, are shown below along with the numbers of edges:

Complete Graphs on \(n\) vertices
The formula for the total number of edges in a complete graph \(K_n\) is given by:
\( E(n) = \frac{n(n-1)}{2} \) where:

Path

A path in a graph represents a way to get from an origin to a destination by traversing edges in the graph. For example, in the undirected graph G = (V,E) drawn below, there are many paths from node 6 to node 1. One such path is highlighted with red:
The red path above is {{6,4}, {4,3}, {3,2}, {2,5}, {5,1}}; it is a path in G from node 6 to node 1.

The blue path above is {{6,4}, {4,5}, {5,1}}; it is also a path in G from node 6 to node 1.

A path is a sequence of vertices with the property that each vertex in the sequence is adjacent to the vertex next to it. A path that does not repeat vertices is called a simple path . A path from node \(n_0\) to node \(n_k\) is a sequence \(n_0, a_0, n_1, a_1, \dots, n_{k-1}, a_{k-1}, n_{k}\) of nodes and arcs where for each \(i\), the endpoints of arc \(a_i\) are \(n_i - n_{i+1}\)

Length of a Path

The length of a path is the number of arcs it contains; if an arc is used more than once, it is counted each time it is used.

Connected Graph

A graph is connected if there is a path from any node to any other node.

Applications of Connected Graphs:

Cycle

A cycle in a graph is a path from some node \(v_0\) back to \(v_0\) where no arc appears more than once in the path sequence, \(v_0\) is the only node appearing more than once, and \(v_0\) occurs only at the ends. A graph with no cycles is acyclic .
A Cycle is a closed path. Formally, a cycle is a sequence of edges: \((v_0,v_1 ),(v_1,v_2), ..., (v_{n-1},v_n),(v_n,v_0) \), where:

Bipartite Complete Graph

A graph is a bipartite complete graph if its nodes can be partitioned into two disjoint nonempty sets \(N_1\) and \(N_2\) such that two nodes \(x\) and \(y\) are adjacent if and only if \(x ∈ N_1\) and \(y ∈ N_2\). If \(|N_1| = m\) and \(|N_2| = n\), such a graph is denoted by \(K_{m,n}\). It is a special kind of bipartite graph where every vertex to the first set is connected to every vertex of the second set.
In such a graph, every vertex from one set is connected to every vertex from the other set, but there are no edges between vertices within the same set.

An example of bipartite complete graph
A bipartite complete graph is a mathematical model or abstraction used to represent relationships between two distinct sets of entities.

Real-world application for Bipartite Complete Graph

Isomorphism Graphs

An isomorphic graphs G and H is a bijection between the vertex sets of G and H.
\(f: V(G) → V(H) \)
such that any two vertices \(u\) and \(v\) of G are adjacent in G if and only if \(f(u)\) and \(f(v)\) are adjacent in H. This kind of bijection is commonly described as "edge-preserving bijection", in accordance with the general notion of isomorphism being a structrue-perserving bijection.

Two graphs \(G_1 = (V_1, E_1)\) and \(G_2 = (V_2, E_2)\) are isomorphic if there is a one-to-one correspondence (or mapping) between their vertex sets and edge sets.

Wikipedia

Isomorphism graphs refers to a concept in graph theory where two graphs are considered isomorphic if they are structurally identical, even though their vertex and edge labels might differ.

How can we check if two graphs are isomorphic?

Graph Isomorphism in Real-World Applications:


Practice

(1) Sketch a graph having nodes {1,2,3,4,5}, arcs {{1,2}, {1,3}, {3,4}, {3,4}, {4,5}, {5,5}}

(2) Refer to the graph created in Practice 1.
a. Find two nodes that are not adjacent.
b. Find a node adjacent to itself.
c. Find a loop.
d. Find two parallel arcs.
e. Find the degree of node 3.
f. Find a path of length 5.
g. Find a cycle.
h. Is this a graph complete?
i. Is this graph connected?

Reference

saylor academy