Given an undirected tree with 7 nodes how many roots would this tree have. My intuition tells me that because the tree is undirected it would either be 7 or 0. How would I solve this?

  • 2
    $\begingroup$ Usually a tree is "rooted" by picking any vertex to be the root. The root isn't special in terms of properties of the graph $\endgroup$ – Curtis F Jul 15 '18 at 21:01
  • $\begingroup$ So in my examples case the undirected tree with 7 nodes can have 7 possible roots because you can choose any node to "start" from? $\endgroup$ – JpersaudCodezit Jul 15 '18 at 21:23
  • $\begingroup$ Perhaps you should give us the definition of a root of a tree. $\endgroup$ – Yuval Filmus Jul 16 '18 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.