3 ms·
Would a multiply-rooted tree still be a tree? I thought a single root was part of the definition of a tree. Would it instead be a graph? Sorry for the elementa
by gaustin 11y ago
Would a multiply-rooted tree still be a tree? I thought a single root was part of the definition of a tree. Would it instead be a graph?
Sorry for the elementary questions. I'm bad at algorithms and just trying to get a grasp here.
- fishnchips 11y agoYes, it's not a tree any more. Which is why I believe this was not the question.
- kele 11y agoAt my university it's common to call acyclic, connected graph a tree. We distinguish between rooted and unrooted trees. For example, minimal spanning tree doesn't really have to be rooted, it just has no cycles.
- haversoe 11y ago> acyclic, connected graph a tree This is the graph theoretic definition of a tree.
- prateek_mir 11y agoTree is a graph without any cycles, hence the definition still holds. And yes, you can have multiple roots in a tree, ex: a --> c <---b ^ d-----|