I trying to implement a test for $k$-connectedness of cubic triangle-free graphs $G$ given their adjacency matrix $A$. My idea is the following:
For $1$-connectedness, we construct a new graph $G’$ by the following process:
$\hskip2in$
[Since triangles are forbidden, the graph will stay simple.]
This can be done for the adjacency matrix as well by
By that, we get $A’$ of $G’$ and will then calculate the eigenvalues of $A’$. We do this for all edges. If the graph was initially $1$-connected and we, at a certain point, remove the $\color{red}{\text{bridge }}$, we are left with two components and the spectrum of $A’$ will have two eigenvalues of $3$.
If there is no bridge, we continue with removing pairs of edges, calculate the spectra and watch out for multiple eigenvalues to check for $2$-connectedness and so forth.
Is there any reason why this shouldn’t work?
How would this algorithm compare to the ones given at Wikipedia?
… More generally, it is easy to determine computationally whether a graph is connected (for example, by using a disjoint-set data structure), or to count the number of connected components…
Seem like I invented counting components via spectra of adjacency matrices?
Few thoughts/comments.
The graph may not remain simple in the second iteration since the first iteration my produce triangles.
In order to evaluate your algorithm, you’d have to explain how to fix the above problem.
It is well known that the number of connected components of a $r$-regular graph is in fact the multiplicity of the eigenvalue $r$.
If the graph is in fact bipartite, then it is automatically $2$-connected.
It is always possible to reduce a cubic graph of order $n+2$ to a cubic graph of order $n$ by using a so called $H$ reduction with is essentialy what you’re doing here but handles the thing with triangles. See this paper for example.