3.5 Paths and Cycles

Caution: In literature there is a considerable variation of terminology concerning the concepts defined in this section. When consulting a book or an article, you need to make sure which definitions are used in the particular text.

Paths and Cycles

Let v0 and vn be vertices in a graph G. A path in G from v0 to vn of length n is an alternating sequence of n+1 vertices and n edges, v0e1v1e2…vn−1envn, in which edge ei is incident on vertices vi−1 and vi for every i=1,…,n

Note that in a simple graph, to denote a path we just need to list the sequence of vertices since two vertices are connected by only one edge, e.g. v0v1…vn

A simple path from vertex u to vertex v in a graph G is a path from u to v with no repeated vertices

Lemma 3.1

Let G be a graph, and u and v two vertices of G. There is a path from u to v in G if and only if there is a simple path from u to v in G

Proof

Let u and v be vertices of a graph G

(⟸) A simple path from u to v in G is a path from u to v, so the result trivially holds

(⟹) Let P be a path from u to v. If P has no repeated vertices, then P is a simple path and we are done. So assume that P has a repeated vertex w. Let P′ be the path obtained by going along P from u to the first appearance of w, and then going along P from the last appearance of w to v. So P′ is a path from u to v whose length is smaller than the length of P. If P′ has no repeated vertices, then we are done. Otherwise, repeat this procedure. By repeating this procedure until there are no more repeated vertices, we end up with a simple path from u to v

Two vertices u and v of a graph G are said to be connected if there is a path from u to v

A graph G is connected if for every pair of vertices u and v of G there is a path from u to v.

Otherwise G is disconnected

connected-disconnect.png

A graph H is a subgraph of a graph G, denoted by H⊆G, if V(H)⊆V(G) and E(H)⊆E(G). A subgraph H of G is a proper subgraph of G if H≠G

A graph H is an induced subgraph of a graph G, if H is a subgraph of G such that every edge of G with both endnodes in V(H) is also an edge of H (A subgraph but the edges aren’t changed, just less vertices). We say that H is the subgraph of G induced by the node set V(H)

subgraphs.png

Let G be a graph. For M⊆E(G), G∖M denotes the graph obtained from G by removing the edges from M. So G∖M=(V(G),E(G)∖M).
For S⊆V(G), G[S] denotes the subgraph of G induced by S.
For S⊆V(G), G∖S denotes the graph obtained from G by removing the vertices from S (and therefore we also remove all edges of E(G) that are incident to vertex in S). So G∖S=G[V(G)∖S] (i.e. the subgraph induced by S―)

Let G be a graph. Relation “is connected to” is an equivalence relation on V(G).
- It is Reflexive, since any vertex is trivially connected to itself by a path of length 0
- It is Symmetric, since a path from u to v can be traversed in the opposite direction to give a path from v to u
- It is Transitive, since a path from u to v and a path from v to w can be combined to give a path from u to w

So there is a partition of V(G) into nonempty subsets V1,…,Vk such that u and v are connected if and only if both u and v belong to the same subset Vi. For i=1,…,k we define Gi to be the subgraph of G induced by the node set Vi. Induced subgraphs G1,…,Gk are called the components of G. Note that connected graphs are those that have only one component.

Components.png