What is the degree of a tree? (As in, a tree ADT)

前端 未结 7 755
星月不相逢
星月不相逢 2021-01-02 03:27

I understand that the degree of a node is the number of children it has.

However, how do we define the degree of a tree?

7条回答
  •  无人及你
    2021-01-02 04:11

    The degree of a graph is 2n

    To find the degree of a tree, use the formula for edges of a tree: Edges = (Vertices - 1)

    Now apply what we know about the degree of a graph to our number of edges in a tree: Degree of tree = 2(n-1) = 2n-2

提交回复
热议问题