| Author |
Comment/Response |
Peter Pein
|
11/01/12 4:51pm
Hi Anton,
with
a = {{0, 1, 1, 0, 0, 0, 1, 0, 0},
{1, 0, 1, 0, 1, 0, 0, 1, 0},
{1, 1, 0, 0, 0, 1, 0, 0, 1},
{0, 0, 0, 0, 0, 1, 0, 0, 0},
{0, 1, 0, 0, 0, 1, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 1, 1},
{0, 1, 0, 0, 1, 0, 1, 0, 1},
{0, 0, 1, 0, 0, 1, 1, 1, 0}};
you do not have an incidence matrix, because
Plus @@@ Transpose[a]
{3, 4, 4, 1, 3, 4, 3, 4, 4}
shows us there would be edges with three or more vertices attached to them.
I guess, you've got an adjacency matrix:
GraphPlot[g = AdjacencyGraph[Range@Length@a, a],
VertexLabeling -> True]
gives a well defined graph and the incidence matrix has got two ones per column as it should have(try: Plus @@@ Transpose[IncidenceMatrix[g]]).
hth,
Peter
URL: , |
|