In this tutorial, we discuss the various methods that deal with connected components of graphs and hypergraphs. Our main objective is to make a distinction between the two different definitions of connected components that are used in the EdgeIdeals package.
A vertex of a (hyper)graph H said to be an isolated vertex if it is not contained in any edge of H. In particular, if a vertex of H is contained in a edge of size one then it is not considered isolated.
|
|
|
Graph Components. A connected component of a graph is any maximal set of vertices which are pairwise connected by a (possibly trivial) path. The most important part of this definition is that isolated vertices count as connected components.
The following methods use this definition of a connected component: connectedGraphComponents, numConnectedGraphComponents and isConnectedGraph.
Hypergraph Components. A connected component of a hypergraph is any maximal set of vertices which are pairwise connected by a non-trivial path. Here isolated vertices do not count as connected components.
The following methods use the hypergraph definition of a connected component: connectedComponents, numConnectedComponents and isConnected.
The next example uses all of these methods on a graph to illustrate the difference between the two definitions.
|
|
|
|
|
|
|
|
|