29. Answer:- Linear probing. have hash function. neki) - Chi (k.) +1) mod m where hk=k and m= L. Therefore, ܛܠܚ hck, i) = (kti mod u so, have h (1040) = (1070) mod 11 Elo mod 115 160] =10 h(220) =(22+0) module 72 modul- 0110] =22 h (31,0) = (3170) mod 1l = 31 mod. 11-93 TC30=31 h(4,0) = (4+0) mod 14 med U4 T[4] =4 h (1540) = (15 to) model = 15 modll = 42) T [4] =15 from the line above que is already full so , so we try T[n(K) + II. Therefore can see I [4] try with n (15,1)15+1) mod I1 = 16 modul 55 >> T[5]=15 7 Next h128,0)=128 +o) mod 11 = 28 mod 11_26.59 TC6] -28 b (140)=(1770) mod 1 = 17 models 6_-) T [6] = 11 Use Again T[6] is already full, so we next slot I [hick ) + 1]
Therefore, n[171] =(17+1) mod 11=18 mod is als) I [2] =17 1 Next h(88,0)=88 modll30 TO] 288 T[o] is already full = we use next slot I[h' (k)+1). Therefore, h 488,1)=(88 +1) mod u 589 mod 115) T[1]=88 Alext, n (5940)=59 mod 11=4 = T[4= 59 I [4] is already full we use I [h')+]. In (591) -59+1) mod is = 60 mod 11 -5 -1 [5 59 T[s] is already full we use I [h' (b) +2]. n (59,2) =(5972 mod ll = 61 modll = 6 -) 1 063 =59 T[6] is already full we use Ich'(K)+3.7. h[ 59,63] =(59+3) mod Il 62 modll =7&TITI = 59. TI) is already full we use T[ n(K)+4] h(59,4) =(59+4) mod 11 363 med il 28 - TC8J-59
. Quadratic Probing. Hashing funcion is h(k, ) = (h' (k)+ci+ C7 ?)mod m. where nilk) =k and mal1, CIEL, (2= 3. We n(x, y) = (ktit 3;)mod 11. have, h(10,0) = (10+0+ 3.02)mod 11910 model = 10 T[10]=10 6(22,0) =(22+0+3.02) mod us 22 mod II 20T COJ-22 n(31707=(31+0+ 3.0%) mod 119. 3) model = 9 → T[0]=9 n(4,0) =(4+0+3.09) mod lle 4 matt 1124 T[4]=44 hlisio)-(ist 0+3.83) mod 1 = 15 mod 11 4 3 7 [4=15 T[4] is already full so we use I (15,1). h (15,1)=(5+1+3.1%)mod UI 19 mod ll 28 T[8]=15 Next, b (2840) -128 +0+3.09)med 11 = 28 mod 11+6 = T[6]=28 n(170) = (1770+ 3.0) mod 11e 17 mod.41 = 6 = T[6]=17. slot T[6] is already in use so we try T [n(17,1), I[h (17,2) which is also taken so use T[n (17,31 1 (1743) = (17+ 3t 3.3) mod U. 36 mod 11=3 4 T137-17. Next, 88 modul 548816)-(88 +0+3.03) modul - TEO] -88 %لله FO The slot I lol is in use already. And others also taken we use Ich(888)] so are
n(8818)=(88:8- 3.82) modll $ 200 mod 11.22 +1[2]=88 Next, h(59,0) = (59 +0+3.8) modll = 59 modul 34 * T4] =59. Slot I [4] is taken .so we go for I(5912). h (592)=(59 +2+ 3.2) mod 11=18 mod 1 =771[7]=59 Double hashing le have that . hakri) = (hick)inzek) mod m where hi(K) = k modm and back) = 1+ kmod (may not Therefore h (Xi) = (k mod 11+ iClt k mod 101) mod ul. TO g So, we have h (2270) =(22 mod 11+ 0.(17 22 mod to) i modul - I Loja 22, n (340) = (31 mod 11 +0:(1+ 31 mod 10 )) mod 1 ST[9] = 31 n(440) = (4 mod 117041+ 4 mod 10))modul =4 T[4] a4 n (1s, o) = (15 mod alto. (it is mod 10)) mod Il = 4 II 4]-15. As I[4] is alread fully we go with (15,1). h (1541) 715 modliti. (17 ismadiol) modul 24 + 175) mod lis 10 MI[1] =15 T[0] is also full we try I (n (15,2).
h(15,2)-15 modul 72:(1+ 15 mod 10)) modul =14+241+ 5)2 mod 11 16 modul 1 [5]= 15. Next, n(2810) = (28_mod 1170.(17.28 mod id)) modul = 6 mod IL-6 1663 = 28. h (1720) =(17 mod 11+ 0.417mod 109) modll F 6 modl=6 T[6]=17 TI o I is already in use we trey (17, 1). h (17,1)=(17 mod.11 + 1*(1+_17 modle)) mod il =16 +177)mod l = 3 = T[3] =17 Next, h(88 10) = (88 mod 11+ 0.61728 mod 10)) modul Ico] I[0] is already taken. So we truy [h (88 i) which is also in use then for T[h 18812) 7 h(8812)=(88 modell + 2+(1+88 mod 1011 mod il = 0+2 (178) modul = 18 modul 7 TIF :88: Next, h (5910) = (59 mod 117 0:(1+59 mod 10 ) ) mod Il =4 T[4] =59 I[4] is already in use alle go for 159,2). h (59,2) =(59 modlitz (1 + 5 mod 10)) modil +(4+2 (149) modul 24 modll a2 T[2] = 59.
010 Answer:- het suppose node x has two children į and z. Х म 123 R2 Case lo Predecessor. The pre dessor of x is the max element say M, in subtree R, If M has a right child then that child will be greater than M which violates the stipulation that M is the largest in R, showing that M cannot have a right child. In case Reis empty then y is the prodessor and we have nothing to prove. • Case 2. Successor : The successor obx is the minimum element say m, in the subtree tz. If m has a left child will be will be less than mi violating the stipulation that m is the smallest in 12. This proves that m Cannot have left child.