Can an islotated node be part of a forest?

475 Views Asked by At

To me it seems like both components in the following graph are trees since they don't contain any loops. Therefore the graph should contain a forest. But according to the quiz that I'm trying to solve that is wrong. Is it because an isloated node does not count as a tree? Why would that be the case?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Isolated vertex is a tree and indeed, a graph with only one vertex is called trivial tree. Since there is another disconnected tree in the graph, this should be a forest I think, there must be a mistake in the quiz.