Given integers$ l\ge 0$, $k\ge 3$, and a graph, I want to know if it contains l k-cycles. I could enumerate all cycles of length k using the link below and count them, but this might not be very efficient.
subgraph_search_iterator-gives-duplicate-subgraphs
G=graphs.OctahedralGraph() H = graphs.CycleGraph(3) L = { tuple(g.edges(labels=False,sort_vertices=True,sort=True)) for g in G.subgraph_search_iterator(H, induced=False) } print(len(L))
For example, when determining if a graph has a unique k-cycle (when k=1), I don't need to list all cycles and then check; instead, obtaining two cycles would suffice, and the algorithm stops.
Similarly, such questions can be asked about subgraphs