Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3 In this problem, consider a treap with n nodes. The key values of these nodes are 1,2,,n. Suppose that instead of random priorities,
Problem 3 In this problem, consider a treap with n nodes. The key values of these nodes are 1,2,,n. Suppose that instead of random priorities, the node with key i has either priority i or priority n+i with equal probability, for every i=1,2,,n. 1. (10\%) What is the expected depth of the node with key n ? Prove your answer formally. 2. (10\%) What is the expected depth of the node with key 1? Prove your answer formally. (Expected depth of a node is the distance from the root to this node.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started