Implementing Dynamic Programming Recurrences in Constraint Handling Rules with Rule Priorities

Size: px
Start display at page:

Download "Implementing Dynamic Programming Recurrences in Constraint Handling Rules with Rule Priorities"

Transcription

1 Implemetig Dyamic Programmig Recurreces i Costrait Hadlig Rules with Rule Priorities Ahmed Magdy 1, Frak Raiser, ad Thom Frühwirth 1 Computer Sciece ad Egieerig, Germa Uiversity i Cairo ahmed.mabrouk@studet.guc.edu.eg Istitute of Software Egieerig ad Compiler Costructio, Uiversity of Ulm {frak.raiser,thom.fruehwirth}@ui-ulm.de Abstract. Dyamic Programmig (DP) is a importat techique used i solvig optimizatio problems. A close correspodece betwee DP recurreces ad Costrait Hadlig Rules with rule priorities (CHR rp ) yields atural implemetatios of DP problems i CHR rp. I this work, we evaluate differet implemetatio techiques with respect to their rutime. From our results we derive a set of guidelies for implemetig arbitrary DP problems i CHR rp. 1 Itroductio Costrait Hadlig Rules (CHR) ([1]) is a simple high-level programmig laguage that is embedded i a host laguage. It combies the elemets of Costrait (Logic) Programmig ad rule-based laguages ([]). It was foud for the purpose of embeddig user-defied costrait solvers i the host laguage. It evolved through the years to become a more powerful geeral-purpose programmig laguage ([1]). A extesio of CHR was itroduced called Costrait Hadlig Rules with Rule Priorities (CHR rp ) ([3]). It gives CHR rules priorities to cotrol the executio order. It simplifies implemetig rule-based algorithms because these algorithms ofte require some rules to be tried before others for efficiecy or correctess reasos ([4]). A importat coclusio, reached by [5], implies that every algorithm ca be implemeted i CHR with the best-kow time ad space complexity. Aother coclusio, reached by [6], states that the efficiecy of the CHR rp implemetatio comes close to the state-of-the-art K.U.Leuve CHR system (ad sometimes eve surpasses it). Dyamic Programmig (DP) is a importat techique used i solvig optimizatio problems. DP follows the optimal substructure property where a solutio of a large problem cotais withi it optimal solutios to smaller subproblems. There is correspodece betwee Dyamic Programmig recurreces ad CHR rp rules that we will exploit i this paper.

2 I this paper, a implemetatio to Matrix Chai Multiplicatio DP problem is itroduced ad evaluated. Differet modificatios to the previous problem are proposed ad evaluated i order to improve the rutime. Other modificatios are tested o four DP problems which are Kapsack ([7]), Edit Distace ([8]), Viterbi ([9]), CYK ([1]). The guidelies are proposed that help i implemetig DP problems i CHR rp. These guidelies are formulated based o the evaluatios doe o the five DP problems. Prelimiaries This sectio reviews CHR rp sytax ad sematics. For a more thorough itroductio, see [3] or [6]. This sectio also reviews dyamic programmig. For a more thorough itroductio, see [11]..1 Costrait Hadlig Rules with Rule Priorities Sytax. A costrait is of the form c(t 1,..., t ) with arity. Each t k is a value defied by the host laguage. There are two types of costraits: builti costraits ad CHR costraits. The host laguage provides data types ad pre-defied costraits which are called the built-i costraits. CHR costraits are also called user-defied costraits ad are solved by the CHR rp program. CHR rp programs cosist of three types of rules show below. Simplificatio H r <=> g B pragma priority(p). Propagatio H k ==> g B pragma priority(p). Simpagatio H k \ H r <=> g B pragma priority(p). where r represets a optioal rule ame. H r ad H k are called heads of the rule ad represet oe or more CHR costraits. g is called the guard of the rule ad it is zero or more built-i costraits that must be satisfied to apply the rule. B is the body of the rule. It s a sequece of CHR costraits ad built-i costraits. p ca be a static umber or a arithmetic expressio. The variables i the arithmetic expressio ca oly be from the variables i the head costraits of the correspodig rule. Sematics. A costrait store is a multiset of costraits. Iitially, the store starts with the costraits of the iitial query. The, the rules of the CHR rp program are applied, which maipulates the cotets of the costrait store. A rule is applied if its head costraits are i the costrait store ad the rule s guard holds. The body of the applied rule is added to the costrait store. The differece betwee the three rules is i the way the program deals with the head costraits if the rule fires. I simplificatio rules, head costraits are removed from the costrait store. I propagatio rules, head costraits are kept i the costrait store. Simpagatio rules combie the actios of propagatio ad simplificatio rules: head costraits before the backslash are kept i the costrait store, ad head costraits after the backslash are removed from the costrait store ([1]).

