Copyright 1978, by the author(s). All rights reserved.

Size: px
Start display at page:

Download "Copyright 1978, by the author(s). All rights reserved."

Transcription

1 Copyrght 1978, by the author(s). All rghts reserved. Permsson to make dgtal or hard copes of all or part of ths work for personal or classroom use s granted wthout fee provded that copes are not made or dstrbuted for proft or commercal advantage and that copes bear ths notce and the full ctaton on the frst page. To copy otherwse, to republsh, to post on servers or to redstrbute to lsts, requres pror specfc permsson.

2 Dstrbuted Query Processng n a Relatonal Data Base System by Robert Epsten Mchael Stonebraker Eugene Wong Memorandum No. UCB/ERL M78/18 17 Aprl 1978 Electroncs Research Laboratory College of Engneerng Unversty of Calforna, Berkeley 94720

3 Dstrbuted Query Processng Page 1 Dstrbuted Query Processng n a Relatonal Data Base System by Robert Epsten Mchael Stonebraker Eugene Wong Electroncs Research Laboratory College of Engneerng Unversty of Calforna, Berkeley Abstract In ths paper we present a new algorthm for retrevng and updatng data from a dstrbuted relatonal data base. Wthn such a data base, any number of relatons can be ds trbuted over any number of stes. Moreover, a user sup pled dstrbuton crtera can optonally be used to specfy what ste a tuple belongs to. The algorthm s an effcent way to process any query by "breakng" the qualfcaton nto separate "peces" usng a few smple heurstcs. The cost crtera consdered are mnmum response tme and mnmum communcatons traffc. In addton, the algorthm can optmze separately for two models of a communcaton network representng respectvely ARPANET and ETHERNET lke networks. Ths algorthm s beng mplemented as part of the INGRES data base system. Research sponsored by the U.S. Army Research Offce Grant DAAG29-76-G-0245, and the Jont Servces Electroncs Program Contract F C-0100.

4 Dstrbuted Query Processng Page 2 I Introducton In ths paper we are concerned wth algorthms for pro cessng data base commands that nvolve data from multple machnes n a dstrbuted data base envronment. These algorthms are beng mplemented as part of our work n extendng INGRES [HELD75, ST0N76] to manage a dstrbuted data base. As such, we are concerned wth processng nteractons n the data sublanguage, QUEL. The specfc data model that we use s dscussed n Secton II. Some of our ntal thoughts on these subjects have been presented elsewhere [STON77, W0NG77]. We are not concerned here wth control of concurrent updates or multple copes [TH0M75, LAMP76, ROTH77, CHU76]. Rather we assume that these are handled by a separate mechansm or can be ntegrated nto our algorthms. Ths paper s organzed as follows: In secton II we formalze the problem by ndcatng our vew of a dstr buted data base and the nteractons to be solved. Then, n secton III we dscuss our model for the computer network. In secton IV a detaled algorthm s presented for handlng the decomposton of queres n a dstrbuted envronment. There are a few complcatons concernng updates and aggre gates n a dstrbuted data base whch are covered n sec tons V and VI. Lastly, n secton VII we draw some conclu sons.

5 Dstrbuted Query Processng Page 3 II The Dstrbuted Data Base Model. We adopt the relatonal model of data [C0DD70, CHAM76] and assume that users nteract wth data through the non procedural query language, QUEL [HELD75]. Algorthms for processng QUEL n a sngle machne envronment (so called "decomposton") have been presented n [STON76, W0NG76]. New algorthms or extensons are needed n a dstrbuted envronment. Some famlarty wth the noton of decompos ton wll be helpful n understandng ths paper. The data base s assumed to consst of a collecton of relatons R, R_,...,R. Each relaton, R., may be at a 1 2 n unque ste or may be spread over several stes n a com puter network. We shall refer to a relaton as beng "local" f t s stored entrely at one ste, and "dstrbuted" f portons of t are stored at dfferent stes. By default relatons wll be assumed to be local unless explctly stated to be otherwse. They can be explctly created (or extended) to be dstrbuted on all or a subcollecton of the stes n the computer network. Call the stes S-, S^,...,S. At a gven 1 2 n ste S. there may be a porton (or fragment [ROTH77]) of R.. Call the porton R'?. We shall assume that each fragment s n fact a subrelaton,.e., a subset of the tuples, of a gven relaton. Hence there s no noton of fragments beng projectons of a gven relaton [R0TH77]. Supportng those more general fragments s nfeasble gven the current structure of INGRES. A dstrbuton crteron, whch determnes how tuples are to be allocated to fragments, may be optonally assoc ated wth each relaton. If no dstrbuton crteron exsts, then tuples wll be placed at the ste where they happen to be processed. Fgure 1 ndcates one collecton of relatons, the fragments that are actually stored and ther dstrbuton crtera. An example query for such a data base s to fnd the job numbers suppled by the sup pler named XYZ. In QUEL ths s expressed as: range of s s suppler range of y s supply

6 Dstrbuted Query Processng Page 4 retreve nto w(y.jno) where y.sno = s.snp and s.sname = "X.YZ" Note that ths query nvolves fragments at all three stes

7 Dstrbuted Query Processng Page 5 Fgure 1 (A sample dstrbuted data base) The users vew: suppler (sno, sname, cty) project (jno, jname, cty) supply (sno, jno, amount) The dstrbuton of Fragments: project suppler where suppler.cty = "Berkeley" ste 1 supply suppler where suppler.cty = "San Jose" ste 3 suppler where suppler.cty!= "Berkeley" and suppler.cty!= "San Jose" III Communcatons Network Model. We are prmarly concerned wth two types of communca ton networks namely ste-to-ste and broadcast networks. In a ste-to-ste network we assume that there s a fxed cost to send one byte of data from any ste to any other ste. In a broadcast network we assume that the cost of

8 Dstrbuted Query Processng Page 6 sendng data from one ste to all stes s the same as that of sendng the same data from one ste to a sngle other ste. Our ste to ste model of a network s motvated by the ARPANET [ROBE70] wth one mportant smplfcaton. In ARPANET the actual cost to communcate between two arbtrary stes wll depend on what route the data must travel.e. on the topology of the network. Our broadcast model s smlar to the ETHERNET [METC76] wth two mportant smplfcatons. We assume that every ste s always free to accept new messages. Thus a message wll never have to be retransmtted because a ste was too busy to accept the message. The ETHERNET restrcts the recpent of a message to be ether one ste or every ste. We assume a more general addressng scheme where anywhere from one to all stes can be addressed n a message. Regardless of whch network model s used, we shall assume that t s desrable to present large blocks of data to the network for transmsson. In other words, bulk transmsson s more effcent. It wll be shown that a broadcast (or ETHER) network s partcularly well suted to a relatonal data base envron ment. The query processng algorthm can take explct advantage of the broadcast capablty of such a network. However, t s our ntenton to have INGRES support a data base on ether type of network.

9 Dstrbuted Query Processng Page 7 IV Query Decomposton. INGRES supports four dfferent data manpulaton com mands: retreve, append, delete, and replace. As mentoned n [STON76], all update commands (append, delete, and replace) are actually processed by convertng them to retreve commands (to dscover what to do) followed by low level fle manpulaton operatons. Thus, the algorthm to decompose queres on a dstrbuted system can be ndependent of the whether t s an update or retreval untl the very end. For ths reason, we shall restrct our dscusson here to "retreves" and cover the relevant problems of updates n the next secton. Optmzaton Crtera. Mnmzng response tme and mnmzng network traffc wll be taken to be the two man optmzaton crtera n a dstrbuted data base envronment. Mnmzng response tme nvolves mnmzng the amount of processng needed to solve a query and usng as much parallelsm as possble from the varous computer stes. Mnmzng network traffc nvolves transmttng only the mnmum data needed to solve the query. These two crtera are not unrelated. An ncrease n network traffc wll mprove response tme f t results n greater parallel processng. Network Decomposton Algorthm. We frst present the skeleton of the bass algorthm. We subsequently dscuss the detaled optmzaton tactc nvolved. The algorthm to decompose a query has the followng nputs: 1) the conjunctve normal form of the query (.e. the qualfcaton s a collecton of clauses separated by AND's; each clause contanng only OR and NOT). 2) the locaton of each fragment and ts cardnalty. 3) the network type (ste-to-ste or broadcast). The algorthm s presented wthn the flowchart n Fgure 2. The partcular ste where the query orgnates s called the

10 Dstrbuted Query Processng Page 8 "master" INGRES ste. The master INGRES communcates wth one "slave" INGRES at each ste that s nvolved n process ng the query. These "slaves" can be created by the "mas ter" when approprate. There are two types of commands that a master INGRES can gve to a slave INGRES. 1) run the (local) query Q. 2) move the (local) fragment R. of relaton R to a sub set of the stes n the network, S-. S0,..., S. ' 1' 2' ' m The algorthm proceeds as follows: (1) Do all one varable sub-queres. Ths has been shown n [YOUS78] to be almost always a good dea for nondstrbuted data bases. It should be equally true for ds trbuted data bases. Note that n the example query from secton II, a one-varable subquery: we have range of s s suppler retreve nto temp(s.sno) where s.name = "XYZ" In step (1) the master INGRES at the ste where the query orgnated nstructs a slave at each of the three stes to run the above subquery. The result s a fragment of temp at each ste. The orgnal query now becomes: range of t s temp range of y s supply retreve nto w(y.jno) where y.sno = t.sno Before actually runnng such a subquery, f the rela ton has a dstrbuton crteron, check to see f a clause n the dstrbuton crteron at ste contradcts a clause n the subquery. In general ths requres a propostonal calculus theorem prover. However, there are some smple cases for whch contradcton s easly determned. For example, f the user's query ncludes a clause such as... and suppler.cty = "San Francsco" examnng the dstrbuton crteron for ste mght show

