View the step-by-step solution to:

(a) The left spine of a binary tree is a path starting at the root and following only left-child pointers down to a leaf. What is the expected number...

(a) The left spine of a binary tree is a path starting at the root and following only left-child
pointers down to a leaf. What is the expected number of nodes in the left spine of an n-node
treap?
(b) What is the expected number of leaves in an n-node treap? [Hint: What is the probability that
in an n-node treap, the node with kth smallest search key is a leaf?]
(c) Prove that the expected number of proper descendants of any node in a treap is exactly equal
to the expected depth of that node.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question