rus i O(log log Λ = log log ) time usig a optimal umber of processors. Chaudhuri, Hagerup, ad Rama's algorithm [2] rus i O(log= loglog) time o the CRC

Size: px
Start display at page:

Download "rus i O(log log Λ = log log ) time usig a optimal umber of processors. Chaudhuri, Hagerup, ad Rama's algorithm [2] rus i O(log= loglog) time o the CRC"

Transcription

1 Selectio Algorithms for Parallel Disk Systems 1 Saguthevar Rajasekara Dept. of CISE, Uiv. of Florida, Gaiesville, FL Abstract. With the wideig gap betwee processor speeds ad disk access speeds, the I/O bottleeck has become critical. Parallel Disk Systems (PDS) have bee itroduced to alleviate this bottleeck. I this paper we preset determiistic ad radomized selectio algorithms for parallel disk systems. The algorithms to be preseted, i additio to beig asymptotically optimal, have small uderlyig costats i their time bouds ad hece have the potetial of beig practical. 1 Itroductio Give a sequece of keys ad a iteger i, 1» i», the problem of selectio is to idetify the ith smallest of the keys. This importat compariso problem has bee extesively studied. Numerous asymptotically optimal sequetial algorithms have bee discovered. Asymptotically optimal algorithms have bee preseted for varyig parallel models as well. Floyd ad Rivest's sequetial algorithm [9], i additio to beig asymptotically optimal, is simpler tha the optimal determiistic algorithm of Blum et al. [7]. Reischuk's radomized algorithm for the parallel compariso tree model takes O(1) time usig processors ad hece is clearly optimal. Meggido's algorithm fids the maximum i O(1) time usig parallel compariso tree processors. Both of these algorithms are based o the idea of [9]. A costat time radomized algorithm for maximum selectio for the CRCW PRAM has bee give by Rajasekara ad Se [18]. It is easy to obtai a radomized logarithmic time algorithm for selectio usig CRCW PRAM processors (see e.g., [10]). A determiistic logarithmic time asymptotically optimal algorithm is also kow [11]. Cole's algorithm for the CRCW PRAM 1 This research was supported i part by ansfaward CCR ad a EPA Grat R log 1

2 rus i O(log log Λ = log log ) time usig a optimal umber of processors. Chaudhuri, Hagerup, ad Rama's algorithm [2] rus i O(log= loglog) time o the CRCW PRAM usig log log = log CRCW PRAM processors. Optimal algorithms have also bee desiged for models such as the mesh, the hypercube, meshes with buses, etc. For a survey of parallel selectio algorithms, the reader is referred to [16]. We preset two selectio algorithms for the PDS. The PDS have bee proposed with the wideig gap betwee processor speeds ad disk access speeds i mid. I essece a PDS ca be thought of as a computer with may disks. It is assumed that i oe I/O operatio we ca fetch a block of data from each of the disks i parallel. The first algorithm we preset for the PDS is radomized ad the secod algorithm is determiistic. The umber of parallel I/O read operatios eeded for either is O N, where N is the umber of iput keys, D is the umber of disks, ad B is the block size. Thus the algorithms are asymptotically optimal. Due to the small uderlyig costats, the algorithms have the potetial of beig practical as well. May problems such as sortig, graph problems, etc. have bee studied o the PDS. Ay sortig algorithm ca clearly be used to perform selectio. The kow lower boud o the umber of passes through the data for sortig o the PDS is Ω log(n=b) log(m=b), where N is the umber of iput keys, M is the iteral memory size, ad B is the block size. I practice oe ca assume that N is a polyomial i M ad M is a polyomial i B ad hece this lower boud simply meas a costat umber of passes through the data. The PDS model we use is the oe suggested by Vitter ad Shriver i their pioeerig paper [20]. Several asymptotically optimal sortig algorithms have bee proposed for the PDS. All these algorithms, though theoretically importat, have rather large costats i their time bouds. Recetly, Rajasekara has proposed a sortig algorithm called the (l; m)-merge sort (LMM) [15]. A implemetatio of this algorithm o the PDS makes» 2 log(n=m) o more tha log(mif(m=b); p Mg) +1 passes through the data. It has bee show that whe D is large, LMM performs better tha the disk-striped merge sort (DSM) algorithm that is used i practice. A iterestig questio is if we ca perform selectio o the PDS i time better tha sortig time. This paper aswers this questio i the affirmative. I Sectio 2 2

3 we itroduce the PDS model. I Sectios 3 ad 4 we preset our radomized ad determiistic algorithms, respectively. Sectio 5 cocludes the paper. 2 Parallel Disk Systems Several models for parallel disks have bee ivestigated i the literature. The model employed i this paper is the oe itroduced i oe of the pioeerig papers of Vitter ad Shriver [20]. I this model there are D distict ad idepedet disk drives. The disks ca simultaeously trasmit a block of data. A block cosists of B records. If M is the iteral memory size, the oe usually requires that M 2. For the algorithms preseted i this paper, achoice of M =3 suffices. Of this, amout of memory is used to prefetch data i order to overlap computatio ad data access. From hereo, we use M to deote. The problem of disk sortig was first studied by Aggarwal ad Vitter i their foudatioal paper [5]. I the model they cosidered, each I/O operatio results i the trasfer of D blocks each block havig B records. A more realistic model was evisioed i [20]. Several asymptotically optimal algorithms have bee give for sortig o this model. Nodie ad Vitter's optimal algorithm [13] ivolves solvig certai matchig problems. Aggarwal ad Plaxto's optimal algorithm [4] is based o the Sharesort algorithm of Cypher ad Plaxto. Vitter ad Shriver gave a optimal radomized algorithm for disk sortig [20]. All these results are highly otrivial ad theoretically iterestig. However, the uderlyig costats i their time bouds are high. I practice the simple disk-striped mergesort (DSM) is used [6], eve though it is ot asymptotically optimal. DSM has the advatages of simplicity ad a small costat. Data accesses made by DSM is such thatatay I/O operatio, the same portios of the D disks are accessed. This has the effect of havig a sigle disk which ca trasfer records i a sigle I/O operatio. A M -way mergesort is employed by this algorithm. To start with, iitial rus are formed i oe pass through the data. At the ed the M disk has N=M rus each of legth M. Next, rus are merged at a time. Blocks of ay ru are uiformly striped across the disks so that i future they ca be accessed i parallel utilizig the full badwidth. Each phase of mergig ivolves oe pass through 3