11 Dstrbuted Query Processng Page 9 Fgure 2 start yes none Do all 1 varable queres on all stes Elmnate stes f possble. v Was there a 1 varable query whch was false on all stes? I no v Apply reducton algorthm j < v < Choose "next pece" of query, v Can "pece" be done yes on sngle stes?! no v Select processng stes and varables to transmt Transmt varables Run Query(es) All False?. no! yes v Done

12 Dstrbuted Query Processng Page 10 suppler where suppler.cty = "Berkeley" Thus wthout actually runnng the sub-query on ste, the porton of suppler on ste can be elmnated from the query. (2) If there s a sub-query that was not satsfed on any ste n (1), the entre query s false and we are done. Ths would happen n our example f temp had no tuples at all stes. (3) Apply the reducton algorthm [WONG76] to the query. Ths wll recast the orgnal query nto a sequence of com ponent queres, each of whch s processed n order, ndependently. Consder a query Q(x1,x2,- -.,x ) n QUEL where each varable x references a relaton R.. Q s sad to be redu cble f t can be replaced by a sequence of two queres (Q'» Q") that overlap on only one varable,.e., Q( xr x2,... xn) > Q'( xm, xn+1,... xn) followed by Q"( x1 x..., x' ) 1,2, m where the range of x' s the result relaton of Q'. For example the query: range of s s suppler range of y s supply range of j s project retreve (s.sname) where s.sno = y.sno and y.jno = j.jno can be reduced to two components namely: retreve nto temp (y.sno) where y.jno = j.jno followed by

13 Dstrbuted Query Processng Page 11 range of t s temp retreve (s.sname) where s.sno = t.sno It s shown n [WONG76] that the rreducble components of a query are unque, and an ntutve argument s presented whch ndcates that these components form an advantageous sequence of subqueres. To test ths hypothess,.expermentaton wth actual data was recently undertaken by [YOUS78] and the results were convncngly affrmatve. It should be equally advantageous n a dstr buted system. Ths step wll perform the reducton algorthm and arrange the rreducble components of the query n ther unque sequence. We can then consder the subqueres ndependently. The example query from secton II s not reducble so ths step has no effect. (4) Choose the "next pece" of the query to process. A query conssts of a target lst and a qualfcaton (whch s n conjunctve normal form). We defne a "pece" as one or more clauses and ther assocated target lsts. Based on the query structure and the sze and locaton of the fragments, the next "pece" of the query to be pro cessed s selected. The algorthm to do ths wll be explaned shortly. In our example there s only one reman ng clause, whch therefore must be the next pece. (5) If the pece to be run can be done on ndvdual stes wthout movng portons of the relatons, then we proceed to step (9). In our example temp s at three stes and supply s at one. Hence, data must be moved n order to proceed. (6) Select the ste(s) that wll process the next pece of the query. Dependng on the number of stes, and whether t s a ste-to-ste or broadcast network, anywhere from one to all possble stes may be chosen. Suppose for our example that all three stes are chosen. (7) The sub-query must be two varable or more n order to reach ths step. In order to process an n varable subquery, fragments from n - 1 relatons must be moved, and the remanng relaton wll reman fragmented. Each ste

14 Dstrbuted Query Processng Page 12 that does processng must have a complete copy of the n - 1 relatons. If processng s done on a sngle ste, t must have copes of all n relatons. For our example we can broadcast supply to all stes. Each ste wll then have all of supply and a fragment of temp and wll process the query producng a local fragment w. The answer to the query s the dstrbuted relaton w. Alternatvely, we can choose to broadcast temp to all stes nvolved n the query. Here we can vew supply as dstrbuted but wth zero tuples on two of the three stes. Hence, fragments of temp wll be sent to ste 2. Ste 2 then processes the same local query as above to produce a w; whle stes 1 and 3 have no work to do. Lastly, we can choose to equalze the dstrbuton of the tuples n the relaton that remans fragmented so as to guarantee that all processng stes have the same amount of work to do. Ths requres sendng each ste a complete copy of temp, and movng one-thrd of the suppler tuples to each of the other two stes before proceedng as above. (8) Move the selected relaton fragments to the selected stes. Each ste wll be drected, n turn, to send a copy of ts selected fragments to the stes selected n step (6). An optmzaton here s to have each ste send only the domans needed n the query. Thus a fragment can be pro jected and duplcates removed. Ths step can take full advantage of a broadcast net work snce we are often broadcastng from one ste to many stes. (9) The master INGRES now broadcasts the query to the selected stes and wats for all stes to fnsh. Once the query has been transmtted, ths step nvolves only local processng. If no ste fnds the qualfcaton to be true, then we know the query s false and no further processng need be done. Otherwse the clauses just run are removed from the query and the new range of the remanng varables s changed f necessary.

15 Dstrbuted Query Processng Page 13 (10) Go to step (4) The Optmzaton Problem. As outlned n the flowchart, the processng algorthm that we have chosen nvolves several decsons: (1) What s the "next pece" of the query that should be processed? (2) Whch stes should take part n the processng of that pece? (3) If the number of partcpatng ste s greater than one, whch of the relatons should be left fragmented? (4) Should the fragmented relaton be equalzed n sze among the processng stes? Choosng the "Next Pece". We have chosen to solve a query by "dvde and con quer". That s, a query wll be broken nto one or more parts and each part wll be processed n turn. The algo rthm we pursue can justfably be called a "greedy" algo rthm. We wll try to optmze each step, ndvdually, wthout explctly lookng ahead to examne the global consequences. A possble refnement s to consder the structure of the resdual query when decdng what should be done. The trade off between cost and beneft remans to be studed. Results from decomposton on a sngle ste have shown that reducng a query nto ts rreducble components s a good heurstc. Thus, after all one varable subqueres have been removed, the reducton algorthm wll be used to transform the orgnal query nto ts rreducble components whch overlap on none, or one varables. Q -» Kr K2,..., K± We could stop at ths pont and smply execute each com ponent n order, whch s what we do on a sngle ste. How ever, snce any one component may span multple stes, t may be desrable to subdvde further. Every component con tans one or more clauses: K = C.., Cp».» C. The queston s whether we should process the entre com ponent at once or subdvde t? The answer s to subdvde

16 Dstrbuted Query Processng Page 14 only f the sze of the result relaton from subdvdng s smaller than the communcaton cost of transmttng the source relatons needed to process t. Here s an example to ntutvely llustrate what can be acheved. Consder the database from secton II wth relatons: suppler (sno, sname, cty) project (jno, jname, cty) supply (sno, jno, amount) and the query: "fnd the names of suppler-project pars such that the suppler supples the project and the two are n the same cty." In QUEL ths can be stated as: range of s s suppler range of j s project range of y s supply retreve (s.sname, j.jname) where s.cty = j.cty and s.sno = y.sno and j.jno = y.jno Ths query s rreducble and nvolves three varables. There s only one rreducble component (namely the entre query) and t nvolves three clauses. To keep the example smple we shall gnore ste 3 from Fgure 1 and pretend there are only two stes, whch have: ste 1 ste 2 project (200 tuples) supply (400 tuples) suppler (50 tuples) suppler (50 tuples) Assume that the tuples of the three relatons have the same wdth. Now consder the costs and benefts of subdvdng the component. We need to examne the four possble choces: (Q1) retreve nto temp(s.sname, s.cty, y.jno) where s.sno = y.sno

17 Dstrbuted Query Processng Page 15 (Q2) retreve nto temp(s.sname, s.sno, j.jname, j.jno) where s.cty = j.cty (Q3) retreve nto temp(j.jname, j.cty, y.sno) where j.jno = y.jno (Q4) retreve (s.sname, j.jname) where s.cty = j.cty and s.sno = y.sno and j.jno = y.jno These are the only possble alternatves. Choosng any two clauses would be tantamount to Q4 snce any two clauses nvolve all three relatons. Q4 would requre movng 200 project tuples and 50 sup pler tuples at whch pont we could complete the query. Therefore, any subdvson wll have to do better than that. Suppose we choose to do Q1. Ths would requre movng 50 suppler tuples. The result relaton would have to be moved n order to process the remanng query: range of t s temp range of j s project retreve (t.sname, j.jname) where t.cty = j.cty and j.jno = t.jno If s.sno were a unque dentfer for suppler and each sup pler suppled only one job, then the result from Q1 would be at most 50 tuples. Thus the total network cost would be movng 50 suppler tuples followed by at most 50 tuples of temp. But also consder the worst case. Suppose that sno s not unque and the entre cross-product of suppler and sup ply f formed. It would have 50 * 400 = 20,000 tuples! The decson whether to subdvde a component must be based on the expected sze of the result relaton. Some method for estmatng the result sze s needed. But suppose the worst happens and the result sze explodes geometrcally. We can throw the result away and smply revert to runnng the whole component. In that case

18 Dstrbuted Query Processng Page 16 we would lose the tme spent processng the abandoned query. The accuracy of estmatng the result sze depends on a careful examnaton of the semantc content of the query (e.g., whether a clause nvolves an equalty), on nforma ton concernng the dstrbuton of values of the domans, (e.g., sno may be a prmary key for the suppler relaton wth no more than one tuple for each possble value), and on the number of varables n the target lst and ther szes. Whle complng and keepng extensve statstcs s mprac tcal, a value ndcatng whether a doman s nearly a pr mary key or not may be both useful and easy to keep. Determnng How to Process the "Next Pece". The second part of the optmzaton problem s how to process a gven subquery. That s, whch stes should be used as processng stes and whch relaton fragments should be moved. The more stes nvolved, the greater the paral lelsm. However, usng more stes may nvolve greater com muncaton costs and delays. Presumably we wll want to make decsons whch mnm ze some applcaton dependent cost functon whch mght look somethng lke: F(c1 * network_communcaton + c2 * processng tme) To do ths we wll need to know how to calculate the amount of network traffc nvolved, the relatve processng tme, and the cost/benefts of equalzng the fragmented relaton. We wll now proceed to explan how to determne each of these. Notatonally, we know there are: N total stes n the network n relatons referenced n the "next pece" We need to choose: K stes to be processng stes R as the relaton to be left fragmented Let's number the processng stes so that 1 <= j <= K. Furthermore, let's defne M. as the number of stes where R.

19 Dstrbuted Query Processng Page 17 has data stored nvolvng At each processng ste j we have a query Qj = Q(R1, R2' ' ^p' ' ',R n ) Determnng Network Cost Gven R and K. Assumng that one relaton R s left fragmented, and K stes (out of N) partcpate n processng, then the frag ments of R. have to be moved as follows: for a processng ste j, R^ s moved to K - 1 other stes. for a non-processng ste j, Rv s moved to K other stes and any fragments of R^ are moved to any one processng ste. The total communcaton cost s gven by comm = K 2 c!rj!! J=1 K-1 [_^p ' ll J=K+1L IRj"j!CKLT_- *P l 3-I n J l L. C- R f 1 l_l P 1-1 l where C (x) denotes the cost of sendng x bytes of data to K stes, a cost that depends on the network that s used. Estmatng Relatve Processng Tme. Defne proc(q) to be the tme requred to process the query Q f t were done on a sngle ste. If K s greater than one then the processng tme of a query, Q, can be mproved from proc(q) to max. proc(q.). In other words, the processng tme for the whole query s equal to the process ng tme of the ste j wth the most processng to be done. It s reasonable to assume that the processng tme at each ste s gven by procq. J R Jl proc r n so that the overall processng tme s

20 Dstrbuted Query Processng Page 18 1 n trj max proc jq. = max"1 tl proc r ~,Q j 1 " 1' j!r! J! P! assumng that all stes are of approxmately equal process ng speed. Cost for Equalzaton. If each fragment of R was the same sze, then the overall processng tme would be gven by 1/K proc(q), snce each fragment would have (1/K) of the data. (Ths assumes, agan, that all computer stes are of approxmately equal speed.) Ths s the motvaton for equalzaton. To determne the cost of equalzng, let us defne the functon pos(x) to be: f x > 0 then pos(x) = x f x <= 0 then pos(x) r 0 The amount of data to be moved n equalzng the fragments of R s gven by N 2 pos RJ - R j L P NJ p. j=1 Ths added network RJ mprovement from - trade some network cessng tme. R P CO' cost would result n processng to j7. Thus t may be desrable to st for an mprovement n overall pro- We now know how to compute network communcaton cost, relatve processng tme, and the cost and beneft of equal zng R We wll now use ths knowledge to mnmze some example cost functons Mnmzng Communcaton Costs. For the moment let's assume that the overall optmza ton crtera s to mnmze communcaton costs. It s mportant to treat ste-to-ste and broadcast networks separately. We wll frst consder usng a broadcast

21 Dstrbuted Query Processng Page 19 network and solvng for K and R. For a broadcast network CK(x) = C^x) for all K >= 1. By examnaton of the communcaton cost functon gven on page 17 t can be seen that the communcaton cost functon s always mnmzed by K = 1 or K > M. To see ths observe that the cost functon has three terms. The frst term wll be zero f K = 1. The thrd term wll be zero f every ste whch has part of R s a processng ste. Thus K must be > M, where M s the number of stes where R_ s present. - p' p P If we assume that C^x) s lnear n x and rearrange some terms then rcomml. ahna. = cjslr,] - lwa\ for K=1 L J broadcast 1 - l} ^ 11 Hence, ICOMM j J. = cj5»r.'-'r'! for K=N LUU1,UJ broadcast 1jfj. P j L. -I the decson rule for mnmzng communcaton n the broadcast network case s gven by If max SR^ > max»r., choose K = 1 and choose the 1 ' 1 I ' processng ste (ste 1) to be the one contanng the most data. In ths case there s no R. In other words, f one ste has more data than the largest relaton, then K = 1 and choose that ste. If max 2R- < max R.j, choose Rrt to be the relaton J l ll! X P contanng the most data and choose K=M. The stuaton for ste-to-ste networks s qute df ferent. For that case we shall assume C^(x) = k Cj(x) and that C-(x) s agan lnear n x. We note that, ndependent of K the choce of R that mnmzes communcatons s the P ' relaton wth the most data,.e., max jr. ]. Once R s chosen, the value of K that mnmzes communcatons s determned as follows: Let the stes be arranged n decreasng order of? R^. Then, choose K to be 1 f 1 ll

22 Dstrbuted Query Processng Page 20 1 Rj - lr-! > \K\ otherwse choose K to be the largest j such that 2 R, - IR^I! < R^ ^p 1 I 1 l-j I P I The nterpretaton of ths decson rule s as follows. A ste should be chosen as a processng ste f and only f the data that t s to receve as a processng ste s less that the addtonal data that t would have to send as a nonprocessng ste. If mnmzaton of communcaton cost s the sole cr teron of optmzaton, then the best choces for both K and R have been completely determned for both broadcast and p ste-to-ste networks. We expect the followng exceedngly smple rule to be reasonable for choosng the number of pro cessng stes: Choose R to be the largest relaton. P f N = 2 and n = 2 then K = 2 f N 2 then K = M for broadcast network K = 1 for ste-to-ste network Mnmzng Processng Tme. Suppose for the moment that our goal was only to mnm ze processng tme and we were wllng to gnore any net work costs or delays. In ths case we would want K = N so that we could dstrbute the work among all stes. We would stll need to choose one relaton to reman fragmented. The actual processng tme wll be ndependent of whatever rela ton we choose. To see ths notce that when we equalze the fragmented relaton the processng tme goes from RJ ' n' 1 max. J tllproc(q) to - proc(q), whch s ndependent of R. J Sr! K y! P!

23 Dstrbuted Query Processng Page 21 Snce we can choose any R our choce for R should be the relaton whch mnmzes network traffc. Thus we are lookng for R whch mnmzes: P 2 c 2 rj j + 2 pos! rj - /njrd;! j=1 N-1_*p' 1,j j=1 "- ' p» p J Summary. The true optmal soluton cannot be determned wthout knowng the precse relatonshps between processng tme and communcaton costs, the dstrbuton of data among the N stes, and the true processng tme for each ste. Any optmal soluton would have to consder the possblty of usng any value of K from 1 to N. Exactly how to choose R and K s an open ended ques ton untl the cost crtera have been specfed. We have shown solutons at two extremes (mnmum network traffc and mnmum processng tme). Note the smlarty between the "next pece" decson and the next tuple varable to be chosen for substtuton n sngle ste decomposton. The same nablty to acheve a true optmum s present n both cases. Just as refnement of the decson makng process was presented n [YOUS78] for decomposton, we plan to do expermentaton concernng cases where each possble algo rthm s best.

24 Dstrbuted Query Processng Page 22 V Updates. INGRES wll be expanded to allow dstrbuted relatons wth optonal dstrbuton crtera. When nserts occur they can cause tuples to be placed on specfc stes. In the case of a replace command, they can cause tuples to be moved from one ste to another. We wll assume that a dstrbuton crteron maps a tuple to a unque ste or to no ste at all. It s possble that a crteron dsallows certan values. Snce the ds trbuton crteron s related to an ntegrty constrant [STON75], tuples whch cannot belong to any ste could be treated as a volaton of an ntegrty constrant. Wth a dstrbuton crteron we wll guarantee that the collecton of all the fragments of a relaton contans no duplcates. Wthout a dstrbuton crteron, any one fragment wll contan no duplcates, but the collecton of all stes can contan duplcates. To support any other rule seems too costly. The processng of an update wll proceed as follows: (1) At the end of the query decomposton, one or more stes wll have a porton of a temporary relaton that holds the changes to be made to the result relaton. (2) Each ste performs the updates specfcally desg nated for t. (3) The remanng updates (f any) are sent drectly to ther correct stes. (4) Each ste completes any new updates receved. The decomposton algorthm can help the update pro cessng by never movng the result relaton. For example, n the query: range of p s project range of s s suppler delete p where p.cty = s.cty decomposton has the choce of movng ether p or s. By

25 Dstrbuted Query Processng Page 23 always choosng NOT to move p (the result relaton var able), we optmze the update processng. Ths s because step (3) above wll then have no tuples for other stes. However, choosng not to move the result relaton, may be a poor tactc durng decomposton. The trade-off cannot readly be determned wthout advance knowledge of how many tuples of the result relaton satsfy the qualfcaton. We wll now dentfy what must be done for each update command, wth or wthout a dstrbuton crteron. For an append command, each tuple to be appended s put nto a temporary relaton and then splt accordng to steps (1) to (4) above. If there s no dstrbuton crteron, the tuples can be appended drectly nstead of gong through a temporary relaton. For a delete command, the temporary relaton conssts of a tuple dentfer (TID) and machne dentfer (MID). The algorthm s the same regardless of the dstrbuton crteron. Note that f we guarantee that the result rela ton s not moved durng decomposton, we do not need the MID. The set of TIDs s only for the machne n whch they resde. In fact, f the result relaton s not moved durng decomposton, the temporary relaton s not needed. The deletes can be done drectly. For a replace command, the TID, MID, and the new tuple must be saved. If the relaton does not have a dstrbuton crteron the replace command s processed n the same manner as a delete. Wth a dstrbuton crteron, t s possble that a tuple wll have to be moved from ts current ste to another. If ths happens, t must be deleted at the current ste and marked to be appended at ts new ste. If decomposton moves the result relaton and a tuple has to change stes because of a replace, steps (3) and (4) must be repeated twce. In order to provde for recovery from a system crash durng an update, updates are not done drectly, nstead we use a "deferred update" fle [STON76]. The deferred update fle wll contan a full mage of all changes that must occur before any actual updates take place. The deferred update mechansm s hdden below the mechansm we have been dscussng.

26 Dstrbuted Query Processng Page 24 All update processng s controlled by the master INGRES. The ndvdual stes can all perform the updates n parallel. If the result relaton s never moved durng decomposton, addtonal network costs can only occur n append, and replace commands where the dstrbuton cr teron forces the tuples to be moved to a new ste.

27 Dstrbuted Query Processng Page 25 VI Processng of Aggregates. The current mplementaton of INGRES processes aggre gates (mn, max, avg, sum, and count) frst and then decom poses the remanng aggregate-free query. Although ths s not always optmal, t typcally s and t s a smple query processng strategy. For dstrbuted INGRES we also plan to process all aggregates frst. Some optmzaton specfc to aggregates can be done. For example, aggregates that range over only one relaton, and are done wthout removng duplcates are processed on ndvdual stes and the aggregated results are transmtted back to the master ste where they are combned to produce the fnal result. Aggregates whch nvolve more than one relaton or whch requre duplcates to be removed, are processed by frst retrevng the values to be aggregated nto a dstr buted temporary relaton, and then aggregatng on that tem porary relaton. If the aggregate requres duplcates to be removed, then the temporary relaton wll have to be col lected onto a sngle ste n order to remove duplcates. Other optmzaton technques such as processng as many aggregates as possble n the same pass through the relaton, and optmzng the by-domans references n aggre gate functons, wll contnue to be performed.

28 Dstrbuted Query Processng Page 26 VII Conclusons. The model we propose for a dstrbuted data base s very flexble. Portons of a relaton can exst at any number of stes and an optonal dstrbuton crtera can be used to assgn tuples to specfc stes. The algorthm for decomposng a query nvolves examn ng the structure of a query's qualfcaton. The query s processed by choosng for processng one or more clauses of the qualfcaton at a tme. It s nevtable that some data wll have to be moved from ste to ste n order to process a query. The algorthm tres to move only the smal lest amount of data, and tres to get the maxmum amount of parallel processng possble. In addton, by tryng to avod movng the result relaton, we help to optmze the update processng. Durng query processng t s frequently desrable to broadcast data from one ste to several other stes, whch makes a broadcast network extremely desrable.

29 Dstrbuted Query Processng Page 27 REFERENCES [CHAM76] Chamberln, D.D.; "Relatonal Data Base Manage ment: A Survey," Computng Survey, Vol. 8, no. 1, March [CHU76] Chu, Wesley W. ; "Performance of Fle Drectory Systems for Data Bases n Star and Dstrbuted Networks," AFIPS Conference Proceedngs, vol. 45, [CODD70] Codd, E.F.; "A Relatonal Model of Data for Large Shared Data Banks," CACM vol. 13, no. 6, June [HELD75] Held, G.D., M.R. Stonebraker, and E. Wong; "INGRES - A Relatonal Data Base System," Proc. NCC vol. 44, [LAMP76] Lamport, L.; "Tme, Clocks and Orderng of Events n a Dstrbuted System," Mass. Computer Assoc ates Report CA , March [METC76] Metcalf, R. M. and D. R. Boggs, "Ethernet: Ds trbuted Packet Swtchng for Local Computer Net works," CACM, vol. 19, no. 7, July [ROBE70] Roberts, L. and Wessler, B., "Computer Network Development to Acheve Resource Sharng," Proc. SJCC, 1970, AFIPS Press. [ROTH77] Rothne, J.B. and N. Goodman; "An Overvew of the Prelmnary Desgn of SDD-1: A System for Ds trbuted Databases," 1977 Berkeley Workshop on Dstrbuted Data Management and Computer Net works, Lawrence Berkeley Laboratory, May [STON75] Stonebraker, M.R.; "Implementaton of Integrty Constrants and Vews by Query Modfcaton", Unversty of Calforna, Electroncs Research Laboratory, Memorandum ERL-M514, March 1975.

30 Dstrbuted Query Processng Page 28 [STON76] Stonebraker, M.R., E. Wong, P. Kreps and G.D. Held; "Desgn and Implementaton of INGRES," ACM Trans. Database Systems, vol. 1, no. 3, Sept [ST0N77] Stonebraker, M.R. and E. Neuhold; "A Dstrbuted Database Verson of INGRES," 1977 Berkeley Workshop on Dstrbuted Data Management and Com puter Networks, Lawrence Berkeley Laboratory, May [TH0M75] Thomas, R.H.; "A Soluton to the Update Problem for Multple Copy Databases Whch Use Dstrbuted Control," BBN Report 3340, Bolt Beranek and New man Inc., Cambrdge, Mass., July [W0NG76] Wong, E. and K. Youssef; "Decomposton - A Strategy for Query Processng," ACM Trans. Data base Systems, vol. 1, no. 3, Sept [W0NG77] Wong, E. ; "Retrevng Dspersed Data from SDD-1: A System for Dstrbuted Databases," 1977 Berke ley Workshop on Dstrbuted Data Management and Computer Networks, Lawrence Berkeley Laboratory, May [Y0US78] Youssef, K. ; "Query Processng for a Relatonal Database System," Ph.D Dssertaton, Unversty of Calforna, Berkeley, 1978, Electroncs Research Laboratory, Memorandum UCB/ERL M78/3, January 6, 1978.

An Optimal Algorithm for Prufer Codes *

An Optimal Algorithm for Prufer Codes * J. Software Engneerng & Applcatons, 2009, 2: 111-115 do:10.4236/jsea.2009.22016 Publshed Onlne July 2009 (www.scrp.org/journal/jsea) An Optmal Algorthm for Prufer Codes * Xaodong Wang 1, 2, Le Wang 3,

More information

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour 6.854 Advanced Algorthms Petar Maymounkov Problem Set 11 (November 23, 2005) Wth: Benjamn Rossman, Oren Wemann, and Pouya Kheradpour Problem 1. We reduce vertex cover to MAX-SAT wth weghts, such that the

More information

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compler Desgn Sprng 2014 Regster Allocaton Sample Exercses and Solutons Prof. Pedro C. Dnz USC / Informaton Scences Insttute 4676 Admralty Way, Sute 1001 Marna del Rey, Calforna 90292 pedro@s.edu Regster

More information

DISTRIBUTED QUERY PROCESSING IN A RELATIONAL DATA BASE SYSTEM. Robert Epstein Michael Stonebraker Eugene Wong

DISTRIBUTED QUERY PROCESSING IN A RELATIONAL DATA BASE SYSTEM. Robert Epstein Michael Stonebraker Eugene Wong DSTRBUTED QUERY PROCESSNG N A RELATONAL DATA BASE SYSTEM Robert Epstein Michael Stonebraker Eugene Wong Electronics Research Laboratory College of Engineering University of California, Berkeley 94720 ABSTRACT:

More information

A Binarization Algorithm specialized on Document Images and Photos

A Binarization Algorithm specialized on Document Images and Photos A Bnarzaton Algorthm specalzed on Document mages and Photos Ergna Kavalleratou Dept. of nformaton and Communcaton Systems Engneerng Unversty of the Aegean kavalleratou@aegean.gr Abstract n ths paper, a

More information

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields 17 th European Symposum on Computer Aded Process Engneerng ESCAPE17 V. Plesu and P.S. Agach (Edtors) 2007 Elsever B.V. All rghts reserved. 1 A mathematcal programmng approach to the analyss, desgn and

More information

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Parallelism for Nested Loops with Non-uniform and Flow Dependences Parallelsm for Nested Loops wth Non-unform and Flow Dependences Sam-Jn Jeong Dept. of Informaton & Communcaton Engneerng, Cheonan Unversty, 5, Anseo-dong, Cheonan, Chungnam, 330-80, Korea. seong@cheonan.ac.kr

More information

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique //00 :0 AM Outlne and Readng The Greedy Method The Greedy Method Technque (secton.) Fractonal Knapsack Problem (secton..) Task Schedulng (secton..) Mnmum Spannng Trees (secton.) Change Money Problem Greedy

More information

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms Course Introducton Course Topcs Exams, abs, Proects A quc loo at a few algorthms 1 Advanced Data Structures and Algorthms Descrpton: We are gong to dscuss algorthm complexty analyss, algorthm desgn technques

More information

Performance Evaluation of Information Retrieval Systems

Performance Evaluation of Information Retrieval Systems Why System Evaluaton? Performance Evaluaton of Informaton Retreval Systems Many sldes n ths secton are adapted from Prof. Joydeep Ghosh (UT ECE) who n turn adapted them from Prof. Dk Lee (Unv. of Scence

More information

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search Sequental search Buldng Java Programs Chapter 13 Searchng and Sortng sequental search: Locates a target value n an array/lst by examnng each element from start to fnsh. How many elements wll t need to

More information

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1)

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1) Secton 1.2 Subsets and the Boolean operatons on sets If every element of the set A s an element of the set B, we say that A s a subset of B, or that A s contaned n B, or that B contans A, and we wrte A

