17
D. Etiemble J.-c. Syre (Eels.) PARLE'92 Parallel Architectures and Languages Europe 4th International PARLE Conference Paris. France, June 1992 l'ro«e<fings Springer-Verlag

PARLE'92 Parallel Architectures and Languages Europeceit.aut.ac.ir/~meybodi/paper/paper/Meybodi-Parle... · PARLE'92 Parallel Architectures and Languages Europe 4th International

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

D. Etiemble J.-c. Syre (Eels.)

PARLE'92 Parallel Architectures and Languages Europe 4th International PARLE Conference Paris. France, June 1992 l'ro«e<fings

Springer-Verlag

Concurrent Data Structures for H ypercube Ma ch ine

M. R. Meybodi

Compute. Science Departmen\, Ohio Univcraity

Athens, Ohio 47501

Abstract To ellkieMly implement parallel algorithm. On ponll.1 cOm pule ... , concurrent d. t ... trodure.

(Jat., ",uct" , .. wbich "'" .imultanoou.ly upduable) au .«<led. In LI,l, pal"'r , In .... impl~ment.'­tioR! of .. priority queue on .. di.otribu ted. memor-y me .. age p,..,ing multiproc.""" with .. hype",ube topology a ... p ... ente<!. In the fi~t implementation. a lin ear chin of pmc .. oo,." i, mapped ont.<> the by!>".cube, ""d Iben .. h.ap data .truclIOn i. mapped onto ,h. chain. wl,.re each proceooor .10>"" on. 1.",,1 in the hUp. A .imihr approach i. laken for Ihe .«ond implementation, but in thi. c_, • \>anyan h •• p dal a "rud"" i. mapped onlo the lineu ch~in of proc .. oon. Agoin, each proc<ssor in th. chain beeom" rupon,ible lor one level ollh. data ,I ,.<lme. ~'or Ih. Ihu-d implement'lion, Ihe banyan heap data .truclu .. i. og.in uK<!, bul the m.pping i. nol onlo lineu chain of procooson. Inslud, tbe b.nyan hUp i, mapped ont.<> proc ..... to column by column, 10 Iht the algori lhm can m.ke better use of the <oncu,.,.enl proc ... iDg cop.bilit;"" of the hypel"Cub. t.opology in oroee to reduce ootlln..,king in the fi ... 1 P"'Xe.oor, on etT..,1 noted in the use of ~he lineu ~hin employe<! by Ihe finl lwo imrl.m.nl ~tion., Th. kq- adv~nla~e of b~nyn hoap ""u Lh. hur i. Ihl ... ith bMyan hup il i. """,ibl. to ,""iev. element. 01 dilf.",nL p.",.nlil. level •.

K cyw or dll and P hru co: Concu,.,..,,1 Dua Slrucluee, Hype","b •• Uuyan Heap. Pu.Uel AIg<>­ril hm

1 Introduction PriO>"ity 'I." .... d.to "ruct .... i.o • ve.,. importanl dolo .trueLu .. ... hoch h ... found applicalion in

nrieti .. of .;Iuallen •• ueh os : di, c,.. le event . imulal io" .,..t.m., timed· .h...,..,d eom~uting .pt.m. findin , .hort.nl path, in a ,,>ph (17). finding the minimum .panning ~ .... of. STOph (171. and iteration in num.,.ic.1 ..:heme. bued on the ideo of ... peated .. I«tion of an item wilh . malle.t le,t criteria I"!, to mention. f . ... ,

nch. cluall ruclu ... iJI a Ht of , I,menl, each of which hu an _<><;a\ed "umbe., i~ prior iLy fOT it, f or each elemenl~, p(~), the priori ly of ~ i. 0 "U",b<. from ..,me linudy order«! ..,1. Sl.nd~rd opention. on • prio'ity queue"", INSt,'HT, ... hich inse," an .Iem.nl .nd it. ",oei,ted p,iorily inlo Ibe prioril y queue, ",d XMA X, wbicb deleies the element wi lh Ihe high .. 1 priority from tho queue. LeI P denote Ihe .. 1 of all element.- priorily pain. Define

p(.)_ ((%,p(%))(p(% ) _. and (%.p(%)) E PI;

Th. ell..,1 of priority queu. ope r.lion. are .. followo:

INSERT( %,p(x))

P - PU{[%,plx))) R .. pon.., .. nuD.

XMAX, p _ P - P(p_ ... ) ... h .... p,p_~) i.o Ih. pair ... ith Ihe hig he" priority. R .. pon .. is P(P",M)'

