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 and be vertices in a graph . A path in from to of length is an alternating sequence of vertices and edges, , in which edge is incident on vertices and for every
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.
A simple path from vertex to vertex in a graph is a path from to with no repeated vertices
Lemma 3.1
Let be a graph, and and two vertices of . There is a path from to in if and only if there is a simple path from to in
Proof
Let and be vertices of a graph
A simple path from to in is a path from to , so the result trivially holds
Let be a path from to . If has no repeated vertices, then is a simple path and we are done. So assume that has a repeated vertex . Let be the path obtained by going along from to the first appearance of , and then going along from the last appearance of to . So is a path from to whose length is smaller than the length of . If 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 to
Two vertices and of a graph are said to be connected if there is a path from to
A graph is connected if for every pair of vertices and of there is a path from to .
Otherwise is disconnected
A graph is a subgraph of a graph , denoted by , if and . A subgraph of is a proper subgraph of if
A graph is an induced subgraph of a graph , if is a subgraph of such that every edge of with both endnodes in is also an edge of (A subgraph but the edges aren’t changed, just less vertices). We say that is the subgraph of induced by the node set
Let be a graph. For , denotes the graph obtained from by removing the edges from . So
For , denotes the subgraph of induced by .
For , denotes the graph obtained from by removing the vertices from (and therefore we also remove all edges of that are incident to vertex in ). So (i.e. the subgraph induced by )
Let be a graph. Relation “is connected to” is an equivalence relation on .
- It is Reflexive, since any vertex is trivially connected to itself by a path of length 0
- It is Symmetric, since a path from to can be traversed in the opposite direction to give a path from to
- It is Transitive, since a path from to and a path from to can be combined to give a path from to
So there is a partition of into nonempty subsets such that and are connected if and only if both and belong to the same subset. For we define to be the subgraph of induced by the node set . Induced subgraphs are called the components of . Note that connected graphs are those that have only one component.