You are on page 1of 22
frscesden (D B-Thee A Bite bo uy holantieg Hree Lea apatnase tot Heeps data Shucture Atored allows Aeasches, ; Seguenttal access, utrcertfons , and deletions [0 Aggasithmie time. The Botne ub a zatlen ga binary Search tree i that a “node can Fave more “than +wo children, Btree Of onder mm Aas te following Properties. dei: AU othe pedis must be at ct Property dia: All nodes except root fe Ave atleas [mp1 keys ond moat m-t operty ' (a, 43: All nen nodes exuept AOE . ” Uptemal oan must Fove atteast Coma) chitdlrer pt 4 Scanned with CamScanner ak - _ _ Popeye 2 Ef the soot node vi a nen deaf, node, then Te must rave. atiast a children. Popaty tbs 1 ApEn Leah nol, sth 9-1 Kags mount Pave 1 number of, chtldren. Property 46. 5 sll ihe Keys vale wotints a code rout be th Axcercting onder. oe G-, Bote of Order 4 Comaris , srraxirru 3 values Jb a node and maximum 4 chiidrer éo* a node. %; marry feaach tree 7 Onder “m3, oO OD A _B-Tie. max. no of child = alm 3) Scorch man. 90 o Keg = a(m-1) 2) Tnsertfen ne 00 0 bey = (mmfa)-1 =) 3 Delzifon. + 70 % child =(m/ad= 9. Search : Step: Read the Search element from the duer. Step 2: Compare, the seosch element woith | pinet Key Value ef soot node th the tree. Step 8: ah both ave matching orien, Node » then dis N[° ood denninale “the puretion. rrotchibg, ‘then check swuhether Gt. : Dp both ave nok +3 welch elemunt smaller (0° stages Mm SS Ss : tees aly Th search element de clavger “than —camnparrey 7 Dext bey Value ub the Aarne. wall. ard Aspaals 2 tep B45 ahd & until ave ound exact tmakch (or) | on Completed woh lat” fey volun sh sof | | Step T: sy we completed wlth fast | Atop mode, “ther display " Blement J rot | tevminabk the posion: valus. tb O pod and “the pew element must be ditsertion i. Tha B-tree, alunos the. new added only ak Leo node. “Thak means Kegvolue “is attached 40 les}, node ony Step |: Chects whether tree Sepa: Tp tre Em then create a! naw node with New value and dnsert fhto the hee as a’ Hoot Mode. Step 8: Th tree Hot Empty, then fied’ deaf node fo uonich the naw Key Vous be added suing pst tapi. | as Step 5 ah that a heady quits “then spit om pode. by ending wie vols 0 18 Pn’ node. t the ame “unt ing Value 46 fined fro a node. tq tothe noot node, tree us Lrcreaced ane tree ard the’ hep of the oe | one: sa | a ae 113 sconmai tw Catieanaer Depinition :- (Orda of a B- tee) - According +o Knuth} duginition , a B-tree ondn. a a tree wwNTch sadhftes the fotlowth properties. CG) Every node Pras atrost mM children. GDA nBn-teap node. with 1 chittwen Contain H-! of Gi) AlL Leaves ih ah the same devel. i Construct a Batre of ord 3 by dnsecthg comber, oon ll Fe gh prom 1 to lo. hv 1, Ay By Ay Fy by, 8, F, 1O- Thsert 1: Sthee “Fd the. tM element Laserted Sete! & Mew node, tt act as +he gact node- : | —Thsevt @: Wehove one node that acts as also Leap. Thik leap bas an Empty postfen. 42 (Tz ] . i Trsext 3: Tt doe Fave Empty position: ao ie™ : Node! and pow .rriidte vate become a meu? AE =e fen te. tree: rapt pitt” biz 3 = 2). 40 Thet 4 F> faserode 9. ub the empty Pes (2c , © TESTE, ap onde te alent bl“ : Root node (8) (4) as pent nent 5: S> . middie Vale : Apt that pode, 0 postion uth Parent code. Neds, near the em ddd a8 @ OW leofy ade. Se new element (> ant 35 “4 as Hoot and add 2- froot at signe ob (9s us OF am fu Ol (3475 OT fal fs Tet 6: 6 > Root (Bani (4). Moveto Aight Of 4 And add Arto +the emphy Pesition. [aya] OO) par {TBI aa Toeat = 2 5 pect (adand (4). Move 2 é Pe SZ mfddle value oleady putt, ap te mete ee ae ie aa = fiddle gee meee Wy alg in G) a6 Root rode. ° fata] Pie ee mai SS qa fs [sje] + COD 6h ‘ise (: 8 > Root rode (4), Move a led ard ~ sot at Eeepty postifon. 7 BOG BB) wo. Tosart (9): 9 > Root node CH). nae D yut 40 6" pode & I ali B *Ceies bide ‘yelue (6) 2 parent rode , U , , ’ ’ me node ia wu (6) has Empty pastion. < 0 suet (4). , ’ , ’ ' ' ' tm 115 ‘Scanned with CamScanner 10> Rect rede (4). Mov 10> Root me (6). Move aif on Treat ar Empty positon Onder 8, cE 4 ili -_ tnax. no. ef child =m =3 inin. Ho. of child = (|) =a eG Fe OF 00.45 tH = ni 2h ch oa CIE Tali 4 oe Das Fy) Construct BA Ayre clntenty 8, 4,5, 6, 8, 105 IR, Ub, Ib, 8, 20, 2d, a4, abe as, 80, 34, 4, 2b 38759, 11,18, Coda-sp “te Tinsett QQ. b di . Go +, Gt "ae * “> . [+ Te] 2 rsp GD [4T] 116 Scanned with CamScanner Scanned with CamScanner 118 Scanned with CamScanner ® inet F 8,8, %) G1, WT), sk, BV OF Order (a). iene F3 Fnset 10,14, yo, 5 doa Batue of ordu (2) i+ Osy 4, a 15, 3 pe] a (45 4 = mo] OM m—- Sts ee sm cveat 1, 355, OM BS (ordi 3), m8. 5,15, 3,12 ab th * ae oh ‘Scanned with CamScanner Qeletfon (B tHe) . Case: 7 K & th nodex, and xa Yebe Alrmply delete prom x, Dno cht Cee at TH Key Bh ‘node x, and x an Uotermat code, thee ate three ‘cai to Conder. Ce Ala: Delete 3. 120 Scanned with CamScanner Re: (NJD- acre) Tngert 5, 3, al, 9, 1,13, & 7, 10, 12, 4, 8 ni a B-Tre and delete &, a, 10,3 4% onda. '4', mens © Orda: ‘ fay Node Max. ro. of thild = (mM) >4 ehid heelt- Tip, no. child = ("2 : (+e) >a Max. ne- h hy = (m-1) = (4- d>3, mb. Po. of ay = = (4 -D= Gle- F) “s(a-d =. Thsest 5, 3, al. (Preange ip ascending Onder) [2 Is Ja] fe» rapt agua eS EERE 3" ey ° $$ 121 ‘Scanned with CamScanner a Insert 1. Troatt,_!* root A 4, 18, 13, al Ts | Tse] Gz sl Ela cifay CelED Cae vac Insert 13. seit’. : ( (eqs) Cie [ep mi Onder m=, Hfid —> lexebs. Max. no. Of hid = (m) => 3. Mh . no. Of chitd = (ma) = (3) =p 1 >a. meme PO kay = (mo) = (8D =e kay = ("Ya-i) = (aa-i) = a-1 Dl. Mh. no. % t ' | Insert 23 | E 124 ‘Scanned with CamScanner Thsert 6 :. (Sey EI] TD dsp cefep ~ Pelele 8. tn ae “ED Aelete 5- . 1 Aelt |, erty te ‘Scanned with camScanner ‘ SOOLEOLELEEELECUUEUE CECE YY YU YY YY Se (10) _ BY “tace. AB bee oa balaned twe dh which every Rath from the sot of the tree fo sap uk of, the Sane terginy ard each roo- teat, node of the tree Pos between [Aa] and [oJ chitdven, where | no pied {* a ‘pavtfautow tree. ‘ 1 To a Bt tree., tb Contrast too a ' Metords Ore sored at the deaf, devel a . ony dye ae Stored ip Srtesral nodes. All the leah nodes ase terconnected 4% | fu aca. ‘ | Keg tray be duptttoted » every Key to the abet oh a partion fey & o> to that beg. BY tree chmacterfetiee. d Rata. yecords Ge only Contains Upto n-1 search fey abuse (i t0 Kou) On ope OR yen Search Coated Onder. , thus, 4 bag, then Kec ig. Specfat casec : S Reet pede B the on Mode f the tree. we. Root pode becomus the teat node, | Mfr. no. op . a cae eet te ty Max. 10. of children > bas. 5 time ar hat of A. eat) nodle « het ‘b’ be the branching jacton ie Odin . $ | | | | Bt tree. 128 Scanned with CamScanner | (oa imeb. het is Se} ih node. ecent dp Present fie Mo. 4 Beach ft > [oaf-0 2 ks bt. yey No. of Poibters (or) children = | No. g Seasch tepati | REOF Nope +. cae , heap nodes ocauning at the ast tout of Te B tre use ‘Ihe own poibter (dase one) +o Connect wiih each other to factlftabe the sequential accers Ot eat bevel. 19 Maa.no. of chidven : [bfa]-1 +m @ (xe mutt hove atteatt & polbters ib cas ft hes only one search Ke) => & =m e=b. (Sorted Keys) L Sizes &% A, T, 10, 17, at, a8 Oder m=45 Gtiven : Onda msh ss fy => (m-i) = (4-28. 130 Scanned with CamScanner Thsece 847 z a Sneast 1+ LT . ae Etta Poff TT . (0 eaEy - Delite a: : » 4, Delete 4. REE at Thee (ae ED Scanned with CamScanner x a CHO) cond todux page fut (NOD, hl Place +the second fh sorted position up the appeopeiat- Bay ‘Bee Page putt (yes) Sand Inder Pe. jut (86), then i ite the ta > Place middle. key i The thax ie: ® Th data Pas jut (se asd Tndex futl (yea, then Split the ~ page » Recods with < middle iy ge Ho the nt » Records ‘go hae fey go to he “Leap Page, Spit andee PGR TH < middie to Left Index lor) B fon bend) ge 7° hip dex The middle Kay en to bet “Cig tndex . peat nd San a Bulls Comtfrue See _Peletion. OT data peat Betoun, U1 dactor (N09 » “Index ape he tran delete the sueord nthe in a Order.to fil. void. © a ae alg Secor UD the undex 4 ee a oon dati Pe beng i dace TThdex page: eel fu f oh (ND, then Co ab ge ond Pes, the. Index to venue Change. . x sa below Hil pe Thdex. Fatoet fiu fae on (eA), dren: Com “tte Leap and . ailing , Adjust he nder pa "ile. tn gt Combine +the fotex pogo soft Ms At Contfnuz. Combinis tbdex pages wnt we seach wht ct jiu {peter % you wach the root tage. > ‘Scanned with CamScanner

You might also like