4 the data. There are DSM is log(n=m) log(m=) by the algorithm is N log(n=m) log(m=) phases ad hece the total umber of passes made by. I other words, the total umber of I/O read operatios performed. The costat here is just log(n=m) log(m=) The kow lower boud o the umber of passes for parallel disk sortig is Ω log(n=m) log(m=b) If oe assumes that N is a polyomial i M ad that B is small (which are readily satisfied i practice), the lower boud simply yields Ω(1) passes. All the above metioed optimal algorithms make oly O(1) passes. So, the challege i the desig of parallel disk sortig algorithms is i reducig this costat. If M =2, the umber of passes made by DSM is 1 + log(n=m), which ideed ca be very high. Recetly, several works have bee doe that deal with the practical aspects. Pai, Schaffer, ad Varma [14] aalyzed the average case performace of a simple mergig algorithm, employig a approximate model of average case iputs. Barve, Grove, ad Vitter [6] have preseted a simple radomized algorithm (SRM) ad aalyzed its performace. The aalysis ivolves the solutio of certai occupacy problems. The expected umber Read SRM of I/O read operatios made by their algorithm is such that Read SRM» N + N log(n=m) log kd ψ log D log log log D 1+ k log log D log log D + 1+logk log log D + O(1) The algorithm merges R = kd rus at a time, for some iteger k. Whe R =Ω(Dlog D), the expected performace of their algorithm is optimal. However, i this case, the iteral memory eeded is Ω(BD log D). They have also compared SRM with DSM through simulatios ad show that SRM performs better tha DSM. Recetly, Rajasekara [15] has preseted a algorithm (called (l; m)-merge sort (LMM)) which is asymptotically optimal uder the assumptios that N is a polyomial i M ad B is small. The algorithm is as simple as DSM. LMM makes less umber of passes through the data tha DSM whe D is large. The selectio algorithms to be preseted are as simple as the DSM. Data accesses are such that i ay I/O operatio, the same portios of the disks are accessed. Alive keys (i.e., keys that have ot yet bee elimiated) i ay stage are uiformly striped across the disks.! (1). 4

5 3 A Radomized Selectio Algorithm I this sectio we preset a radomized selectio algorithm for the PDS. The umber of I/O read operatios made by the algorithm is O N with high probability. Almost all the selectio algorithms proposed i the literature, be they determiistic or radomized, sequetial or parallel, are based o samplig. For example, Floyd ad Rivest's radomized algorithm [9] is based o radom samplig. The algorithm cosists of the followig steps. 1) Select a radom sample S of s elemets from the iput set X; 2) Sort the sample S ad fid two elemets `1 ad `2 from S such that the ith smallest elemet of X will have a value i betwee `1 ad `2 ad also the umber of keys from X that have a value i betwee `1 ad `2 is 'small'; 3) Elimiate keys of X that do ot have avalue i the rage [`1;`2]; ad4)perform a appropriate selectio i the set of remaiig keys. Samplig techiques have bee repeatedly used to develop selectio algorithms for a variety of parallel models of computig. Though these algorithms employ samplig as a commo theme, they have model-depedet iovatios ad employ additioal techiques. Our radomized algorithm is also based o the above theme. A Samplig Lemma. Let Y be a sequece of umbers from a liear order ad let S = fk 1 ;k 2 ;:::;k s g be a radom sample from Y. Also let k 0 1 ;k0 2 ;:::;k0 s be the sorted order of this sample. If r i is the rak of k 0 i i Y, the followig lemma provides a high probability cofidece iterval for r i. (The rak of ay elemet k i Y is oe plus the umber of elemets <ki Y.) Lemma 3.1 For every ff>0, Prob jr i i s j > p 3ff p s p log < ff. A proofoftheabove lemma ca be foud i [17]. We say a radomized algorithm uses e O(g()) amout of ay resource (like time, space, etc.) if there exists a costat c such that the amout of resource used is o more tha cffg() with probability 1 ff o ay iput of legth ad for ay fixed ff (see e.g., [10]). Similar defiitios apply to eo(g()) ad other such `asymptotic' fuctios. 5

6 By high probability we mea a probability of 1 ff for ay fixedff 1( beig the iput size of the problem at had). Let B(; p) deote a biomial radom variable with parameters ad p. Oe of the most frequetly used facts i aalyzig radomized algorithms is Cheroff bouds. These bouds provide close approximatios to the probabilities i the tail eds of a biomial distributio. Let X stad for the umber of heads i idepedet flips of a coi, the probability of a head i a sigle flip beig p. X is also kow to have a biomial distributio B(; p). The followig three facts (kow as Cheroff bouds) will be used i the paper (ad were discovered by Cheroff [3] ad Aglui & Valiat [1]): for ay 0 <ffl<1, ad m>p. Prob [X m]» p m m e m p ; Prob [X (1 + ffl)p]» exp( ffl 2 p=3); ad Prob [X» (1 ffl)p]» exp( ffl 2 p=2); Now we are ready to describe our algorithm. Let N = M c. I practice c ca be assumed to be a costat. I today's PC market, M is of the order of megabytes ad the disk space is of the order of gigabytes. So it is perhaps safe to assume that c is o more tha 3. To begi with each key is alive ad = N. Algorithm RSelect Iput is a sequece of N keys ad the output is the ith smallest key of the sequece. = N. repeat Step 1. Let be the umber of alive keys. If» M the goto Step 6. Each alivekey is icluded i the sample S with probability M 2. The expected umber of sample keys is M. We ca show that the actual umber of keys 2 i S is M + eo(m). Cout the umber s of sample keys. 2 Step 2. Sort S ad pick two keys `1 ad `2 from S whose raks i S are i s ffi ad i s + ffi, respectively, for ffi p 3ffs log, for ay fixed ff 1. 6

