Counting edges and vertexes
As graphs become more complex, they convey more information, but they also
become harder to understand and manipulate. The number of edges and vertexes
in a graph determines graph complexity. However, you use the combination of
edges and vertexes to tell the full story. For example, you can have a node that
isn’t connected to the other nodes in any way. It’s legal to create such a node in a
graph to represent a value that lacks connections to the others. Using the following
code, you can easily determine that node 6 has no connections to the others
Do'stlaringiz bilan baham: |