Since moot of Lh. applint;",,, of pri,"ity qunc. or. compuLalion.,lly inten. ive, il i, ih\»OrLanl \(I h .... an effici.nt impl.mentalion , Th...,. kind. of implement.I;on, 01 priority 'lueU. h .... been ... ported in Ih. lit.ralm .. : _uenli.1 .l,orilhml 101" implementation on uniproce .. or, panllel al· ~o,il h m i< a,chit""'n, .. I", .... al;.a\;..,n in ha,.,\w ..... "nd 1'" .• \1.1 .I ...... ithm. fo ' ;ml'l.m."ta''''n on parallel conoput .... In Ih. ne~1 t hre. P"'~"l'h ....... ¥i.w II,. Ii .... ',,'" 101' t\>..., ·.Pl"oad ....

Th .... .... numbe, 01 implem.nt~ion' fO>" prio,ity quo"e on • unop .... " • ...",.. I'r i","y qne"e CA "

be mai"I';n.d .. a sorted li' t, in which c ..... dd.ting Ih •• I.m.nl .. i,h Ih. hi~h"l priority tak .. 0(1) tim" but in.ertion t~hl O(N ) l im •• or it can b. m~inl.; ncd .. an "noorted li.t, in which c.,..

insertion , .. h • .:o •• lul. time but XMAX tak .. O!N) L;m e, wheu f\' I. the numbe.- of elemont_priority pairs in the priority queue. Other implementa"on . .. hieh lend them •• I",. 10 ]og:>rilnmic lime ar. heiJht or .... i&;ht hal.ne"" IffiO parti ally ordered tru(h .. p), !oFI;,,\ 1~1 ,ug,!!; .. ted by C. A. Crane [30). paSo<h. {37 ), Ike ... hu,," !381, implicit hupo 130], and bioom;'1 queu .. 139). Th. m",,' widely used implemenlal;"o of priority queue i ... ilh a hup d~\a OI,ucln,e. A hup j. a full k-.!'ur 1.­' nch .hl the priority of th, dement AI any nod. in th. IT"" j. gr<~t 'T thn priority of II .. cl,m.,,' at each of;\.o .hikl .. n. Th". 11,. elemen' with the high ... priority i. ~Iw.y. at Ih. rool of Lh. hup. 01"' , >1;"" fNSE:RTi. pc,-fo'med by ~dding Ih. pai, 10 th. I.." lev.1 of th. he.p .. nd then con"""';"g th •• e.ullin, complete Ir« into a heap by pu.hin~ thaI p.ir"p the I ..... ro<uni .. ely. XMAX worko by ,..,pl.cing 110. p.ir 0\ 1"<>01 wil h Ih. p~ir r .. idinr in the righlm""t nodo 01 tho lui 10"01 01 of hup and .hen COn"OMi" l lhe r.,,, lling complete Iree into. hup by p".hing Ihe pair at thorool down ,10, tr"" tKu",i .. ,ly. If _ 2 tbon ... , hve binary heap wbich iI 110, mot, wildly "ud;"] .pocial .....

A mumb .. 01 mu!!.ip"""osoor d .. ig~ for maintaining priority queue hove boen propoMd in the lil,ratur, •. Th_ d .. isn. can bo d .... ifi.d into t..., main I "'"po. 1) d .. isn. with .mall number of 1''''''''-'' •• ch h .. ing ~n .m.ll amo"nl of memory, ond 2) d .. ign. ",ilh .moll number of 1'1"<1«"0" nch ha .. in, a lug, amount of. memory. Group 1 d .. ign'l5,13.n.27,33\which in lum un be c1 .... ihd into O1.tol;': tr« d .. ilns ond .yotolic ....,..y d .. ign ... e .mlabl. for imp emenlat ion by VLSI hardw .. , "' b ...... I rOUp t...., d .. i,n' 12, 4,1l,29,421 cu be 'mpl.monled eilhor in VLSI Or aJlr gonoral pur"",e li,I,llyor loooelr coupled mullip"""osoor onhit.ecture.

E~i"ing algorithm. for mullip""""""'" ...., di .. ided inL-o I...., S"'''P"': ,10"" lor .hored memory multiproc ... 1IOn and IbOM for d;"Iribuled memory muliproe...,..... When de. irning algorilhmo fOT ,hared memory m,,!tipf<l~ Ihe foeu. i. on reducing Ih. interference bet .... n conto ..... nl p""".:IU. """ ... ing lb. d ata . truc'u" ,.. h ....... in Ihe cue of d;"trib"I. d memory muh iproce.rot the locu. ;" on exploiting lb. par,lIellom in the d.t, .. ructure . ContutT.nl , 11I0rilh"", fOT manipubtin~ bin[ff: Ir« d". \.0 Kunl aDd Lehman 181, concurTenl algorithm. fOT 1)..1 ..... du, to Lebman and Yo<> 119, algorithm. for eoncurrent .. onlond in. ertion of dota in AVL-Ir .. and 2·' tr ... d". L-o Ell,. 120,21 , contuTT."I algorilhm for in .. rtion and delelion on Ih. h.ap due 10 Rao ond Kum~' [81, ""J Bl.w .. and Brow". 111 ~ eumple. 01 alsOO"ithm. for .h~_memory mullip"""OPot. E~ompl .. of algorithm. for di.lti"ul..! memory mo!tiproc....". are; balanced ,ub. du. to Dally 191, ""rted <hoin due to Omondi and B""".J13I, and binary .. onll m .. b due L-o Meybod; 14]1 .

II.houl bo nol,d .ht m."t of the machine. or algorilbm, ciled in Ihi. pI pe r off .. eaplb'lili .. .. h;':h go beyond priority queue operalion •. 0110" operation •• upported by m."t of Ihe ciled algo­rithm. or machin .. ~ operotin ... SEARCH, NEAR, UPDATE, and DE~£TE on .. I of kor-ruord 1"''''. In tb, context of priority queue. rocord io Ihe elem. nl ud .he <o"""'ponding key io 110. priority ... oci,ted 10 Ihal .Iemont .

In Ihi. p.""r " e p .... n. thr« implem.ntation. of priorily que". on diotribu.ed.m.mory m .. .ag. p .... in~ mulliproce ..... ,..ilh hrPercub. topology. Th. finl implemenla.ion ;" 10-'1 on hup data OIruclure. Th. heap io mapped into a linnr chain of PToe",""", whith i. then embedded into hrper­cub •. The olher t_ impl.m,nla.ion. are b&oed on hanyan nul' data . Iruelu". They differ in tbe w~r Ihl Ihe hany. n ;, In>r''''~ inl<> the hyperen .... Th, key .rlv.,nl.,<:," "I h •• pn he>p 0." the h",p i. thl ... it~ banran h •. ", it to """ihl. L-o "tri •• , .Iemen ... t d,If ... nt ""re.nlil. l.v.lo.. A hypercube com pul ... i. brieRy d_ribed belo .....

An "- dimenlional hypercube machine con, i, .. of 2~ 1>", .... or node. intereonntete<! 10 one another 10 lorm a d dimen. ional cube. In an d dimen . ional cube Iwo nod .. are connteled if and only if Ihe binlry ",pre .. nta.ion of tbeir numbe ... diff .. by one and only one bit. ~b p""",,'or node i" 110. hypercube 10 .. a 1''''''''''''''' and I local memory fOT thot p"""._ r. Th. P""""""'" WOT. independenl!y and uy nchronoully , nd communicale by p ... inS m .... g .. 131·

The ..... 1 of 11,i. paper i. Oflonlled .. folio,... Seclion 2 giv ... h .. p b&oed implementation of priority queue on a di. tributed_memory m .... g •. p_inl. 5«lion 3 d.fin .. b.,ny .. graph. and banyan hul'". In _lion 4 "0 diK"" an implement •• ion of priority que". b"ed on b'nr~n he~p d . l o . Iruclure Socl ion S d .. i .... anal ylical formul. fOT Ih. perotntil. 1 .... 1 of a relri . .. e<! .l.m.nt. In toel;on 6, Ih. 'teond banyan 10 .. 1' b .. ed implemenl . lion of prio.ily qu.ue i. pT .. enled. Th. 1 .... 1 _tion i. the conclu.ion.

2 First Implementation Thi. implementalion i. b-'1 on hup data IIn!Cture. Th~ h O~1> i, fi" l mapped into a linear chain

01 n proc....., ... Thi. chin ,. then embedd. d inlo the hypeKu b. in . neh a ... ~y '" to pr .... "'. the p",~ imily property, i.e.,'" . h.t aJly t"" odj",ent proc. "", ... in the eh .in are mapped inlo neighbor noo .. in Ih. hpercube (3), Th. "," of Gr~r cod ... ;" on. ho"·n le<ohnique to obtain a m3pp'nt ... hich pr ••• "" Ih , pf<lx,mity p.-operly. Tbi, ttehniq"e .an be Hplained OS follow" If the binary repr".ntalion of the node number in Ih, cho", it 64_ ,61_ , .. . /00, t h. n it i. mapl"'d ;nlo the nod. ,.. 'Ih number , '~_"._' ... '"' ... here <; ~ &; + 6;t l, il (t < d - 1), ond <, .. b" if 1 _ d - I. For en mpl. , node numbo, 26 (011010) in Ihe chain,. mopped inlo nod. 23(010111) in the loypeKube. If Z· < 101 " Ihen mo .... Ihan one le .. el of 110. 10.,1' may be ..,ignod 10 0 . ingle procoosar in the chain. Thi. HIen.ion will nol. be dioco ... d here. Pro,"""", p" (0 ::; i::; n _ 1), of tbe chain ,tor .. 110. ;'~ I~el of lh. he.p. E""h nod. hos 6 field" DATA, P RIORITY, LCIIILD, RCHILD, LEMPTYNODES, and REMPTYI'ODES. For a node, Ih.

DATA fi.ld hold, an element and the PRIORITY field hold. Ih. priority .... ooialM with t ht element, LCHILD and RCHILD hold. r •• pedively pointen '0 tb. 1.1101;ld IUld rightchild ,,/ thaI node, and LEMPTYNODES iUld REMPTYNODES hold the numb.r of null nod., (nodes with no informalion) In th. 1.1, and riShl .ublrH1! of <hI node . Initially, Ih. OAT A field of .Ilth. nooo. ;v. od to nnU and th. PRIORITY field of an th. nod .. ar •• d 10 -1. The LEMPTYNODES and REMPTYNODES fidd. of all tho nO<! .. at level i a ... initi ali,"'; to 2~ -; - 1. The,. Iwo field, aT< updated .. d ••• elemen" ou in .. rled inlo or delded from lb. hur . Information .h"\1\ lb. numbu ol.mpty, nod .. i. u..a by INSERT <>p"ralion to d«ide .. hieh polh In tho hUp 010uld b< followt<! dUring Ih. ,n • .,.I;on proc.... Lack of . uch information may l ... d 10 an "verA" .. , it".\ion in Ih. I .... ' pro< ... or. Thi. hppen, if th. INSERT oper ~tion mov.o along a path in which .. II th. nod •• ar. non_empty.

Tb. prooe .. running on . ""h proo""'" ;n Ihe hYJ><reub. cono;.I. of Iwo d;.I;ncl par' •. Th. finl p~rt belong. to Ihe applica,ion lhal runo on alilh. P'Moo",,,, 01 the hYJ><reub •. Th. o«,md pari, called u" .. I; •• , io ' ''pon,ibl. for Ih. execut ion 01 Ih. priorily qu.". operalionl. An . xeculi ... Can ~.i"" ~nd proc ... many m .... g .. , imullueou,ly. Priority queu. operMio"o ..... inilialed by th. applicalion pari 01 Ih. pro<",," tIlnning on Ih. proc ... ",,,, 01 Ih. bpucub<. An operalio" wuod by • proce .. i. communical.d 10 Ihe .... culi"" of Ihl proc .... Th. <>lee""ive Ih.n ..,nd. lhal oJ><ulion 10 Ihe proc...." al Ih. head of Ih. chain (",) for u«ulion. Th. priorily qu.u. opeTllion. uc.ived by p."""",or"., w,l1 b< executed In a pipelined f.."hion along the chin of 1'.0<.'''' .... The ... pon .. 10 ,h. XMA X operation produced by '" i, fo ..... rd. d 10 Ih~ 1',,,,,,."0' "" lo i<h origin all y in itiat.d tb. oper ~' ion. An uo<uliv< • ..-;.i"", in""I<I;on, .ilh .. from ~no\h" ,~ ,""nLiv" 0' fmm th e .'pplic~L;on pal"l of Ih. proce .. 10 whi<-h il belons •. Now .. e de.cribe oJ><'"lioll' XMAX and INSEHT.

The algorithm. for XMA X and INSERT,.... diff ... nt from Lhdr .. q".nli~1 ~O,," ... pat". in IhM Ihey bOlh pe.fo,m lh. , .. Ltu~t"ri"g proc . .. from Ihe lop. Th. following algorithm .... pl~in . Ih . INSERT op<ulion .... h.n imel"lion i. J><rfo.med from Ih. lOp. Thi. new INSERT oJ><ulion t,aVfl'O" Ihe heap from Ih, lop to J><,form Ih. , .. I. oclo,in8 1'.0«" and, un lik. Ihe convenlional algorithm ;1 doe. not nec ... u ily . xp&nd th. heap levd by l. veL

INSERT operalion, Wb.n pr"",,",o' p, , (0 -S ; -S n - I), ... ceiv •• oJ>< .~tion fNSERT( p, item ) il perfo.mo Ih. follo .. iJ>g I(Olion, . It ~ ... I <.omP'Tfl Ihe PRIORITY,p] .. ilb 'he priorily of il<m, if Ih. priorily of il.m i. g .... ter Ihn lhal of DATA(p) il ,.plac .. DATAfp) by il.m .>nd Ih.n wUe' INSERT(Q,DATA(p)) 10 proceowr p;~ , . If Ih, priorily of il .... i, 1 . .. t ho Ihl of DATA(p), Ihe. proc"IIO'P; only «.do TNSER~q'ilem) 10 Pit' .The Ieller q ref",.. 10 Lh. :odd .... 01 Ihe righl child of nod. I' if LEMPTYI'ODESlp < REMPTYNODES'I) and rele .. \0 Ih. addre .. of Ihe Iefl child of nod. p if LEMPTYNODES I' > REMPTYNO DES pl. ?roc."o. p, al. o decre~. Ihe LEMP· TYNODES(p) or REMPTYNO ES(p) by on<, depending on ",· h. ,h .. Ih. item will he in«rted into Ih. righl (q .. RCIlILD(p)) 0. lell (q .. LCHILD'p)) . ublre. of nod. p. INSERToperaiion will nol be prop. g.ted ful"lh .. down if n<>d. I' i. ~ nun nod . .. hich in 'hat c ... Ih. only action perform.d by proc. ... or p; io to .Iot< Ih • .t,men' in DATA(p).

XUA X operat,on: When the .~.e"liv. of Po ~.iv., operalion XM,I X from anolh" executive o. from Ih •• ppli<-ation pMt of il. own prO<. .... il g.n .. at .. an operation <-ailed ad) .. 1 .. hich propagal .. Ih",ugh Ih. chain of proc.e"oTO ond converl. Ih. binary I"", (after Ihe rool i. f<mov«l) inlo .. he.p. With .... pecl 10 oJ><ulioh XMAX, all th. proc.-... . XC.pl pro~ ... or '" J><.form the nm •• et of a~tion •. W. doocrib. oJ>< ratiQn XMAX .... follow",

p r "" .... or Po: Wh.n proce .. or '" ,«.iv .. operalion XMAX, il reporlo , h. elemenl wilh Ih. IIigh .. 1 prio.it y 10 Ih. pro .. ,,,,r lhal i.,u,d Ih. XMAX oJ><ralion .nd Ih,n .,nd. oJ><ulion adj~.1 10 proc • ...,r Pl.

p ,,,,, ••• or 1'; , (0 < i < ,, - 1) : Lei I' be Ih •• dd .... of Ihe nod. in Ih. local memory of proc ... or PI _, whOll' vaIn. had been movNlnp o ... ported by proc .. ,or PI_l in the previollO ,ieI'. On r«. iv_ inR operalion ~dj""(P! by Pi, il 6nd. Ih. child of nod. p, q. Ihot ~"nt,i" . th • • lem". ' wilh high .. p"orily . •• nds DATA q) 10 p,_, to replace DATA(p), "nd ".~ I ,,"d. 4dj _.t(j) 10 proce .. o. 1',+\ . PTOc< .. or 1" _1, (i:> I "f,,, fillin. up the node pwiLh DATAh). in""·,,,,", tho .F:Ml'TYNODF.-S or Ht;:"\PT YNODBS field of nod. p by ono dopending on .. heth.r q 11 .. been Ihe Mdr ... of left or right child of nod. p. If bolh child .. n of nod. p aro .mplY Ihen p,oc.,,,,r 1', wil l no\ g .... al. any mo .. ~dj_'1 oJ><ralion; il on ly ..,"d. ,. me""a~e 10 proce""". P' _1 ... kin S 10 emply node p. No pr"" ... or will receive an ~dj",1 op<nlion unlillhe mo, t .. cent ddjnl optration i,,".d by Ihal proce""". is compltled by il. neighbo.ing p.o< .. ",r.