7 forever Step 3. Compute the umber 1 of alive keys that are less tha `1 ad the umber 2 of alive keys that have avalue i the rage [`1;`2]. Step 4. If i< 1,ori> 1 + 2, or 2 > M 0:4, goto Step 1. Step 5. Ay alive key whose value lies outside the rage [`1;`2] dies. Set i = i 1 ad = 2. Step 6. Sort the alive keys ad output the ith smallest key. Aalysis. I Step 1, the umber of sample keys has a biomial distributio B(; M 2 ). A applicatio of Cheroff bouds shows that s = M + eo(m). Also Step 1 takes O( 2 ) I/O read operatios. Sice S is kept i the iteral memory, Step 2doesot ivolve ay I/O operatios. I Step 3, a applicatio of Lemma 3.1 implies that the umber 2 of keys survivig Step 5 is O e ps p log = O e M. As a result it follows that, the umber of iteratios 0:4 of the repeat loop is O(c). e I Step 4, we ca show that the probability ofexecutig the goto statemet is very small. Step 5 ivolves O( ) I/O read operatios. Note that the umber of survivig keys from oe iteratio of the repeat loop to the ext decreases by a factor of M 0:4 with high probability. Thus it follows that the total umber of I/O read operatios made by the etire algorithm is e O N. Thus we get the followig Theorem. Theorem 3.1 Selectio from out of N keys ca be performed o the PDS usig O e N I/O read operatios provided that N = M c for some costat c. 2 4 A Determiistic Selectio Algorithm I this sectio we preset our determiistic selectio algorithm for the PDS. The umber of I/O read operatios performed by the algorithm is O N. The uderlyig costat is small ad hece this algorithm has the potetial of beig practical. 7

8 Samplig has also domiated as a techique useful i the desig of determiistic selectio algorithms. For example, Blum et al.'s algorithm [7] partitios the iput such that there are 5 elemets i each part, fids the media of each part, fids the media M of these medias, splits the iput ito two groups (those that are» M ad those that are greater tha M), idetifies the group that has the key to be selected, ad fially performs a selectio i the group that cotais the key to be selected. The medias of the 5-elemet parts ca be thought of as a sample of the iput keys ad hece the media M of these medias ca be expected to be a approximate media of the iput keys. Cosider a collectio X of keys ad cosider the problem of fidig the ith smallest key of X. We use the followig strategy to idetify two elemets of X such that they will bracket the ith smallest elemet of X ad also the umber of keys of X that have avalue i betwee these two keys is ot large. Partitio the collectio X = R 0 such that there are M keys i each part. Sort each part. From each part retai those keys that are at a distace of p M from each other. That is, keep the keys whose raks are p M;2 p M;3 p M;:::. Thus the umber of keys i the retaied set R 1 is p M. Now group the elemets of R 1 such that there are M elemets i each part, sort each part, ad retai oly every p Mth elemet i each part. Call the retaied set R 2. Proceed to obtai R i 's i a similar fashio (for i 3) util we reach a stage whe jr j j»m. If = M c, the clearly, j =2c 2. This process ca be represeted by a tree of degree p M. Each leaf has M iput elemets. All the elemets i the leaves costitute R 0. The root has R j. Let the root be i level j. Let its childre be i level j 1, ad so o. The leaves are at level 0. There are p M childre to the root. Each suchchild has M elemets. p M elemets are passed o from each child to its paret. I geeral each ode i the tree has M elemets. p M elemets from out of these will go to its paret. Each ode p M childre. PickfromR j two elemets `1 ad `2 whose raks are i jr j j ffi ad i jr jj +ffi, respectively. Without loss of geerality assume that jr j j = M. The, jr i j = M( p M) j i. Cosider a elemet x whose rak i R j is q. The the rak of q i R j 1 will be i the rage [q p M;q p M + p M( p M 1)]. This rak is also i the iterval [q p M;q p M + M]. I.e., there is a ucertaity ofm i the rak of x i R j 1. Each child of the root cotributes 8

9 p M 1 ß p M to this ucertaity. I geeral the ucertaity i the rak of x i Ri is cotributed to by each ode i level i. Note that there are M (j i)=2 odes at level i. Each such ode cotributes p M 1 to the ucertaity. Thus, if U(i) is the maximum possible rak of x i R i, the U(i) satisfies: p U(i)» M U(i +1)+M (j i+1)=2 which solves to U(i)» M (j i)=2 U(j) +(j i)m (j i+1)=2. Whe i = 0, we get U(0)» M j=2 U(j)+jM (j+1)=2. I other words, U(0)» qm c 1 +(2c 2) p M where c = log log M. As a result, if we pick ffi to be (2c 2+ffl) p M, for ay ffl>0, the rak of `1 i R 0 will be i the iterval " i (2c 2+ffl) p ;i ffl # p M M Also, the rak of `2 i R 0 willlieitheiterval " i +(2c 2+ffl) p ;i+(4c 4+ffl) # p M M Puttig together, we realize that the ith smallest elemet ofr 0 will have a value i the iterval [`1;`2] ad also the umber of keys of R 0 that have a value i the iterval [`1;`2] isomore tha (6c 6+2ffl) p M. Call the above process of startig from R 0 ad obtaiig R 1 ;R 2 ;:::;R j a stage of samplig. Note also that the umber of I/O read operatios eeded for a stage is O where jr 0 j =. Oe could see that a stage of samplig correspods to oe iteratio of the repeat loop of RSelect. Similar samplig techiques have bee employed by Muro ad Paterso [12]. Now we preset a detailed descriptio of our algorithm. Let K = k 1 ;k 2 ;:::;k N be the iput. Say we are iterested i fidig the ith smallest key. To begi with each key is alive ad = N. 9

10 Algorithm DSelect Iput is a sequece of N keys ad the output is the ith smallest key of the sequece. = N. repeat forever Step 1. If» M goto Step 3. Perform a stage of samplig i the collectio of alive keys. As a result, obtai two keys `1 ad `2 that will bracket the key to be selected. Step 2. Sca through the alive keys ad kill the keys that have a value outside the rage [`1;`2]. Cout theumber of keys survivig this step. Let this umber be. Step 3. Sort the alive keys ad output the ith smallest elemet. Aalysis. Clearly, theumberofalivekeys reduces by a factor of Ω p M log M log from oe iteratio to the ext of the repeat loop. Therefore, if N = M c, the umber of iteratios of the repeat loop is O(c). Also, the umber of I/O read operatios eeded i ay iteratio of the repeat loop is O as has bee discussed before. Sice the umber of alive keys decreases by a factor of Ω p M log M log from oe iteratio to the ext, the total umber of I/O read operatios is oly O N. We arrive atthefollowig Theorem. Theorem 4.1 We ca perform selectio from out of N give keys o the PDS usig O N I/O read operatios whe N = M c for some costat c. 2 5 Coclusios We have preseted two selectio algorithms for the PDS. Both are asymptotically optimal. The uderlyig costats i the time bouds are small ad hece the algorithms have the potetial of beig practical. 10

11 Refereces [1] D. Aglui ad L. G. Valiat, Fast Probabilistic Algorithms for Hamiltoia Paths ad Matchigs, Joural of Computer ad System Scieces 18, 1979, pp [2] S. Chaudhari, T. Hagerup, ad R. Rama, Approximate ad Exact Determiistic Parallel Selectio, Proc. 18th Aual Symposium o Mathematical Foudatios of Computer Sciece, [3] H. Cheroff, A Measure of Asymptotic Efficiecy for Tests of a Hypothesis Based o the Sum of Observatios, Aals of Mathematical Statistics 23, 1952, pp [4] A. Aggarwal ad C. G. Plaxto, Optimal Parallel Sortig i Multi-Level Storage, Proc. Fifth Aual ACM Symposium o Discrete Algorithms, 1994, pp [5] A. Aggarwal ad J. S. Vitter, The Iput/Output Complexity of Sortig ad Related Problems, Commuicatios of the ACM, 1988, 31(9): [6] R. Barve, E. F. Grove, ad J. S. Vitter, Simple Radomized Mergesort o Parallel Disks, Techical Report CS , Departmet of Computer Sciece, Duke Uiversity, October [7] M. Blum, R. W. Floyd, V. Pratt, R. L. Rivest, R. E. Tarja, Time Bouds for Selectio, Joural of Computer ad System Scieces 7, 1973, pp [8] R. Cole, A Optimally Efficiet Selectio Algorithm, Iformatio Processig Letters 26, 1988, pp [9] R. W. Floyd ad R. L. Rivest, Expected Time Bouds for Selectio, Commuicatios of the ACM 18(3), 1975, pp [10] E. Horowitz, S. Sahi, ad S. Rajasekara, Computer Algorithms, W. H. Freema Press, [11] J. J'a Já, Parallel Algorithms: Desig ad Aalysis, Addiso-Wesley Publishers,

