FindFundamentalCycles
✖
FindFundamentalCycles
Details and Options

- FindFundamentalCycles is also known as cycle basis.
- FindFundamentalCycles returns a list of cycles consisting of fundamental cycles {c1,c2,…}.
- For an undirected graph g with a spanning tree s, fundamental cycles ci are cycles that contain exactly one non-tree edge each.
- Cycles ci can be combined into new cycles by adding their edges modulo two, i.e. if the same edge is covered an odd number of times it is kept and otherwise discarded.

Background & Context
- FindFundamentalCycles returns a list of fundamental cycles of a graph. Here, fundamental cycles are a set of cycles that form a fundamental cycle basis, which is a set of cycles that can generate every cycle in a graph by a linear combination of members based on a spanning tree. The cycles are returned as a list of edge lists. Cycle bases are useful in the study of chemical graphs, to generate large cycle families, and to compute voltage or current in a circuit.
- FindFundamentalCycles uses the result of FindSpanningTree as the default spanning tree.
- A list of all cycles of a graph (not just the fundamental ones) may be returned using FindCycle. FindHamiltonianCycle and FindEulerianCycle return other specific types of graph cycles. EdgeCycleMatrix is a related function that can be used to return an edge cycle matrix of a graph.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
FindFundamentalCycles works with undirected graphs:
In[1]:=1

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-8i8cnu
Out[1]=1

FindFundamentalCycles works with large graphs:
In[1]:=1

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-lkg873
In[2]:=2

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-b5ef0w
Out[2]=2

Applications (1)Sample problems that can be solved with this function
All cycles can be generated from fundamental cycles:
In[1]:=1

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-7rtwny
Out[1]=1

Obtain a cycle basis of a graph:
In[2]:=2

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-186tux
Out[2]=2

In[6]:=6

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-1hd4g
In[7]:=7

✖
https://wolfram.com/xid/0yj72q1maeegr1lkwk-bqfyp7
Out[7]=7

Wolfram Research (2014), FindFundamentalCycles, Wolfram Language function, https://reference.wolfram.com/language/ref/FindFundamentalCycles.html.
✖
Wolfram Research (2014), FindFundamentalCycles, Wolfram Language function, https://reference.wolfram.com/language/ref/FindFundamentalCycles.html.
Text
Wolfram Research (2014), FindFundamentalCycles, Wolfram Language function, https://reference.wolfram.com/language/ref/FindFundamentalCycles.html.
✖
Wolfram Research (2014), FindFundamentalCycles, Wolfram Language function, https://reference.wolfram.com/language/ref/FindFundamentalCycles.html.
CMS
Wolfram Language. 2014. "FindFundamentalCycles." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindFundamentalCycles.html.
✖
Wolfram Language. 2014. "FindFundamentalCycles." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindFundamentalCycles.html.
APA
Wolfram Language. (2014). FindFundamentalCycles. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindFundamentalCycles.html
✖
Wolfram Language. (2014). FindFundamentalCycles. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindFundamentalCycles.html
BibTeX
✖
@misc{reference.wolfram_2025_findfundamentalcycles, author="Wolfram Research", title="{FindFundamentalCycles}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FindFundamentalCycles.html}", note=[Accessed: 07-June-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_findfundamentalcycles, organization={Wolfram Research}, title={FindFundamentalCycles}, year={2014}, url={https://reference.wolfram.com/language/ref/FindFundamentalCycles.html}, note=[Accessed: 07-June-2025
]}