Can a tree graph have only one vertex? And if so, that means that a tree graph has at minimum one leaf?

4.9k Views Asked by At

Also, if the tree is two vertices connected by an edge, does the root count as a leaf too? Since it's also a vertex of degree one?

I've had trouble clarifying this online and from my textbook. Thank you.

2

There are 2 best solutions below

4
On

For the former: yes, by most definitions, the one-vertex, zero-edge graph is a tree.

For the latter: yes, all vertices of degree 1 are leaves. In general, which node you call the "root" is pretty much arbitrary.

0
On

Yeah a graph only has one vertice is a tree but only a tree with at least 2 vertices has a leaf