# EdgeCycleMatrix

gives the edge cycle matrix of a graph g.

EdgeCycleMatrix[{vw,}]

uses rules vw to specify the graph g.

# Details

• EdgeCycleMatrix is also known as tie-set matrix or loop matrix.
• EdgeCycleMatrix returns a matrix cij where each row corresponds to a cycle i in the graph g, and each column corresponds to an edge ej.
• For an undirected graph, cij is 1 if edge ej is part of cycle i and zero otherwise.
• For a directed graph, cij is 1 if edge ej is part of cycle i, -1 if edge ej in reverse direction is part of cycle i, and zero otherwise.
• Edge ej is the edge at position j in EdgeList[g], and the index j for an edge ej can be found from EdgeIndex[g,ej].
• EdgeCycleMatrix gives a basis for all the cycles in the graph g.
• EdgeCycleMatrix works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

# Background & Context

• EdgeCycleMatrix returns a matrix cij in which each row corresponds to a cycle i in a graph and each column corresponds to an edge ej. An edge cycle matrix is determined by the incidences of edges and cycles in a graph, and cycles in an edge cycle matrix form a cycle basis of a graph. Cycle bases are useful in the study of chemical graphs, to generate large cycle families, and to compute voltage or current in a circuit. Edge cycle matrices are also known as tie-set or loop matrices.
• For an undirected graph, cij is 1 if edge ej is part of cycle i and zero otherwise. For a directed graph, cij is 1 if edge ej is part of cycle i, if edge ej in reverse direction is part of cycle i, and zero otherwise.
• FindFundamentalCycles is a related function that can be used to return a list of fundamental cycles of a graph.

# Examples

open allclose all

## Basic Examples(2)

Find the edge cycle matrix of a graph:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]//MatrixForm=

Obtain a cycle basis of a graph:

 In[1]:=
 In[2]:=
 Out[2]=

Show the cycles:

 In[3]:=
 Out[3]=