The ... pon .. li me for XUA X i. Olios 11'), bec"n,. il t,k., O(log /1') tim. fo. XMA X oper.>lion to reach prou .. o. '" a nd it aIM> uk .. O(log ,II) I,m. 10 .. nd lh. ~ult. produced .1 pl'O< ... or 1'<> bad 10 the proccooo, which inili .t<d Ih. ol'<',.tion. The piJ><lin e period for bolll 1h. XMAX and INSERT oJ><Tahon. " 0(1), ,nd,p,.dent of Ihe lenglh of Ih. chin of pro<.<""",. Tlte uo<Ulion tim. fo •• ach of Ih. XUA X or INSERT operalion i. O(log N). Thi. i, due 10 Ih, facl lhat il moy lake O(log N ) lime for ,. new el.menl 10 find ii, correcl pi"". wilhin Ih. hup or to KIl up Ih. gap prod"~od .." a

r .. ul~ of XMAX op<nlion.

R.o:muk 1 Information "o.M in th. LEMPTYNODES ",,<I REMPTYNODES field, of ,h. Dod .. are ~oed by INSERT o""ralion lo decide .. hklt palh in the " .. p .hould b. follo.....,J dnrin, .h. in.miao proc .... Tilis uniq"e pall. un bo .100 <om put"" on Ihe Hy by lb. INSERT 01'<,&1;00 S,8). Thil requirn th. 'yolo", Lo maintain t..., pioc .. of in formalion, /"'1, Ih. index of lb. luI oo.emply node of Ih. hup and Ii"!' lb. indu of th. 1.l\mOlI node in the d«pen le¥el of tho h •• p .. hieh <on l ain. al leall o,,,e HOuempty "(XI<. LeI 1 _ 1 .. 1 - Ii .. l and p .. Io! /4.1. Th. "u .... hor J <u be expraoed al • pob" binary "umber. The biury "'p,"enlation of of I lel1, DO .. hethe. lo go t.o ,h. righl or left .. hen we Ira".tinl down Ih. h •• p. AI level i ... e D .. Ih. i'· bil r...,m the t.f, of 110 decide .. belhe. 10 I" t<J Ih right (if I) or left (if 0). ROO!. of tb. bup ;. a' I~ol 1. Thio p<o<edut< tan be utended t.o .pply ' 0 • i-ary h •• p .. her. k ., 2". If , _ I •• ! _ r",t and p .. los IA't. Then al 1"".1 d of the I,eap w. n .. (I + I)'· b," of binary "pr •• ublion of Iw eh.,.,... the nod. al the nox, 1 .... 1 of lb. h.ap. Th. adQJlhg< o( Ihit p"",.dn. o ... r Ihe one .. oed in ,bil, .. port is lhal il requireo I ... m.mory .p;ac. and al"", it upand, th. hup 1 . ... 1 by Iov.1 jun .. ill Ih. """"'ntioul oequenti.J al gorithm. Th. o .. fnln ... of informalion . boUI Ih. num!>.. of . mpty nod .. of 110. lofl and righl ... blre< b.<om .. apparonl wh on ... , lalk aboul banyan heap in 'h, rollowing OKtio ....

3 Banyan graphs and banyan heaps A b. nyan gr.ph i. a lias>< diaorram 134) of a pmial orderin, in .. hith tl,.,. i, only one pAllo fron,

any bue t.o any apex . A b-. i. d.&n~ .. aoy verla: ",ith no arcs indd.nt out of it and an ape" io d.6nod .. any ... rt", ... ilh no U'f.II incidonl int.o il. A ....,.1", lnal i. neilher an apex nor a bue yerl,"" it called .n intermedia'" yort.,..

An I..-1,y,1 banyan il a banyan in which tho p.th from bue t.o .pe,, (or apex to bue) i, of I.",th L. Then:fo .. , in an I..-I""ol banyan, Ihe" an. L+ 1 lovell of nod" ... d L 1,.,...,1. of edg ... By""n ... nl;on, apex .. an. ""n, id"red 10!>. al l.y,,1 0 and baHt a, 1 .... 1 L. In a banY3n , .. ph, 110" outde,r ... nd Ibe ind.l ..... of a nod. are called .pread and hnoul of lhal node. If Ih ... i. An edge be"'·.en I ..... node •. x al leyd i aDd Y al 1.",,1 • + I, Ih"n w. oay x i. 110" pM<nl of y. and y i. Ih. child of x.

D eBnltlon 1 .4 "",u" call,d. _nilo"" " .. ,u iJ oJl !A. 1>0'; .. ",,'Ain 110. '''m< 1 ... ,/ A" •• id".,i.oJ 'P" "'; " " ,; luo.!.

lu a uifonn b~nY&n ,Ihe fanou~ and .pread ~alu .. m.y be char.th.ri.ed by L ,ompono,,1 y«lor1l, F ., (/0, j" ... , h_ d and 5 _ ('" '" ... , 'd, Ih. rano~I y""t,or and Ip,ud y",,~r, , .. pecl;v.ly, wheu ' ; and j, d. nol~. Ih, ' r TOad ~nd fonoul of ~ node al l.y,l i.

D e6n;t ;oD l If .;~, ~ I;, (0:5 i:5 L - I), 141;' F ~ 5, !A." !A. "",,,,, i. ,,,II,d ",'o"1..J" •. 1/ . .... , '" " lor ." .... i, lIou 110. "nyu i, Mn."d""g..Jot.

D " Bolt;on 3 .4 "",II" ;, ",it !o k "1..J .. • j.; .. t, {I :5 i :5 LJ, .. ...I j, '"' f, (0 :5 i:5 L - I), Jor .,,"" o"""",.! t ""t J. 0110.""". il;, '4id!0 6e i,"f..Jo •.

Ddln;t;on 4 .4 "",0" i, "" SW,M",." ,/il loll, IA. /0/1""""1 ho" Addll10ui p!"Op .. !itl , 4) T_ nod .. ", ... i"h"".d;"!. 1 .. 01 i, h ... illo .. .. 0 or ,,1/ co",,,,,,n "" .. "II .1 1 .. e1, - 1, ~) ho" "od ... , i"I.,.".,d;"l, 1 .... 1. h .... 110 .. " 0 o. oJl '"'''''''''' dild .. " .! , .... , i + I.

D eBnll ion 5 .4" SW,."n,u i, ,,,.11 I" 6e ""'."9~I"t ./il" " 10/", "n" I, '"' d, (1:5.:5 L) •• "d /; = d, (1:5 i :5 L - I), /" •• " .... ")!"'A'" d.

Havillg inlroduced .he nec ... ary nol .. ionl and d.~nition, w, d,6no banyan hoap.

DeBnltion II .4" I..-I ... I kt"1n IuGP " "" £.1 ... 1 loa",,,,, nolo !Ad tAt. prio"/J "f tlte clem,nt ", .od. I>Od • .. ,,_oJ O. ,....,/<1" tA." tIu priori!i .. 0/ II .. 01, ...... 1> .! .ocA oJ i!. diJd, ....

Figure I .ho ... an uample o( 4· !evel r«tangu13r hnY3n hup. In Ihi' ""p0rt we OIudy Ihe im­plemonta,i"" o( M~'" reclanlul .. SIV-bany~n heap wilh ,; _ 2 en ~ n d,m"n.;onal cube wh .... 2ft _ los '" + l. '" is Ihe numbe r o( apex", Th. rutriclion ~ an Mx,lf T«Ianlular S W_banyan it in Ihe inl .... 1 o( ,;mplicily of p .... nl.l;"n. In ouch banyan. Ihe RUm!>'t of l.yeb it log.lf + 1 .• ~""h nod" in Ihe banyan hup h ... six fields: DATA, PRIORITY, LCHILD, RCHILD, LEMPTYNODf,;S, and REMPTYNODES. In addilion 10 Ihe aboye ,iw. fiold., nch ap<~ h,. 3nolh .. ~old called NEXT. Thil &eld io uoed 10 link apex .. &oedh",_ Inilially, th. DATA fi.ld. o( all tho nod .. ar ... 1 10 nuo and the priorily fi"ld. of .llih. nod .. ar. '0110 -1. To iniliali •• Ih .... field., fir1l1 partilion \I,. hup inlo '" di.joinl bin.>ry t ...... and Ihen U,"" the umo rule .. fo, ,h. fi",' do.i~n 10 in;Ii.~.e Ih. LEMP_ TYNODES and n£MPTYNODES fiold. of 110. Dod .. in .aeh pmilioR. The partilioning p"",_ 11m. wilh Iho ld'm""t ape ~ and con tinuos in inc",uing Oro .. of .h. ",,",x number •. Th. Idlm",1 apex i. "umbeted l. Par';I;on; i, Iho oe' of aU nod .. which a .. "'Mhabl. from ape" • by moYin~ dnwn 'h" hup ud a~ RM pan of p .... ilion i - l. Th. r",,1 "r r"li';~n' ;, .'pu '- Th. deplh nr" 1' ...... ' ;,,0 i •• he d.p.n of Ih. ,"""",.",,ndin ~ bin...,. I..,.,. Th .... 1 of p"I,loon. "nd .he in;Ii.>I ... tling, of LEM?TYNODES and REMPTYNODES fi.lds f" r an ad S W. banY3n is gi""n in figure Z.

De fi nition 7 A ~ L-I .. cI,..Tlilion<i knyon A.~p" u L· I.wl k"yo .. n,A IA~I ,~<A "",tilio" 01 tA, k ny. " ( •• •• liMa do •• ) i. a bi"." A,op.

D efin itlon e A ""rl;lw ... d L.I ... I bonya" hoop':' •• id to .. /,,,11 ~p 10 opu d il .11 tAo nod .. in ,..,litio ... j, (j < d). ,IT, no,,·, .. 11 a"d tAo .. od .. in til ... moini"9 "",titioll.l ... " .. II.

D efini tion 9 A" ..... i" ....... 'u A.op i, ,.,d to .. ".,Adl. b, ""rllllo" 'ro"" ."". , if it> ,.." M ;, .... <hdlo by ..... 11/,: .... lrom 01' .... Nod, 1.1 1 ... .1 i +l " ... ddl, ~, "",tillo" lrom n<><1< t d' I,.d i if "od. I .i,Il" Au "o~· ... . REMPTYNODES .nd ;1 i , ,A •• igAI .h,ld of "od. 1,0' h,. non·UM LEMPTYNODES ... d <I i. tAo 1.lt , Aii.d of nod. I. An .pe. i. ".,Adl. b.w "".tition Irnm dulf.

Remark 2 Th. null nod ..... hi<.h a~ ",,,,,habl. by partition lrom "siv. n .pu ... ill be fillod up by in • .,.tion. initiUod . t Ib.1 apt" unl ... Ih • • uchblny oIlh, nod,. will ,hug. by a laler d.lelion o""'&lion ioilialod at oom. olh ... ptu •. R.&thablity do .. n~ imply "'&th.b1ity by parlilion.

4 Se con d Implementation Th. ,[ective impl.m.ntation 01 bany~n h.ap on hypt«ube requ i,.." .ffici.nl mapping 01 th, banyan

It""tU'" among the proc.18OfI 01 Ih. hyp'l"eub •. W •• umin. 1_ ouch mopping'. Th. finl m.pping is obtaint<! by tint m.

h .. ! ~II. b~")'l<" into a linu/" chain .nd Ih.n .mbetlding Ih~ chain inlO Ih.

hy"" ... uh. (~ 5ju,"" 3 , T ~ second mapping is obhinod by ,ol!a""ing column. of Ih. hany.n inlo .ingl. p.o,~ .. 3( 1_ al is .a<h b ....... ap.~ palh in Ih. bany",,- wilh id.nli<ally labelt<! v.,,;' •• is m. pped into on. proceooor in Ih. hyp.n:ub. wilh Ih. nm. label. A«ording 10 Ih;" mapping, if lwo nod .. art adj .... nl in Ih. banyan Ih.n Ih.y are map.p<d inlo two adj"".nl p.oc .. oon in Ih. hyptrcub., IhO!. hying label. Ihl diff.r ,~&ttly in Ih. , ' digit. ~ •• 6gure 6 for a:n .umpl._ In this seclion w. <on.idcr Ih. fi",1 m. pping.

a.1_ w. ,i ... a d.lailod d .... riplion of Ih. ope ratiou. XMAX and INSERT"", .ho .. how to <om· put. Ih. add'--f:I of th children of a gi ... n nod., The nod .. al a liv.n I.yd a", ,to.od ><qu.ntiallr in an arTaY of .i. t M in the loc.1 m.mory 01 Ih. co ..... 'ponding proc...."., 1..1 "c; to d.not. Ih. i' nod. on Ih.l'a lev.1 of Ih. b.nyan ... h.re 0:':::;:'::: M ,O:'::: (log M + 1). Th,n "e. il ,onnecl.d 10 t_ nod .. n1' '' 'j; and "l'HI .. , where m i. Ih. intog .. lound by in,..,.ting th~ i,a moot .ignifi,ant bit in Ih. binary re preun lalion of;, W. col! nod •• n(H' I; . nd nj, .. 'I .. Ih. righl ~nd 1.11 child ... " of nod. "';, r .. p",li ... ly. Th"".fo"" Ih. I.ft child and nghl . hild 0 nod. i ,I lev.1 k a .... tored ""peclivoly in Ih •• '" lo<ation and m,a loution of Ih. array r .. idinS in tho local m.mory 01 procesoor k + l.

An the XMAX and INSERT op".lioo' inil;alod at di[ . ... nl proc....."." . re .. nl to Ih. head or Ih, embetldod chain and ..,.. OJ<ecutod in a pi""linod manner. Wh.n optra~ion INSERT i. r",.ived. by proceuor Po, it fi"'l find. Ih. 1.llmool pmil;on whi.h h ... at 1 ... 1 on •• mply nodo. Thi. ,an be don. u.in , inlormat;"" OIOrt<! in Ih. REMPTYNODES ud LEMPTYNO DES field. oIlho aptx<I in O(M} lim •. II Ihon pu , h .. Ih •• Iom.nl " ''lu •• I. d to b. in""rlt<! down Ih. hanpn hup u.ing op<ralion ."".I_.d, .. ,1. Th. optrati"n iU"' -odj'" pu"lI .. the .km'nl ,]""," (~lon8 Ih. p~lh, lrom Ih. rool of Lh. parlition 10 Ih. b .... . ) unta it find. ito 'OTrec' pooit ion Thi, ~"i ... 0(10' M) lim •. Th n.INSERT ;, an O(M) ol><'fation.

Tn Ih~ cod •• Ci,",. brl<>w w. u ... h. lollowi"c .ynl;u ~nd um~nl;' 1<>< .. n~ .'nd "",.i", in.ln«· liono. The in.l.uetion Sond«pro, ... or>,'<in.lrutlion>'j .. nd. in.truehon <in.lrudion> to pro--""or < proc._.> for ",«ulion. Th. execulion of ..... ive( <p.oc<ooor>, (i.formalion) cau .... h. informa'ion .pecifi ed by Ih, "",ond argu m.nt be ob.ained from proc ....... <pro, ... o/"> and fo ..... ard.d 10 .h. ~u .. ling proc,,,,,,r (Ih. proc"".",. ",ecu li ng .1.. ,,,,.i,,. in.truclion). A «<,ive inslru,tion u",ul.d hy proto ..... p; i. nol compl.l. unlil a m .... g. i • .-..:.iv.d lrom p.oc.-..or p;.,.

Upon . rec;.ivini INSERT(p,(iltm,priorily}) by proc • ..". pO, it execul •• Ih. follo ... ing cod ... Th . letter P II Ih. addt ... 01 Ih. l.rlmOfl al'<X, and (item, priority) i. the pair l"t'lu,,"l.d to be i • ..,.lod.

lound ~ fal .. While (no. found) do

if DATA(p) -I null . hon il priority> PRIORITY(p)

btg;n if LEMPTYNODES(p)1' 0 0. REMPTYl'iODES(p)'l'" 0 Ih ••

begin if LEMPTYl'iODES(p) > REMPTYNODES(p} Ihon

begin p' _ RCHlLD(p); REMPTYl'iODES(p) ~ REMPTYNODF.S(p) -1 .. , ....

begin p' _ LCHTLD(p); LEMPTYNODES (p} - LEMPTYNODES{p) - 1

,., ...... d(Po • 'in ... rl-adju.t(p', DATA(p))'); DATA(p) _item; PRIORITY(p)_ pnority; found _ lrue ,., , ..

p - NEXT(p)

'"' .10. hOi;n ( priority.:: PRIORITY(p) I

if LEMPTYNODES(r) '" 0 or REMPTYNODES(p);i 0 the ... booSi ...

if LEMPTYNODES(p) > REMPTYNODES(r) then b<gin

p' _ LCHlLD(p)i

LEMPTYNODES(p) _ LEMPTYNODES(p) - 1 ,., ,'-

1,..~ ;" p' - nCHILD(pli REMPTYNODES(p)_ REMPTYNODES(p) -1 ,.,

.. nd( f'O, 'inoert_adju. «p·. (item,priority) }'}, found _ true ,.,

,'" r - NEXT!p)

,'" begin DATA(p] _ item; PRIORITY(p) _ priority

end;

Proceuo. P;. (2 $ i :;: L), upon receiving in.<r!-Gdi~'I(p,(iI.m ,priori1.)")) M"'U~' the following <od ... ,

ifDATA(p) 'I' null then if priority> PRIORITY(?) then

b< gin if LEMPTYNODES{r) .,. 0 or REMPTYNODES(p) ;i 0 then

bogin if LEMPTYNODES(p) > REMPTYNODES(p) then

begin p' _ LCIIILD( p) ; LEMPTYNODES(I') ..... LEMPTYIWDES(I')-I

,.d .1 ••

b.~jn P' ..... RCHlLD(p); REMPTYNODES (p) +--- LEMPTYNODES(p) - \ ,., ,.,

..,,,d(p,+!, 'in",r\.- _>dim'! p' ,(D A TA(p).PRIOR ITY( p))) '): DATA (p) ..... it.",; PRIORITY(p) ..... priority ,.,

.1 •• begin

if LEMPTYNODES(p) .,. 0 or REMPTYNODES(p) {o 0 , hen begin

if LEMPTYNODES(p) > REMPTYNODES (p) then begin

p' ..... RCHILD(p]; REMPTYNODES(p) _ REMPTYIWDESh,) -I ,.,

,'" begin p' _ LCIIlLD( p);

LEMPTYNODES(p) _ Lt>MPTYNODES(p)-1 •• d

.. ftd(p;." 'in .. r\oodju.l{p' ,(item,prioril,))'); .. , .... ~Ji.l>

DATA(p) _ il~mi PRIORITY(p) _ priorily .. , .," bel;n

DATA( p) - item; PRIORIty(p) - priority

endi

XMAX oper~lioD ~lloc~\e' tho ape x .. bich contain. Ihe .Iom,nt wilh .h, highe" priorily, up.,..., thai ,l,monl \0 tk, oa"ido world, and Ih~n fill. up Ihu .p .... with Ih~ tlnntnl ia oM 01 it.o .hild",a. rmu·u"j .. , it _pon,ibl, for ""'1r.cl.rinllh~ banr""" il m""a d.-a Ih~ h •• p. Whtn XMAX( p) it reui~ by proc_ Plo il uecna II.. followi_. cod .. , wh.", ,. i. the add.,... oIth, loftmool apex. Th .. add ....... kn own \0 II.. omuid. world (f,..,nl .nd com pUler).

p' - p .. hile NEXT(p) # nil and OATA(NEXT(p») # null do

belin if PRIORITY(p) > PRIORITY( NEXT( p)) then p' _ p

•• ! - NEXT(p)

.. nd('ou,"id~ .....,..Id' DATA(p'II ' _.iyo (p" ((PRIORITY(RCI LO{P'11,DATAIRCItII,D1PI"'

(PRIO RITYILCIIILD p'il,DATAI CIIILD(p'JII) I if OATA(RCIIILO(p·n.;. null or DAtA(LCII1 .Dlp'))),! n.lIthen

if DAtA(RCIIILD(p')) > DATA(J.ClllLDlr'))lhen b'liA

DATA(p') - OATA lnC11!LDlr:)l;

~~~?:4~~~6.;!~~~RJi~j!li.rJ~'?,~I~') + I; ,n.rnd (/>:l, ':.m ... · odjuf\(RCH ILD(p 'll') .," begin

DATAlp'} - OATA(LCHILD(p')l; PRIORlty/p') _ PRIORITY/1;(;HlLD/p'll; LE~IPTYNODES(p') _ LEMPTYNOD~rp') + I i ... d (po, '.m .... _a.!j • • I(LCHILD(p'))' .. , ....

ho,in OATA( p') _ nml~ PRIORITY(p') __ 1

•• d

~eiyt(p;+" ((PRIORITY{RCHlLD! .. n,DATA (RCHILO/ Pl)!,

[

PRIORrtY(LCHittl(P)l,DATA{LCHltD p)))) I; i! DATA/RCHILD pIlI- n~lIor DATA{LCHILO{p» "I- nO I ~b

i! OAtA(RCHI 0 pI) > DATA(LCHILD(p)) Ihu begin

DATA{p} - DATA/RCH !LO(~.))i PRIORITY( p - PRIORITY RCHILD p ); REMPTYN OhF..5(p) - REM TYNOD~l(p) + ,: .. nd(p, ... " ' o:mu •• dJulI(RCHlLD( p)) 'J .. ,

.'M belin

DATA{p] _ OATA/LCHILD/I>l); PRIORITY(p) _ PRIORITy(LCHlLO(p));

LEMPTYNODES(pl- PRIORITY!!» + 1, ... d(P.H, 'xmu-a<!ju.I(LCHlLD(p) 'J

.. d .1 ••

MSi" DATA(pl _ ""II: PRIORITY(!» _ - L

•• d

R.emark 3 Th •• Iemenl, ,"or«! in Ih •• ~" nod .. o.u no\ nnk...t in . ny par \;<uIAfordet. Th;'.p~. up the in .. ,tion ."" ... , b", Iud. \0 0 M) lime ro. del.';"n, II i. p" .. ibl. to in .. n. lb •• Iemonl, in ,uch a ... y lnat S,t . Iemen' "'ith Ih. hi~ ~t prio. ily i • • Iway. av.il.bl •• 1 Ih. l.hm.,.' .pu in whkh .a •• loe.ling Ih. e"",,,,<1 'pe" to initiate Ihe in ... tion I.k .. OfM) ti", •. Th'. melhod ... m. to b< more effi,ienl doe to Ih. rut I porlion of I h. time 'penllo find tit. corr«1 posilion . In be "".,Iapped .. illt l it. lim • • ponllo ]oc.le In apu ,. ith .or" REMPTYNODES or .HO LEM?TYNODES.ln Ih. algonlhm. p..-nled .bo ... we h ... u.& Ih. 5,..,\ approKh. Th. O<'(:ond appro""h wi ll b. roport..! in another po"" •.

From Ih. proputi •• of SlV.hny~n gT~ph. and th. ~bov< ~Igorithm., w. <~n .Iat. th. folia..- in g !'flult •.

T heorem 1 OpcrAlion XMAX ",q.i ... O(M) lim. 10 .ompl.I •.

Theorem 7 OpcrM;o .. INSERT .. </_i .. . O( M ) I;",. 10 .0mpl'I • .

L"mm. I .J TA. , .... ,,-nd'.'1 op .... t.o .. .. eo .. u.oul", ~ .. 0<1. u·A ',A " Mn·". 11 GOld Ao, ~.ro LEMPTYNODt:5 ud .... H.f::MPTYNODt:S.~) TA. i ... .. /.Adj •• 1 opc ro/io n Alwo~. fi .. d, A ... Ii .. od. 10 i ..... 1 ,e. d.mul.

P roo f a) H op<Tal ion zmu .• djul .n.ount.~ a non· null nod. with LEMPTYNODES and REMP· TY NODES fi.ld. "'I o~1 to .. ro Ihen il mo.1 have 1><.01 inil;'IM from an apu ... ith both REMP· TY NODES iUld LEMPTYNODES "'lui 1o IHO. Thi. is im_ible ac.ordin~ to Ih, algorilhm for INSERT. b) Proof i. immediate from Ih. proof of pari . and the definilion. of LEMPTYNO DES and RE MPTYNO DES.

R"lnATk ~ Dd<lion of ~n d.",enl fron, parlilio" • "' 'Y <au .. on< of 11, •• 1,,,,onU in olher pulilion • .. h_ nod .. ~ ...... l.Ch3bl. from .pe~' to k<ome nuU. Thi. h->ppen, if. d.lele operation 03 .... the .m<U_Adi .. ~ on i1.o .... y down the hup, 10 m"". up the <onlenl of on. of Ih. Inf nod .. of pu!.ilion • to &11 up i1.o parenl ... hieh ho.. bee n emptit<! by .mu'Gdj •• 1 op<T.tion al the previou. "ep. The .mptin ... of .hi. node now will be reftectt<! in Ihe REMPTYNODES or LEMPTYKOD ES of ape x i. Thio node i. na..- ruch.ble by rarlilion from apex i and ... i]] be filled by an in .... lion inilialfll at ' pex i. The m ... imum numl>< r 0 nod .. thai m.y I>«ome "l.Chabl, by parlition from apex; as a !'flull of a d. letion i. "'1",110 (L+ 1) - D, whe .. D i. the depth of pn L.ilion i.

Lewm~ ~ Z~ro REMP T YNODSS BM .~m LEMPTYNODES 'or Bn BI"" do .. no l impl, lhal 1111 lA, ,,0<1 .. ... ,A, <o . .... po .. di .. , p''''i';o .. 01"< ..... ·".11.

Proof From remark 4.

L~U1m. 3 Apcz;, ( I 5: i 5: M ), 01 .... ,. ,o"'oi,.. 1M <I.monl ",A><A hal Ih' Aigh." p" on'l, 01"'0'" ,A, .1.", ... /.0 "o ... d , .. IA. nod .. 0/ ""rLiLio" i .

Proof From algorilhm. for XMAX, zmoz.odj..", INSERT, and in"d.odj.jl.

L~U1m8 4 TA, d ..... '" "",A ,A, A;gAut p";"ri,y i. 01 ... ,. "p.r',d~, opc .... /'o .. XMAX .

Proof: From lemma 4 ond Ihe 6 ... 1 part of algorilhm for XMAX.

Defin it ion 10 A por'ilio .. in.J",u ~, LEMPTYNODES nd REMPTYNODES {oold. %pu i i. /A, .. , 0/011 "od .. ",AicA M' ".,Adl. ~, p4 .1;,i."/.-.,,, 0PC2 •.

5 Retrieval at Percentile Levels On< of the mo.t imporlanl iOdvantage. 01 banyan hea p """ Iho binary hoap i. lhal it ;. _iblo

10 "I,iov, .lem.nl, ~\ d iff ... nl percenlile 1 • ...,1 •. In Ihi. ,..:tion wo derivo lormul ... lor Iho porcont il. lev.l 01 Ihe . lem.nl r.porled by opaalion XMAX lor diR".r<nl c .... .

D efinition 11 A~ d<"'<~1 ",mo •• d /'0'" 4 I>o.~yo~ ~<4P i, 01 /><",u /il, , 'f 0,1,,,,,. p .. «~1 0/ I~' ,I,,,,,"h ./o .. d ;11 I~. A<o~ A~ •• prioril, I, .. IA.~ 0' ,q~.1 /0 lA, "non/y 0/ lA, dd.,.d d.m.nl.

W. d.fine REM PTY NODES, 3nd LE M PTY N ODES, 10 donol, T"pediv<ly Ih. value of REMP· TYNODES field and LEMPTYNODES fi.ld of apex i. Th. proof 01 th. following ( lemm ... Me immodi a~ from Ih. d. 6nilion. of REMPTYNODES and LEMPTYNODES.

Lemma L T~. 10/.1 n~m'" of nidi nod .. wAi,~ 0'" ",.,Adl. b~ I'M/ilion/rom .pu i i, REM PTY NO DES, ... LEMPTYNODES,

Lemma 6 1/.n M.M ".,.lIlIo".d ""'."gul •• SW.60" ,." I>o."~.,, h,.p ,,/~II up 10 01''' d tA. "

., L)lIEMI'TYNODES; + LEMPTYNODI,'S,) = 0 .

; B'

Lemma 7 [" on M:rJ.l .. ,t."g~lo. S W.~~n,o~, th, 101.1 n~mb<r 0/ null "od .. ... ,hbl. b~ "."lllioll from .p.r .. 1 'A 'O~9A d. w, it/.n N ULLNODES(M,d}, i, Vi.,,, by:

< N ULLNOD ES(M,dj .. L(REMI'TYNODES, + LEM I'TY NODES, ) + K.

; * ,

",A ... K i, IA. ~~m'" of ~"/I ~p<%" i, (i$ d) .

Lem .. ", 8 TA. lo!~l ~.m 6 .. of Mn· n.1I Md .. i~ d M:tJ.f l'<',tilioMd ,.."tUg"ld' SW.I>o.~ydn, ""il!<n NONNULLNODES{M,M}, i. M(logM + 1) - NULLNODES (M , M).

Lemma 9 TA. lolal "umo., o/po.titio,," 0' d.pU. k in d f .. 11 Pd,/ilioMd 6o.nyaR ~'dP up 10 01''' d, "",,1.11 N p., ;, gi.en 'y: d - ,,~ -, NP

NI'.=l .:..., . , 'J ,

Pr<>of. W, proY< Ihi. lomm~ by induction on d.

B~,io: For d ~ 1. NP; = 0 for alii $,. $IOiN + I .

lnduclion: Allume Ihu

Con.id .. d+ 1. Eilher d i. even or il ;. odd . If d ;. ev. n th. " ape x d+ 1 ;. 'h~ root of 3 pMI;lion with depth 1. Th ... fo ....

d+ l - L;: ~ NP;- (,vI', + 1) ,'11' . .. [ 2 J,

For Iho c= Iht d i. odd w. con.ider lwo .uh<;~: Apex d + 1 i. cil h .. the roo~ 01 ~ partilion of depth k OT il i. the root of a partilion ",ilh depth A. (h < k) . If d + 1 i, the TOol of a partition of depth d Ihen w, ... ill hove

Sin,e d i. even Ih.n .... have

01- ~h' N P NP. _[ £..,., fJ. ,

If .po ~ d-+- I io Ih ......... of & puloiliou wit~ dep\h " ... ho •• I :s " < 100: N -'- 1 ud "-;' k .hen ... e h ...

,\'/\ = l d + I - L: 'Si' •• - I.,;" II' P, - IN P,. + I) J.

r..,mtn~ 10 Th. 10141 um~" of h<I~ - ... 1I ~oJ .. ;~ • /~11 MzAf "".1;110 .. '.1 r«14ft , _I". S W" A .. ,U ~p lOOp" d, ",.w ... ,i •• (M,d). ,. , i •• " ' "

M........ . n'z« M,d)_ 2: 2"+ L NP,Z;

•• 0 ,..,

LMnm. II II u Mz).{ ruto"f'/o . SW· .... 'u po . hhOft.,J A •• p" 1.11 x, to .,,01 ~ IAn U .. d,mu! d"f'td.' .,..z J II 0' ,.. .. Uli[. Iud

[1M-I) . \00 .... (M ,d)

P r oof " .. {M ,d) it the tot.l number of "od .. in an M x M ro<un~"lu S IY. banyan hup .. hich it fall up 10 &I'U d and 2M - I it the Iotal number of nod .. in partition I.

Lewma I Z 1 .. u Mill "".titioned ."lu,.I • • S W"u,u h. op .,A"h i.l_1I ~p 10 . pu d, .f "".._ otion XMAX iUII/i, .... i,(i<d), Mn· ... I1.,..r .. lAu lA, " .. « n'ilo elthe "'I"','ed d,mn! "

P roof fum le",ma 10.

WmID& u 1/ ",..,..hu XMAX 'umi ..... "" ... 1 IA",.,A J •• Oil MzM ",<lng.lo, .... 'u .'0, IAn 110. ,. ..... hI • • / IA. ""o,'uI tI .... ul u ""oJl .. lAu . r .,.oJ IQ

P r oof It a buraa kup io full up <0 apu J l b ... by I,mma 12 lb. per«nli!. of lit. ol<mtnl ...,por'Ud by o~ation XMA X ;'

I

By lemma 7, Ihil u n boo writlen ""

ou.(M, J) • 100 ( .. · •• (M, Mj- NU LLNODES(M, All)'

I)~. I ~' banyan i. " '" '~II ~p I .. apox J ... d .~u.r.".. oomo 01' Ih. "<>d~. whid. ar. r .. ch. bl. 1m", ape><u I 10 J an nil Lel F be Ih. 101.1 "Umber of .",h lIodu_ n...-.I_ Ihe !>'"f<e .. "l. 01' Ih, elemonl "'porl«l by X Mil X opeu lion ,.ill be

(.ue(M,d) - F) . 100

(om (M , M) N ULLNOD£S(M, M ))'

110;. pf'OYU ,h, lemma.

rr",,,,"rk 5 A priority <IU,", c~n ~l", I>< impl,men\od ... banyan he.p. " paMition,d banyu hup c.>n I>< conv<rt.d into a banyan h • • p by an o~rAtion cilled ~dj~,t. M log .lf - 2 .dj..,t o~r.\ion' ",e b,oade.""1 by Ihe XMAX o~,.tion .. hen it inurl, an element into.n . mpty p..,-tilion. Th.,. ~dj.8I o~ratlOn. ca" ••• om. of th . element, in the nodu of Ihose p.>rliliono which are r .. chable from a~x ito mOV. up and 6II up the nod •• of PMtil ion i . A" a r.,"II , all the node . .. h"". wnt.nl> (empty or non. ,mpty) h ... b, .. m.,...od by Ih. ~dl.,t o~ratlon be<on,. re . <hable by part ition from a~x •. It .hould b. not.d Ih < ..,m. of Ih • • di~" o~ration . iniliated at proe • ...,r pO by XMA X o~ral ion may not hav. any elf«1 On Ih •• truclur. of the hUp ,

The w vantage of banyan hup o ... r p..-tition.d banyan hup i. tht it allow. a more uniform di. tribution of dal~ elemen" among Ih. pari ilion. in Ih. he.p and lead. to a mo~ uniform inc", .. e in th. ~l'<entil.l.v.1 of Ih e reportod .lement .. the numl><r of eu min..! a~n' inc~ .. e. ,

Algo";lhm, for XMA X, %m.%.~di.' t and in",t .• dj'..,I are Ihe n me for Ihe banyan heap , The o~ntion INSERT and th. ne .. o~ .. tion ~di • • t ",e d .. c";be-d in 141.

6 Th ird implementation In the 6 ... 1 Iwo implementalion. , proc",.." '" b"""meA a botll.n«k becu •• all Ih. o~ .. tion.

mn,t p ... Ihrough th;" proceMOr. Th;' limits the potential to"<urr.ncy of th ... t..., implemenlalion. 3nd p,-.,venl! them from fully utili. ing the hypercube t.opolou. For the th ird impl.m. nlalion, 110. hnyan hup d at~ . Irueture i • • gain u.ed, but the mapping", not onto a linur chain of proc.osors. In, tead, 110. banyan heap io mapped onlO proee"",rs column by column. S •• figure 4. Thi, Iud. 10 an implem.ntation that t.nd, to diotr ibute the load amon, th. proc •• ",rs more ev.nly .nd achieve ,reoter con~urreney, Thi. mapping . 11""" 110. algorithm 10 make 1><11 .. u •• of concurrenl proce .. in~ capabilit;". of Ihe hy~",ube topology in order 10 '''''uee bot\lneeh"g in th. fi ... t proce"or , an .!fecl not..! in t he u.e of Ih. linur <hain .mploy"" in Ih. fi,.,t t .. o implementation •.

In Ihi. impl'ment al ion, each column of Ih. h.nyan heap i ..... igned to a unique proeu,or .• proc • ...,r .. hOi. numl><r io the .ame .. the numl><r of thai column, Thu., if a node i. ",. ign ed 10 pmceowr % then Ih. lefl child of Iht node i. ,tot.d in preee""r % and Ih. righl ehild io .Ior..! in • proe • ...,r which", Wj...,.nt to proce.",r % and .. h",. add"",.;. m ", h. re m i. the int.ger comput..! "I inv. rting tb. i" ",,,,,t ,ignifiunt bit in ,h. binary rep,e.ent . lion ofi. Th. noo .. in 0 given <olumn o the b.nyan hup ", •• to~ •• quentiilly in an &rray of Ii .. log M + I in Ih. local m.mory of it. proeeswr.

Th. al gorithmic principl •• of XM A X and INSERT oper3Iio" . are ,h ... m ... the seeond imple-m. ntation , Bnl . in« column, of Ihe h .. p are .to~ in cli.tinc' proc .... o ... in Ih. hy~rcul><. th. o~ntion of computing Ihe leflm"'l partil;on that 10M at 1 .... 1 one empt y node ( .. plITt of INSERT oPfl'a\ion) "nd Ih. operation of locating the ~~x with the h;~h"l prio,.;"y (." pa" of XMA X op­. . .. ion) un b. ['<rform..! in O(lo~ M) ralher than O(M), Thi . I~ , ,,b 10 .> lolal TO.pon.e lime of O(log M) for XMA X ope"lio" M "' ill 1.>. diocu ... d I,ter in ,hi. >«I;on ,

To imp.,m.n1 the priorily qu.". o~ .. Lion . ... n • ..! tw<> o~r.,tion >: Glol>«l O"",d,", I.>n n GlOMI Mi~. GloW Bro.d,.d i. u.ed 10 di, I,ibul. a m ... ag. t.o all the nod. in the hy~",ube, . nd Clol>«i Min i. u • ..! \0 comrute the minimum of a lin of il.m . .. hich are di , tribu te-d among Ihe pro""",,,," of Ih. hy~r<ube 16. Belo .. we de. cribe algorilhm. for Ih . .. two o~ .. tio" •.

GloW Broad,.,t The proc . dure i. b ...... d on Ih. idu of a fanOUI teff in .. hich each node >end. Ih. mes.og. to all of ito neighbo ... .. hicb Ita ... nol alre.dy rK.i .. d il. The fanoul ~ree root..! al nod. o for a 4_dimen. ional hy~r<ul>< i. gi ... " in fig"~ 5. In Ihe fanout lree each nod ... nd. th, data to .11 n. ighbors on Ihe li.1 of ne;~hbon of that node .fter Ih. node Ihey , ,,,.i,,, il from. Node. in •• ch of Ih. 1i.1 of neighbo ... . re ord.red by incr .... ing node number. The Ian o" t " .. rooled al .>ny olhor node r c1m be compul..! by lak ing Ih •• xclu.ive OR of any nod. in <b. t,..,. with r. See fi~ure 6 for the fanoullre. roolod .1 nod. 13. The following th""rem from Brandenburg and Scoll 171"ugg •• t, iUl efficient implem. ntalion for ,hi. algorithm.

Theor~m 4 I'I~. rool • ,ud, !o ... . yi.>dy .nd <Q'~ oth •• .. oo, %, .'hi,h ""'"" ~ ",,,,.g. ''''''' z, Iud. it 0" I. oil ... i9M." Y _ ~ + 2; ."'~ th., 2; > % + ', th." Ih. " .. /ling ,"Mol I." i. Ih, '4mo ., !hM obl.i",d ' .om .. d.,i • • OR wilh r ., tre. r",,'ed .1 "TO,

GI.1>o1 Ati,, : Th. algo. ithm for ' hio o~nlion ;. al.., b .... d on the idea of a fanoul Ir ••. In Ih. fanoul I,..,., eath noo. comp"t .. the minimnm of it. cur~n ' item and Ih",. of it. children .nd thon p."'" it to it. parenl . The ex«ution of Ih. cod . for Glol>«l Min . t differenl proe ... o .. i •• tarted when a m.,ng. i. re«ived from Ihe root of Ih. corre.ponding fanoul I ... r"iu"' ting the comput.lion of Ihe minimum ,

OperMion. X MA X .nd INSERT for Ihi, impl.mentalion are d •• crib.d I><low,

(NSERT, An INSERT operation iniliate-d al nooe % firOl <om put .. the odd .... of the 1.ftm",' a~x y whose parlition b30 at 1.",t one . mpty nod. (",i"g Glol>«l Min o~ralion). Th, el.ment.prioriIY pair i. th. n >eM from nod. % \0 the node which conl.in. a~x y. Th. p.ir willI>< in • .,I.d into Ih.

pMtit;on roolM d ~p<x y iOCoor<ling to the procedure described for ~he .<'<ond impleme nt ation ,

Th~ prohlem wilh th. INSERT operalion .. given above i. th t an in ... lion oper~tion may fi nd> parl il;on (reporlod to haveemply pooilion,) full when;t ~ri •• 10 in'e<1 a pair inlo ~hM pUl.ition, and therefore blockod ond unable to proceod. t hio i. co u.ed by allCM'ing .. veral INSERT ope .. lio •• to ... ",h the lill of apex .. concurrently for Iheir poinl of 'n,.r~;on . , which, ... . re.ul~ more lhan one INSERT operuion, may 1"« ..... Ih. um. apex whoo. corn.ponding partilion h .. on ly one . mply I>"'ilion &/I Ih. poinl of in ... I;on . In thi • • iloalion & n. w INSERT operation m.y ~ •• wned al th. nod. ",hich block..d the in~rlion .

XMAX: An XMAX ope.alion iniliatod at node ~ firsl dele.min .. Ih. ape x which containo the element wiU, Ihe hi~ h .. 1 priority (u.in g Global Min openlion) and then .. nd . an operation, called ~di." , to the nod. cont:Uning that a pex. Operalion ~dj"" fi"t reporl. the el .men~ to m.de r, and then adju. t the hny." he.,p .. d .. crib<d in Ihe previo". -=,ion.

The problem with XMA X operalion .. described above io that due 10 concu",,"1 ",cOM 10 Ihe liol of apeu. by .ev .. al proc ... o,", the nme apex may b< reported to •• verol XMAX ope"lio", .. the holder of Ih • • l. m.nt wil h the higheot priorily, T hio may lo~ 10 Iho , ilu ' lion in which .I. menl. retum..d and .ub.equ.n~ly delel~ by lOme of the XMAX operation do nol have Ih. highe.1 priority in lb. hnyan h e~p at the time of r.moval. On. IOlution 10 Ihis problem is to .. nd all the XMAX open~ions (i"uod al differenl node. ) t~ nod. "" and let node"" uocute them .. qu onti.lly. Thi, limit. lhe ~mounl of conculToncy obtainabl. in the .y. lem. Tlte amOun~ of obl~inable concurrency .hrl. to deer .... due to thi, ot .. tegy when the numb<r of olemenl' in Ih. banyan hup uc • ..d . 2'oc M+O _ 1 for t h. fi .. llimo,

Tb w relJ1 ~ OI'<",lio" XMAX "'q~i,. .. O(log M ) lim. 10 compl., •.

Proof: Operation XMA X con, i'l of 3 parto: 1. findi ng the apex cont . ini .. ~ Il,e elemenl wi lh the high.,t el.m.nl . 2. repor~in g Iho element 10 the nod. initi aled Ihe operation . 3. ;adjusting Ihe h Jlyan h<ap

E""h of Iho., .tep. uquire. O(loS M) lime .nd h,nce Ih, tot . 1 time of 0(108 M) for XMAX ,

Th.orem II Op,,,,'i,, ,, INSERT uq.i .. , O(/ogM) tim. to <"mpl.t •.

Proof: Similar to Iheore'" 5.

Theor em 7 A " XMA X "p, rn li"" n«d, n o mo .. IAon 2(M - 1) + 2 · 10gM <ommn;cal",,,, ,

Proof: The Ihird impl.mentAtion can p.rlonn M opeulion. nl a time and uch operation r<qu"e. O(loS Al) time, and h.nc. O(M f log U ) Ihroughpul.

In ",h' follow. we 6"" define a fe'" t.rms ond Ihen inlroduce Iho con<opl 01 con,i,t.nOf for ConcurTO"t dal •• Iruelme,

D e Hnit ion 12 TA. h"''' I"'''~ 0/ M' or.",li,,", i, Ih, lim< 41 ~'h" h Ih. 0/,<'0';"" ,. iniliol.d 41 • ,,<><I • ."d ,h. 1,,,,,,lomp of <> 'ommnicol;"n ;, lA, 1; ... "lomp 0/ lh. o/,<,.Iion which gen .. ol.d Ihol ,ommonl<4Iio n.

D e fin it ion 13 Op<ral'o~. 0"02,0,, ... , a"d 0 , ",iln hm"lamp' I" I,.t" ' .. ud t, .rc .aid 10 b. ~ .. q~ . .... of op.rolion. ;fl, < t2 < " .. < t, ud "p.rntion, 0" 1 <,,:5 q.rc Ih. only op.rnli"", ;" •• d b.1",.u I, ud I ,

D efin ition 14 A ,c".~"."1 d~lo .Iruch,,, ... said 10 b. con,i,l<nl 'f lA , concu,,,,,1 utcul;o" of ~"1 •• qll.n • • 0/ ol'<",li"",, 01> tho d.t~ ' Iruchl'< gi ... Ih. $Orne ... n it . , ,,<cuting tlt. op,,,,lion. "qu'I>li4i1r.

Proof: Con,id.r ., '<quenee of XMA X ope .. l;o", wailing in nodo "" for n etulion. Duo 10 the f<o<1 tht Ih ... XMA X operation. aro exetuled •• q~onti.lly in incre""ing ord.r of Ih.ir tim "lamp', il i. quite poo. ible for . n INSERT operuio" which have ., lorger time. lamp than an}, of th~ XMAX open~ion. 10 b< u ecul..d b.fore.1l the XMA X operalion. are compld..d.

Theorem 10 n. lAird impl.m.n!alion" ,on,i,t,n! if U 0«." mod. to on apu by U optration i, no! .h,,!«1 "nJ". oil !~. op.m!ion. ",i!~ !~.Io"<r !i",,,!.,,,p. ~a •• • ompl.l.d all !h.i, M+l .... ,,. , 10 IA. a",.".

& 10" we dncribe a procedure for making the third implementalion con. i'lenl.

An oporalion is fiNI r"""rded by all the proeeMOrs in Ihe hypercub<. The proc ... or ... hich inili~l<>d th. operalion broadc ... t. l hot operalion lO~elher with itllim, slamp 10 ~lIlh. proc.,.",., u.ing ilt fan OUI tr .... The oporation.."d ito tim "lamp .. added 10 th. 1i.1 of incomplete oper>lion' m""\ained by re,id.nt .~eculive of oach proc • ...,r. After Ih. ope,alion is add.d 10 th. Ii,t of incomplete ope'alioR' by a proco...", Ihat proco""," •• nd. a notific~tion ,ignallo Ih. p.oc., ,,,,, that initiatM the operaliou. The nOlifi"lion . ignal. i .. ued by Ihe proce .. o", are combin.d accord ing 10 Ih. fanoull,..., .ool.d al Ihe proce .. o, .. hidl initiated Ih. op< .. lion, no procego, .. nd. a nolific,lion .i ~n ~l to it. parenl in Ih. f~n oullre. unl . .. . 11 ilo .hildren have nol.d l\tal op<.alion. Arl .. Ih. '001 proc ... or ««ived All Ih. nolificalion , ign al., the ",,«ulion of Ih. op<r&lion .Iul,. During Ih . exe<ulion of Ih. op<ution no ""co" is mad. t.o an ap< ~ unl ... allihe oporalion . ... ilh lower lim .. l;\mP' have eompl.l<>d Iheir act ... 10 lhat apex. Wh.n an op<ralion compl.l" it. l. ' t ""<eM to Ihe 'pen. , il .."h all Ih. execnliv", 10 um",". Ihal operalion from Ih.ic li.1 of incomplet. opeulion • . Th. removal opention i. p<rfoml.d in Ihe sam. f .. hion .. Ihe op<,alion of recording an ope,alion. After an operalion i. removed from Ih. Iill of incomplele operaliono of:ut execulive, ' he ntxl p.nding operalion ... ill be allow.d t.o perform il. acc ... 10 Ih. corr<sponding ap<x.

7 Conclusion We have propoud Ihree eoncu'Tenl d.>I • • 1 ... <1 "r .. roc impl.m.nlin~ priorily queu .. on .> di , lribu'o<i·

m.mory m .. nge p ... ,iog m,lItipro<e .. or wilh hypercub e "'"1"'1081. TI, . .. ,on"".,..", d~'a . tcudur .. can be uoed by any appli~~lion running on ,h. hypercuhe ... ilhoul worrying abo"l all Ih. n«e", ary ,ommun "OIions ~nd .ynehroninlions . PTionly queue open lion' . """ require O(log M) I,me t.o eom· plde, bUl,inco M operalion' may be initialed ,imu lla.eou , ly at diff".nl proc'",ON, O(MjIQgM) Ihroughpul is ""hi.vabl .... compued 100(1) Ih rou,hpnllor .. qu.,li.1 dala ,'.uelur.,.

8 References 1. J. Bis ..... and J. C. B,o"'ne, ·Sim"lianeou. Updu. of Prio.ily S,,,,<lures." P"",.eding' of In\ern ....

lionu Conference "n PuaUel Proce .. ing , Augu", 19~7, pp. 12-1·13L

Z M. J. C~y and C. D. Thompson, ' An .ffici.nt Implemenlalion of Search I .... on rlog N + 11 proc • ..o",." IEEE n an''''''i,,"" on COmI'UI .... , Vol. C-33, No. 11, Nov. 1984, Pl'. 1038·104L

3. Y. Sud and M. Sehull', ·Topologi<~l Properli~ of Hyperoub .. ,. IEEE n,nnclion. of Comput .... , VoL 37, No.7, July 19M, pp. ~67·812.

~. M. R. Meybodi, ' New D .. ign.lor Prio,ily Qu.u. M",hine" Proceedings of PARBASE-OO: Confer· ence on Dalab ..... , p"'~nel ATChileclu""" and th. ir Application •. Mi.mi Be.ch, Florida, Mw:h e-9, 1990, pp. 123·128.

5. M. R. Meybo.Ji, .n... Slnlcluced Dictionary Machin .. for VLSI·A Surv.y," CS Technic~1 R<J>Orl, Ohio Univ."ity, Alhen., Ohio, 47501 .

6. M. R. M.ybodi, ·Impl.m<nlin~ Prio,ily Qu.u," on Hy percube Machine," Annual P.rallel ProcHsing Symposium. Fullerton, Calilonia, April 4.6 , 1990, pp. 132·157.

7. C. Mol .. and D. S. Scoll, ·CommunkatiotO Utilili.s Fo. The iPSC," iPSC Tech. Report, AuS",1 19S6.

8. J. E. Br.>nd.nburg and O. S. Scot~, ' EmWding. of Co,"munica~ion Tr ••• nd Grid inlo Hype ' cubM,' iPSC Technieal ReJ>Ort, Augu" 1986.

9. V. N. Rao and V. Kuma<, "Concurrenl Act ... of PTion ly Queu.,' IEEE TraR. actions on Compul.,.., Vol. 37, 1"0. 12, Dec. 1988. PI' . 1657· 1005.

10. W. J . Dally, A VLSI A"hiteclu", for COncurre nl Dala Siruclu" •. Klu ..... Academic Publi,hen, 1ge7.

11. M. J. Quinn, D .. ign;R~ Effi,i.n' Algonlhms for paralld COmp,," "'. MeG,.", Hill, 1987.

12. C. D. Thomp&On, "Th. VI-SI Compl.xily of Sorlini," J EE~; nan. "tion. on COmp,,'."' , Vol. c.n, No. 12, D«. 1983, pp. 373·J~.

13. A. R. Omondi and J. D. Brock, "Implementing a Diclionary on Hyp<,cube M""hin. ," Proceodings of Intern.tional Conf.rence on PualleI Proce .. ing, A ugu ' l 1987, pp. 707·709.

14. K. H. Chong. 'Efficienl O .. ign , of Priorily Queu. ,' Proc.ed ing. of In lernational Confer.nce on Parallel Proc ... ing, Augu'l 1988, PI'. 363·366.

15. J. H. Chanl, O. ft . Ibarra. M. J. Chng, and K. K. Rao, '5yolol;" -rr.:.: Im pl~m~n"lion of Dal. Slno<l u< .... IEEE Tr~n."dion' on Con,pu t ... , V,,1. 37, No.6, Jun< 19~~. pp. 717.73$.

HI. J. D. UlI".,&I>, Comp""lio".! A.""~I of VLSI, Compul« 5<;'0<. Pro .. , 1984.

11. T. A. Siaodish, D"I .. Slruelu,," T«hniq"", Add;"'n W .. I<y, Inso.

18. E. Horowiu and A. Sahni, F'undam<n ,alo of Data " noel""",, Comp"l.,. &ienco Pr ... , 1983.

19. H. T. Kunl and P. L. whman, 'Con~u'Tfn l Man,pulati<>n of Binuy Surch -rr.:.:.,. ACM 'lran.&CI'ono on Dauba.. SyOl<mo, Vol. S, No.3, 501'1. 19!O, PI'. 354_382.

ZOo P. L. whman and 5. B. Yao, 'Efficienl Loc king for Concalnlll O"". ol'on. on B--rr.:.:.," ACM Tran .. &Ction. on Daiab..ao S)'O'e".,., Vol. 8, No. 4, DO<. 1981, PI'. 650-670.

21. C. S. Ell;', 'Coocu"...n! S .. reh and I . .. rlion in AVL~" ItEE Tr.,".action. on Comp,,"'''', Vol. (;.29, No.9 Septe".,ber In!O, PI'. 811·817.

22. C. S. Elli., 'Concu"...,,1 5oa.n:h and In.ertion iu 2_3 Tr ..... Ada Informalioo, Vol. 14, 19!O, PI'. 63_86 .

23. J. L. Bentley and H. T. Kung, "A 1ift Machine for Marching Problem.,. Proceed in g or Ihe In'<T_ nationol Confen'lI« On Parallel Proc ... in g, 1979.

24. C. E_ w .... roon, "Sy.toli< P,.;only Queu,,", ' Dept . of Comput .. &ionee, Cun.gie Melon Un iversity, Pitt,burgh, PA, Reporl CMU-CS-1l5, 19'79.

n. T . A. Ollmann. A. L. aOHnberg, and L. J. Sl.ockmey .. , 'A Dielion ~ry M""hine for VI,SI," IEEE Tru.action on Co".,pu", .. , Vol. (;.31, No.9. Sopl. 1987, PI'. !92_897.

26. H. T. Kunl and C. E. w ioeroon, 'Sy.tolic ArraYI {for VLSlj, ' Proceeding. of Symposium on SpaDe Matrix Compu~ation. and Iheir Application., N.,... 1978, pp. 256-U2.

27. A. K. Somani and V. K. Agarwal, 'An Effieient VLSI Dictionary Machine, • Proceedi n,. of IUh Annuallu"'malioul Sympooinm on CompIII .. ArchilKlure, 1985, PI'. 142_150.

28. M. J. Alallah and S. R. K",araju, ' A G,nuali • .d Diclionuy Machine for VLSI," IEEE tnnuelion. on Compul ... , Vol. (;.34, No. 2, F~b. 1985, PI'. 151_155.

29. H. SchmKk and H. &hrod~r, 'Dictionuy Machin .. for Dilf .. enl Mod.l. of VLSI," IEEE Tr~n.""lio" on compute .. , Vol. (;. 34, No.5, May 1985, PI'. 412·475.

30. A L. Fi,her, 'Dictionary Machin .. wi,h Small """.,ho-r "r P"", •• ,,, .. ,,: Proc .... ,," •• <"Ir In'.rn.''ion.,1 Symp<llli~m on Comp"l~r Arcbile<l",", \O8~, pp. 151_156.

31. D. Knuth, The Art of Computer Pl'Ojramminl, Vol. 3, 1973.

3Z E. M. Reingold and w. J. Han .. n, Dala StnoCtuUl, Little, Brown and Comp.ny, 1983

33. N. J. Nilsoon, Probl.m Soh-ing M<lbod. in Arti&ci .. 1 Io",nitl<RC< , MeG" ... Hill, 1971.

3(. F. D.hne and N. Sanloro, 'Oplimal VLSI Dictionary Muhin .. on M .. h .... Proc...ding$ of Intorna-l ional Conf.rence on Parallel Proce .. ing, Augu,t 1987, PI'. 832-840.

35. L. a. Goke and C. L. Lipov.ki, 'B .. yon Nol ... oru fOl" Parlilioning Multiproc~""r Sy.lem.," Pro. co.ding. of the Fin. Annnl Symp<lllinm on Computer Archit«lur., \073, PI'. 21_28.

30 A. L. Tbilrp, File Orguiution and Prot_lnR, John Wiley .nd Son" 19M. 37 A. V. Aho, J. E. Hopcroft, and J. D. Ullm.n, The D .. ign and An~ly.;' of Computer Algo";lhml,

Add ison W .. I.,.. 1974.

38. a, Nix, "Au Evaluation of Pagodao," Tech. Rep. 1M, Compul .. Sci.nce {hpl. Yale Uni ...

39 D. D. SleatOl" and R. E. T,.,.j.n , "MU Adju.ting Heap"," SIAM J. Compul. Vol. 15, No 1, F~b. 1986, pp . 52_59.

40. J. Vuine".,'., 'A Dat. Structure for Manipulating P";ority Que" ... : Comm. ACM, Vol. 21, No. (, 19S5, pp. 309-3\5.

4\. M. R. Moybodi, 'Binary 50areh M .. h: A Coneu"...n! Dua Structur. for lIyp<rube,' Compuler &ien« TKhn;"al Repon, Ohio Univ ... ity, Alh.n>, Ohio, Jan. 1992.

42 . M. R. M.ybodi "Banyan Heap Machin.: Proceeding. of Suth Internalional PMal"'l Pro<_ing Sy".,pooium, Universily of Soulhern Coliforni., Lot Angel .. , CA, Mareh 1992.

figu.:e 1

(igu.:c 2 !iguce J

,

fiqurt! 4

,

3

1 ,

"

I I

fi9u re 5

I II 111111 I I , I ' I I I 1 I I I

0000 I 0010 0100 0110 1000 1010 I I I , I ! ,

"

I I I

1100 I I

1110

0001 0011 0101 0111 1001 1011 1101

Cigu r c 6

111\