More information

Solving two-person zero-sum game by Matlab

Solving two-person zero-sum game by Matlab Appled Mechancs and Materals Onlne: 2011-02-02 ISSN: 1662-7482, Vols. 50-51, pp 262-265 do:10.4028/www.scentfc.net/amm.50-51.262 2011 Trans Tech Publcatons, Swtzerland Solvng two-person zero-sum game by

More information

Needed Information to do Allocation

Needed Information to do Allocation Complexty n the Database Allocaton Desgn Must tae relatonshp between fragments nto account Cost of ntegrty enforcements Constrants on response-tme, storage, and processng capablty Needed Informaton to

More information

Concurrent Apriori Data Mining Algorithms

Concurrent Apriori Data Mining Algorithms Concurrent Apror Data Mnng Algorthms Vassl Halatchev Department of Electrcal Engneerng and Computer Scence York Unversty, Toronto October 8, 2015 Outlne Why t s mportant Introducton to Assocaton Rule Mnng

More information

Simulation Based Analysis of FAST TCP using OMNET++

Simulation Based Analysis of FAST TCP using OMNET++ Smulaton Based Analyss of FAST TCP usng OMNET++ Umar ul Hassan 04030038@lums.edu.pk Md Term Report CS678 Topcs n Internet Research Sprng, 2006 Introducton Internet traffc s doublng roughly every 3 months

