In a graph, every node is connected with every other node, with no redudant connections.
That is, if A->B then B doesn't need to go to A. It is still one connection.
I know that there are N * (N - 1)/2 Edges.
In a loop, it would look like,
for(int i = 0; i < n - 1; i++)
for(int j = i + 1; j < n; j++)
I can't remember the formal definition for this. What is it called?
From stackoverflow
-
Simucal : Thanks stbuton, I appreciate it.
-
You mean Complete?
-
Strongly connected graph I think?
Rob Kennedy : A complete graph is strongly connected, but a strongly connected graph isn't necessarily complete. Strongly connected just means there's a path from each node to every other node, not necessarily a direct connection.
0 comments:
Post a Comment