GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 1.24

Tree facts and traversal uniqueness

Data Structures · Tree Properties & Traversals · Full GATE CSE 1998 paper

GATE 1998, Q1.24 1 mark · MCQ
Report issue

Tree Properties & Traversals

Question 1.24, GATE 1998: Which is false: n-node trees have n−1 edges; preorder plus postorder uniquely determine a labelled binary tree; full binary trees have leaves=internal+1; maximum nodes at edge-height h is 2^(h+1)−1?
Tap to enlarge
Your answer
Answer & solution

Answer: B under the full-tree interpretation of complete (no official key was published)

Take a root r with only one child c. Making c the left child or the right child gives the same preorder r, c and postorder c, r, so uniqueness fails: B. A connected acyclic n-node graph has n−1 edges. A full binary tree satisfies 2I=I+L−1, hence L=I+1. Summing complete levels 0 through h gives 2h+1−1. The source says “complete” for the leaf formula; modern heap-complete trees may have a one-child node, invalidating that formula. Under that terminology C can fail too, so the intended full/proper definition is a qualification.

Original paper, page 3