More information

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound CSE 326: Data Structures Qucksort Comparson Sortng Bound Steve Setz Wnter 2009 Qucksort Qucksort uses a dvde and conquer strategy, but does not requre the O(N) extra space that MergeSort does. Here s the

More information

Mathematics 256 a course in differential equations for engineering students

Mathematics 256 a course in differential equations for engineering students Mathematcs 56 a course n dfferental equatons for engneerng students Chapter 5. More effcent methods of numercal soluton Euler s method s qute neffcent. Because the error s essentally proportonal to the

More information

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following. Complex Numbers The last topc n ths secton s not really related to most of what we ve done n ths chapter, although t s somewhat related to the radcals secton as we wll see. We also won t need the materal

More information

TPL-Aware Displacement-driven Detailed Placement Refinement with Coloring Constraints

TPL-Aware Displacement-driven Detailed Placement Refinement with Coloring Constraints TPL-ware Dsplacement-drven Detaled Placement Refnement wth Colorng Constrants Tao Ln Iowa State Unversty tln@astate.edu Chrs Chu Iowa State Unversty cnchu@astate.edu BSTRCT To mnmze the effect of process

More information

Learning the Kernel Parameters in Kernel Minimum Distance Classifier

Learning the Kernel Parameters in Kernel Minimum Distance Classifier Learnng the Kernel Parameters n Kernel Mnmum Dstance Classfer Daoqang Zhang 1,, Songcan Chen and Zh-Hua Zhou 1* 1 Natonal Laboratory for Novel Software Technology Nanjng Unversty, Nanjng 193, Chna Department

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CPS 0 Introducton to Computer Scence Lecture Notes Chapter : Algorthm Desgn How should we present algorthms? Natural languages lke Englsh, Spansh, or French whch are rch n nterpretaton and meanng are not

