AMS subject classifications. 65F05 Direct methods for linear systems and matrix inversion

Size: px
Start display at page:

Download "AMS subject classifications. 65F05 Direct methods for linear systems and matrix inversion"

Transcription

1 EFFICIENT SOLUTION OF A x (k) = b (k) USING A 1 ADI DITKOWSKI, GADI FIBICH, AND NIR GAVISH Abstract. I this work we cosider the problem of solvig Ax (k) = b (k), k = 1,..., K where b (k+1) = f(x (k) ). We show that whe A is a full matrix ad K c, where c 1 depeds o the specific software ad hardware setup, it is faster to solve Ax (k) = b (k) for k = 1,..., K by explicitly evaatig the iverse matrix A 1 rather tha through the LU decompositio of A. We also show that the forward error is comparable i both methods, regardless of the coditio umber of A. AMS subject classificatios. 65F05 Direct methods for liear systems ad matrix iversio 1. Itroductio. Oe of the first thigs we lear i a basic umerical liear algebra course is that i order to solve the liear system Ax = b, we should ot calculate the iverse matrix A 1. For example, we quote from Matlab s user guide: I practice, it is seldom ecessary to form the explicit iverse of a matrix. A frequet misuse of iverse arises whe solvig the system of liear equatios. Oe way to solve this is with x = iv(a) b. A better way, from both a executio time ad umerical accuracy stadpoit, is to use the matrix divisio operator x = A\b. This produces the sotio usig Gaussia elimiatio, without formig the iverse. Similar statemets appear i the classical umerical aalysis textbooks. For example, Gob ad va Loa [7, page 121] say:... As a fial example we show how to avoid the pitfall of explicit iverse computatio... whe a matrix iverse i ecoutered i a formula, we must thik i terms of solvig equatios rather tha i terms of explicit iverse formatio. Similarly, Cote ad de Boor [8, page 166] say:... give this simple prescriptio for calculatig the iverse of a matrix, we haste to poit out that there is usually o good reaso for ever calculatig the iverse.... wheever A 1 is eeded merely to calculate a vector A 1 b (as i solvig Ax = b) or a matrix product A 1 B, A 1 should ever be calculated explicitly. Higham [9, page 262] also states: Not oly is the iversio approach three times more expesive, but it is much less stable.... we see that matrix iversio is likely to give a much larger residual tha Gaussia elimiatio with partial pivotig... Thus, the reasos for preferrig Gaussia elimiatio over explicit calculatio of A 1 to solve Ax = b are performace, ad accuracy ad stability. I this study we cosider the case where we wat to solve the equatios Ax (k) = b (k), k = 1,..., K, (1.1) whe 1. A is a full matrix. 2. Equatios (1.1) have to be solved sequetially, e.g. whe b (k+1) = f(x (k) ). The stadard, LU-based approach ivolves a preprocessig stage i which the LU decompositio of the matrix A is calculated: [L, U] = (A). (1.2) The, for each right-had-side the liear system is solved usig a forward substitutio ad a backward substitutio: y (k) = L\b (k) ; x (k) = U\y (k), k = 1,..., K. (1.3) A secod, A 1 based approach for solvig problem (1.1) is to calculate the iverse of A i a preprocessig stage: iva = iv(a). (1.4) The, for each right-had-side the liear system is solved by a sigle matrix-vector multiplicatio: x (k) = iva b (k), k = 1,..., K. (1.5) 1

