5 votes 5 votes A level of a max heap (containing 100 nos) is choosen randomly, on its selection, a node from the same level is choosen randomly. What is the probability that it is the 36th smallest element DS data-structures binary-heap probability numerical-answers + – vivek9837 asked Oct 7, 2016 recategorized Jul 7, 2022 by Lakshman Bhaiya vivek9837 1.2k views answer comment Share Follow See all 15 Comments See all 15 15 Comments reply Show 12 previous comments papesh commented Oct 7, 2016 reply Follow Share @Debashish Deka u r correct... having one dout ... 36 at level 2 is at fixed location at right end and having only one choice..here u takes probability=1/2 since this level having 2 ele. now at level 3 having 4 elements ...but at this level 36 can be at any place ... u takes probability=1/4 here having 4 choices... confusing probability for me! plz explain ! 0 votes 0 votes Kapil commented Oct 8, 2016 reply Follow Share @Debashish , why 36 occurs in any level from 2 to 7. 0 votes 0 votes vivek9837 commented Oct 13, 2016 reply Follow Share @debashish, can you make that an answer 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Its P(65th largest element given that a level is chsen and an elemwnt is chosen from it) So P= ((1/7)*(1/37))/((1/7)+(1/7)*(1/2)+......+ (1/7)*(1/2^5)+(1/7)*(1/37)) P=0.0135 vishwajit_vishnu answered Oct 8, 2016 vishwajit_vishnu comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes According to me, 36 can be present at any level except @0th, hence p= probablity of choosing 36th smallest element provided any level is choosen p= 1/7∗(1/2+1/4+1/8+1/16+1/32+1/37) p= 0.1422 rish1602 answered Aug 18, 2021 rish1602 comment Share Follow See all 0 reply Please log in or register to add a comment.