More information

NAG Fortran Library Chapter Introduction. G10 Smoothing in Statistics

NAG Fortran Library Chapter Introduction. G10 Smoothing in Statistics Introducton G10 NAG Fortran Lbrary Chapter Introducton G10 Smoothng n Statstcs Contents 1 Scope of the Chapter... 2 2 Background to the Problems... 2 2.1 Smoothng Methods... 2 2.2 Smoothng Splnes and Regresson

More information

GSLM Operations Research II Fall 13/14

GSLM Operations Research II Fall 13/14 GSLM 58 Operatons Research II Fall /4 6. Separable Programmng Consder a general NLP mn f(x) s.t. g j (x) b j j =. m. Defnton 6.. The NLP s a separable program f ts objectve functon and all constrants are

More information

CS 534: Computer Vision Model Fitting

CS 534: Computer Vision Model Fitting CS 534: Computer Vson Model Fttng Sprng 004 Ahmed Elgammal Dept of Computer Scence CS 534 Model Fttng - 1 Outlnes Model fttng s mportant Least-squares fttng Maxmum lkelhood estmaton MAP estmaton Robust

More information

Support Vector Machines

Support Vector Machines /9/207 MIST.6060 Busness Intellgence and Data Mnng What are Support Vector Machnes? Support Vector Machnes Support Vector Machnes (SVMs) are supervsed learnng technques that analyze data and recognze patterns.

