next | previous | forward | backward | up | index | toc

# connectedComponents(SimplicialComplex) -- find the connected components of an abstract simplicial complex

## Synopsis

• Function: connectedComponents
• Usage:
connectedComponents Delta
• Inputs:
• Delta, ,
• Outputs:
• a list, of induced subcomplexes of $\Delta$, each one a distinct connected component of $\Delta$.

## Description

Two vertices $v$ and $w$ in $\Delta$ are connected if there is a sequence of facets $F_0, F_1, \ldots, F_k \in \Delta$ such that $v \in F_0$, $w \in F_k$ and $F_i \cap F_{i+1} \neq \varnothing$ for all $1 \leq i \leq k-1$. A connected component of $\Delta$ is a maximal subcomplex of $\Delta$ in which all pairs of vertices are connected.

Our first example is an abstract simplicial complex with two connected components.

 i1 : S = QQ[x_0..x_6]; i2 : Δ = simplicialComplex {x_0*x_1, x_1*x_2, x_3*x_4, x_4*x_5, x_5*x_6} o2 = simplicialComplex | x_5x_6 x_4x_5 x_3x_4 x_1x_2 x_0x_1 | o2 : SimplicialComplex i3 : C = connectedComponents Δ o3 = {simplicialComplex | x_1x_2 x_0x_1 |, simplicialComplex | x_5x_6 x_4x_5 ------------------------------------------------------------------------ x_3x_4 |} o3 : List i4 : assert all(C, Γ -> connectedComponents Γ === {Γ})

The void and irrelevant complexes each have one connected component.

 i5 : void = simplicialComplex monomialIdeal(1_S) o5 = simplicialComplex 0 o5 : SimplicialComplex i6 : connectedComponents void o6 = {simplicialComplex 0} o6 : List i7 : assert({void} === connectedComponents void) i8 : irrelevant = simplicialComplex {1_S} o8 = simplicialComplex | 1 | o8 : SimplicialComplex i9 : connectedComponents irrelevant o9 = {simplicialComplex | 1 |} o9 : List i10 : assert({irrelevant} === connectedComponents irrelevant)