Given below are two statements: one is labelled as Assertion A and the other…
2023
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R
Assertion A: The AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion
Reason R: A Red Black tree with n nodes has height that is greater than 2 log2(n + 1) and the AVL tree with n nodes has height less than logφ(√5(n + 2)) − 2
In the light of the above statements, choose the correct answer
Answer: C. A is true but R is false — Concept: Two closed-form height bounds govern this comparison. For a Red-Black tree with n internal nodes, the standard result gives height h ≤ 2 log2(n + 1)…
- A.
Both A and R are true and R is the correct explanation of A
- B.
Both A and R are true but R is not the correct explanation of A
- C.
A is true but R is false
- D.
A is false but R is true
Attempted by 364 students.
Show answer & explanation
Correct answer: C
Concept: Two closed-form height bounds govern this comparison. For a Red-Black tree with n internal nodes, the standard result gives height h ≤ 2 log2(n + 1) — an upper limit the height can never exceed. For an AVL tree with n nodes, Knuth's classical result gives height h < logφ(√5(n + 2)) − 2 — again an upper bound, but a tighter one, because AVL trees enforce a strict per-node balance factor of at most 1, whereas Red-Black trees only enforce a looser black-height invariant that allows height up to roughly twice the optimal log2 n.
Application: Reason R is a conjunction of two height claims joined by "and". Its Red-Black clause asserts height GREATER than 2 log2(n + 1) — the exact opposite direction of the true bound (height ≤ 2 log2(n + 1)), so this clause is false. Because R is a conjunction, one false clause makes the whole of R false, whatever the status of its other clause. Now check Assertion A: the stricter per-node balance requirement of AVL trees (height difference ≤ 1 at every node) is exactly what forces more frequent rebalancing during insertions and deletions, compared to a Red-Black tree's looser recoloring/rotation scheme — so Assertion A is true.
Cross-check: Independently verify R's AVL clause: logφ(√5(n + 2)) − 2 IS the standard Knuth upper bound for AVL height, so that clause alone is correct. This confirms the error in R is isolated to its Red-Black clause, not a wholesale misstatement — and it rules out treating R as true overall, since a conjunction is false as soon as any one clause is false. It also rules out disputing Assertion A, since the rotation-frequency trade-off between AVL and Red-Black trees follows directly from their differing balance invariants and is not a debatable claim.
Result: Assertion A is true and Reason R is false — the tighter AVL balance invariant, not an incorrect height inequality, is what actually explains the extra rotations in A.
A video solution is available for this question — log in and enroll to watch it.