TOPICS
Search

Unicyclic Graph


A unicyclic graph is, in the usual literature convention, a connected graph containing exactly one graph cycle (Harary 1994, p. 41). MathWorld and the Wolfram Language GraphData class "Unicyclic" use the broader convention of exactly one graph cycle, allowing disconnected graphs. Under this convention, one connected component contains the unique graph cycle and every other connected component is a tree. For example, a triangle graph together with an isolated vertex is unicyclic in the MathWorld and GraphData convention but not in the connected literature convention.

A connected unicyclic graph is therefore a pseudotree that is not a tree. Equivalently, a connected graph is unicyclic iff its circuit rank, also called its cyclomatic number, is 1. Consequently, a graph is a pseudoforest iff each of its connected components is either a tree or a connected unicyclic graph.

Thus a connected graph that is unicyclic has the same number of edges as vertices.

More generally, a graph with exactly one graph cycle and c connected components satisfies m=n-c+1.

This follows since deleting an edge from the unique graph cycle leaves a forest with the same number c of connected components and hence n-c edges. Conversely, adding an edge to a forest between two vertices in the same connected component creates exactly one graph cycle. In particular, attaching pendant edges, or more generally trees, to vertices of a unicyclic graph preserves unicyclicity.

Truszczyński (1984) conjectured that all connected unicyclic graphs except the cycle graph C_n with n=1 or 2 (mod 4) are graceful (Gallian 2025, pp. 18-19).

UnicyclicGraphs

The numbers of unlabeled simple unicyclic graphs in the broader MathWorld and GraphData convention on n=1, 2, ... vertices are 0, 0, 1, 3, 9, 25, 68, 185, ... (OEIS A236570), the first few of which are illustrated above.

UnicyclicConnectedGraphs

The corresponding numbers in the connected literature convention are 0, 0, 1, 2, 5, 13, 33, 89, ... (OEIS A001429), the first few of which are illustrated above.

Examples of unicyclic classes of graphs include (n,3)-caveman graphs, cycle graphs C_n, pan graphs, sunlet graphs C_n circledot K_1, and tadpole graphs.

In the connected convention, the triangle graph C_3 is the only nonbipartite unicyclic integral graph (Braga et al. 2026). The connectedness condition is essential for this wording under MathWorld's broader convention. Braga et al. (2026) acknowledge Claude assistance with exploring ideas and checking proofs, and state that they verified the mathematical content.


See also

Acyclic Graph, Circuit Rank, Cyclic Graph, Graph Cycle, Integral Graph, Pseudoforest, Pseudotree, Tree

Explore with Wolfram|Alpha

References

American Institute of Mathematics. "Graph Catalog: Families of Graphs." https://aimath.org/WWN/matrixspectrum/catalog2.html.American Institute of Mathematics. "AIM Minimum Rank Graph Catalog." http://admin.aimath.org/resources/graph-invariants/minimumrankoffamilies/#/super.Braga, R. O.; Moraes, J. C.; and Santos, M. C. "Spectral Asymmetry and Odd Cycles in Integral Graphs." 16 Oct 2026. https://arxiv.org/abs/2610.22773.Gallian, J. "Dynamic Survey of Graph Labeling." Elec. J. Combin., Dynamic Survey DS6, Oct. 30, 2025. https://doi.org/10.37236/27.Harary, F. Graph Theory. Reading, MA: Addison-Wesley, 1994.Sloane, N. J. A. Sequences A001429/M1438 and A236570 in "The On-Line Encyclopedia of Integer Sequences."Truszczyński, M. "Graceful Unicyclic Graphs." Demonstratio Math. 17, 377-387, 1984. https://doi.org/10.1515/dema-1984-0211.

Referenced on Wolfram|Alpha

Unicyclic Graph

Cite this as:

Weisstein, Eric W. "Unicyclic Graph." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/UnicyclicGraph.html

Subject classifications