Cycle enumeration of an undirected graph with multi edges
问题 I'm trying to code a program that uses Electrical Mesh Analasys. So I have the nodes of the circuit [A,B,C,D] and the branches that links the nodes [0,1,2,3,4,5,6,7,8]. How can I find the shortest cycles in an undirected graph with multi edges like the example bellow? Graph image (4 nodes, 9 edges/branches): Cycles: 0-1-0 5-6-5 6-8-6 1-4-2-1 2-7-3-2 4-7-5-4 The number of cycles that I need are: Cycles = Branches - (Nodes - 1), in this case I need 6 cycles. I have this data stored in arrays