More information

K-means and Hierarchical Clustering

K-means and Hierarchical Clustering Note to other teachers and users of these sldes. Andrew would be delghted f you found ths source materal useful n gvng your own lectures. Feel free to use these sldes verbatm, or to modfy them to ft your

More information

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe CSCI 104 Sortng Algorthms Mark Redekopp Davd Kempe Algorthm Effcency SORTING 2 Sortng If we have an unordered lst, sequental search becomes our only choce If we wll perform a lot of searches t may be benefcal

More information

Load Balancing for Hex-Cell Interconnection Network

Load Balancing for Hex-Cell Interconnection Network Int. J. Communcatons, Network and System Scences,,, - Publshed Onlne Aprl n ScRes. http://www.scrp.org/journal/jcns http://dx.do.org/./jcns.. Load Balancng for Hex-Cell Interconnecton Network Saher Manaseer,

More information

Load-Balanced Anycast Routing

Load-Balanced Anycast Routing Load-Balanced Anycast Routng Chng-Yu Ln, Jung-Hua Lo, and Sy-Yen Kuo Department of Electrcal Engneerng atonal Tawan Unversty, Tape, Tawan sykuo@cc.ee.ntu.edu.tw Abstract For fault-tolerance and load-balance

More information

Module Management Tool in Software Development Organizations

Module Management Tool in Software Development Organizations Journal of Computer Scence (5): 8-, 7 ISSN 59-66 7 Scence Publcatons Management Tool n Software Development Organzatons Ahmad A. Al-Rababah and Mohammad A. Al-Rababah Faculty of IT, Al-Ahlyyah Amman Unversty,

More information

Optimizing Document Scoring for Query Retrieval

Optimizing Document Scoring for Query Retrieval Optmzng Document Scorng for Query Retreval Brent Ellwen baellwe@cs.stanford.edu Abstract The goal of ths project was to automate the process of tunng a document query engne. Specfcally, I used machne learnng

More information

5 The Primal-Dual Method

5 The Primal-Dual Method 5 The Prmal-Dual Method Orgnally desgned as a method for solvng lnear programs, where t reduces weghted optmzaton problems to smpler combnatoral ones, the prmal-dual method (PDM) has receved much attenton

More information

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS ARPN Journal of Engneerng and Appled Scences 006-017 Asan Research Publshng Network (ARPN). All rghts reserved. NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS Igor Grgoryev, Svetlana

More information

F Geometric Mean Graphs

F Geometric Mean Graphs Avalable at http://pvamu.edu/aam Appl. Appl. Math. ISSN: 1932-9466 Vol. 10, Issue 2 (December 2015), pp. 937-952 Applcatons and Appled Mathematcs: An Internatonal Journal (AAM) F Geometrc Mean Graphs A.

More information

Parallel matrix-vector multiplication

Parallel matrix-vector multiplication Appendx A Parallel matrx-vector multplcaton The reduced transton matrx of the three-dmensonal cage model for gel electrophoress, descrbed n secton 3.2, becomes excessvely large for polymer lengths more

More information

Intro. Iterators. 1. Access

Intro. Iterators. 1. Access Intro Ths mornng I d lke to talk a lttle bt about s and s. We wll start out wth smlartes and dfferences, then we wll see how to draw them n envronment dagrams, and we wll fnsh wth some examples. Happy

More information

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound CSE 326: Data Structures Qucksort Comparson Sortng Bound Bran Curless Sprng 2008 Announcements (5/14/08) Homework due at begnnng of class on Frday. Secton tomorrow: Graded homeworks returned More dscusson

More information

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming CS 4/560 Desgn and Analyss of Algorthms Kent State Unversty Dept. of Math & Computer Scence LECT-6 Dynamc Programmng 2 Dynamc Programmng Dynamc Programmng, lke the dvde-and-conquer method, solves problems

More information

The Codesign Challenge

The Codesign Challenge ECE 4530 Codesgn Challenge Fall 2007 Hardware/Software Codesgn The Codesgn Challenge Objectves In the codesgn challenge, your task s to accelerate a gven software reference mplementaton as fast as possble.

More information

Hierarchical clustering for gene expression data analysis

Hierarchical clustering for gene expression data analysis Herarchcal clusterng for gene expresson data analyss Gorgo Valentn e-mal: valentn@ds.unm.t Clusterng of Mcroarray Data. Clusterng of gene expresson profles (rows) => dscovery of co-regulated and functonally

More information

Reducing Frame Rate for Object Tracking

Reducing Frame Rate for Object Tracking Reducng Frame Rate for Object Trackng Pavel Korshunov 1 and We Tsang Oo 2 1 Natonal Unversty of Sngapore, Sngapore 11977, pavelkor@comp.nus.edu.sg 2 Natonal Unversty of Sngapore, Sngapore 11977, oowt@comp.nus.edu.sg

More information

3. CR parameters and Multi-Objective Fitness Function

3. CR parameters and Multi-Objective Fitness Function 3 CR parameters and Mult-objectve Ftness Functon 41 3. CR parameters and Mult-Objectve Ftness Functon 3.1. Introducton Cogntve rados dynamcally confgure the wreless communcaton system, whch takes beneft

More information

A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS

A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS Proceedngs of the Wnter Smulaton Conference M E Kuhl, N M Steger, F B Armstrong, and J A Jones, eds A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS Mark W Brantley Chun-Hung

More information

Lecture 5: Multilayer Perceptrons

Lecture 5: Multilayer Perceptrons Lecture 5: Multlayer Perceptrons Roger Grosse 1 Introducton So far, we ve only talked about lnear models: lnear regresson and lnear bnary classfers. We noted that there are functons that can t be represented

More information

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss. Today s Outlne Sortng Chapter 7 n Wess CSE 26 Data Structures Ruth Anderson Announcements Wrtten Homework #6 due Frday 2/26 at the begnnng of lecture Proect Code due Mon March 1 by 11pm Today s Topcs:

More information

TN348: Openlab Module - Colocalization

TN348: Openlab Module - Colocalization TN348: Openlab Module - Colocalzaton Topc The Colocalzaton module provdes the faclty to vsualze and quantfy colocalzaton between pars of mages. The Colocalzaton wndow contans a prevew of the two mages

More information

DESIGNING TRANSMISSION SCHEDULES FOR WIRELESS AD HOC NETWORKS TO MAXIMIZE NETWORK THROUGHPUT

DESIGNING TRANSMISSION SCHEDULES FOR WIRELESS AD HOC NETWORKS TO MAXIMIZE NETWORK THROUGHPUT DESIGNING TRANSMISSION SCHEDULES FOR WIRELESS AD HOC NETWORKS TO MAXIMIZE NETWORK THROUGHPUT Bran J. Wolf, Joseph L. Hammond, and Harlan B. Russell Dept. of Electrcal and Computer Engneerng, Clemson Unversty,

More information

Smoothing Spline ANOVA for variable screening

Smoothing Spline ANOVA for variable screening Smoothng Splne ANOVA for varable screenng a useful tool for metamodels tranng and mult-objectve optmzaton L. Rcco, E. Rgon, A. Turco Outlne RSM Introducton Possble couplng Test case MOO MOO wth Game Theory

More information

Problem Set 3 Solutions

Problem Set 3 Solutions Introducton to Algorthms October 4, 2002 Massachusetts Insttute of Technology 6046J/18410J Professors Erk Demane and Shaf Goldwasser Handout 14 Problem Set 3 Solutons (Exercses were not to be turned n,

More information

CHAPTER 2 DECOMPOSITION OF GRAPHS

CHAPTER 2 DECOMPOSITION OF GRAPHS CHAPTER DECOMPOSITION OF GRAPHS. INTRODUCTION A graph H s called a Supersubdvson of a graph G f H s obtaned from G by replacng every edge uv of G by a bpartte graph,m (m may vary for each edge by dentfyng

More information

Improving Low Density Parity Check Codes Over the Erasure Channel. The Nelder Mead Downhill Simplex Method. Scott Stransky

Improving Low Density Parity Check Codes Over the Erasure Channel. The Nelder Mead Downhill Simplex Method. Scott Stransky Improvng Low Densty Party Check Codes Over the Erasure Channel The Nelder Mead Downhll Smplex Method Scott Stransky Programmng n conjuncton wth: Bors Cukalovc 18.413 Fnal Project Sprng 2004 Page 1 Abstract

More information

CHAPTER 2 PROPOSED IMPROVED PARTICLE SWARM OPTIMIZATION

CHAPTER 2 PROPOSED IMPROVED PARTICLE SWARM OPTIMIZATION 24 CHAPTER 2 PROPOSED IMPROVED PARTICLE SWARM OPTIMIZATION The present chapter proposes an IPSO approach for multprocessor task schedulng problem wth two classfcatons, namely, statc ndependent tasks and

More information

Private Information Retrieval (PIR)

Private Information Retrieval (PIR) 2 Levente Buttyán Problem formulaton Alce wants to obtan nformaton from a database, but she does not want the database to learn whch nformaton she wanted e.g., Alce s an nvestor queryng a stock-market

More information

Topology Design using LS-TaSC Version 2 and LS-DYNA

Topology Design using LS-TaSC Version 2 and LS-DYNA Topology Desgn usng LS-TaSC Verson 2 and LS-DYNA Wllem Roux Lvermore Software Technology Corporaton, Lvermore, CA, USA Abstract Ths paper gves an overvew of LS-TaSC verson 2, a topology optmzaton tool

More information

Cluster Analysis of Electrical Behavior

Cluster Analysis of Electrical Behavior Journal of Computer and Communcatons, 205, 3, 88-93 Publshed Onlne May 205 n ScRes. http://www.scrp.org/ournal/cc http://dx.do.org/0.4236/cc.205.350 Cluster Analyss of Electrcal Behavor Ln Lu Ln Lu, School

More information

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation Intellgent Informaton Management, 013, 5, 191-195 Publshed Onlne November 013 (http://www.scrp.org/journal/m) http://dx.do.org/10.36/m.013.5601 Qualty Improvement Algorthm for Tetrahedral Mesh Based on

More information

Brave New World Pseudocode Reference

Brave New World Pseudocode Reference Brave New World Pseudocode Reference Pseudocode s a way to descrbe how to accomplsh tasks usng basc steps lke those a computer mght perform. In ths week s lab, you'll see how a form of pseudocode can be

More information

LOOP ANALYSIS. The second systematic technique to determine all currents and voltages in a circuit

LOOP ANALYSIS. The second systematic technique to determine all currents and voltages in a circuit LOOP ANALYSS The second systematic technique to determine all currents and voltages in a circuit T S DUAL TO NODE ANALYSS - T FRST DETERMNES ALL CURRENTS N A CRCUT AND THEN T USES OHM S LAW TO COMPUTE

More information

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory Background EECS. Operatng System Fundamentals No. Vrtual Memory Prof. Hu Jang Department of Electrcal Engneerng and Computer Scence, York Unversty Memory-management methods normally requres the entre process

More information

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning Outlne Artfcal Intellgence and ts applcatons Lecture 8 Unsupervsed Learnng Professor Danel Yeung danyeung@eee.org Dr. Patrck Chan patrckchan@eee.org South Chna Unversty of Technology, Chna Introducton

More information

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009. Farrukh Jabeen Algorthms 51 Assgnment #2 Due Date: June 15, 29. Assgnment # 2 Chapter 3 Dscrete Fourer Transforms Implement the FFT for the DFT. Descrbed n sectons 3.1 and 3.2. Delverables: 1. Concse descrpton

More information

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions Sortng Revew Introducton to Algorthms Qucksort CSE 680 Prof. Roger Crawfs Inserton Sort T(n) = Θ(n 2 ) In-place Merge Sort T(n) = Θ(n lg(n)) Not n-place Selecton Sort (from homework) T(n) = Θ(n 2 ) In-place

More information

UB at GeoCLEF Department of Geography Abstract

UB at GeoCLEF Department of Geography   Abstract UB at GeoCLEF 2006 Mguel E. Ruz (1), Stuart Shapro (2), June Abbas (1), Slva B. Southwck (1) and Davd Mark (3) State Unversty of New York at Buffalo (1) Department of Lbrary and Informaton Studes (2) Department

More information

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization Problem efntons and Evaluaton Crtera for Computatonal Expensve Optmzaton B. Lu 1, Q. Chen and Q. Zhang 3, J. J. Lang 4, P. N. Suganthan, B. Y. Qu 6 1 epartment of Computng, Glyndwr Unversty, UK Faclty

More information

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array Inserton Sort Dvde and Conquer Sortng CSE 6 Data Structures Lecture 18 What f frst k elements of array are already sorted? 4, 7, 1, 5, 1, 16 We can shft the tal of the sorted elements lst down and then

More information

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision SLAM Summer School 2006 Practcal 2: SLAM usng Monocular Vson Javer Cvera, Unversty of Zaragoza Andrew J. Davson, Imperal College London J.M.M Montel, Unversty of Zaragoza. josemar@unzar.es, jcvera@unzar.es,

More information

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices Internatonal Mathematcal Forum, Vol 7, 2012, no 52, 2549-2554 An Applcaton of the Dulmage-Mendelsohn Decomposton to Sparse Null Space Bases of Full Row Rank Matrces Mostafa Khorramzadeh Department of Mathematcal

More information

CE 221 Data Structures and Algorithms

CE 221 Data Structures and Algorithms CE 1 ata Structures and Algorthms Chapter 4: Trees BST Text: Read Wess, 4.3 Izmr Unversty of Economcs 1 The Search Tree AT Bnary Search Trees An mportant applcaton of bnary trees s n searchng. Let us assume

More information

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces Range mages For many structured lght scanners, the range data forms a hghly regular pattern known as a range mage. he samplng pattern s determned by the specfc scanner. Range mage regstraton 1 Examples

More information

Efficient Distributed File System (EDFS)

Efficient Distributed File System (EDFS) Effcent Dstrbuted Fle System (EDFS) (Sem-Centralzed) Debessay(Debsh) Fesehaye, Rahul Malk & Klara Naherstedt Unversty of Illnos-Urbana Champagn Contents Problem Statement, Related Work, EDFS Desgn Rate

More information

A New Approach For the Ranking of Fuzzy Sets With Different Heights

A New Approach For the Ranking of Fuzzy Sets With Different Heights New pproach For the ankng of Fuzzy Sets Wth Dfferent Heghts Pushpnder Sngh School of Mathematcs Computer pplcatons Thapar Unversty, Patala-7 00 Inda pushpndersnl@gmalcom STCT ankng of fuzzy sets plays

More information

ELEC 377 Operating Systems. Week 6 Class 3

ELEC 377 Operating Systems. Week 6 Class 3 ELEC 377 Operatng Systems Week 6 Class 3 Last Class Memory Management Memory Pagng Pagng Structure ELEC 377 Operatng Systems Today Pagng Szes Vrtual Memory Concept Demand Pagng ELEC 377 Operatng Systems

More information

Wishing you all a Total Quality New Year!

Wishing you all a Total Quality New Year! Total Qualty Management and Sx Sgma Post Graduate Program 214-15 Sesson 4 Vnay Kumar Kalakband Assstant Professor Operatons & Systems Area 1 Wshng you all a Total Qualty New Year! Hope you acheve Sx sgma

More information

USING GRAPHING SKILLS

USING GRAPHING SKILLS Name: BOLOGY: Date: _ Class: USNG GRAPHNG SKLLS NTRODUCTON: Recorded data can be plotted on a graph. A graph s a pctoral representaton of nformaton recorded n a data table. t s used to show a relatonshp

More information

Term Weighting Classification System Using the Chi-square Statistic for the Classification Subtask at NTCIR-6 Patent Retrieval Task

Term Weighting Classification System Using the Chi-square Statistic for the Classification Subtask at NTCIR-6 Patent Retrieval Task Proceedngs of NTCIR-6 Workshop Meetng, May 15-18, 2007, Tokyo, Japan Term Weghtng Classfcaton System Usng the Ch-square Statstc for the Classfcaton Subtask at NTCIR-6 Patent Retreval Task Kotaro Hashmoto

More information

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints Australan Journal of Basc and Appled Scences, 2(4): 1204-1208, 2008 ISSN 1991-8178 Sum of Lnear and Fractonal Multobjectve Programmng Problem under Fuzzy Rules Constrants 1 2 Sanjay Jan and Kalash Lachhwan

More information

Chapter 6 Programmng the fnte element method Inow turn to the man subject of ths book: The mplementaton of the fnte element algorthm n computer programs. In order to make my dscusson as straghtforward

More information

Advanced Computer Networks

Advanced Computer Networks Char of Network Archtectures and Servces Department of Informatcs Techncal Unversty of Munch Note: Durng the attendance check a stcker contanng a unque QR code wll be put on ths exam. Ths QR code contans

More information

Analysis of Continuous Beams in General

Analysis of Continuous Beams in General Analyss of Contnuous Beams n General Contnuous beams consdered here are prsmatc, rgdly connected to each beam segment and supported at varous ponts along the beam. onts are selected at ponts of support,

More information

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers IOSR Journal of Electroncs and Communcaton Engneerng (IOSR-JECE) e-issn: 78-834,p- ISSN: 78-8735.Volume 9, Issue, Ver. IV (Mar - Apr. 04), PP 0-07 Content Based Image Retreval Usng -D Dscrete Wavelet wth

More information

VRT012 User s guide V0.1. Address: Žirmūnų g. 27, Vilnius LT-09105, Phone: (370-5) , Fax: (370-5) ,

VRT012 User s guide V0.1. Address: Žirmūnų g. 27, Vilnius LT-09105, Phone: (370-5) , Fax: (370-5) , VRT012 User s gude V0.1 Thank you for purchasng our product. We hope ths user-frendly devce wll be helpful n realsng your deas and brngng comfort to your lfe. Please take few mnutes to read ths manual

More information

Active Contours/Snakes

Active Contours/Snakes Actve Contours/Snakes Erkut Erdem Acknowledgement: The sldes are adapted from the sldes prepared by K. Grauman of Unversty of Texas at Austn Fttng: Edges vs. boundares Edges useful sgnal to ndcate occludng

More information

y and the total sum of

y and the total sum of Lnear regresson Testng for non-lnearty In analytcal chemstry, lnear regresson s commonly used n the constructon of calbraton functons requred for analytcal technques such as gas chromatography, atomc absorpton

More information

Helsinki University Of Technology, Systems Analysis Laboratory Mat Independent research projects in applied mathematics (3 cr)

Helsinki University Of Technology, Systems Analysis Laboratory Mat Independent research projects in applied mathematics (3 cr) Helsnk Unversty Of Technology, Systems Analyss Laboratory Mat-2.08 Independent research projects n appled mathematcs (3 cr) "! #$&% Antt Laukkanen 506 R ajlaukka@cc.hut.f 2 Introducton...3 2 Multattrbute

More information

Assembler. Building a Modern Computer From First Principles.

Assembler. Building a Modern Computer From First Principles. Assembler Buldng a Modern Computer From Frst Prncples www.nand2tetrs.org Elements of Computng Systems, Nsan & Schocken, MIT Press, www.nand2tetrs.org, Chapter 6: Assembler slde Where we are at: Human Thought

More information

Multiblock method for database generation in finite element programs

Multiblock method for database generation in finite element programs Proc. of the 9th WSEAS Int. Conf. on Mathematcal Methods and Computatonal Technques n Electrcal Engneerng, Arcachon, October 13-15, 2007 53 Multblock method for database generaton n fnte element programs

More information

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm Internatonal Journal of Advancements n Research & Technology, Volume, Issue, July- ISS - on-splt Restraned Domnatng Set of an Interval Graph Usng an Algorthm ABSTRACT Dr.A.Sudhakaraah *, E. Gnana Deepka,

More information

Efficient Broadcast Disks Program Construction in Asymmetric Communication Environments

Efficient Broadcast Disks Program Construction in Asymmetric Communication Environments Effcent Broadcast Dsks Program Constructon n Asymmetrc Communcaton Envronments Eleftheros Takas, Stefanos Ougaroglou, Petros copoltds Department of Informatcs, Arstotle Unversty of Thessalonk Box 888,

More information

CHAPTER 10: ALGORITHM DESIGN TECHNIQUES

CHAPTER 10: ALGORITHM DESIGN TECHNIQUES CHAPTER 10: ALGORITHM DESIGN TECHNIQUES So far, we have been concerned wth the effcent mplementaton of algorthms. We have seen that when an algorthm s gven, the actual data structures need not be specfed.

More information

Notes on Organizing Java Code: Packages, Visibility, and Scope

Notes on Organizing Java Code: Packages, Visibility, and Scope Notes on Organzng Java Code: Packages, Vsblty, and Scope CS 112 Wayne Snyder Java programmng n large measure s a process of defnng enttes (.e., packages, classes, methods, or felds) by name and then usng

More information

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data A Fast Content-Based Multmeda Retreval Technque Usng Compressed Data Borko Furht and Pornvt Saksobhavvat NSF Multmeda Laboratory Florda Atlantc Unversty, Boca Raton, Florda 3343 ABSTRACT In ths paper,

More information

Communication-Minimal Partitioning and Data Alignment for Af"ne Nested Loops

Communication-Minimal Partitioning and Data Alignment for Afne Nested Loops Communcaton-Mnmal Parttonng and Data Algnment for Af"ne Nested Loops HYUK-JAE LEE 1 AND JOSÉ A. B. FORTES 2 1 Department of Computer Scence, Lousana Tech Unversty, Ruston, LA 71272, USA 2 School of Electrcal

More information

An Iterative Solution Approach to Process Plant Layout using Mixed Integer Optimisation

An Iterative Solution Approach to Process Plant Layout using Mixed Integer Optimisation 17 th European Symposum on Computer Aded Process Engneerng ESCAPE17 V. Plesu and P.S. Agach (Edtors) 2007 Elsever B.V. All rghts reserved. 1 An Iteratve Soluton Approach to Process Plant Layout usng Mxed

More information

Memory Modeling in ESL-RTL Equivalence Checking

Memory Modeling in ESL-RTL Equivalence Checking 11.4 Memory Modelng n ESL-RTL Equvalence Checkng Alfred Koelbl 2025 NW Cornelus Pass Rd. Hllsboro, OR 97124 koelbl@synopsys.com Jerry R. Burch 2025 NW Cornelus Pass Rd. Hllsboro, OR 97124 burch@synopsys.com

More information

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005 Exercses (Part 4) Introducton to R UCLA/CCPR John Fox, February 2005 1. A challengng problem: Iterated weghted least squares (IWLS) s a standard method of fttng generalzed lnear models to data. As descrbed

More information

Machine Learning. Support Vector Machines. (contains material adapted from talks by Constantin F. Aliferis & Ioannis Tsamardinos, and Martin Law)

Machine Learning. Support Vector Machines. (contains material adapted from talks by Constantin F. Aliferis & Ioannis Tsamardinos, and Martin Law) Machne Learnng Support Vector Machnes (contans materal adapted from talks by Constantn F. Alfers & Ioanns Tsamardnos, and Martn Law) Bryan Pardo, Machne Learnng: EECS 349 Fall 2014 Support Vector Machnes

More information

A Hybrid Genetic Algorithm for Routing Optimization in IP Networks Utilizing Bandwidth and Delay Metrics

A Hybrid Genetic Algorithm for Routing Optimization in IP Networks Utilizing Bandwidth and Delay Metrics A Hybrd Genetc Algorthm for Routng Optmzaton n IP Networks Utlzng Bandwdth and Delay Metrcs Anton Redl Insttute of Communcaton Networks, Munch Unversty of Technology, Arcsstr. 21, 80290 Munch, Germany

More information

AMath 483/583 Lecture 21 May 13, Notes: Notes: Jacobi iteration. Notes: Jacobi with OpenMP coarse grain

AMath 483/583 Lecture 21 May 13, Notes: Notes: Jacobi iteration. Notes: Jacobi with OpenMP coarse grain AMath 483/583 Lecture 21 May 13, 2011 Today: OpenMP and MPI versons of Jacob teraton Gauss-Sedel and SOR teratve methods Next week: More MPI Debuggng and totalvew GPU computng Read: Class notes and references

More information

Conditional Speculative Decimal Addition*

Conditional Speculative Decimal Addition* Condtonal Speculatve Decmal Addton Alvaro Vazquez and Elsardo Antelo Dep. of Electronc and Computer Engneerng Unv. of Santago de Compostela, Span Ths work was supported n part by Xunta de Galca under grant

More information