3 Joi Orderig ad Idexig. Fidig parter costraits to match a rule is crucial i CHR. Joi orderig is the order i which these parter costraits are looked up. The time complexity for that operatio should be miimized to obtai the optimal complexity. The time complexity of a program depeds o the joi orderig ([1]). Therefore, the lookup of parter costraits should be efficiet. Idexig is a importat approach that decrease the lookup time. There are several approaches for idexig. The traditioal oe uses attributed variables for costat lookup time ([1]).. Dyamic Programmig Dyamic programmig (DP) is a importat techique used i solvig may optimizatio problems. Optimizatio problems are the kid of problems that have several solutios but oe of them is better tha the others. The idea of dyamic programmig is that some itermediate computatio may be repeated due to overlappig sub-problems. Therefore, itermediate results are stored ad reused whe ecessary. DP exhibits the optimal substructure property. A problem exhibits this property whe the optimal solutio of the large problem cotais withi it optimal solutios of its smaller sub-problems ([11]). Matrix Chai Multiplicatio. It is the problem of multiplyig matrices. The order by which matrices are multiplied affects the umber of scalar multiplicatios. To multiply three matrices, there are two ways: (A 1 A )A 3 ad A 1 (A A 3 ). Assume A 1 has dimesios 1 1, A has dimesios 1 5, ad A 3 has dimesios 5 5. The first optio will result i = 75 }{{}}{{} A 1 A (A 1A ) A 3 multiplicatios. The secod optio will result i = }{{}}{{} A A 3 A 1 (A A 3) 75. DP ca be used to fid the optimal umber of scalar multiplicatios to multiply a chai of matrices. The the optimal order ca be calculated. The umber of scalar multiplicatios ca be computed usig (1). m(i, j) = { i = j mi i<k j {m(i, k) + m(k + 1, j) + p i 1 p k p j } i < j (1) where m(i, j) represets the cost of multiplyig matrices from matrix i to matrix j, p i the secod dimesio of matrix i, ad p the first dimesio of the first matrix 3. The optimal umber of scalar multiplicatios ca be computed by calculatig m(1, ), where is the umber of matrices to multiply. The DP algorithm rus i O( 3 ) time complexity ad O( ) space complexity ([11]). 3 The first dimesio of matrix i must be equal to the secod dimesio of matrix i 1

4 3 Implemetatio I this sectio, a implemetatio of the Matrix Chai Multiplicatio is itroduced. Costrait p/ represets the matrices dimesios. The first attribute is the idex, ad the secod oe is the dimesio. It resembles the p i i (1). The umber of matrices is stored i umofmatrices/1 costrait as its oly attribute. The costrait that holds itermediate calculated values is called cell/3. The first ad secod attributes are the same as the first ad secod argumets of (1). The third oe represets the value calculated. The recursive part i the recurrece is represeted as a propagatio rule at priority two. cell(i,k,c1), cell(k1,j,c), p(i,p1), p(k,p), p(j,p3), curretsize(d) ==> K1=:=K+1, D=:=J-I, I=:=I-1 R is C1+C+P1*P*P3, cell(i,j,r) pragma priority(). The head costraits of the rule (without curretsize(d) costrait) resembles the right had side of (1). The body of the rule resembles the left had side of (1). Costraits matched with the propagatio rules that represet the recurrece should cotai optimal values. Usig a o-optimal value will add to the rutime. Therefore, a ew costrait (curretsize/1) is defied to esure that the costraits matched are optimal. The attribute of the costrait represets the size of sub-problems that ca be solved by the propagatio rule. The attribute starts with the smallest possible sub-problem ad is icremeted util the whole problem is solved. m(i, j) calculates the umber of scalar multiplicatios to multiply matrix i to matrix j which are j i matrices. This differece is a idicatio to the size of the problem. The problem m(i, j) depeds o sub-problems m(i, k), m(k + 1, j), where k varies from i + 1 to j. This implies that both sub-problems are smaller i size tha the m(i, j) problem sice k i j i ad j k + 1 j i. The attribute of the curretsize costrait is icremeted at priority three after all cell costraits from the propagatio rules are geerated. Iitially, curretsize s attribute is set to zero. This satisfies the base case of the recurrece whe j i =. At the base case, m(i, j) is set to zero. Therefore, cell(i,i,) costraits are added to the store. Selectig the optimal choice (miimum umber of scalar multiplicatios) is doe by a simpagatio rule at the highest priority. After the program fiishes computatios, the result will be C i the costrait cell(1,x,c), where X is the umber of matrices. 4 Evaluatio I this sectio, the iitial implemetatio of the Matrix Chai Multiplicatio is evaluated. Furthermore, two modificatios to the iitial implemetatio are

5 proposed to improve the rutime. These modificatios are the evaluated to determie their effect. Two other modificatios are evaluated o Kapsack s problem implemetatio. The evaluatios are performed o a Dual-Core processor. GHz machie usig SWI-Prolog Iitial Implemetatio Hypothesis. The Matrix Chai Multiplicatio implemetatio rus i O( 3 ) Test. The implemetatio is tested o sizes of the problem. For each size, te trials are radomly geerated. Average time betwee the te trials is calculated ad plotted. Smallest test case is two matrices ad the icremet betwee each set ad the ext is oe matrix. The geerated graph is show i Fig CHR^rp f(x) = x^5 / Fig. 1. Matrix Chai Multiplicatio i CHR rp. Result. The geerated graph ca be approximated by a polyomial of 5 th order. Therefore, a factor of is added to the rutime. 4. Replacig Guards with Costraits Guards are ot idexed. Replacig the guards of the form A=:="arithmetic expressio" with costraits ca lead to idexig of these costraits ad improvig the rutime i fidig the matchig parter costraits. Hypothesis. Replacig guards from the propagatio rules that correspods to the recurrece with costraits improves the rutime.

6 Test. Test cases from the previous bechmark are used i this test case to compare the results. The geerated graph is plotted agaist the previous graph i Fig. 14 Iitial implemetatio Guarded costraits Fig.. Guards vs. Guard costraits. Result. icreased by a factor ragig from 1.1 to 1.. Therefore, the hypothesis is ot true. 4.3 Editig Order of Costraits The order of occurrece of costraits i a rule ca ifluece the order of matchig parter costraits. If the compiler matches parter costraits i the order as they appear i the rule, the there will be more tha a costat factor i the complexity to fid the matchig costraits. Cosider the followig example: x(i), y(j), z(i,j) <=>... where the umber of y costraits is big relative to x ad z costraits. If x(i) is the costrait that tries to fid parter costraits, the it will try to match y(j). Therefore, it will try several y(j) till it reaches the oe that matches with z(i,j). Therefore, i the worst case, the umber of y costraits will be added to rutime. The factor that icreased i the rutime i the previous implemetatio ca be because of the joi orderig where the umber of head costraits icreased ad they are ot ordered. Therefore, the order of costraits i the recurrece rules is edited so that the rule starts with the curretsize costrait, followed by a costrait that has the same attribute of the curretsize costrait, followed by a costrait that have commo attributes with the previous costraits ad so o.

7 Hypothesis. Orderig costraits i the recurrece rules improves the rutime. Test. This modificatio is tested o the implemetatio itroduced i subsectio 4. because this implemetatio cotais costraits that share may attributes where idexig will be applied. Therefore, by applyig this modificatio to that implemetatio, the differece i rutime will be observable. The geerated graph is plotted i Fig.3.85 Ordered costraits f(x) = x^3 / Fig. 3. Ordered costraits i Matrix Chai Multiplicatio. Results. The rutime is improved by a factor of. Therefore, the hypothesis is true. 4.4 Other Evaluatios Two modificatios are evaluated o the Kapsack problem. The first oe is typig costraits attributes to groud. This modificatio improved the rutime by a factor early equal to 1.. The secod modificatio is typig costraits attribute to iteger. This modificatio resulted i the same rutime as typig costraits to groud. 4 5 Implemetig DP problems i CHR rp I this sectio, guidelies are itroduced that help i implemetig DP recurreces i CHR rp. 4 Geerated graphs are show i Appedix A.

8 Guidelie 1. DP depeds o reusig previously calculated values. Therefore, costrait cell(+,+,+) is defied to store these values. The first two attributes represet the argumets of the DP recurrece. The last attribute represets the value calculated. Typig costrait s attribute to groud improved rutime as observed i subsectio 4.4 Guidelie. Optimizatio Rule is defied to make the optimal choice ad remove the o-optimal costrait from the costrait store. It is defied at priority oe with a simpagatio rule to drop the o-optimal costrait. Some DP problems do ot have a optimizatio rule. The CYK ([1]) problem is such a example. The optimizatio rule looks like : cell(x,y,z1) \ cell(x,y,z) <=> "optimizatio choice" true pragma priority(1). Guidelie 3. Recurrece Rules are defied to perform the actual computatio of the DP recurrece ad geerate cell costraits. The recurrece rules are propagatio rules. This esures that previously calculated results remai i the store to be further used. They are defied at priority two. Their head costraits represet the right had side of the recurrece, while their body represet the left had side of the recurrece. Due to the ucertaity of the order of applicatio of the recurrece rules (sice all recurrece rules have the same priority), a o-optimal costrait of a smaller sub-problem could be used to solve a bigger oe before optimizig the smaller sub-problem. That would cause to use o-optimal values which would lead to uecessary computatios ad adds to the rutime. Hece, explicit cotrol of the order i which rules are fired is used to esure that the values used are optimal. Guidelie 4. A curretsize(+) costrait is defied to eforce explicit cotrol of the order i which rules are fired. Its attribute represets the size of the sub-problems that ca be solved by the recurrece rules ad hece, is problem specific. Not all problems require that kid of cotrol. For a problem like the CYK ([1]) problem, there is o optimal choice made. Therefore, curretsize costrait is ot used for the CYK implemetatio. The attribute of the curretsize costrait is icremeted whe all the subproblems of that size are solved. It is icremeted at priority 3 with a simpagatio rule of the form : maximum(x) \ curretsize(y) <=> Y<=X NextY is Y+1, curretsize(nexty) pragma priority(3). where maximum s attribute represets the maximum size of the problem.

9 Guidelie 5. If the recurrece rule requires a guard of the form A=:="arithmetic expressio", the replace it with a costrait that satisfies it. cell(a,b,x), cell(c,d,y) ==> A=:=B+C... is trasformed to : cell(a,b,x), cell(c,d,y), guardsum(a,b,c) ==>... This is doe, because whe the compiler idexes the costraits it does ot iclude the guards i the idexig. By replacig it with a costrait, it is idexed. The guardsum costraits are added to the store whe costraits they will deped o are added to the store. The overhead of geeratig the guardsum costraits is liear i the umber of costraits they deped o because for each costrait geerated there is at least oe costrait that matches it. Hece, geeratig the costraits itroduces a costat factor oly to the overall complexity. It was observed i subsectio 4. that this modificatio icreased the rutime. However, orderig the costraits after applyig this guidelie improved the rutime by more tha a costat factor. Guidelie 6. The order of head costraits withi a rule is sigificat. The compiler tries to match costraits i the order they appear i the rule as observed i subsectio 4.3. Hece, to make use of idexig of costraits, the recurrece rule starts with the curretsize costrait, followed by a costrait that has the same attribute of the curretsize costrait, followed by a costrait that has commo attributes with the previous costrait, ad so o. Guidelie 7. Result Rules are defied to get the result ad prit it. They are defied at priorities four ad five. Two priorities are used because the result of some DP problems is the maximum or miimum of several values. Therefore, the value is calculated at priority four ad prited at priority five. These guidelies are applied o the five DP problems ad the evaluated. All geerated graphs could be approximated to the complexities of the correspodig problems 5. 6 Coclusio Five DP problems were implemeted the evaluated. Modificatios were proposed ad evaluated i order to improve the rutime. The, guidelies followig the five implemetatios ad modificatios are itroduced that helps i implemetig DP recurreces i CHR rp. 5 Geerated graphs are show Appedix B

10 Future Work. Guidelies itroduced are tested o DP problems that have a recurrece cosistig of two attributes oly. Tests should be doe to see if these guidelies ca be exteded o DP problems that have recurreces cosistig of three or more attributes. curretsize costrait is problem specific. However, it is related to the recurrece formulatio. The size of the implemeted problem was defied by reasoig but o direct mappig from the recurrece was itroduced. A possible research is to fid the attributes that cotrol the size of the problem directly from the recurrece. Space complexity was ot ivestigated i this paper. Modificatios to the implemetatios ca be researched to reach the optimal theoretical space complexity. Theoretical complexity aalysis ca be doe to prove that this formulatio is i the optimal time complexity. Related Work. A Viterbi implemetatio was proposed by [1] ad bechmarked. This implemetatio was the exteded ad optimized to achieve the theoretical best time complexity. This paper was published so recetly that comparisos betwee our results ad their results could ot be doe. Refereces 1. Seyers, J., Va Weert, P., Schrijvers, T., De Koick, L.: As time goes by: Costrait Hadlig Rules A survey of CHR research betwee 1998 ad 7. TPLP 1(1) (1) Schrijvers, T.: Aalyses, optimizatios ad extesios of Costrait Hadlig Rules. PhD thesis, K.U.Leuve, Belgium (5) 3. De Koick, L., Schrijvers, T., Demoe, B.: User-defiable rule priorities for CHR. I Leuschel, M., Podelski, A., eds.: PPDP 7, ACM Press (7) Gabbrielli, M., Meo, M.C., Mauro, J.: O the expressive power of priorities i CHR. I López-Fraguas, F., ed.: PPDP 9, ACM Press (9) Seyers, J., Schrijvers, T., Demoe, B.: The computatioal power ad complexity of Costrait Hadlig Rules. ACM TOPLAS 31() (9) 6. De Koick, L., Stuckey, P.J., Duck, G.J.: Optimized compilatio of CHR rp. Techical Report CW 499, K.U.Leuve, Dept. Comp. Sc., Leuve, Belgium (7) 7. Martello, S., Toth, P.: Kapsack Problems: Algorithms ad Computer Implemetatio. Joh Wiley ad Sos (199) 8. Wager, R.A., Fischer, M.J.: The strig-to-strig correctio problem. J. ACM 1(1) (1974) Rabier, L.R., Juag, B.H.: A itroductio to hidde markov models. 3(1) (1986) Sipser, M.: Itroductio to Theory of Computatio. d ed. Thomso Course Techology (6) 11. Corme, T.H., Leiserso, C.E., Rivest, R.L., Stei, C.: Itroductio to Algorithms. d ed. McGraw-Hill Sciece / Egieerig / Math (3) 1. Christiase, H., Have, C.T., Lasse, O.T., Petit, M.: The viterbi algorithm expressed i Costrait Hadlig Rules. I Va Weert, P., De Koick, L., eds.: CHR 1, K.U.Leuve, Dept. Comp. Sc., Techical report (1) To appear.

11 A Kapsack Modificatios A.1 Groud Typig versus Not Typig Hypothesis Typig variables to groud is more efficiet. Test This optimizatio is tested o the Kapsack problem. I defiitio of costraits, costrait/3 is trasformed to costrait(+,+,+). For example, cell/3 is trasformed to cell(+,+,+). 14 Iitial implemetatio Groud typig Fig. 4. Typed vs. o-typed. Results Typig is ideed more efficiet by a costat factor approximately equal 1.. A. Typig Groud versus Typig Itegers It s possible to specify the type of variable to be atural iteger. This ca give more iformatio to the compiler to do more optimizatio. Hypothesis Typig itegers is more efficiet. Test This optimizatio is tested o the Kapsack problem. I the defiitio of costraits, costrait(+,+,+) is trasformed to costrait(+it,+it,+it). For example, cell(+,+,+) is trasformed to cell(+it,+it,+it). This trasformatio is doe for all costraits that have iteger attributes.

12 11 1 Groud typig Iteger typig Fig. 5. Groud-typed vs. iteger-typed. Result They produced the same performace. B Fial Implemetatios I this sectio, fial implemetatios of the five DP problems are evaluated after applyig the guidelies Fial Implemetatio f(x) = 3.8^(x/145) Fig. 6. Kapsack.

13 Fial Implemetatio f(x) = x / Fig. 7. Edit Distace with varyig first strig. 18 Fial Implemetatio f(x) = x / m Fig. 8. Edit Distace with varyig secod strig.

14 .85 Fial Implemetatio f(x) = x^3 / Fig. 9. Matrix Chai Multiplicatio. 1 Fial Implemetatio f(x) = x^ / Fig. 1. Viterbi with varyig umber of states.

15 Fial Implemetatio f(x) = x/ m Fig. 11. Viterbi with varyig sequece legth i sparse trasitio matrix.. Fial Implemetatio f(x) = x / m Fig. 1. Viterbi with varyig sequece legth i complete trasitio matrix.

16 .6.4 Fial Implemetatio f(x) = x/ Fig. 13. Viterbi with varyig the degree of sparsity of the trasitio matrix. 18 Fial Implemetatio f(x) = x^3 / L Fig. 14. CYK.

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

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

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

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

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

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

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

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

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

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

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

BOOLEAN MATHEMATICS: GENERAL THEORY

BOOLEAN MATHEMATICS: GENERAL THEORY CHAPTER 3 BOOLEAN MATHEMATICS: GENERAL THEORY 3.1 ISOMORPHIC PROPERTIES The ame Boolea Arithmetic was chose because it was discovered that literal Boolea Algebra could have a isomorphic umerical aspect.

More information

condition w i B i S maximum u i

condition w i B i S maximum u i ecture 10 Dyamic Programmig 10.1 Kapsack Problem November 1, 2004 ecturer: Kamal Jai Notes: Tobias Holgers We are give a set of items U = {a 1, a 2,..., a }. Each item has a weight w i Z + ad a utility

More information

An Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem

An 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 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

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

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

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

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 26 Ehaced Data Models: Itroductio to Active, Temporal, Spatial, Multimedia, ad Deductive Databases Copyright 2016 Ramez Elmasri ad Shamkat B.

More information

Project 2.5 Improved Euler Implementation

Project 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 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

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

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

Filter design. 1 Design considerations: a framework. 2 Finite impulse response (FIR) filter design

Filter design. 1 Design considerations: a framework. 2 Finite impulse response (FIR) filter design Filter desig Desig cosideratios: a framework C ı p ı p H(f) Aalysis of fiite wordlegth effects: I practice oe should check that the quatisatio used i the implemetatio does ot degrade the performace of

More information

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 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 information

From last week. Lecture 5. Outline. Principles of programming languages

From last week. Lecture 5. Outline. Principles of programming languages Priciples of programmig laguages From last week Lecture 5 http://few.vu.l/~silvis/ppl/2007 Natalia Silvis-Cividjia e-mail: silvis@few.vu.l ML has o assigmet. Explai how to access a old bidig? Is & for

More information

Improving Template Based Spike Detection

Improving Template Based Spike Detection Improvig Template Based Spike Detectio Kirk Smith, Member - IEEE Portlad State Uiversity petra@ee.pdx.edu Abstract Template matchig algorithms like SSE, Covolutio ad Maximum Likelihood are well kow for

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

Optimum Solution of Quadratic Programming Problem: By Wolfe s Modified Simplex Method

Optimum Solution of Quadratic Programming Problem: By Wolfe s Modified Simplex Method Volume VI, Issue III, March 7 ISSN 78-5 Optimum Solutio of Quadratic Programmig Problem: By Wolfe s Modified Simple Method Kalpaa Lokhade, P. G. Khot & N. W. Khobragade, Departmet of Mathematics, MJP Educatioal

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

the beginning of the program in order for it to work correctly. Similarly, a Confirm

the beginning of the program in order for it to work correctly. Similarly, a Confirm I our sytax, a Assume statemet will be used to record what must be true at the begiig of the program i order for it to work correctly. Similarly, a Cofirm statemet is used to record what should be true

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

Solving Fuzzy Assignment Problem Using Fourier Elimination Method

Solving Fuzzy Assignment Problem Using Fourier Elimination Method Global Joural of Pure ad Applied Mathematics. ISSN 0973-768 Volume 3, Number 2 (207), pp. 453-462 Research Idia Publicatios http://www.ripublicatio.com Solvig Fuzzy Assigmet Problem Usig Fourier Elimiatio

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

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

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

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

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

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen COP4020 Programmig Laguages Fuctioal Programmig Prof. Robert va Egele Overview What is fuctioal programmig? Historical origis of fuctioal programmig Fuctioal programmig today Cocepts of fuctioal programmig

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

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

Pattern Recognition Systems Lab 1 Least Mean Squares

Pattern 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 information

Speeding-up dynamic programming in sequence alignment

Speeding-up dynamic programming in sequence alignment Departmet of Computer Sciece Aarhus Uiversity Demark Speedig-up dyamic programmig i sequece aligmet Master s Thesis Dug My Hoa - 443 December, Supervisor: Christia Nørgaard Storm Pederse Implemetatio code

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

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

Fast Fourier Transform (FFT) Algorithms

Fast 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 information

Evaluation scheme for Tracking in AMI

Evaluation 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 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

Accuracy Improvement in Camera Calibration

Accuracy 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 information

Abstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup Note:

Abstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup   Note: Chapter 4 Computatio Bjare Stroustrup www.stroustrup.com/programmig Abstract Today, I ll preset the basics of computatio. I particular, we ll discuss expressios, how to iterate over a series of values

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

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 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 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

Solutions to Final COMS W4115 Programming Languages and Translators Monday, May 4, :10-5:25pm, 309 Havemeyer

Solutions to Final COMS W4115 Programming Languages and Translators Monday, May 4, :10-5:25pm, 309 Havemeyer Departmet of Computer ciece Columbia Uiversity olutios to Fial COM W45 Programmig Laguages ad Traslators Moday, May 4, 2009 4:0-5:25pm, 309 Havemeyer Closed book, o aids. Do questios 5. Each questio is

More information

Polynomial Functions and Models. Learning Objectives. Polynomials. P (x) = a n x n + a n 1 x n a 1 x + a 0, a n 0

Polynomial Functions and Models. Learning Objectives. Polynomials. P (x) = a n x n + a n 1 x n a 1 x + a 0, a n 0 Polyomial Fuctios ad Models 1 Learig Objectives 1. Idetify polyomial fuctios ad their degree 2. Graph polyomial fuctios usig trasformatios 3. Idetify the real zeros of a polyomial fuctio ad their multiplicity

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

CMPT 125 Assignment 2 Solutions

CMPT 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 information

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1 COSC 1P03 Ch 7 Recursio Itroductio to Data Structures 8.1 COSC 1P03 Recursio Recursio I Mathematics factorial Fiboacci umbers defie ifiite set with fiite defiitio I Computer Sciece sytax rules fiite defiitio,

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

EE260: 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 )

EE260: 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 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

Adaptive Resource Allocation for Electric Environmental Pollution through the Control Network

Adaptive Resource Allocation for Electric Environmental Pollution through the Control Network Available olie at www.sciecedirect.com Eergy Procedia 6 (202) 60 64 202 Iteratioal Coferece o Future Eergy, Eviromet, ad Materials Adaptive Resource Allocatio for Electric Evirometal Pollutio through the

More information

Optimal Mapped Mesh on the Circle

Optimal Mapped Mesh on the Circle Koferece ANSYS 009 Optimal Mapped Mesh o the Circle doc. Ig. Jaroslav Štigler, Ph.D. Bro Uiversity of Techology, aculty of Mechaical gieerig, ergy Istitut, Abstract: This paper brigs out some ideas ad

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

Second-Order Domain Decomposition Method for Three-Dimensional Hyperbolic Problems

Second-Order Domain Decomposition Method for Three-Dimensional Hyperbolic Problems Iteratioal Mathematical Forum, Vol. 8, 013, o. 7, 311-317 Secod-Order Domai Decompositio Method for Three-Dimesioal Hyperbolic Problems Youbae Ju Departmet of Applied Mathematics Kumoh Natioal Istitute

More information

Today s objectives. CSE401: Introduction to Compiler Construction. What is a compiler? Administrative Details. Why study compilers?

Today s objectives. CSE401: Introduction to Compiler Construction. What is a compiler? Administrative Details. Why study compilers? CSE401: Itroductio to Compiler Costructio Larry Ruzzo Sprig 2004 Today s objectives Admiistrative details Defie compilers ad why we study them Defie the high-level structure of compilers Associate specific

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

The Closest Line to a Data Set in the Plane. David Gurney Southeastern Louisiana University Hammond, Louisiana

The Closest Line to a Data Set in the Plane. David Gurney Southeastern Louisiana University Hammond, Louisiana The Closest Lie to a Data Set i the Plae David Gurey Southeaster Louisiaa Uiversity Hammod, Louisiaa ABSTRACT This paper looks at three differet measures of distace betwee a lie ad a data set i the plae:

More information

Redundancy Allocation for Series Parallel Systems with Multiple Constraints and Sensitivity Analysis

Redundancy Allocation for Series Parallel Systems with Multiple Constraints and Sensitivity Analysis IOSR Joural of Egieerig Redudacy Allocatio for Series Parallel Systems with Multiple Costraits ad Sesitivity Aalysis S. V. Suresh Babu, D.Maheswar 2, G. Ragaath 3 Y.Viaya Kumar d G.Sakaraiah e (Mechaical

More information

MATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fitting)

MATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fitting) MATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fittig) I this chapter, we will eamie some methods of aalysis ad data processig; data obtaied as a result of a give

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 Very Simple Approach for 3-D to 2-D Mapping

