Fringe Analysis of Synchronized Parallel Algorithms on 2{3 Trees?

Fringe Analysis of Synchronized Parallel Algorithms on 2{3 Trees?

Fringe analysis of synchronized parallel algorithms on trees R BaezaYates J Gabarro and X Messeguer Departamento de Ciencias de la Computacion Universidad de Chile Dep LSI Universitat Politecnica de Catalunya Barcelona Abstract Weareinterested in the fringe analysis of synchronized par allel insertion algorithms on trees namely the algorithm of W Paul U Vishkin and H Wagener PVW This algorithm inserts k keys into a tree of size n with parallel time O log n logk Fringe analysis studies the distributio n of the b ottom subtrees and it is still an op en problem for parallel algorithms on search trees To tackle this problem weintro duce a new kind of algorithms whose two extreme cases seems to upp er and lower b ounds the p erformance of the PVW algorithm We extend the fringe analysis to parallel algorithms and wegeta rich mathematical structure giving new interpretations even in the sequential case The pro cess of insertions is mo deled byaMarkovchain and the co ecients of the transition matrix are related with the exp ected lo cal b ehavior of our algorithm Finallywe show that this matrix has a p ower expansion over n where the co ecients are the binomial transform of the exp ected lo cal b ehavior This expansion shows that the parallel case can b e approximated b y iterating the sequential case Keywords Fringe analysis Parallel algorithms trees Binomial trans form Intro duction Fringe analysis studies the distribution of the b ottom subtrees or fringe of trees and has b een applied to most search trees in the sequential case EZG BY We are interested on the fringe analysis of the synchronized parallel algo rithms on trees designed byWPaul U Vishkin and H Wagener PVW This algorithm inserts k keys randomly selected with k pro cessors in time O log n log k into a tree of size n The fringe analysis in this case is still op en and the main drawback is the reconstructing phase that is comp osed bywaves of synchronized pro cessors which mo dies the tree b ottomup In this pap er we prop ose a new synchronized parallel algorithm denoted MacroSplit that b ounds the PVW one in the following sense the distribution Partially supp orted byACICONICYT through CatalunyaChile Co op eration Pro gram DOG and RITOS network CYTED and ESPRIT Long Term Research Pro ject no ALCOM IT and DGICYT under grant PB pro ject KOALA and CICIT TICCE and CIRIT SGR 1) 2) x node y node y node x node x no a + 1 key {b} ab ab +1 key {c} ac 1-type leaves 2-type leaves 2-type leaves 1-type leaves Fig The transformation of x and y b ottom no des after insertion of one key In the key b hits a b ottom no de x containing the key a No de x transforms into a no de y having keys a and b Wehave X X and Y Y In case the t t t t key c hits a b ottom no de y containing a and b This the no de y splits into no des x containing a and c resp ectively while b is inserted in the parent no de recursivelyNow X X and Y Y t t t t of the fringe derived from the PVW algorithm is upp er and lower b ounded by the distribution derived from two extreme cases of our algorithm The key idea is that our algorithm reconstructs the tree with only one wave meanwhile PVW needs a pip eline of waves Wehave extended the fringe analysis from the sequential case into the parallel case with signicant improvements As later on is showed the direct extensions of this technique on two concrete cases the parallel insertion of two and three keys suggest the inapplicability of this technique on cases greater than these simple ones Wehaveovercome this drawback with two facts allowing us the analysis of the generic case the insertion of k keys The random insertion of keys generates a binomial distribution on the b ot tom no des This fact allows us the probabilistic analysis of the parallel algo rithm The fringe evolution is determined by the exp ected lo cal b ehavior of the algorithm This fact gives a new understanding to fringe analysis The rest of the pap er is organized as follows In section we recall the fringe analysis of the sequential case In section weintro duce the MacroSplit algorithms Section contains the direct extension of the fringe analysis for the parallel intro duction of two and three keys Section contains the analysis of the generic case and section the analysis of two concrete cases of this generic case Finally section contains the conclusions Sequential case The fringe of a tree is comp osed by the subtrees on the b ottom part of a tree Our fringe is comp osed b y trees of height one A b ottom no de with one key is called and x no de and a b ottom no de with twokeys is called an y no de These no des separate leaves into typ e leaves if their parents are x no des and typ e leaves if their parents are y no des i) b d f h j a c e g i k d j ii) Split b d g j a b c e f g h i k a c e f h i k Fig Choices for MacroSplit rules In i the MaxMacroSplit rule creates a maxi mum numb er of splits In ii the MinMacroSplit rule creates the minimum numb er Intermediate strategies are allowed Let X and Y b e the random variables asso ciated to the number of typ e t t leaves and typ e leaves resp ectively at the step tWe assume that X Y n t t b eing n the number of keys of the tree When a new key falls into a b ottom no de this no de is transformed according the rules given in gure The probability X Y t t that a key hits a b ottom no de x is and for a no de y is The conditional n n exp ectations verify X Y t t E X j X Y X X Y X t t t t t t t n n n n X Y t t E Y j X Y Y Y X Y t t t t t t t n n n n The exp ected number of leaves conditioned to the random insertion of one key at the step t can b e mo deled by EZG BY E X j E X j t t T n E Y j E Y j t t As the conditional exp ectations verify E X j E E X j X Y j t t t t and E Y j E E Y j X Y j we get from the preceding expression t t t t the OneStep transition matrix T I b eing I n n n In order to compare with the parallel case we consider the sequential insertion Seq of k keys given by T T T Itiseasytoprove nk n nk k k Seq T I O I nk n n n k x no de y no de y xx xx xy xy xxx or yy xxx or yy xxy xxy xxxx or xy y xxxx or xy y xxxy or yyy Table MacroSplit p ossibili ties for x and y b ottom no des once k keys are inserted MacroSplit parallel insertion algorithms Weintro duce a parallel insertion algorithm based on the idea of MacroSplitOn this algorithm an array of ordered keys a is inserted into a tree having n leaves The MacroSplit insertions algorithm has two main successive phases Percolation Phase In a topdown strategy the set of keys to b e inserted is split into several packets and these packets are routed down Finally these packets are attached to the leaves PVW Reconstruction Phase In a b ottomup phase the packets attachedtothe leaves are really inserted and the tree is reconstructed This reconstruction is based in just one unique wavemoving b ottom up First the packets are incorp orated at the b ottom internal no des of the tree In successive steps the wavemoves up decreasing the depth one unit at each time The evolution of this unique wave needs the usage of rules so called MacroSplit rules see Figure The MacroSplit algorithm can b e seen as a heightlevel description of the parallel insertion algorithm given byWPaul U Vishkin and H Wagener in PVW whichtake place by splitting a MacroSplit step into sev eral more basic steps chained together in a pip eline Let us see whywehave several MacroSplit algorithms for a large k At most k keys can reach a no de If the no de stores more than twokeys it must split using a MacroSplit rule Table showusseveral split p ossibilities for x and y b ottom no des For instance the rst row show us the splits of the x and y no des when k see Figure In this case there is just one p ossibility The fourth row showushow x and y no des can b e split when k In this case a b ottom no de x can b e split into no des x or into no des y Later on we will consider two extreme cases The MaxMacroSplit algorithm will maximize the number of splits at each step and the MinMacroSplit algorithm will minimize this number When k or b oth algorithms coincides see table Consider that at the t step k random keys we asume a uniform distribu tion of them fall in parallel into a fringe with X leaves of typ e and Y leaves t t typ e such that X Y n The exp ected values of X and Y after t t t t the insertions dep ends on two facts P E X jX Y E Y jX Y t t t t t t X t x x X Y t t n n X X t t x x X Y t t n n X Y t t x y X Y t t n n Y t y y X Y t t n n Y Y t t X Y y y t t n n Table Parallel insertion of twokeys The concrete form of the MacroSplit algorithm This algorithm explicites how manyleaves of typ e and typ e will b e generated by b ottom no des when they receivesomenumberofkeys The preceding values of X and Y t t We deal with a Markovchain and the evolution can b e analyzed through the so called kOneStep transition matrix T nk E X j k E X j k t t T nk E Y j k E Y j k t t Parallel insertion of and keys In this section we compute T and T following directly the technique applied n n b efore to sequential insertions EZG and we discuss the viabilityofthis approach Direct extensions First let us consider the case k Wehave only one MacroSplit algorithm see Table The exp ected numberofleaves is characterized by OneStep T n transition matrix E X j E X j t t T n E Y j E Y j t t We compute the probabilities of the dierent splits by an

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us