Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers *
|
|
- Lynn Glenn
- 5 years ago
- Views:
Transcription
1 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 Korea dkimku@korea.ac.kr **Departmet of omputer Egieerig & Ifo. Techology Soogsil Uiversity Seoul, -, Rep. of Korea kchug@soogsil.ac.kr Abstract Algorithms of fidig prime umbers up to some iteger by Sieve of Eratosthees are simple ad fast. However, eve with the time complexity o greater tha O( l l ), it may take weeks or eve years of PU time if is large like over digits. o kow shortcut was reported yet. We develop efficiet parallel algorithms to balace the workload of each computer, ad to exted mai memory with disk storage to accommodate Giga-bytes of data. Our experimets show that a complete set of up to -digit prime umbers ca be foud i a week of computig time (PU time) usig our.ghz Petium- Ps with Liux ad MPI library. Also, by sieve of Eratosthees, we thik it is very ulikely that we ca compute all primes up to 0 digits usig fastest computers i the world. Key words: prime umber, sieve of Eratosthees, load balacig, MPI, cluster computer. Itroductio Prime umbers gets people s attetio due to their importat role i data security usig ecryptio/ decryptio by public keys with such as RSA algorithm []. There are a lot of mathematical theories o prime, but the computatio cost of big prime umbers is usually huge eve with today s high performace computers. Sieve of Eratosthees (abbreviated by SOE later) [,] is a classic but straightforward way of fidig all primes i a give rage. Let s review the method. The sievig of umbers starts with a array A[:] whose iitial value is set to zero. Begiig with, which is the smallest prime, all multiples of the prime up to are marked to, i.e. A[]= A[]= = A[ k ]= = ( k is a iteger). ow, the ext smallest umarked iteger is used to mark its multiples i the same way; A[]= A[]= = A[ k ' ]= =. This procedure cotiues util we fid a ew smallest prime x such that x. The, all umarked itegers with A[ ]=0 are gathered. The algorithm seems serial i ature, sice prime umbers are foud oe by oe i a icreasig order, ad all primes lyig betwee X ad X ca be foud oly after we fid all prime umbers up to X. Let S deote the set that cotais all prime umbers from to Q to geerate primes up to, where Q is the greatest prime less tha or equal to. The prime umbers i S are called sievig primes. For simplicity let s assume that S is idexed i icreasig order. The, S =,,,, L, Q}. Let [X:Y] deote a iterval (or a rage) that cotais all the itegers betwee X ad Y iclusive. Sievig i the iterval is a process of markig all multiples of each sievig prime i the iterval, ad the collectig oly umarked umbers as prime. I the literature, there are a few sequetial algorithms of prime geeratio reported to reduce the * This research was supported by KOSEF Grat (R ) ad by Korea Uiversity Research Grat.
2 complexity close to O() [,,]. It is reported that the k-th prime is greater tha k (l k + l l k -) for k []. May big prime umbers are reported [,]. This paper presets a parallel prime geeratio method to exted the work of Bokahari [] with the combied (static ad dyamic) load balacig algorithm that we apply SOE oto distributed memory parallel computers (cluster) ad expad the rage of iteger beyod the mai memory capacity usig hard disk storage. We develop methods of partitioig the work load, ad devise the way of efficietly represetig ad storig big itegers. The proposed algorithms are expected to deliver the best performace if they provide eve distributio of the load to all computers. Void Iterate_Sievig(, M) Fid all sievig primes up to ; for (I=0; I < ; I++) /* = /M */ /* overs the array A[I*M+:(I+)*M] */ ) Read i workig prime set up to } ( I + )M from the disk; ) Mark A[ ] as that are multiple of the umber i workig prime set.; ) Write A[I*M+:(I+)*M] to disk;}. Load Model of Sieve of Eratosthees Let s fid the computatioal load for the work. The major computatioal load of sievig i the rage : is to mark (or write) o the array whose idex matches some multiple of sievig primes. The umber of write operatios for the multiple of the first prime is /. Similarly, it is / for the secod prime. Thus, L[ : ] = L+ =. This Q p S p load is bouded by l l + O() []. If a umber x is a multiple of some prime p, the remaider after a iteger divisio should be zero. If x is a multiple, the x + p, x + p, are also multiple. Thus, multiples ca the foud by additio istead of divisio, which saves the computatioal cost. It is kow that there are X/l X prime umbers [, ], thus, if we set X as a -digit umber, there are 0 prime umbers that easily exceed the 000 GB hard disk capacity to store if they are represeted i -bit format. To compute big itegers usig SOE, we firstly eed to overcome the limit of mai memory capacity. Oly M itegers are loaded o mai memory at a time ad sievig computatio is doe, where M is the capacity of mai memory. Thus, we have to repeat the markig at least /M times as show i Iterate_Sievig( ) below. We assume that the set of sievig prime is available before the iteratio, or it ca be computed very quickly. ost-wise, throughout the iteratios lie ) ad lie ) i Iterate_Sievig() eed O( l l ) ad O() time, respectively. However, the time complexity of the above algorithm icreases sice it has the term Ω ( / l ) because of lie ) as explaied below. Whe is large, we ca ot load the whole sievig prime umbers ito memory(or i cache block), istead we may read i oly ecessary prime umbers, called workig prime set, from the disk (or from mai memory). At iteratio i, the greatest iteger i mai memory for sievig is Mi, thus the umber of sievig primes eeded is Mi / l Mi. The overall time complexity t[ : ] of loadig the workig prime set oto mai memory is obtaied as t[: ] = = ( M / l Mi / l M ) Mi i Mi / l M M t[: ] ( M / l M ) xdx [ x x ] l M M t [ : ] ( ) l M By substitutig =, the above relatio ca be M rewritte as t[ : ] = Ω( / l )
3 . Parallel Algorithms For parallel executio, the sievig computatio ca be partitioed to P processors i two ways. Either the markig space of array A[:] ca be partitioed to P segmets (subarrays), the all umbers that are multiple of ay of the sievig primes are marked i each segmet simultaeously. Or the etire set of sievig prime are divided ito P disjoit subsets, ad each processor marks o its local copy of A[:] for the multiples of sievig primes i its ow subset, the oly those umbers are collected as prime whose P copies have ever marked by ay processor. This ca be implemeted by reduce operatio i MPI library. The two schemes are called array partitio ad set partitio, respectively. For simplicity assume here that K P = for some iteger K. Divisio ito P equal load is doe i a recursive maer as explaied below. Our parallel computig adopts master/slave cofiguratio so that the master is i charge of fidig the sievig prime set S, while slaves sieve umbers i the rage allocated to them. Aother role of the master i the cofiguratio is to supervise dyamic load distributio as explaied later. For set partitio we should kow how to partitio the sievig prime set S ito P disjoit subsets to provide equal load to all processors, while i array partitio we must divide the itervals : ito P segmets each of which will have eve load. We start from two equal partitios. The half-load set boudary is the locatio that divides the sievig prime set ito two subsets (left subset ad right subset) so that the load to mark with left subset is equal to the load to mark with right. I other words, each demads a half the overall load by the origial set. The total load deoted by L [ : ] is approximated as L[ : ] = dx. p S p i x We also kow the relatio dx = l = l. x The complexity may ot be as tight as give i [], but it will be applied i later computatio. Let ( u ~ v) represet a subset of S that icludes all primes betwee u ad v. (Suppose Z z ) ow, we wat to kow the poit Z where the umber of sievig operatios i the iterval [:] with primes ( u ~ z) is a half the umber with primes i ( u ~ v), i other words, the load of sievig with prime umbers i ( u ~ z) is equal to the load with those i ( z + + ~ v), where z is the immediate ext prime umber after z. z v = + p= u p p= z p The, the summatio equatios are coverted to z v itegratio by approximatio as dx = dx. u x z x l z lu = l v l z, l z = l u + l, z = uv Z = uv ( ~ uv ( u ~ v v ow, which meas that the sievig computatio with primes i u ) eeds the half load of the computatio with primes i ). If the half-load boudary formula is applied agai to both sets ( u ~ z) ad ( z ~ v), we will get four equal-load partitios. The method ca be recursively applied to K divide the origial load to P = equal-load partitios, as described i Algorithm Set_Partitio. Void Set_Partitio(L, R, P) if (R-L > Mi_iterval) AD (P>=) /* Mi_iterval is the threshold for parallel computatio. */ mid = LR ; Set_Partitio(L, mid, P/); Set_Partitio(mid, R, P/)} else Allocate all (L~R) to ay of P; /* (L~R) is a set of primes. */ exit;} } For aother way of load partitioig, let us fid the half-load poit that is the boudary poit of divisio of the iterval [:] ito two equal-load segmets, [:, ad [y+: ]. The half-load poit x ca be foud as below, where S ' is the subset of S that icludes all primes less tha y. L[: = p S ' p l l To fid y that satisfies the above relatioship is ot easy, so we istead fid a approximatio Y. If is
4 0 very large such as 0, the approximatio is obtaied as y Y = / with very small error. The relative error f a o-icreasig fuctio ad is very 0 close to for 0 0 < f < ). as show below ( ll ll L[: L[: Y ] f = L[: ll l(l l ) l(l0 l ) = < 0.0 ll l l0 The approximatio is valid for a big.. Experimets ad Discussio The prime umber geerator has bee experimeted o cluster computers. Oe of the clusters cosists of.ghz AMD processors, each with a 0GB local disk ad GB mai memory. All odes are cosidered fully coected by Fast Etheret ad Myriet switches. Aother cluster is plaed to use, which is -ode Myriet cluster i KISTI []. Our experimets are performed o the -ode cluster, ad maximum executio time is curretly limited to hours. Uder the costrait, we ca compute the primes up to = 0. To reduce the overheads i the executio, we modify the sievig process as explaied below. Firstly, to save the storage ad disk/memory access time, big itegers/idexes like over te digits, (ormally -bit iteger represetatio covers oly up to te digits) are grouped with commo prefix i biary bits ad oly the lower bit/digit iformatio is specifically represeted. Secodly, the order of markig is adjusted to overcome the cache limitatio. Fidig a iteger that is a multiple of some prime (actually the idex i of A[i]) is usually doe by a additio; sice if x is a multiple of some prime p, the x + p, x + p, are also multiple. Sice we have a limited size of cache (or cache lie), the ext multiple may ot be i the cache whe p is greater tha cache lie size. I such a case, every attempt to markig geerates a cache miss. I this respect, a certai umber of sievig primes adjacet each other are grouped, ad markig is doe for all primes together, istead of oe prime by oe prime. As itroduced earlier, set partitioig is simple to implemet, however, it requires sychroizatio ( reduce operatio) of the whole array A[:] from P processors after idividual markig operatios are complete. It adds commuicatio cost of O( log P), which may ot be eglected compared to sievig cost of l l. Thus, the algorithm is practical for small, ad our experimets focus o set partitioig. Sice the half load boudary is a approximate value, there ca be some imbalace amog differet partitios. To get complete balacig of load throughout the computatio, the static load distributio will be combied with dyamic load balacig. Static distributio allocates oly a fractio q ( 0 < q ) of the iterval [:] to P processors. The remaiig iterval is equally divided ito R ( >> P) small segmets for dyamic load distributio, thus, processors that fiish sievig o the statically assiged itervals will receive small segmets from the master for executio util o more are left. Figure shows the predicted ad observed times of sequetial executio with various rages, where the upper limit (= ) is chose as 0 for the coveiece of the experimets. The plot reveals that the ruig times are close to O ( /l ), whose reaso was due to the limited mai memory/cache capacity as explaied i sectio. Figures to plot speedups of parallel computatio with three job partitio schemes: static oly, static ad dyamic combied, ad dyamic oly. Static simply divides the itervals equally, which gives too iferior results. The reaso is i that eve though the couts of markig are equal, real load due to cache misses is ot reflected at all. The same problem is relieved i dyamic ad combied partitioig, sice the scheme cotrols load durig ru time. Whe the problem size is big (i.e. ), parallel computatio with processors of dyamic ad combied partitio schemes has best performace sice it gets smallest work load per job favorable to cache hits. We observe i the plots super-liear speedups are obtaied, ad it is sice the sequetial executios experieces saturated operatios due to the heavy disk traffic ad high cache misses because of overloaded resource utilizatio tha other parallel oes. Also, parallel computig is suitable i the computatio sice there is very little overhead i commuicatio for master/slave job distributio. As the rage grows, i additio to huge PU time cosumptio, the sievig also requires other resources to the limit such as hard disk capacity. To cover digit prime umbers, we expect the hard disk should be as large as TB. We predicts that it eeds days of
5 computig time to get digit primes with our ode cluster, while -digit eeds a year of computatio.. ocludig Remarks This research focuses o efficiet parallel computatio of prime umbers i a give rage. Load is distributed to each processor statically ad dyamically, thus, evetually all processors sped the same amout of computatio time to achieve the miimum executio time. The partitio of load to processors was based o divisio of computig itervals ad divisio of prime umbers i the set S of sievig primes. Saturatio of the performace is observed due to full load to disk ad cache misses i both sequetial ad parallel prime geerators. We expect that the complete set of prime umbers up to 0 ca be obtaied i days of executio, ad 0 i a year, although the times could vary depedig o the speed of the parallel computers. 0 Figure (dyamic load distributio) exec.time i secods data size Figure Sequetial time complexity Speed up measured predicted Figure (static & dyamic combied) Figure (static load distributio) Refereces [] S.H. Bokhari, Multiprocessig the sieve of Eratosthees, IEEE omputer 0(): April, pp.0- [] P. Dusart, The K-th prime is greater tha k(l k + l l k-) for k >=, Mathematics of omputatio, Vol, o., pp. -, Ja.. [] G. Hardy ad E. Wright, A itroductio to the theory of umbers, laredo Press,. [] X. Luo, A practical sieve algorithm for fidig prime umbers, ommuicatios of the AM, Vol. o., pp. -, March. [] G. Pailard,. Lavult, ad R. Fraca, A distributed prime sievig algorithm based o Schedulig by Multiple Edge Reversal, It l Symp. O Parallel ad Distributed omputig, Uiv. Lille, Frace, July -, 00. [] Rivest, R., Shamir, A., Adlema, L.: A method for obtaiig digital sigatures ad public key cryptosystems, omm. AM (Feb. ), pp. 0- [] [] How may primes are there? [] KISTI Supercomputig eter.
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 information6.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 informationCIS 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 informationLecture 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 informationA 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 information1.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 informationChapter 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 informationThe isoperimetric problem on the hypercube
The isoperimetric problem o the hypercube Prepared by: Steve Butler November 2, 2005 1 The isoperimetric problem We will cosider the -dimesioal hypercube Q Recall that the hypercube Q is a graph whose
More informationThe Magma Database file formats
The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,
More information15-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 informationCreating 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 informationEvaluation scheme for Tracking in AMI
A M I C o m m u i c a t i o A U G M E N T E D M U L T I - P A R T Y I N T E R A C T I O N http://www.amiproject.org/ Evaluatio scheme for Trackig i AMI S. Schreiber a D. Gatica-Perez b AMI WP4 Trackig:
More informationCIS 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 informationHash 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 informationCHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs
CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.
Morga Kaufma Publishers 26 February, 208 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Virtual Memory Review: The Memory Hierarchy Take advatage of the priciple
More informationChapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4
More informationAn 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 informationLecture 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. 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 informationBasic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.
5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator
More informationn n B. How many subsets of C are there of cardinality n. We are selecting elements for such a
4. [10] Usig a combiatorial argumet, prove that for 1: = 0 = Let A ad B be disjoit sets of cardiality each ad C = A B. How may subsets of C are there of cardiality. We are selectig elemets for such a subset
More informationAn 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 informationFast Fourier Transform (FFT) Algorithms
Fast Fourier Trasform FFT Algorithms Relatio to the z-trasform elsewhere, ozero, z x z X x [ ] 2 ~ elsewhere,, ~ e j x X x x π j e z z X X π 2 ~ The DFS X represets evely spaced samples of the z- trasform
More information1. SWITCHING FUNDAMENTALS
. SWITCING FUNDMENTLS Switchig is the provisio of a o-demad coectio betwee two ed poits. Two distict switchig techiques are employed i commuicatio etwors-- circuit switchig ad pacet switchig. Circuit switchig
More informationAlgorithm. 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 informationEE University of Minnesota. Midterm Exam #1. Prof. Matthew O'Keefe TA: Eric Seppanen. Department of Electrical and Computer Engineering
EE 4363 1 Uiversity of Miesota Midterm Exam #1 Prof. Matthew O'Keefe TA: Eric Seppae Departmet of Electrical ad Computer Egieerig Uiversity of Miesota Twi Cities Campus EE 4363 Itroductio to Microprocessors
More informationTransitioning to BGP
Trasitioig to BGP ISP Workshops These materials are licesed uder the Creative Commos Attributio-NoCommercial 4.0 Iteratioal licese (http://creativecommos.org/liceses/by-c/4.0/) Last updated 24 th April
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5
Morga Kaufma Publishers 26 February, 28 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Set-Associative Cache Architecture Performace Summary Whe CPU performace icreases:
More informationLecture 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 informationCombination 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 informationAnalysis 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 informationAlgorithms for Disk Covering Problems with the Most Points
Algorithms for Disk Coverig Problems with the Most Poits Bi Xiao Departmet of Computig Hog Kog Polytechic Uiversity Hug Hom, Kowloo, Hog Kog csbxiao@comp.polyu.edu.hk Qigfeg Zhuge, Yi He, Zili Shao, Edwi
More informationSorting 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 informationOn (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 informationMinimum Spanning Trees
Presetatio for use with the textbook, lgorithm esig ad pplicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 0 Miimum Spaig Trees 0 Goodrich ad Tamassia Miimum Spaig Trees pplicatio: oectig a Network Suppose
More informationEE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 )
EE26: Digital Desig, Sprig 28 3/6/8 EE 26: Itroductio to Digital Desig Combiatioal Datapath Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi at Māoa Combiatioal Logic Blocks Multiplexer Ecoders/Decoders
More informationWhat 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 informationImproved 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 informationAdministrative UNSUPERVISED LEARNING. Unsupervised learning. Supervised learning 11/25/13. Final project. No office hours today
Admiistrative Fial project No office hours today UNSUPERVISED LEARNING David Kauchak CS 451 Fall 2013 Supervised learig Usupervised learig label label 1 label 3 model/ predictor label 4 label 5 Supervised
More informationMinimum Spanning Trees. Application: Connecting a Network
Miimum Spaig Tree // : Presetatio for use with the textbook, lgorithm esig ad pplicatios, by M. T. oodrich ad R. Tamassia, Wiley, Miimum Spaig Trees oodrich ad Tamassia Miimum Spaig Trees pplicatio: oectig
More information1 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 informationCIS 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 informationAPPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS
APPLICATION NOTE PACE175AE BUILT-IN UNCTIONS About This Note This applicatio brief is iteded to explai ad demostrate the use of the special fuctios that are built ito the PACE175AE processor. These powerful
More informationCopyright 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 informationImage Segmentation EEE 508
Image Segmetatio Objective: to determie (etract) object boudaries. It is a process of partitioig a image ito distict regios by groupig together eighborig piels based o some predefied similarity criterio.
More information6.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 informationParallel 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 informationA 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 informationCivil 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 informationExamples 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 informationMulti-Threading. Hyper-, Multi-, and Simultaneous Thread Execution
Multi-Threadig Hyper-, Multi-, ad Simultaeous Thread Executio 1 Performace To Date Icreasig processor performace Pipeliig. Brach predictio. Super-scalar executio. Out-of-order executio. Caches. Hyper-Threadig
More informationDescriptive Statistics Summary Lists
Chapter 209 Descriptive Statistics Summary Lists Itroductio This procedure is used to summarize cotiuous data. Large volumes of such data may be easily summarized i statistical lists of meas, couts, stadard
More informationBezier curves. Figure 2 shows cubic Bezier curves for various control points. In a Bezier curve, only
Edited: Yeh-Liag Hsu (998--; recommeded: Yeh-Liag Hsu (--9; last updated: Yeh-Liag Hsu (9--7. Note: This is the course material for ME55 Geometric modelig ad computer graphics, Yua Ze Uiversity. art of
More informationChapter 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 information27 Refraction, Dispersion, Internal Reflection
Chapter 7 Refractio, Dispersio, Iteral Reflectio 7 Refractio, Dispersio, Iteral Reflectio Whe we talked about thi film iterferece, we said that whe light ecouters a smooth iterface betwee two trasparet
More information3D 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 informationElementary Educational Computer
Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified
More informationPseudocode ( 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 informationNew 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 informationA 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 informationChapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3
More informationAlpha Individual Solutions MAΘ National Convention 2013
Alpha Idividual Solutios MAΘ Natioal Covetio 0 Aswers:. D. A. C 4. D 5. C 6. B 7. A 8. C 9. D 0. B. B. A. D 4. C 5. A 6. C 7. B 8. A 9. A 0. C. E. B. D 4. C 5. A 6. D 7. B 8. C 9. D 0. B TB. 570 TB. 5
More informationPattern Recognition Systems Lab 1 Least Mean Squares
Patter Recogitio Systems Lab 1 Least Mea Squares 1. Objectives This laboratory work itroduces the OpeCV-based framework used throughout the course. I this assigmet a lie is fitted to a set of poits usig
More informationCounting 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 informationDESIGN AND ANALYSIS OF LDPC DECODERS FOR SOFTWARE DEFINED RADIO
DESIGN AND ANALYSIS OF LDPC DECODERS FOR SOFTWARE DEFINED RADIO Sagwo Seo, Trevor Mudge Advaced Computer Architecture Laboratory Uiversity of Michiga at A Arbor {swseo, tm}@umich.edu Yumig Zhu, Chaitali
More informationDynamic Programming and Curve Fitting Based Road Boundary Detection
Dyamic Programmig ad Curve Fittig Based Road Boudary Detectio SHYAM PRASAD ADHIKARI, HYONGSUK KIM, Divisio of Electroics ad Iformatio Egieerig Chobuk Natioal Uiversity 664-4 Ga Deokji-Dog Jeoju-City Jeobuk
More information9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence
_9.qxd // : AM Page Chapter 9 Sequeces, Series, ad Probability 9. Sequeces ad Series What you should lear Use sequece otatio to write the terms of sequeces. Use factorial otatio. Use summatio otatio to
More informationLecture 28: Data Link Layer
Automatic Repeat Request (ARQ) 2. Go ack N ARQ Although the Stop ad Wait ARQ is very simple, you ca easily show that it has very the low efficiecy. The low efficiecy comes from the fact that the trasmittig
More informationThe golden search method: Question 1
1. Golde Sectio Search for the Mode of a Fuctio The golde search method: Questio 1 Suppose the last pair of poits at which we have a fuctio evaluatio is x(), y(). The accordig to the method, If f(x())
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to
More informationA Note on Least-norm Solution of Global WireWarping
A Note o Least-orm Solutio of Global WireWarpig Charlie C. L. Wag Departmet of Mechaical ad Automatio Egieerig The Chiese Uiversity of Hog Kog Shati, N.T., Hog Kog E-mail: cwag@mae.cuhk.edu.hk Abstract
More informationA Hierarchical Load Balanced Fault tolerant Grid Scheduling Algorithm with User Satisfaction
A Hierarchical Load Balaced Fault tolerat Grid Schedulig Algorithm with User Satisfactio 1 KEERTHIKA P, 2 SURESH P Assistat Professor (Seior Grade), Departmet o Computer Sciece ad Egieerig Assistat Professor
More informationLecture 7 7 Refraction and Snell s Law Reading Assignment: Read Kipnis Chapter 4 Refraction of Light, Section III, IV
Lecture 7 7 Refractio ad Sell s Law Readig Assigmet: Read Kipis Chapter 4 Refractio of Light, Sectio III, IV 7. History I Eglish-speakig coutries, the law of refractio is kow as Sell s Law, after the Dutch
More informationCSC 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 informationCourse Site: Copyright 2012, Elsevier Inc. All rights reserved.
Course Site: http://cc.sjtu.edu.c/g2s/site/aca.html 1 Computer Architecture A Quatitative Approach, Fifth Editio Chapter 2 Memory Hierarchy Desig 2 Outlie Memory Hierarchy Cache Desig Basic Cache Optimizatios
More informationProject 2.5 Improved Euler Implementation
Project 2.5 Improved Euler Implemetatio Figure 2.5.10 i the text lists TI-85 ad BASIC programs implemetig the improved Euler method to approximate the solutio of the iitial value problem dy dx = x+ y,
More informationA 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 informationIMP: Superposer Integrated Morphometrics Package Superposition Tool
IMP: Superposer Itegrated Morphometrics Package Superpositio Tool Programmig by: David Lieber ( 03) Caisius College 200 Mai St. Buffalo, NY 4208 Cocept by: H. David Sheets, Dept. of Physics, Caisius College
More informationCopyright 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 informationRecursive Procedures. How can you model the relationship between consecutive terms of a sequence?
6. Recursive Procedures I Sectio 6.1, you used fuctio otatio to write a explicit formula to determie the value of ay term i a Sometimes it is easier to calculate oe term i a sequece usig the previous terms.
More informationParabolic Path to a Best Best-Fit Line:
Studet Activity : Fidig the Least Squares Regressio Lie By Explorig the Relatioship betwee Slope ad Residuals Objective: How does oe determie a best best-fit lie for a set of data? Eyeballig it may be
More informationIntro to Scientific Computing: Solutions
Itro to Scietific Computig: Solutios Dr. David M. Goulet. How may steps does it take to separate 3 objects ito groups of 4? We start with 5 objects ad apply 3 steps of the algorithm to reduce the pile
More informationHomework 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 informationLecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions
U.C. Berkeley CS170 : Algorithms Midterm 1 Solutios Lecturers: Sajam Garg ad Prasad Raghavedra Feb 1, 017 Midterm 1 Solutios 1. (4 poits) For the directed graph below, fid all the strogly coected compoets
More informationMath Section 2.2 Polynomial Functions
Math 1330 - Sectio. Polyomial Fuctios Our objectives i workig with polyomial fuctios will be, first, to gather iformatio about the graph of the fuctio ad, secod, to use that iformatio to geerate a reasoably
More informationLecture 13: Validation
Lecture 3: Validatio Resampli methods Holdout Cross Validatio Radom Subsampli -Fold Cross-Validatio Leave-oe-out The Bootstrap Bias ad variace estimatio Three-way data partitioi Itroductio to Patter Recoitio
More informationarxiv: 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 informationLower 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( n+1 2 ) , position=(7+1)/2 =4,(median is observation #4) Median=10lb
Chapter 3 Descriptive Measures Measures of Ceter (Cetral Tedecy) These measures will tell us where is the ceter of our data or where most typical value of a data set lies Mode the value that occurs most
More informationTask scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation
6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca Departmet of Computig ad Software McMaster Uiversity CANADA SEKE 08
More informationCMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems
More informationOutline 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 informationData 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 informationAccuracy Improvement in Camera Calibration
Accuracy Improvemet i Camera Calibratio FaJie L Qi Zag ad Reihard Klette CITR, Computer Sciece Departmet The Uiversity of Aucklad Tamaki Campus, Aucklad, New Zealad fli006, qza001@ec.aucklad.ac.z r.klette@aucklad.ac.z
More informationA 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 informationAn Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem
A Improved Shuffled Frog-Leapig Algorithm for Kapsack Problem Zhoufag Li, Ya Zhou, ad Peg Cheg School of Iformatio Sciece ad Egieerig Hea Uiversity of Techology ZhegZhou, Chia lzhf1978@126.com Abstract.
More informationCMPT 125 Assignment 2 Solutions
CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address
More informationECE4050 Data Structures and Algorithms. Lecture 6: Searching
ECE4050 Data Structures ad Algorithms Lecture 6: Searchig 1 Search Give: Distict keys k 1, k 2,, k ad collectio L of records of the form (k 1, I 1 ), (k 2, I 2 ),, (k, I ) where I j is the iformatio associated
More informationAvid Interplay Bundle
Avid Iterplay Budle Versio 2.5 Cofigurator ReadMe Overview This documet provides a overview of Iterplay Budle v2.5 ad describes how to ru the Iterplay Budle cofiguratio tool. Iterplay Budle v2.5 refers
More information