A Very Simple Approach for 3-D to 2-D Mapping A Very Simple Approach for -D to -D appig Sadipa Dey (1 Ajith Abraham ( Sugata Sayal ( Sadipa Dey (1 Ashi Software Private Limited INFINITY Tower II 10 th Floor Plot No. - 4. Block GP Salt Lake Electroics

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

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

Data diverse software fault tolerance techniques

Data diverse software fault tolerance techniques Data diverse software fault tolerace techiques Complemets desig diversity by compesatig for desig diversity s s limitatios Ivolves obtaiig a related set of poits i the program data space, executig the

More information

Neural Networks A Model of Boolean Functions

Neural Networks A Model of Boolean Functions Neural Networks A Model of Boolea Fuctios Berd Steibach, Roma Kohut Freiberg Uiversity of Miig ad Techology Istitute of Computer Sciece D-09596 Freiberg, Germay e-mails: steib@iformatik.tu-freiberg.de

More information

Math 10C Long Range Plans

Math 10C Long Range Plans Math 10C Log Rage Plas Uits: Evaluatio: Homework, projects ad assigmets 10% Uit Tests. 70% Fial Examiatio.. 20% Ay Uit Test may be rewritte for a higher mark. If the retest mark is higher, that mark will

More information

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

APPLICATION 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 information

Małgorzata Sterna. Mateusz Cicheński, Mateusz Jarus, Michał Miszkiewicz, Jarosław Szymczak

Małgorzata Sterna. Mateusz Cicheński, Mateusz Jarus, Michał Miszkiewicz, Jarosław Szymczak Małgorzata Stera Mateusz Cicheński, Mateusz Jarus, Michał Miszkiewicz, Jarosław Szymczak Istitute of Computig Sciece Pozań Uiversity of Techology Pozań - Polad Scope of the Talk Problem defiitio MP Formulatio

More information

The Magma Database file formats

The 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 information

NTH, GEOMETRIC, AND TELESCOPING TEST

NTH, GEOMETRIC, AND TELESCOPING TEST NTH, GEOMETRIC, AND TELESCOPING TEST Sectio 9. Calculus BC AP/Dual, Revised 08 viet.dag@humbleisd.et /4/08 0:0 PM 9.: th, Geometric, ad Telescopig Test SUMMARY OF TESTS FOR SERIES Lookig at the first few

More information

ECE4050 Data Structures and Algorithms. Lecture 6: Searching

ECE4050 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 information

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control EE 459/500 HDL Based Digital Desig with Programmable Logic Lecture 13 Cotrol ad Sequecig: Hardwired ad Microprogrammed Cotrol Refereces: Chapter s 4,5 from textbook Chapter 7 of M.M. Mao ad C.R. Kime,

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

Lecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions

Lecturers: 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 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

Software development of components for complex signal analysis on the example of adaptive recursive estimation methods.

Software development of components for complex signal analysis on the example of adaptive recursive estimation methods. Software developmet of compoets for complex sigal aalysis o the example of adaptive recursive estimatio methods. SIMON BOYMANN, RALPH MASCHOTTA, SILKE LEHMANN, DUNJA STEUER Istitute of Biomedical Egieerig

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

Appendix A. Use of Operators in ARPS

Appendix A. Use of Operators in ARPS A Appedix A. Use of Operators i ARPS The methodology for solvig the equatios of hydrodyamics i either differetial or itegral form usig grid-poit techiques (fiite differece, fiite volume, fiite elemet)

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

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5

Morgan 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 information

Computers and Scientific Thinking

Computers and Scientific Thinking Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput

More information

GPUMP: a Multiple-Precision Integer Library for GPUs

GPUMP: a Multiple-Precision Integer Library for GPUs GPUMP: a Multiple-Precisio Iteger Library for GPUs Kaiyog Zhao ad Xiaowe Chu Departmet of Computer Sciece, Hog Kog Baptist Uiversity Hog Kog, P. R. Chia Email: {kyzhao, chxw}@comp.hkbu.edu.hk Abstract

More information

New HSL Distance Based Colour Clustering Algorithm

New HSL Distance Based Colour Clustering Algorithm The 4th Midwest Artificial Itelligece ad Cogitive Scieces Coferece (MAICS 03 pp 85-9 New Albay Idiaa USA April 3-4 03 New HSL Distace Based Colour Clusterig Algorithm Vasile Patrascu Departemet of Iformatics

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

Cache and I/O Efficient Functional Algorithms

Cache and I/O Efficient Functional Algorithms Cache ad I/O Efficiet Fuctioal Algorithms Guy E. Blelloch Robert Harper Caregie Mello Uiversity guyb@cs.cmu.edu rwh@cs.cmu.edu Abstract The widely studied I/O ad ideal-cache models were developed to accout

More information

Recursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames

Recursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames Uit 4, Part 3 Recursio Computer Sciece S-111 Harvard Uiversity David G. Sulliva, Ph.D. Review: Method Frames Whe you make a method call, the Java rutime sets aside a block of memory kow as the frame of

More information

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 8 Strigs ad Vectors Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Slide 8-3 8.1 A Array Type for Strigs A Array Type for Strigs C-strigs ca be used to represet strigs

More information