Example Say order = 5 and size = 4
How would you create a graph that is not a tree?
I know a graph needs a cycle, but since there are more vertices then edges I'm having trouble creating one.
Example Say order = 5 and size = 4
How would you create a graph that is not a tree?
I know a graph needs a cycle, but since there are more vertices then edges I'm having trouble creating one.
Copyright © 2021 JogjaFile Inc.
Given that a tree must be connected in order to even be called a tree, one can make some of the points singletons, i.e. points that are not connected to any others. Then there are enough edges left to create loops if desired, although the question (as first posed) does not seem to indicate that this is necessary.