# incidenceMatrix -- computes the incidence matrix of a graph

## Synopsis

• Usage:
M = incidenceMatrix G
• Inputs:
• G, an instance of the type Graph,
• Outputs:
• M, , the incidence matrix of graph G

## Description

An incidence matrix M is the #vertexSet of G by #edges of G matrix where entry (i,j) equals 1 if vertex i is incident to edge j, and equals 0 otherwise.

 i1 : M = incidenceMatrix cycleGraph 3 o1 = | 1 1 0 | | 1 0 1 | | 0 1 1 | 3 3 o1 : Matrix ZZ <--- ZZ