12 [12] J. I. Muro ad M. S. Paterso, Selectio ad Sortig with Limited Storage, Theoretical Computer Sciece 12, 1980, pp [13] M. H. Nodie, J. S. Vitter, Large Scale Sortig i Parallel Memories, Proc. Third Aual ACM Symposium o Parallel Algorithms ad Architectures, 1990, pp [14] V. S. Pai, A. A. Schaffer, ad P. J. Varma, Markov Aalysis of Multiple-Disk Prefetchig Strategies for Exteral Mergig, Theoretical Computer Sciece, 1994, 128(2): [15] S. Rajasekara, A Framework For Simple Sortig Algorithms O Parallel Disk Systems, Proc. 10th Aual ACM Symposium o Parallel Algorithms ad Architectures, [16] S. Rajasekara, Sortig ad Selectio o Itercoectio Networks, DIMACS Series i Discrete Mathematics ad Theoretical Computer Sciece 21, 1995, pp [17] S. Rajasekara ad J.H. Reif, Derivatio of Radomized Sortig ad Selectio Algorithms, i Parallel Algorithm Derivatio ad Program Trasformatio, Edited by R. Paige, J.H. Reif, ad R. Wachter, Kluwer Academic Publishers, 1993, pp [18] S. Rajasekara ad S. Se, Radom Samplig Techiques ad Parallel Algorithms Desig, i Sythesis of Parallel Algorithms, edited by J. H. Reif, Morga-Kaufma Publishers, 1993, pp [19] R. Reischuk, Probabilistic Parallel Algorithms for Sortig ad Selectio, SIAM Joural of Computig, 1985, 14(2): [20] J. S. Vitter ad E. A. M. Shriver, Algorithms for Parallel Memory I: Two-Level Memories, Algorithmica, 1994, 12(2-3):

Lecture 5. Counting Sort / Radix Sort

Lecture 5. Counting Sort / Radix Sort Lecture 5. Coutig Sort / Radix Sort T. H. Corme, C. E. Leiserso ad R. L. Rivest Itroductio to Algorithms, 3rd Editio, MIT Press, 2009 Sugkyukwa Uiversity Hyuseug Choo choo@skku.edu Copyright 2000-2018

More information

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8) CIS 11 Data Structures ad Algorithms with Java Fall 017 Big-Oh Notatio Tuesday, September 5 (Make-up Friday, September 8) Learig Goals Review Big-Oh ad lear big/small omega/theta otatios Practice solvig

More information

Improved Random Graph Isomorphism

Improved Random Graph Isomorphism Improved Radom Graph Isomorphism Tomek Czajka Gopal Paduraga Abstract Caoical labelig of a graph cosists of assigig a uique label to each vertex such that the labels are ivariat uder isomorphism. Such

More information

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 201 Heaps 201 Goodrich ad Tamassia xkcd. http://xkcd.com/83/. Tree. Used with permissio uder

More information

Sorting in Linear Time. Data Structures and Algorithms Andrei Bulatov

Sorting in Linear Time. Data Structures and Algorithms Andrei Bulatov Sortig i Liear Time Data Structures ad Algorithms Adrei Bulatov Algorithms Sortig i Liear Time 7-2 Compariso Sorts The oly test that all the algorithms we have cosidered so far is compariso The oly iformatio

More information

1 Graph Sparsfication

1 Graph Sparsfication CME 305: Discrete Mathematics ad Algorithms 1 Graph Sparsficatio I this sectio we discuss the approximatio of a graph G(V, E) by a sparse graph H(V, F ) o the same vertex set. I particular, we cosider

More information

Lower Bounds for Sorting

Lower Bounds for Sorting Liear Sortig Topics Covered: Lower Bouds for Sortig Coutig Sort Radix Sort Bucket Sort Lower Bouds for Sortig Compariso vs. o-compariso sortig Decisio tree model Worst case lower boud Compariso Sortig

More information

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis Itro to Algorithm Aalysis Aalysis Metrics Slides. Table of Cotets. Aalysis Metrics 3. Exact Aalysis Rules 4. Simple Summatio 5. Summatio Formulas 6. Order of Magitude 7. Big-O otatio 8. Big-O Theorems

More information

An Efficient Algorithm for Graph Bisection of Triangularizations

An Efficient Algorithm for Graph Bisection of Triangularizations A Efficiet Algorithm for Graph Bisectio of Triagularizatios Gerold Jäger Departmet of Computer Sciece Washigto Uiversity Campus Box 1045 Oe Brookigs Drive St. Louis, Missouri 63130-4899, USA jaegerg@cse.wustl.edu

More information

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured

More information

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs What are we goig to lear? CSC316-003 Data Structures Aalysis of Algorithms Computer Sciece North Carolia State Uiversity Need to say that some algorithms are better tha others Criteria for evaluatio Structure

More information

Chapter 24. Sorting. Objectives. 1. To study and analyze time efficiency of various sorting algorithms

Chapter 24. Sorting. Objectives. 1. To study and analyze time efficiency of various sorting algorithms Chapter 4 Sortig 1 Objectives 1. o study ad aalyze time efficiecy of various sortig algorithms 4. 4.7.. o desig, implemet, ad aalyze bubble sort 4.. 3. o desig, implemet, ad aalyze merge sort 4.3. 4. o

More information

Combination Labelings Of Graphs

Combination Labelings Of Graphs Applied Mathematics E-Notes, (0), - c ISSN 0-0 Available free at mirror sites of http://wwwmaththuedutw/ame/ Combiatio Labeligs Of Graphs Pak Chig Li y Received February 0 Abstract Suppose G = (V; E) is

