If node A has three siblings and B is parent of A, what is the degree of A?

2011

If node A has three siblings and B is parent of A, what is the degree of A?

Answer: D. None of the aboveThe degree of a node in a tree is the number of children that node has. This is a property of the node’s own descendants — it does not depend on the node’s…

  1. A.

    0

  2. B.

    3

  3. C.

    4

  4. D.

    None of the above

Attempted by 875 students.

Show answer & explanation

Correct answer: D

The degree of a node in a tree is the number of children that node has. This is a property of the node’s own descendants — it does not depend on the node’s siblings (the other children of the same parent) or on the node’s parent.

Here, A has three siblings and B is A’s parent. This tells us that B (A’s parent) has four children in total — A plus its three siblings — so B’s own degree is 4. However, the problem gives no information at all about how many children A itself has: A could be a leaf with 0 children, or could have any number of children.

  • 0 would only follow if the problem stated that A is a leaf node — it does not.

  • 3 is the number of A’s siblings, not the number of A’s children.

  • 4 is the number of children of A’s parent B (A plus its three siblings), not the number of A’s own children.

Since A’s own child count is never stated, none of 0, 3, or 4 can be justified as the degree of A from the given information — the degree of A cannot be determined, so the correct response is “None of the above.”

Explore the full course: Niacl Ao It Specialist

Loading lesson…