In an incidence matrix we have:
e1 e2 e3 e4 e5 e6
v1 1 1 0 0 0 0
v2 0 0 1 1 0 1
v3 0 0 0 0 1 1
v4 1 0 1 0 0 0
v5 0 1 0 1 1 0
To find a path, we should find if the last vertex of and edge i is the start of another edge, and the last of the last edge is the first of the first edge.
Can someone help me to find a solution? I understand very well what it is but not how to implement it!