More information

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19 CIS Data Structures ad Algorithms with Java Sprig 09 Stacks, Queues, ad Heaps Moday, February 8 / Tuesday, February 9 Stacks ad Queues Recall the stack ad queue ADTs (abstract data types from lecture.

More information

Data Structures and Algorithms. Analysis of Algorithms

Data Structures and Algorithms. Analysis of Algorithms Data Structures ad Algorithms Aalysis of Algorithms Outlie Ruig time Pseudo-code Big-oh otatio Big-theta otatio Big-omega otatio Asymptotic algorithm aalysis Aalysis of Algorithms Iput Algorithm Output

More information

Ones Assignment Method for Solving Traveling Salesman Problem

Ones Assignment Method for Solving Traveling Salesman Problem Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:

More information

Analysis of Algorithms

Analysis of Algorithms Aalysis of Algorithms Ruig Time of a algorithm Ruig Time Upper Bouds Lower Bouds Examples Mathematical facts Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite

More information

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments Ruig Time ( 3.1) Aalysis of Algorithms Iput Algorithm Output A algorithm is a step- by- step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.

More information

Analysis of Algorithms

Analysis of Algorithms Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Ruig Time Most algorithms trasform iput objects ito output objects. The

More information

An Efficient Algorithm for Graph Bisection of Triangularizations

An Efficient Algorithm for Graph Bisection of Triangularizations Applied Mathematical Scieces, Vol. 1, 2007, o. 25, 1203-1215 A Efficiet Algorithm for Graph Bisectio of Triagularizatios Gerold Jäger Departmet of Computer Sciece Washigto Uiversity Campus Box 1045, Oe

More information

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments Ruig Time Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects. The

More information

Major CSL Write your name and entry no on every sheet of the answer script. Time 2 Hrs Max Marks 70

Major CSL Write your name and entry no on every sheet of the answer script. Time 2 Hrs Max Marks 70 NOTE:. Attempt all seve questios. Major CSL 02 2. Write your ame ad etry o o every sheet of the aswer script. Time 2 Hrs Max Marks 70 Q No Q Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Total MM 6 2 4 0 8 4 6 70 Q. Write a

More information

2. ALGORITHM ANALYSIS

2. ALGORITHM ANALYSIS 2. ALGORITHM ANALYSIS computatioal tractability survey of commo ruig times 2. ALGORITHM ANALYSIS computatioal tractability survey of commo ruig times Lecture slides by Kevi Waye Copyright 2005 Pearso-Addiso

More information

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13 CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis

More information

Outline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis

Outline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis Outlie ad Readig Aalysis of Algorithms Iput Algorithm Output Ruig time ( 3.) Pseudo-code ( 3.2) Coutig primitive operatios ( 3.3-3.) Asymptotic otatio ( 3.6) Asymptotic aalysis ( 3.7) Case study Aalysis

More information

FREQUENCY ESTIMATION OF INTERNET PACKET STREAMS WITH LIMITED SPACE: UPPER AND LOWER BOUNDS

FREQUENCY ESTIMATION OF INTERNET PACKET STREAMS WITH LIMITED SPACE: UPPER AND LOWER BOUNDS FREQUENCY ESTIMATION OF INTERNET PACKET STREAMS WITH LIMITED SPACE: UPPER AND LOWER BOUNDS Prosejit Bose Evagelos Kraakis Pat Mori Yihui Tag School of Computer Sciece, Carleto Uiversity {jit,kraakis,mori,y

More information

6.854J / J Advanced Algorithms Fall 2008

6.854J / J Advanced Algorithms Fall 2008 MIT OpeCourseWare http://ocw.mit.edu 6.854J / 18.415J Advaced Algorithms Fall 2008 For iformatio about citig these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advaced Algorithms

More information

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:

More information

Big-O Analysis. Asymptotics

Big-O Analysis. Asymptotics Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses

More information

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis

More information

A Parallel DFA Minimization Algorithm

A Parallel DFA Minimization Algorithm A Parallel DFA Miimizatio Algorithm Ambuj Tewari, Utkarsh Srivastava, ad P. Gupta Departmet of Computer Sciece & Egieerig Idia Istitute of Techology Kapur Kapur 208 016,INDIA pg@iitk.ac.i Abstract. I this

More information

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method A ew Morphological 3D Shape Decompositio: Grayscale Iterframe Iterpolatio Method D.. Vizireau Politehica Uiversity Bucharest, Romaia ae@comm.pub.ro R. M. Udrea Politehica Uiversity Bucharest, Romaia mihea@comm.pub.ro

More information

Counting the Number of Minimum Roman Dominating Functions of a Graph

Counting the Number of Minimum Roman Dominating Functions of a Graph Coutig the Number of Miimum Roma Domiatig Fuctios of a Graph SHI ZHENG ad KOH KHEE MENG, Natioal Uiversity of Sigapore We provide two algorithms coutig the umber of miimum Roma domiatig fuctios of a graph

More information

A NOTE ON COARSE GRAINED PARALLEL INTEGER SORTING

A NOTE ON COARSE GRAINED PARALLEL INTEGER SORTING Chater 26 A NOTE ON COARSE GRAINED PARALLEL INTEGER SORTING A. Cha ad F. Dehe School of Comuter Sciece Carleto Uiversity Ottawa, Caada K1S 5B6 æ {acha,dehe}@scs.carleto.ca Abstract Keywords: We observe

More information

Algorithm. Counting Sort Analysis of Algorithms

Algorithm. Counting Sort Analysis of Algorithms Algorithm Coutig Sort Aalysis of Algorithms Assumptios: records Coutig sort Each record cotais keys ad data All keys are i the rage of 1 to k Space The usorted list is stored i A, the sorted list will

More information

Massachusetts Institute of Technology Lecture : Theory of Parallel Systems Feb. 25, Lecture 6: List contraction, tree contraction, and

Massachusetts Institute of Technology Lecture : Theory of Parallel Systems Feb. 25, Lecture 6: List contraction, tree contraction, and Massachusetts Istitute of Techology Lecture.89: Theory of Parallel Systems Feb. 5, 997 Professor Charles E. Leiserso Scribe: Guag-Ie Cheg Lecture : List cotractio, tree cotractio, ad symmetry breakig Work-eciet

More information

Algorithm Design Techniques. Divide and conquer Problem

Algorithm Design Techniques. Divide and conquer Problem Algorithm Desig Techiques Divide ad coquer Problem Divide ad Coquer Algorithms Divide ad Coquer algorithm desig works o the priciple of dividig the give problem ito smaller sub problems which are similar

More information

How do we evaluate algorithms?

How do we evaluate algorithms? F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:

More information

CS 683: Advanced Design and Analysis of Algorithms

CS 683: Advanced Design and Analysis of Algorithms CS 683: Advaced Desig ad Aalysis of Algorithms Lecture 6, February 1, 2008 Lecturer: Joh Hopcroft Scribes: Shaomei Wu, Etha Feldma February 7, 2008 1 Threshold for k CNF Satisfiability I the previous lecture,

More information

Lecture 1: Introduction and Strassen s Algorithm

Lecture 1: Introduction and Strassen s Algorithm 5-750: Graduate Algorithms Jauary 7, 08 Lecture : Itroductio ad Strasse s Algorithm Lecturer: Gary Miller Scribe: Robert Parker Itroductio Machie models I this class, we will primarily use the Radom Access

More information

On Nonblocking Folded-Clos Networks in Computer Communication Environments

On Nonblocking Folded-Clos Networks in Computer Communication Environments O Noblockig Folded-Clos Networks i Computer Commuicatio Eviromets Xi Yua Departmet of Computer Sciece, Florida State Uiversity, Tallahassee, FL 3306 xyua@cs.fsu.edu Abstract Folded-Clos etworks, also referred

More information

why study sorting? Sorting is a classic subject in computer science. There are three reasons for studying sorting algorithms.

why study sorting? Sorting is a classic subject in computer science. There are three reasons for studying sorting algorithms. Chapter 5 Sortig IST311 - CIS65/506 Clevelad State Uiversity Prof. Victor Matos Adapted from: Itroductio to Java Programmig: Comprehesive Versio, Eighth Editio by Y. Daiel Liag why study sortig? Sortig

More information

Examples and Applications of Binary Search

Examples and Applications of Binary Search Toy Gog ITEE Uiersity of Queeslad I the secod lecture last week we studied the biary search algorithm that soles the problem of determiig if a particular alue appears i a sorted list of iteger or ot. We

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies

More information

arxiv: v2 [cs.ds] 24 Mar 2018

arxiv: v2 [cs.ds] 24 Mar 2018 Similar Elemets ad Metric Labelig o Complete Graphs arxiv:1803.08037v [cs.ds] 4 Mar 018 Pedro F. Felzeszwalb Brow Uiversity Providece, RI, USA pff@brow.edu March 8, 018 We cosider a problem that ivolves

More information

On (K t e)-saturated Graphs

On (K t e)-saturated Graphs Noame mauscript No. (will be iserted by the editor O (K t e-saturated Graphs Jessica Fuller Roald J. Gould the date of receipt ad acceptace should be iserted later Abstract Give a graph H, we say a graph

More information

New Results on Energy of Graphs of Small Order

New Results on Energy of Graphs of Small Order Global Joural of Pure ad Applied Mathematics. ISSN 0973-1768 Volume 13, Number 7 (2017), pp. 2837-2848 Research Idia Publicatios http://www.ripublicatio.com New Results o Eergy of Graphs of Small Order

More information

Protected points in ordered trees

Protected points in ordered trees Applied Mathematics Letters 008 56 50 www.elsevier.com/locate/aml Protected poits i ordered trees Gi-Sag Cheo a, Louis W. Shapiro b, a Departmet of Mathematics, Sugkyukwa Uiversity, Suwo 440-746, Republic

More information

Lecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein

Lecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein 068.670 Subliear Time Algorithms November, 0 Lecture 6 Lecturer: Roitt Rubifeld Scribes: Che Ziv, Eliav Buchik, Ophir Arie, Joatha Gradstei Lesso overview. Usig the oracle reductio framework for approximatig

More information

LU Decomposition Method

LU Decomposition Method SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS LU Decompositio Method Jamie Traha, Autar Kaw, Kevi Marti Uiversity of South Florida Uited States of America kaw@eg.usf.edu http://umericalmethods.eg.usf.edu Itroductio

More information

Perhaps the method will give that for every e > U f() > p - 3/+e There is o o-trivial upper boud for f() ad ot eve f() < Z - e. seems to be kow, where

Perhaps the method will give that for every e > U f() > p - 3/+e There is o o-trivial upper boud for f() ad ot eve f() < Z - e. seems to be kow, where ON MAXIMUM CHORDAL SUBGRAPH * Paul Erdos Mathematical Istitute of the Hugaria Academy of Scieces ad Reu Laskar Clemso Uiversity 1. Let G() deote a udirected graph, with vertices ad V(G) deote the vertex

More information

Data Structures Week #9. Sorting

Data Structures Week #9. Sorting Data Structures Week #9 Sortig Outlie Motivatio Types of Sortig Elemetary (O( 2 )) Sortig Techiques Other (O(*log())) Sortig Techiques 21.Aralık.2010 Boraha Tümer, Ph.D. 2 Sortig 21.Aralık.2010 Boraha

More information

A graphical view of big-o notation. c*g(n) f(n) f(n) = O(g(n))

A graphical view of big-o notation. c*g(n) f(n) f(n) = O(g(n)) ca see that time required to search/sort grows with size of We How do space/time eeds of program grow with iput size? iput. time: cout umber of operatios as fuctio of iput Executio size operatio Assigmet:

More information

Random Graphs and Complex Networks T

Random Graphs and Complex Networks T Radom Graphs ad Complex Networks T-79.7003 Charalampos E. Tsourakakis Aalto Uiversity Lecture 3 7 September 013 Aoucemet Homework 1 is out, due i two weeks from ow. Exercises: Probabilistic iequalities

More information

On Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract

On Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract O Ifiite Groups that are Isomorphic to its Proper Ifiite Subgroup Jaymar Talledo Baliho Abstract Two groups are isomorphic if there exists a isomorphism betwee them Lagrage Theorem states that the order

More information

1.2 Binomial Coefficients and Subsets

1.2 Binomial Coefficients and Subsets 1.2. BINOMIAL COEFFICIENTS AND SUBSETS 13 1.2 Biomial Coefficiets ad Subsets 1.2-1 The loop below is part of a program to determie the umber of triagles formed by poits i the plae. for i =1 to for j =

More information

Big-O Analysis. Asymptotics

Big-O Analysis. Asymptotics Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses

More information

3D Model Retrieval Method Based on Sample Prediction

3D Model Retrieval Method Based on Sample Prediction 20 Iteratioal Coferece o Computer Commuicatio ad Maagemet Proc.of CSIT vol.5 (20) (20) IACSIT Press, Sigapore 3D Model Retrieval Method Based o Sample Predictio Qigche Zhag, Ya Tag* School of Computer

More information

A Study on the Performance of Cholesky-Factorization using MPI

A Study on the Performance of Cholesky-Factorization using MPI A Study o the Performace of Cholesky-Factorizatio usig MPI Ha S. Kim Scott B. Bade Departmet of Computer Sciece ad Egieerig Uiversity of Califoria Sa Diego {hskim, bade}@cs.ucsd.edu Abstract Cholesky-factorizatio

More information

A Generalized Set Theoretic Approach for Time and Space Complexity Analysis of Algorithms and Functions

A Generalized Set Theoretic Approach for Time and Space Complexity Analysis of Algorithms and Functions Proceedigs of the 10th WSEAS Iteratioal Coferece o APPLIED MATHEMATICS, Dallas, Texas, USA, November 1-3, 2006 316 A Geeralized Set Theoretic Approach for Time ad Space Complexity Aalysis of Algorithms

More information

prerequisites: 6.046, 6.041/2, ability to do proofs Randomized algorithms: make random choices during run. Main benefits:

prerequisites: 6.046, 6.041/2, ability to do proofs Randomized algorithms: make random choices during run. Main benefits: Itro Admiistrivia. Sigup sheet. prerequisites: 6.046, 6.041/2, ability to do proofs homework weekly (first ext week) collaboratio idepedet homeworks gradig requiremet term project books. questio: scribig?

More information

CSE 417: Algorithms and Computational Complexity

CSE 417: Algorithms and Computational Complexity Time CSE 47: Algorithms ad Computatioal Readig assigmet Read Chapter of The ALGORITHM Desig Maual Aalysis & Sortig Autum 00 Paul Beame aalysis Problem size Worst-case complexity: max # steps algorithm

More information

Analysis of Algorithms

Analysis of Algorithms Presetatio for use with the textbook, Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Aalysis of Algorithms Iput 2015 Goodrich ad Tamassia Algorithm Aalysis of Algorithms

More information

quality/quantity peak time/ratio

quality/quantity peak time/ratio Semi-Heap ad Its Applicatios i Touramet Rakig Jie Wu Departmet of omputer Sciece ad Egieerig Florida Atlatic Uiversity oca Rato, FL 3343 jie@cse.fau.edu September, 00 . Itroductio ad Motivatio. relimiaries

More information

SORTING AND SELECTION ON PARALLEL DISK MODELS

SORTING AND SELECTION ON PARALLEL DISK MODELS Chapter 1 SORTING AND SELECTION ON PARALLEL DISK MODELS Sanguthevar Rajasekaran Department of CISE, Univ. of Florida raj@cise.ufl.edu Abstract Data explosion is an increasingly prevalent problem in every

More information

15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015

15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015 15-859E: Advaced Algorithms CMU, Sprig 2015 Lecture #2: Radomized MST ad MST Verificatio Jauary 14, 2015 Lecturer: Aupam Gupta Scribe: Yu Zhao 1 Prelimiaries I this lecture we are talkig about two cotets:

More information

. Written in factored form it is easy to see that the roots are 2, 2, i,

. Written in factored form it is easy to see that the roots are 2, 2, i, CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or

More information

6.851: Advanced Data Structures Spring Lecture 17 April 24

6.851: Advanced Data Structures Spring Lecture 17 April 24 6.851: Advaced Data Structures Sprig 2012 Prof. Erik Demaie Lecture 17 April 24 Scribes: David Bejami(2012), Li Fei(2012), Yuzhi Zheg(2012),Morteza Zadimoghaddam(2010), Aaro Berstei(2007) 1 Overview Up

More information

Pruning and Summarizing the Discovered Time Series Association Rules from Mechanical Sensor Data Qing YANG1,a,*, Shao-Yu WANG1,b, Ting-Ting ZHANG2,c

Pruning and Summarizing the Discovered Time Series Association Rules from Mechanical Sensor Data Qing YANG1,a,*, Shao-Yu WANG1,b, Ting-Ting ZHANG2,c Advaces i Egieerig Research (AER), volume 131 3rd Aual Iteratioal Coferece o Electroics, Electrical Egieerig ad Iformatio Sciece (EEEIS 2017) Pruig ad Summarizig the Discovered Time Series Associatio Rules

More information

Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers *

Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers * Load balaced Parallel Prime umber Geerator with Sieve of Eratosthees o luster omputers * Soowook Hwag*, Kyusik hug**, ad Dogseug Kim* *Departmet of Electrical Egieerig Korea Uiversity Seoul, -, Rep. of

More information

Mathematical Stat I: solutions of homework 1

Mathematical Stat I: solutions of homework 1 Mathematical Stat I: solutios of homework Name: Studet Id N:. Suppose we tur over cards simultaeously from two well shuffled decks of ordiary playig cards. We say we obtai a exact match o a particular

More information

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS) CSC165H1, Witer 018 Learig Objectives By the ed of this worksheet, you will: Aalyse the ruig time of fuctios cotaiig ested loops. 1. Nested loop variatios. Each of the followig fuctios takes as iput a

More information

Throughput-Delay Scaling in Wireless Networks with Constant-Size Packets

Throughput-Delay Scaling in Wireless Networks with Constant-Size Packets Throughput-Delay Scalig i Wireless Networks with Costat-Size Packets Abbas El Gamal, James Mamme, Balaji Prabhakar, Devavrat Shah Departmets of EE ad CS Staford Uiversity, CA 94305 Email: {abbas, jmamme,

More information

CIS 121. Introduction to Trees

CIS 121. Introduction to Trees CIS 121 Itroductio to Trees 1 Tree ADT Tree defiitio q A tree is a set of odes which may be empty q If ot empty, the there is a distiguished ode r, called root ad zero or more o-empty subtrees T 1, T 2,

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 19 Query Optimizatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Query optimizatio Coducted by a query optimizer i a DBMS Goal:

More information

BASED ON ITERATIVE ERROR-CORRECTION

BASED ON ITERATIVE ERROR-CORRECTION A COHPARISO OF CRYPTAALYTIC PRICIPLES BASED O ITERATIVE ERROR-CORRECTIO Miodrag J. MihaljeviC ad Jova Dj. GoliC Istitute of Applied Mathematics ad Electroics. Belgrade School of Electrical Egieerig. Uiversity

More information

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015. Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Hash Tables xkcd. http://xkcd.com/221/. Radom Number. Used with permissio uder Creative

More information

Parallel Polygon Approximation Algorithm Targeted at Reconfigurable Multi-Ring Hardware

Parallel Polygon Approximation Algorithm Targeted at Reconfigurable Multi-Ring Hardware Parallel Polygo Approximatio Algorithm Targeted at Recofigurable Multi-Rig Hardware M. Arif Wai* ad Hamid R. Arabia** *Califoria State Uiversity Bakersfield, Califoria, USA **Uiversity of Georgia, Georgia,

More information

Chapter 3 Classification of FFT Processor Algorithms

Chapter 3 Classification of FFT Processor Algorithms Chapter Classificatio of FFT Processor Algorithms The computatioal complexity of the Discrete Fourier trasform (DFT) is very high. It requires () 2 complex multiplicatios ad () complex additios [5]. As

More information

Lecture 2: Spectra of Graphs

Lecture 2: Spectra of Graphs Spectral Graph Theory ad Applicatios WS 20/202 Lecture 2: Spectra of Graphs Lecturer: Thomas Sauerwald & He Su Our goal is to use the properties of the adjacecy/laplacia matrix of graphs to first uderstad

More information

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem Exact Miimum Lower Boud Algorithm for Travelig Salesma Problem Mohamed Eleiche GeoTiba Systems mohamed.eleiche@gmail.com Abstract The miimum-travel-cost algorithm is a dyamic programmig algorithm to compute

More information

Civil Engineering Computation

Civil Engineering Computation Civil Egieerig Computatio Fidig Roots of No-Liear Equatios March 14, 1945 World War II The R.A.F. first operatioal use of the Grad Slam bomb, Bielefeld, Germay. Cotets 2 Root basics Excel solver Newto-Raphso

More information

Computational Geometry

Computational Geometry Computatioal Geometry Chapter 4 Liear programmig Duality Smallest eclosig disk O the Ageda Liear Programmig Slides courtesy of Craig Gotsma 4. 4. Liear Programmig - Example Defie: (amout amout cosumed

More information

Computer Science Foundation Exam. August 12, Computer Science. Section 1A. No Calculators! KEY. Solutions and Grading Criteria.

Computer Science Foundation Exam. August 12, Computer Science. Section 1A. No Calculators! KEY. Solutions and Grading Criteria. Computer Sciece Foudatio Exam August, 005 Computer Sciece Sectio A No Calculators! Name: SSN: KEY Solutios ad Gradig Criteria Score: 50 I this sectio of the exam, there are four (4) problems. You must

More information

EE123 Digital Signal Processing

EE123 Digital Signal Processing Last Time EE Digital Sigal Processig Lecture 7 Block Covolutio, Overlap ad Add, FFT Discrete Fourier Trasform Properties of the Liear covolutio through circular Today Liear covolutio with Overlap ad add

More information

Design and Analysis of Algorithms Notes

Design and Analysis of Algorithms Notes Desig ad Aalysis of Algorithms Notes Notes by Wist Course taught by Dr. K Amer Course started: Jauary 4, 013 Course eded: December 13, 01 Curret geeratio: December 18, 013 Listigs 1 Array sum pseudocode.................................

More information

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON Roberto Lopez ad Eugeio Oñate Iteratioal Ceter for Numerical Methods i Egieerig (CIMNE) Edificio C1, Gra Capitá s/, 08034 Barceloa, Spai ABSTRACT I this work

More information

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures Uiversity of Waterloo Departmet of Electrical ad Computer Egieerig ECE 250 Algorithms ad Data Structures Midterm Examiatio ( pages) Istructor: Douglas Harder February 7, 2004 7:30-9:00 Name (last, first)

More information

COMP Parallel Computing. PRAM (1): The PRAM model and complexity measures

COMP Parallel Computing. PRAM (1): The PRAM model and complexity measures COMP 633 - Parallel Computig Lecture 2 August 24, 2017 : The PRAM model ad complexity measures 1 First class summary This course is about parallel computig to achieve high-er performace o idividual problems

More information

The Counterchanged Crossed Cube Interconnection Network and Its Topology Properties

The Counterchanged Crossed Cube Interconnection Network and Its Topology Properties WSEAS TRANSACTIONS o COMMUNICATIONS Wag Xiyag The Couterchaged Crossed Cube Itercoectio Network ad Its Topology Properties WANG XINYANG School of Computer Sciece ad Egieerig South Chia Uiversity of Techology

More information

Creating Exact Bezier Representations of CST Shapes. David D. Marshall. California Polytechnic State University, San Luis Obispo, CA , USA

Creating Exact Bezier Representations of CST Shapes. David D. Marshall. California Polytechnic State University, San Luis Obispo, CA , USA Creatig Exact Bezier Represetatios of CST Shapes David D. Marshall Califoria Polytechic State Uiversity, Sa Luis Obispo, CA 93407-035, USA The paper presets a method of expressig CST shapes pioeered by

More information

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 1 Itroductio to Computers ad C++ Programmig Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 1.1 Computer Systems 1.2 Programmig ad Problem Solvig 1.3 Itroductio to C++ 1.4 Testig

More information

Homework 1 Solutions MA 522 Fall 2017

Homework 1 Solutions MA 522 Fall 2017 Homework 1 Solutios MA 5 Fall 017 1. Cosider the searchig problem: Iput A sequece of umbers A = [a 1,..., a ] ad a value v. Output A idex i such that v = A[i] or the special value NIL if v does ot appear

More information

Improving Information Retrieval System Security via an Optimal Maximal Coding Scheme

Improving Information Retrieval System Security via an Optimal Maximal Coding Scheme Improvig Iformatio Retrieval System Security via a Optimal Maximal Codig Scheme Dogyag Log Departmet of Computer Sciece, City Uiversity of Hog Kog, 8 Tat Chee Aveue Kowloo, Hog Kog SAR, PRC dylog@cs.cityu.edu.hk

More information

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions: CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists

More information

INTERSECTION CORDIAL LABELING OF GRAPHS

INTERSECTION CORDIAL LABELING OF GRAPHS INTERSECTION CORDIAL LABELING OF GRAPHS G Meea, K Nagaraja Departmet of Mathematics, PSR Egieerig College, Sivakasi- 66 4, Virudhuagar(Dist) Tamil Nadu, INDIA meeag9@yahoocoi Departmet of Mathematics,

More information

CS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1

CS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1 CS200: Hash Tables Prichard Ch. 13.2 CS200 - Hash Tables 1 Table Implemetatios: average cases Search Add Remove Sorted array-based Usorted array-based Balaced Search Trees O(log ) O() O() O() O(1) O()

More information

Bayesian approach to reliability modelling for a probability of failure on demand parameter

Bayesian approach to reliability modelling for a probability of failure on demand parameter Bayesia approach to reliability modellig for a probability of failure o demad parameter BÖRCSÖK J., SCHAEFER S. Departmet of Computer Architecture ad System Programmig Uiversity Kassel, Wilhelmshöher Allee

More information

CSE 2320 Notes 8: Sorting. (Last updated 10/3/18 7:16 PM) Idea: Take an unsorted (sub)array and partition into two subarrays such that.

CSE 2320 Notes 8: Sorting. (Last updated 10/3/18 7:16 PM) Idea: Take an unsorted (sub)array and partition into two subarrays such that. CSE Notes 8: Sortig (Last updated //8 7:6 PM) CLRS 7.-7., 9., 8.-8. 8.A. QUICKSORT Cocepts Idea: Take a usorted (sub)array ad partitio ito two subarrays such that p q r x y z x y y z Pivot Customarily,

More information