2 2 I this study we show that it is better to solve equatios (1.1) usig A 1 rather tha through LU decompositio. I Sectio 2 we cosider the performace issue. We first show that the two methods require the same umber of arithmetic operatios. However, the actual performace has a lot to do with the way that optimized computer codes, such as Itel s MKL BLAS (Basic Liear Algebra Support) package, hadle computer architecture issues, such as cachig ad memory allocatio. Ideed, because the data structure of a square matrix (A 1 ) is iheretly simpler tha that of two triagular matrices (L ad U), i our umerical tests we observe that it faster to solve these equatios usig A 1 tha through the LU decompositio of A. I Sectio 2.4 we show that there are more efficiet implemetatios of the LU algorithm the the oe give i equatios (1.2,1.3). Eve with these improvemets, however, the A 1 algorithm is still more efficiet. As oted, the secod argumet agaist usig A 1 is accuracy ad stability. This argumet is based o aalysis which showed that the backward error i the A 1 based method is larger tha i the LU-based method, ad that the ratio betwee the two icreases with the coditio umber of A. While there has bee o such aalytical results for the forward error, it was implicitly assumed that it would behave similarly. However, i Sectio 3, our simulatios with radomly-chose matrices, as well as with three families of ill-coditioed matrices, suggest that this implicit assumptio is wrog. Ideed, we observe that the forward error is of the same magitude for both the A 1 based method ad the LU-based method, regardless of the coditio umber of A. I Sectio 4 we list various applicatios that are expected to ru faster whe implemeted with the A 1 based method (quasi-newto iteratios, iverse power method, ad spectral differetiatio methods). We cocde by showig that the iverse power method for fidig the smallest eigevae of a matrix ca be 11 times faster with the A 1 based method tha with the LU-based method, ad just as accurate. Our cocsio that usig A 1 is superior to usig LU decompositio applies to problems i which: 1. A is full, sice whe A is sparse the L ad U are sparse but A 1 is full. 2. Equatios (1.1) have to be solved sequetially, hece oly level 2 BLAS optimizatio (matrix-vector operatios) ca be used. Ideed, whe all the b (k) are kow i advace, all the right-had sides ca be simultaeously solved with a block LU algorithm, i.e., replacig (1.3) with Y = L\B; X = U\Y, where B = [b (1) b (K) ], X = [x (1) x (K) ], Y = [y (1) y (K) ]. I this case, the block LU algorithm is more efficiet tha usig X = A 1 B, sice oe ca exploit level 3 BLAS optimizatio (matrix-matrix operatios). 2. Performace Arithmetic operatios cout. We begi with the stadard cout of arithmetic operatios: Lemma 2.1. The overall umber of arithmetic operatios eeded to solve the system (1.1) i the LUbased method is ad i the A 1 based method N = O( 2 ) + 2K 2 + O(K), }{{}}{{} eq. eq. (1.3) (1.2) N A 1 = O( 2 ) + 2K 2 + O(K). }{{}}{{} eq. eq. (1.5) (1.4) Proof. For the LU-based method the preprocessig stage ivolves fidig the LU decompositio of A, which requires O ( 2) arithmetic operatios, see [2, page 152]. The, solvig each liear system ivolves a backward ad forward substitutio. Each substitutio requires 2 + O() arithmetic operatios. Therefore, a overall of 2K 2 + O(K) arithmetic operatios are eeded to solve (1.3).

3 Similarly, for the A 1 based method the preprocessig stage ivolves fidig A 1, which require O ( 2) arithmetic operatios, see [2, page 161]. The, solvig each liear system requires multiplyig b (k) by A 1, which requires O() arithmetic operatios. Therefore, a overall of 2K 2 + O(K) arithmetic operatios are eeded to solve (1.5). Observatio 2.1 shows that the umber of arithmetic operatios for the LU-based method is smaller tha for the A 1 based method for K, ad is the same for K. More precisely, N 1 4 N A 1 K N = 2+6λ 8+6λ N A 1 K = λ, λ = O(1) N N A 1 K Numerical tests. The stadard approach to estimate ru-time of algorithms is to cout the umber of arithmetic operatios. Hece, Lemma 2.1 ad equatio (2.1) seem to suggest that the LU-based method is faster tha the A 1 based method. We ow show that this is ot always the case. To demostrate this, we solved liear systems of the form (1.1) usig the LU-based ad A 1 based methods. For each method ad for each = 2 j, j = 5,..., 12, we radomly choose 3 differet matrices, for each matrix we solve the liear system Ax = b (k) 1000 times, sequetially, ad calculate the average CPU time per RHS. This measuremet of CPU time does ot icde the preprocessig time of LU decompositio or of fidig the iverse. The tests were coducted o a Petium 4 with 1Mb cache ad 2GB RAM usig Matlab 7.0 R14 for Liux. I the first test we used Itel s MKL BLAS (Basic Liear Algebra Support) package. The average CPU time per RHS with the A 1 based method is smaller by a factor of compared with the LU-based method (see Figure 2.1), for matrix sizes varyig from to (2.1) average CPU time Fig Average CPU time for solvig Ax = b (k) usig the backward ad forward substitutio (eq. (1.3), ) ad through multiplicatio by A 1 (eq. (1.5), ). Next, we repeated the same test, but chaged the software package that Matlab uses for the liear algebra subrouties from Itel s MKL BLAS to ATLAS BLAS. I this case, the average CPU time for a forward ad a backward substitutio did ot chage, but the average CPU time for multiplicatio by A 1 icreased by a factor of , hece the A 1 based method was oly 8-16 times faster tha the LU-based method, see Figure 2.2. Fially, we ra a bechmark test i which we implemeted the multiplicatio by A 1 ad the backward ad forward substitutio usig a aive straightforward o-vectorized code of a double loop. I that case, the average CPU time is about the same for forward ad backward substitutio ad for multiplicatio by A 1, see Figure 2.3. As expected, the aive implemetatio was slower tha the MKL BLAS implemetatio. The matrix-vector multiplicatio by A 1 was times faster (usig MKL BLAS) tha with the aive

4 4 average CPU time Fig Same data as i Figure 2.1. Also plotted, is the average CPU time usig ATLAS BLAS for solvig Ax = b (k) usig the forward ad backward substitutio (eq. (1.3), ) ad through multiplicatio by A 1 (eq. (1.5, ). implemetatio. O the other side, forward ad backward substitutio usig MKL BLAS was oly times faster tha forward ad backward substitutio with the aive implemetatio. average CPU time Fig Same data as i Figure 2.1. I additio average CPU time per RHS usig a aive implemetatio for the LU-based method (solid) ad the A 1 based method (dashes). We also coducted the same tests o a differet Petium 4 machie (0.5Mb cache ad 0.5GB RAM usig Matlab 7.0 R14 for Widows XP). Uder this cofiguratio, all qualitative results remaied the same, but the performace ratios chaged. For example, the A 1 based method was oly times faster tha the LU-based method usig Itel s MKL BLAS, ad 8-12 faster uder ATLAS BLAS Data aalysis. The simulatio of Sectio 2.2 shows that, for sequetially solvig the system ad eglectig the preprocessig costs, the A 1 based method is sigificatly faster tha the LU-based method (per RHS). Sice the umber of arithmetic operatios per RHS is the same for both methods (see Sectio 2.1), we cocde that the A 1 based method is faster sice the implemetatio of matrix multiplicatio i MKL BLAS or i ATLAS BLAS is faster tha the implemetatio of a forward ad backward substitutio. Ideed, whe we used a aive implemetatio, there was o performace differece betwee the two methods. I retrospect, the fact that the A 1 based method is faster is ot surprisig sice the memory structure ad idexig of a full matrix is iheretly simpler tha that of a triagular matrix. Therefore, matrix

5 5 multiplicatio ca be more easily accelerated through software ad hardware optimizatio. I other words, the performace differece betwee the two methods is due to the implemetatio of the umerical liear algebra software package. This cocsio is further supported by the observatio that chagig the BLAS package leads to a chage i the performace ratio from to 8-16, see Figure 2.2. I the umerical experimets show so far, we eglected the preprocessig cost ad cosidered oly the cost of the solvig the liear systems (1.3) ad (1.5). This correspods to the case where K, sice the the preprocessig costs are egligible. We ow take ito accout the preprocessig cost ad look at the overall cost of solvig (1.1) i both methods. For example, settig K=10 ad comparig the overall cost (preprocessig+solvig for 10 RHS) of the two methods, we obtai that the A 1 based method is faster that the LU-based method for matrices of size < th ad slower for > th, where the threshold is th (K = 10) = 700, see Figure 2.4. Equivaletly, for a give we ca fid a threshold K th = K th (), such the overall cost for solvig (1.1) is faster for the A 1 method whe K > K th ad slower whe K < K th. There is a liear relatio betwee K th ad. Ideed, the overall cost of the LU-based method is T preprocessig + K T RHS = α preprocessig 3 + K β RHS 2 + O(K, 2 ), (2.2) where T preprocessig is the preprocessig cost of (1.2) ad T RHS is the cost of the solvig the liear systems (1.3) by forward ad backward substitutio. The overall cost of the A 1 based method is where T preprocessig iverse Hece, T preprocessig iverse K th = T preprocessig iverse + K Tiverse RHS = α preprocessig iverse 3 + K β RHS iverse 2 + O(K, 2 ), (2.3) is the preprocessig cost (1.4) ad T RHS iverse is the cost of multiplicatio by A 1, see (1.5). T RHS = (αpreprocessig iverse (β RHS T preprocessig Tiverse RHS α preprocessig ) 3 + O( 2 ) βiverse RHS )2 + O() αpreprocessig iverse β RHS α preprocessig β RHS iverse + O(1). (2.4) I Figure 2.5 we plot the vae of K th as a fuctio of. The results show that K th , i agreemet with (2.4). As oted, Observatio 2.1 has bee traditioally iterpreted to imply that the LU-based method is faster tha the A 1 based method for K = O() ad that the ru time of the two methods is the same for K. I cotrast, i Figure 2.5 we see that the A 1 based method is faster for K > c, where c The reaso for this disagreemet is the implicit assumptio that the umber of arithmetic operatios is a good measure for compariso of ru-times. This assumptio fails, however, to capture the large differece betwee βiverse RHS ad βrhs that results from the differece i implemetatio of matrix-vector multiplicatio ad of forward ad backward substitutios. K=10 overall CPU time th Fig Overall cpu time of the LU-based method (dots) ad the A 1 based method (solid) with K = 10.

6 6 K th Fig K th as a fuctio of th (solid). Dotted lie is the fitted liear curve K th = Improvig the LU solver. I our umerical tests so far we used the most straightforward implemetatio of the LU algorithm for solvig (1.1). We first calculated the LU decompositio (1.2). The, for each right-had-side we solved the liear system usig a forward substitutio ad a backward substitutio, see equatio (1.3), which are implemeted by a backslash ( \ ) or equivaletly by the mldivide Matlab commad. As stated by the Matlab s help, the commad [L, U] = (A); returs a upper triagular matrix i U, ad a psychologically lower triagular matrix (i.e., a potetially permuted lower triagular matrix) i L. The psychologically lower triagular form makes it harder to efficietly implemet forward substitutio. A faster way is, therefore, to eforce L to be a strict lower triagular matrix by usig the commad [L, U, P ] = (A), (2.5) where P is the permutatio matrix. The, the sotio to Ax = b ca be obtaied by y = L\(P b); (2.6) x = U\y; The additioal calculatios i this modificatio (i.e., the calculatio of P b) are O(), hece are egligible compared with the time saved by forcig L to be triagular. Ideed, Figure 2.6 shows that usig the strict lower triagular matrix is about 2.5 times faster tha the stadard method. The backslash commad, e.g. A\b, ivolves a preprocessig stage i which the properties of the matrix A are checked i order to pick the most appropriate solver for the problem. Thus, i the case of equatio (2.6), the backslash commad idetifies that L ad U are triagular matrices ad uses backward- or forwardsubstitutio to obtai the sotio. Sice it is kow that L ad U i (2.6) are lower- ad upper-triagular matrices, it is possible to bypass the preprocessig stage by usig the lisolve commad istead of the backslash commad. Therefore, we use (2.5) to obtai a strict lower triagular matrix L, but replace (2.6) with optlt.lt = true; % lower triagular property (2.7) optu T.U T = true; % upper triagular property y = lisolve(l, P b, optlt ); x = lisolve(u, y, optut ); Figure 2.6 shows that usig (2.5) ad (2.7) is 4.6 times faster tha the stadard method, i.e. equatios (1.2) ad (1.3), ad 1.3 times faster tha usig a strict lower triagular matrix without lisolve, i.e, (2.5) ad (2.6). Eve after all these improvemets, however, the A 1 method is still cosiderably faster.

7 average CPU time N Fig Average CPU time for solvig Ax = b (k) usig stadard LU method (solid), LU with explicit pivot matrix (dash-dotted), LU ad lisolve (dotted) ad A 1 method (dashed). 3. Accuracy ad stability. The secod commo argumet i the Literature agaist solvig Ax = b with A 1 is its umerical accuracy ad stability (see citatios i the Itroductio). As oted, this argumet is based o aalysis which showed that the backward error i the A 1 based method is larger tha i the LU-based method, ad that the ratio betwee the two icreases with the coditio umber of A. While there has bee o such aalytical results for the forward error, it was implicitly assumed that it would behave similarly. Our simulatios however suggest that this implicit assumptio is wrog. Ideed, we observe that the forward error is of the same magitude for both the A 1 based method ad the LU-based method, regardless of the coditio umber of A Forward error. I the A 1 based method, x x cod(a) b b. I the LU-based method x is determied by solvig the liear systems (1.3), hece, x x cod(l)cod(u) b b. Sice cod(a) cod(l)cod(u), the worst case relative (forward) error x x is likely to be larger for the LU-based method tha for the A 1 based method. O the other had, the roudoff error ivolved i matrix vector multiplicatio is greater tha the roudoff error of backward ad forward substitutio [9, page 262]. We ow show that, i practice, the relative error of the A 1 based method is oly slightly larger tha the relative error of the LU-based method. To do so, we first solved liear systems of the from (1.1) usig the LU-based ad A 1 based methods. For each = 100, 200,, 4000, we radomly choose 25 differet matrices ad a sotio vector x. For each matrix A, we first geerate the vector b = Ax, the solve with each method Aˆx = b, calculate the relative forward error ˆx x x ad the average over all 25 matrices. Results i Figure 3.1A show that the forward error of the LU-based is smaller by a factor of 2-4 tha for the A 1 based method. This 2-4 factor does ot chage sigificatly as chages from 100 to 4000, ad cod(a) varies betwee 10 3 to I order to see whether larger differeces would appear for ill-coditioed matrices, we perform the same test with Matlab s matrix gallery of ivotory ill-coditioed matrices (Figure 3.2A). I this case, the relative forward error for the LU-based method is slightly below the error for the A 1 based method, differig by a factor of 1 1.5, as cod(a) varies betwee Repeatig this test for tridiagoal ill-coditioed matrices ad asymmetric ill-coditioed matrices gave early idetical results, with factors of 1-2 ad , respectively.

8 Relative forward error A Relative backward error B Fig A: Relative forward error ˆx x x same data. for ˆx = A 1 b (solid) ad ˆx = A\b (dots). B: Relative backward error for the Relative forward error A Relative backward error B cod(a) cod(a) Fig A: Forward error x ˆx for ˆx = A x 1 b (solid) ad for ˆx = A\b (dots). The two lies are almost idistiguishable. B: Backward error Aˆx b for the same data. b 3.2. Backward error. The backward error Aˆx b is kow to be sigificatly larger i the A 1 based method tha i the LU-based method whe A is ill-coditioed [9, page 262]. Ideed, Figure 3.1B shows that the backward error of the LU-based method is smaller by a factor of tha for the A 1 based method, for the same matrices used to geerate Figure 3.1A. Similarly, Figure 3.2B shows that the backward error of the LU-based method becomes expoetially smaller tha for the A 1 based method, for the same ill-coditioed ivotory matrices used to geerate Figure 3.2A. These results, thus, cofirm that the LU-based method is superior to the A 1 based method i terms of backward error. However, compariso betwee Figures 3.1A ad 3.1B ad betwee Figures 3.2A ad 3.2B shows, that the backward error is a poor predictio to the forward error. Remark: If the matrix A ca be diagoalized, the worst case sceario is that b is the eigevector of the maximal eigevae (i absote vae) ad b is proportioal to the eigevector of the miimal eigevae. However, i most applicatios arisig from PDE, this is ot the case. The mai mass is cocetrated i the lower modes, i.e. i the eigevector correlated to the lower eigevaes, while the oise is related to the high frequecy modes. Therefore i such applicatios the worst case sceario is ulikely to happeed. 4. Potetial Applicatios. Ay applicatio that ivolves solvig may liear systems with a costat full matrix A ca beefit from adoptig the A 1 based approach over the LU-based method. We ow list various applicatios which are potetially suitable for the A 1 based method:

9 9 1. Spectral differetiatio methods for PDEs: While fiite differece methods require solvig liear systems with a sparse baded matrix, spectral methods, i may cases, require solvig of liear systems with full matrices [3]. For example, whe solvig a parabolic PDE i a implicit method, each time step ivolves solvig a liear system of the form Dx (t+ t) = F (x (t) ), where D is a full matrix which does ot vary with time t. I this case, if the umber of time steps K > K th (), it is faster to adopt the A 1 based approach, i.e., we ivert D at the begiig of the simulatio, ad the at each step calculate x (t+ t) = D 1 F (x (t) ). 2. Modified Newto methods: Newto methods are used to fid the roots of oliear equatios. They ivolve the iteratios ( x (k+1) = x (k) [J (k) ] 1 F x (k)), (4.1) where J (k) = J ( x (k)) is the Jacobia of the fuctio F at the poit x (k). Hece, x (k+1) is the sotio of the liear system ( J (k) x (k+1) = b (k), b (k) = J (k) x (k) F x (k)). (4.2) The calculatio of the Jacobia at every iteratio is typically very expesive. To reduce the cost of the Jacobia calculatio, i the modified Newto method [6], the Jacobia is calculated oly oce every several (K) iteratios. The commo approach is to avoid the explicit calculatio of J 1, ad fid x (k+1) from (4.2). Our aalysis shows that it is faster to use the A 1 based approach ad calculate x (k+1) from (4.1) for small matrices of size < th (K). A similar algorithm which may beefit from applyig the A 1 based method is the Update Skippig BFGS algorithm used i optimizatio problems [1]. I this case, the iteratios of the BFGS method are ( B k x (k+1) = B k x (k) λj x (k)), (4.3) where B k is a approximatio to the Hessia of F at the poit x (k) [5]. To reduce the cost of the Hessia calculatio, i the Update Skippig BFGS algorithm, B k is updated oly oce every K steps. I this case, Our aalysis shows that it is faster to use the A 1 based approach ad calculate x (k+1) from x (k+1) = x (k) λ k B 1 k J (x (k)), (4.4) for matrices of size < th (K). 3. Iverse iteratio: The smallest eigevae of a full matrix A (ad the correspodig eigevector) ca be foud from the sequece v(k+1), where [2], v (k) Av (k+1) = v (k). (4.5) The commo approach is to calculate v (k+1) usig the LU-based method, i.e., Ly = v (k), Uv (k+1) = y. (4.6) However, i this case, calculatig v (k+1) usig the A 1 based approach is faster if the umber of iteratios K > K th (). v (k+1) = A 1 v (k) (4.7)

10 10 Method Equatios CPU time (secods) [L, U] (1.2), (1.3) [L, U, P ] (2.5), (2.6) 7.6 [L, U, P ] + lisolve (2.5), (2.7) 4.62 A 1 (1.4), (1.5) 1.88 Table 4.1 Compariso of CPU ru times for the iverse iteratio method. As a fial example, we implemet the iverse power method (4.5) usig both methods as follows. We radomly choose 250 radom matrices. For each matrix we measure the overall cpu-time (preprocessig ad iteratios) eeded to calculate the smallest eigevae usig the iverse power method implemeted with the A 1 based method (4.7) ad the LU-based method (4.6). We stop the iteratios whe the relative error is below (with respect to the smallest eigevae foud by Matlab s eig fuctio). I our simulatios we observed that the A 1 based method was about 11 times faster tha the LUbased method (see Table 4.1). The average umber of iteratios eeded for the iteratios to coverge was 269 i A 1 based method ad 264 i the LU-based method. This 2% differece is probably due to the larger roudoff errors i the A 1 based method. Therefore, i this case, the A 1 based method is sigificatly faster tha the LU-based method, ad just as accurate. Usig the accelerated LU algorithms (see Sectio 2.4) lead to a cosiderable reductio i the overall CPU time, but was still 2.5 times slower tha usig A 1. Ackowledgmets. We thak Eli Turkel ad Siva Toledo for useful discussios. REFERENCES [1] J.E. Deis ad Jr. Schabel ad B. Robert, Numerical Methods for Ucostraied Optimizatio ad Noliear Equatios, Pretice-Hall, New York, [2] N.L. Trefethe ad D. Bua, Numerical Liear Algebra, Siam, Philadelphia, [3] N.L. Trefethe, Spectral methods i MATLAB, Siam, Philadelphia, [4] C.T. Kelley, Solvig Noliear Equatios with Newto s Method, Siam, Philadelphia, [5] K.G. Tamara ad D. P. O Leary ad L. Nazareth, BFGS with update skippig ad varyig memory,siam J. Optim.,Vol. 8, [6] A. Quarteroi ad R. Sacco ad F. Saleri, Numerical Mathematics, Spriger, New-York, 2000 [7] G. Gob ad C. va Loa, Matrix computatios, 2rd ed., The Johs Hopkis Uiversity Press, Lodo, [8] S. D. Cote ad C. de Boor, Elemetary Numerical Aalysis, 3rd ed., McGraw-Hill book compay, [9] N. J. Higham, Accuracy ad Stability of Numerical Algorithms, Siam, Philadelphia, 1996.

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

Civil Engineering Computation

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

More information

Numerical Methods Lecture 6 - Curve Fitting Techniques

Numerical Methods Lecture 6 - Curve Fitting Techniques Numerical Methods Lecture 6 - Curve Fittig Techiques Topics motivatio iterpolatio liear regressio higher order polyomial form expoetial form Curve fittig - motivatio For root fidig, we used a give fuctio

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

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

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

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

Lecture 18. Optimization in n dimensions

Lecture 18. Optimization in n dimensions Lecture 8 Optimizatio i dimesios Itroductio We ow cosider the problem of miimizig a sigle scalar fuctio of variables, f x, where x=[ x, x,, x ]T. The D case ca be visualized as fidig the lowest poit of

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

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

AN OPTIMIZATION NETWORK FOR MATRIX INVERSION

AN OPTIMIZATION NETWORK FOR MATRIX INVERSION 397 AN OPTIMIZATION NETWORK FOR MATRIX INVERSION Ju-Seog Jag, S~ Youg Lee, ad Sag-Yug Shi Korea Advaced Istitute of Sciece ad Techology, P.O. Box 150, Cheogryag, Seoul, Korea ABSTRACT Iverse matrix calculatio

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

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

A Recursive Blocked Schur Algorithm for Computing the Matrix Square Root. Deadman, Edvin and Higham, Nicholas J. and Ralha, Rui. MIMS EPrint: 2012.

A Recursive Blocked Schur Algorithm for Computing the Matrix Square Root. Deadman, Edvin and Higham, Nicholas J. and Ralha, Rui. MIMS EPrint: 2012. A Recursive Blocked Schur Algorithm for Computig the Matrix Square Root Deadma, Edvi ad Higham, Nicholas J. ad Ralha, Rui 212 MIMS EPrit: 212.26 Machester Istitute for Mathematical Scieces School of Mathematics

More information

EM375 STATISTICS AND MEASUREMENT UNCERTAINTY LEAST SQUARES LINEAR REGRESSION ANALYSIS

EM375 STATISTICS AND MEASUREMENT UNCERTAINTY LEAST SQUARES LINEAR REGRESSION ANALYSIS EM375 STATISTICS AND MEASUREMENT UNCERTAINTY LEAST SQUARES LINEAR REGRESSION ANALYSIS I this uit of the course we ivestigate fittig a straight lie to measured (x, y) data pairs. The equatio we wat to fit

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

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

EE123 Digital Signal Processing

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

More information

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

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

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

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

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

A Note on Least-norm Solution of Global WireWarping

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

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

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

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

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

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

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

More information

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

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

Appendix D. Controller Implementation

Appendix D. Controller Implementation COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);

More information

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

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

More information

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

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

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

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

Algorithm. Counting Sort Analysis of Algorithms

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

More information

Markov Chain Model of HomePlug CSMA MAC for Determining Optimal Fixed Contention Window Size

Markov Chain Model of HomePlug CSMA MAC for Determining Optimal Fixed Contention Window Size Markov Chai Model of HomePlug CSMA MAC for Determiig Optimal Fixed Cotetio Widow Size Eva Krimiger * ad Haiph Latchma Dept. of Electrical ad Computer Egieerig, Uiversity of Florida, Gaiesville, FL, USA

More information

Lecture 13: Validation

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

Math Section 2.2 Polynomial Functions

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

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

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

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

The Adjacency Matrix and The nth Eigenvalue

The Adjacency Matrix and The nth Eigenvalue Spectral Graph Theory Lecture 3 The Adjacecy Matrix ad The th Eigevalue Daiel A. Spielma September 5, 2012 3.1 About these otes These otes are ot ecessarily a accurate represetatio of what happeed i class.

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

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software Structurig Redudacy for Fault Tolerace CSE 598D: Fault Tolerat Software What do we wat to achieve? Versios Damage Assessmet Versio 1 Error Detectio Iputs Versio 2 Voter Outputs State Restoratio Cotiued

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

Ch 9.3 Geometric Sequences and Series Lessons

Ch 9.3 Geometric Sequences and Series Lessons Ch 9.3 Geometric Sequeces ad Series Lessos SKILLS OBJECTIVES Recogize a geometric sequece. Fid the geeral, th term of a geometric sequece. Evaluate a fiite geometric series. Evaluate a ifiite geometric

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

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

Characterizing graphs of maximum principal ratio

Characterizing graphs of maximum principal ratio Characterizig graphs of maximum pricipal ratio Michael Tait ad Josh Tobi November 9, 05 Abstract The pricipal ratio of a coected graph, deoted γg, is the ratio of the maximum ad miimum etries of its first

More information

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

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

More information

Analysis of Algorithms

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

More information

Higher-order iterative methods free from second derivative for solving nonlinear equations

Higher-order iterative methods free from second derivative for solving nonlinear equations Iteratioal Joural of the Phsical Scieces Vol 6(8, pp 887-89, 8 April, Available olie at http://wwwacademicjouralsorg/ijps DOI: 5897/IJPS45 ISSN 99-95 Academic Jourals Full Legth Research Paper Higher-order

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

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

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

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

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

More information

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

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

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

More information

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

9.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 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

It just came to me that I 8.2 GRAPHS AND CONVERGENCE

It just came to me that I 8.2 GRAPHS AND CONVERGENCE 44 Chapter 8 Discrete Mathematics: Fuctios o the Set of Natural Numbers (a) Take several odd, positive itegers for a ad write out eough terms of the 3N sequece to reach a repeatig loop (b) Show that ot

More information

Convergence results for conditional expectations

Convergence results for conditional expectations Beroulli 11(4), 2005, 737 745 Covergece results for coditioal expectatios IRENE CRIMALDI 1 ad LUCA PRATELLI 2 1 Departmet of Mathematics, Uiversity of Bologa, Piazza di Porta Sa Doato 5, 40126 Bologa,

More information

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

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

More information

CS 111: Program Design I Lecture # 7: First Loop, Web Crawler, Functions

CS 111: Program Design I Lecture # 7: First Loop, Web Crawler, Functions CS 111: Program Desig I Lecture # 7: First Loop, Web Crawler, Fuctios Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago September 18, 2018 What will this prit? x = 5 if x == 3: prit("hi!")

More information

Dynamic Programming and Curve Fitting Based Road Boundary Detection

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

Section 7.2: Direction Fields and Euler s Methods

Section 7.2: Direction Fields and Euler s Methods Sectio 7.: Directio ields ad Euler s Methods Practice HW from Stewart Tetbook ot to had i p. 5 # -3 9-3 odd or a give differetial equatio we wat to look at was to fid its solutio. I this chapter we will

More information

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

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

More information

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

Protected points in ordered trees

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

More information

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

Consider the following population data for the state of California. Year Population

Consider the following population data for the state of California. Year Population Assigmets for Bradie Fall 2016 for Chapter 5 Assigmet sheet for Sectios 5.1, 5.3, 5.5, 5.6, 5.7, 5.8 Read Pages 341-349 Exercises for Sectio 5.1 Lagrage Iterpolatio #1, #4, #7, #13, #14 For #1 use MATLAB

More information

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

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

More information

BACHMANN-LANDAU NOTATIONS. Lecturer: Dr. Jomar F. Rabajante IMSP, UPLB MATH 174: Numerical Analysis I 1 st Sem AY

BACHMANN-LANDAU NOTATIONS. Lecturer: Dr. Jomar F. Rabajante IMSP, UPLB MATH 174: Numerical Analysis I 1 st Sem AY BACHMANN-LANDAU NOTATIONS Lecturer: Dr. Jomar F. Rabajate IMSP, UPLB MATH 174: Numerical Aalysis I 1 st Sem AY 018-019 RANKING OF FUNCTIONS Name Big-Oh Eamples Costat O(1 10 Logarithmic O(log log, log(

More information

( n+1 2 ) , position=(7+1)/2 =4,(median is observation #4) Median=10lb

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

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

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

More information

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

ANN WHICH COVERS MLP AND RBF

ANN WHICH COVERS MLP AND RBF ANN WHICH COVERS MLP AND RBF Josef Boští, Jaromír Kual Faculty of Nuclear Scieces ad Physical Egieerig, CTU i Prague Departmet of Software Egieerig Abstract Two basic types of artificial eural etwors Multi

More information

Alpha Individual Solutions MAΘ National Convention 2013

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

Fuzzy Minimal Solution of Dual Fully Fuzzy Matrix Equations

Fuzzy Minimal Solution of Dual Fully Fuzzy Matrix Equations Iteratioal Coferece o Applied Mathematics, Simulatio ad Modellig (AMSM 2016) Fuzzy Miimal Solutio of Dual Fully Fuzzy Matrix Equatios Dequa Shag1 ad Xiaobi Guo2,* 1 Sciece Courses eachig Departmet, Gasu

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

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation Improvemet of the Orthogoal Code Covolutio Capabilities Usig FPGA Implemetatio Naima Kaabouch, Member, IEEE, Apara Dhirde, Member, IEEE, Saleh Faruque, Member, IEEE Departmet of Electrical Egieerig, Uiversity

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

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

Elementary Educational Computer

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

Arithmetic Sequences

Arithmetic Sequences . Arithmetic Sequeces COMMON CORE Learig Stadards HSF-IF.A. HSF-BF.A.1a HSF-BF.A. HSF-LE.A. Essetial Questio How ca you use a arithmetic sequece to describe a patter? A arithmetic sequece is a ordered

More information

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

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

More information

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

Computational Geometry

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

More information

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig

More information

Python Programming: An Introduction to Computer Science

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

Homework 1 Solutions MA 522 Fall 2017

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

More information

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)

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

More information