wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Any decision tree that sorts n elements has height

A
Ω(log n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Ω(n log n)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Ω(n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Ω(n)2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Ω(n log n)
Any comparison based sorting alogrithm for sorting 'n' elements it takes Ω(n log n).
  • The depth of a decision tree for a given value of n is Ω(n log n)
  • There are n! leaves. A tree of height h has at most 2h1 nodes. So, 2h1log2 n!=log2(1,2.......n)
=log2 1+log2 2+.....+log2n
>(n/2)log2(n/2)

hΩ(n log n)

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Inequalities
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon