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

Size: px
Start display at page:

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

Transcription

1 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 pedro@s.edu Regster Allocaton Sample Exercses 1 Sprng 2014

2 Problem 1: Consder the three-address code below: 1: = 0; 2: a = p1; 3: b = * 4; 4: c = a + b; 5: L1: f ( > 100) goto L2 6: c = a + 1; 7: = + 1; 8: b = * 4; 9: e = p1; 10: f (c <= p1) goto L3 11: c = e - b; 12: a = e; 13: goto L4 14: L3: d = p1; 15: c = d + b; 16: a = d; 17: L4: f ( <= 100) goto L1 18: L2: return a) Determne the nterference graph assumng a gven varable s lve at the end of a specfc nstructon f after the use n that nstructon the value s stll used elsewhere n the code. You should assume the varable p1 s defned upon entry of the code as t corresponds to a parameter of the procedure and s used after the return nstructon. b) Determne the mnmum number of regsters needed (wthout spllng, of course). c) Assumng you were short of one regster, whch regster(s) would you spll and at whch ponts n the program would you nsert the spll code? Explan the ratonale of your choce. d) Now redo the regster allocaton usng the top-down method n whch varables used nsde a loop are weghted more that varables outsde the loop. Soluton: a) We have drawn the nterference graph between the webs as shown below where we use the nterference noton as dctated by the lveness of a gven varable after the executon of a gven nstructon. In ths context we say a varable s lve n a specfc nstructons (denoted by the lne number) f that varables partcpates n that nstructon. If a varable s not used after a specfc nstructon t s consdered dead after that nstructon. We consder that the parameter p1 s defned outsde and s stll needed after the code of the procedure executes. It s thus always lve. As such as have the followng lve ranges (denoted by the lne numbers) where each varable s lve: a: { 2, 3, 4, 5, 6 } + { 12, 13,16, 17 } b: { 3, 4 } + { 8, 9, 10, 11 } + { 14, 15 } c: { 4 } + { 6, 7, 8, 9, 10 } + { 11 } + { 15 } d: {14, 15, 16 } e: { 9, 10, 11, 12 } : { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 } p1: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 } The fgure below llustrates the Control-Flow-Graph (CFG) wth the basc blocks correspondng to ths code that helps you determne whch value of whch varables flow to whch uses. Regster Allocaton Sample Exercses 2 Sprng 2014

3 1: def ; 2: def a, use p1; 3: def b; use ; 4: def c; use a, b; BB0 5: use ; BB1 6: def c; use a; 7: def ; use ; 8: def b; use ; 9: def e; use p1; 10: use c ; use p1; BB2 BB3 11: def c; use e,b; 12: def a; use e; 13: BB4 14: def d; use p1; 15: def c; use d,b; 16: def a; use d; 17: use ; BB5 18: BB6 b) Usng these nterference webs for computng the nterference graph one would get the graph below. To color ths graph one needs 6 colors. Notce that there s a clque of sze 6 (a complete set of 6 nodes where all nodes n ths set are connected to the other nodes n the same set). Ths means that we need at least 6 colors. The 6-clque n ths example s composed by the nodes {a,b,c,e,,p1}. The node {d} can be colored wth the same color as node {e} as they have no conflct or nterference. c) Removng the nodes {e} ad {d} whch corresponds to the varable wth the shortest lve ranges would leaves us wth a clque of sze 5 thus requrng 5 regsters. Regster Allocaton Sample Exercses 3 Sprng 2014

4 d) Usng the top-down allocaton algorthm we must frst compute the COST(V,B) functons for each varables V and basc block B. For the example above we have the followng matrx of cost values: BB0 BB1 BB2 BB3 BB4 BB5 BB p a b c d e In addton we now have to compute the nestng depth of each basc block as shown n the table below. BB0 BB1 BB2 BB3 BB4 BB5 BB6 Depth Gven these two tables we now compute the total cost assocated wth a gven varable n ths algorthm as TotCost(V) = cost(v, B)*freq(B) where freq(b) of the basc block B s 10 depth(b). V TotCost(V) TotCost(V) 2 + 1*10 + 3*10 + 1*10 52 p *10+ 1*10 31 a 2 + 1*10+ 1* *10 32 b 2 + 1*10+ 1* *10 32 c 1 + 2*10+ 1* *10 41 d 0 + 3*10 30 e 0+1*10 + 2*10 30 As such the varables are assgned regster n the followng prorty: {, c, a, b, p1, d, e} Regster Allocaton Sample Exercses 4 Sprng 2014

5 Problem 2: Consder the followng three-address format representaton of a computaton. Here we have use the ARP regster to load local varables nto temporary varables ntroduced n the ntermedate code generaton process. We have also used comple-tme offsets to load the values of several local varables as they are located and fxed locatons n the current procedure AR. 01: t1 = k * 8 02: = FP + offset_a 03: = t1 + 04: = * 05: = * x 06: = FP + offset_b 07: t7 = * 8 08: t8 = *t7 09: t9 = + t8 10: *t7 = t9 11: k = k + 1 Questons: (a) Usng the bottom-up regster allocator descrbed n class assgn the varous temporary varables and varables to actual regsters. For the purpose of ths secton, assume you only have 4 physcal regsters. At each pont when choosng to reuse a regster ndcate why do you pck each one. (b) Use the graph-colorng based algorthm for dong regster allocaton nstead. In ths secton we are to explore the use of nterference webs for dfferent defntons of nterference as mentoned n class. Soluton: a. In the frst web use the defnton that two varables nterfere f there s at least one nstructon n whch they partcpate. Derve the nterference web between varables usng ths defnton. b. In the second defnton there s no nterference f the two webs ether do not ntersect at all or f they do ntersect at a sngle nstructon the web that ends at that nstructon partcpates as the argument of the nstructon and the web that begns at that nstructon corresponds to the destnaton value of the nstructon. c. For both defntons determne the mnmum number of requred regsters. d. Usng the graph-colorng heurstc descrbed n class determne the number of requred regsters for each of the two nterference defntons. Why do they dffer, or why not? (a) Below s a descrpton on how to translate the code n ths queston usng 4 physcal regsters and usng the local allocaton algorthm descrbed n class. For each varable we have loaded ts value nto a regster va the ndrecton usng the FP and a specfc offset n the AR. At specfc ponts n the executon we ndcate the current assgnment of regsters to program varables. 01: r0 = FP + offset_k // Assgnment: r0 k; r1 empty; r2 empty; r3 empty; 02: r1 = r0 * 8 // Assgnment: r0 k; r1 t1; r2 empty; r3 empty; 03: r2 = FP + offset_a // Assgnment: r0 k; r1 t1; r2 ; r3 empty; 04: r3 = r1 + r2 // Assgnment: r0 k; r1 t1; r2 ; r3 ; 05: r1 = (r3) // Assgnment: r0 k; r1 ; r2 ; r3 ; 06: r2 = FP + offset_x // Assgnment: r0 k; r1 ; r2 x; r3 ; 07: r1 = r1 * r2 // Assgnment: r0 k; r1 ; r2 x; r3 ; 08: r2 = FP + offset_b // Assgnment: r0 k; r1 ; r2 ; r3 t7; 09: r3 = r2 * 8 // Assgnment: r0 k; r1 ; r2 ; r3 t7; 10: r2 = *r3 // Assgnment: r0 k; r1 ; r2 t8; r3 t7; 11: r1 = r2 + r1 // Assgnment: r0 k; r1 t9; r2 t8; r3 t7; 12: *r3 = r1 // Assgnment: r0 k; r1 t9; r2 t8; r3 t7; 13: r0 = r0 + 1 // Assgnment: r0 k; r1 t9; r2 t8; r3 t7; Regster Allocaton Sample Exercses 5 Sprng 2014

6 (b) We present the nterference table nstead as t s easer to read. On the left we have the nterference table for the smpler noton of nterference whereas on the rght we have for the noton of nterference takng nto account the use of the value n each regster when the RHS s evaluated. k x t1 t7 t8 t9 k x t1 t7 t8 t9 k x t1 t7 t8 t9 k x t1 t7 t8 t9 a. Interference Table b. Interference Table t7 t8 t9 x t1 t7 t8 t9 x t1 k k a. Interference Graph b. Interference Graph (c) In the frst case we need 5 regsters as the maxmum number of conflcts n any row of the table s 4 (last one for t9) whereas n the second case we only need 4 regsters. (d) Usng the graph-colorng heurstc algorthm (for the frst noton of nterference) and usng 5 regsters durng the frst phase we push the nodes for all nodes (n lexcographcal order) onto the stack leavng only the nodes correspondng to x, and k. We assgn r0 to k and r1 to. Then poppng each of the nodes off the stack we can assgn r1 to t1, r2 to,, and t8,; r3 to y3, t7 and r4 to t9, yeldng the colored graph below: t8 t9 t1 t7 x k Regster Allocaton Sample Exercses 6 Sprng 2014

7 Problem 3: Consder the code fragment depcted below. 1: = 0 2: a = 1 3: b = * 4 4: c = a + b 5: L1: f > n goto L2 6: c = a + 1 7: = + 1 8: b = * 4 9: f c <= p goto L3 10: e = 1 11: c = e - b 12: a = e 13: goto L4 14: L3: d = 2 15: c = d + b 16: a = d 17: L4: goto L1 18: L2: return For ths code determne the followng: a) The lve ranges for the varables, a, b, c, d, e, p. b) The nterference graph usng the smplest defnton of nterference where the webs nclude the lve range n terms of the lne numbers where an access to a varable (ether a read or a wrte operaton) occurs. c) Determne the mnmum number of regsters needed (wthout spllng, of course) usng the graph colorng algorthm descrbed n class. d) Assumng that you were short of one regster, whch regster(s) would you spll and at whch ponts n the program would you nsert the spll code? Explan. Soluton: a) The basc observaton s that one varable s lve at a specfc program pont p f ts value s stll gong to possbly be used n the future. The best way to fgure ths out s to begn by constructng the control-flow graph (CFG) for ths code. For nstance varable s lve at program pont 11 as there s a possblty that the value defned for ths varable at pont 7 s gong to be used along the path that traverses the basc block that contans the nstructons 10 through 13 whch then jumps to lne 5 whch reads ths varable to evaluate the test(>n). Tracng the defntons and uses for each varable we can arrve at the followng lve ranges where the number ndcaton the source program lne numbers: : {1 17} p: {1-17} a: {2-6,12,13,16,17} b: {3,4}, {8,9,10,11}, {8,9,14,15} c: {4}, {6,7,8,9,11,15} d: {14,15,16} e: {10,11,12} b) The varables {, a, p} nterfere wll all the other varables as depcted n the nterference graph s as shown below (left). a a b b p c c e d e d Regster Allocaton Sample Exercses 7 Sprng 2014

8 c) Usng the algorthm we have studed n class for graph colorng for N = 6 gven that that s the hghest degree n the graph t s hghly lkely that for N = 6 we wll be able to fnd such colorng of the nterference graph. In ths case only nodes d and e go nto the stack as they have degree 5 less than 6. If that s the case we now remove one node from the graph, say node p that nterferes wth all the other remanng nodes n the graph. We are left wth the graph above n the mddle. Then we must push all the remanng nodes on the stack agan, ths tme all of them have degree less than 6. We then pop the nodes one by one and assgn colors. One such color s to assgn the same color, say red to {e,d} as they do not nterfere and any other 4 colors to the remanng nodes. Ths results n 5 colors leavng the node correspondng to p uncolored. d) If you had one less regster say 4 regsters, you could leave the node wth the shortest lve range, say node d or e out of regsters. Regster Allocaton Sample Exercses 8 Sprng 2014

9 Problem 4: Consder the followng three-address format representaton of a computaton usng scalars and arrays A and B. Assume for the purposes of ths exercse that no addtonal regsters are needed to access (ether wrtng or readng) the value of an array. As such the access to A[t1] requres no addtonal regsters n addton to the one carryng the value of t1. 01: t1 = 02: = A[t1] 03: = : = A[] 05: = + 06: = / 2 07: t7 = 08: B[t7] = 09: = + 1 Questons: (a) Usng the bottom-up regster allocator descrbed n class assgn the varous temporary varables and varables to actual regsters. For the purpose of ths secton, assume you have 3 physcal regsters and that the scalar s already loaded nto regster r0. At each pont when choosng to reuse a regster ndcate why do you pck each one. Also you should try to reuse regsters n copy operatons such as t1 = n lne 01 thus not consumng any more regsters but smply propagatng the use of r0 n ths case. (b) Use the graph-colorng based algorthm for dong regster allocaton nstead. In ths secton we are to explore the use of nterference webs for dfferent defntons of nterference as mentoned n class. Soluton: e. In the frst web use the defnton that two varables nterfere f there s at least one nstructon n whch they partcpate. Derve the nterference web between the varables n ths code usng ths defnton. f. In the second defnton there s no nterference f the two webs ether do not ntersect at all or f they do ntersect at a sngle nstructon the web that ends at that nstructon partcpates as the argument of the nstructon and the web that begns at that nstructon corresponds to the destnaton value of the nstructon. g. Usng the graph-colorng heurstc descrbed n class wth N=4 and determne the colorng and hence regster allocaton for both nterference defntons. Why do they dffer, or why not? (a) Below s a descrpton on how to translate the code n ths queston usng 3 physcal regsters and usng the local allocaton algorthm descrbed n class. At specfc ponts n the executon we ndcate the current assgnment of regsters to program varables. Note that we could have elmnated t1 as the frst nstructon makes a copy of the value of I nto t1 (and the same s true for t7 and ). For ths reason n the assgnment below the par t1, and t7, appear as a sngle tuple. 01: r0 = r0 // Assgnment: r0 t1, ; r1 empty; r2 empty; 02: r1 = A[r0] // Assgnment: r0 t1, ; r1 ; r2 empty; 03: r2 = r0 + 1 // Assgnment: r0 t1, ; r1 ; r2 ; 04: r0 = A[r2] // Assgnment: r0 ; r1 ; r2 ; 05: r2 = r1 + r0 // Assgnment: r0 ; r1 ; r2 ; 06: r0 = r2 / 2 // Assgnment: r0 ; r1 ; r2 ; 07: r1 = // Assgnment: r0 ; r1 t7, ; r2 ; 08: B[r1] = r0 // Assgnment: r0 ; r1 t7, ; r2 ; 09: r1 = r1 + 1 // Assgnment: r0 ; r1 t7, ; r2 ; (e) We present the nterference table nstead as t s easer to read. On the left we have the nterference table for the smpler noton of nterference whereas on the rght we have for the noton of nterference takng nto account the use of the value n each regster when the RHS s evaluated. In ths example we have gnored the varables t1 and t7 as they can be elmnated by copy-propagaton - an optmzaton that removes redundant varables by observng when the denttes {a = b} hold through the executon of a code secton. Ths greatly smplfes the regster allocaton. Regster Allocaton Sample Exercses 9 Sprng 2014

10 a. Interference Table b. Interference Table a. Interference Graph b. Interference Graph (f) In the frst case we need 4 regsters as the maxmum number of conflcts n any row of the table s 4 (for ) whereas n the second case we only need 3 regsters. There are several clques of sze 3 n the second case and at least one clque of sze 4 n the frst case (nvolvng ). (g) Usng the graph-colorng heurstc algorthm (for the frst noton of nterference) and usng 4 regsters or N=4 n the algorthm, we fst push onto the stack the nodes n the order {,,,,, }. We then pop the node correspondng to and assgn t the color c0. Next we color wth color c1, color wth color c2 and wth color c3. When we pop we can color t wth the same color as,.e., c2 and when we pop we can use ether c3 or c1. The fgures below depct these colorngs on the left for the frst nterference graph and on the rght for the second nterference graph, whch uses only 3 color. Notce that for the graph on the left there s a clque of sze 4 so usng four colors (regsters) s the best we can do and s n fact optmal. Regster Allocaton Sample Exercses 10 Sprng 2014

11 Problem 5: Consder the followng three-address format representaton of a computaton usng scalars and arrays A and B and a procedure F(nt a, nt b). Assume for the purposes of ths exercse that no addtonal regsters are needed to access (ether wrtng or readng) the value of an array. As such the access to A[t1] requres no addtonal regsters n addton to the one carryng the value of t1. 01: t1 = 02: = A[t1] 03: = : = A[] 05: = + 06: = / 2 07: t7 = 08: B[t7] = 09: putparam 10: putparam 1 11: call F,2 12: t8 = 13: t9 = t8 + 2 a) Apply copy propagaton and dead code elmnaton to the basc block mmedately precedng the functon nvocaton. b) Use the bottom-up regster allocaton algorthm for 3 regsters under the assumpton that varable s lve outsde ths basc block and after the call to F. In ths secton you can smply gnore the nstructons on lnes 09 through 11. In ths part of the code load the value of the scalar varables usng the offset of the scalar from the Frame-Ponter (FP) regster. So you need to make some changes to the ntermedated code. c) Passng the arguments to the procedure F could be done va regsters. Ths would come at the cost of addtonal regsters unless the values requred by a gven procedure would already resde n regsters. For ths partcular case explan whch putparam nstructon could be elmnated usng arguments for the procedure that are already n regsters. Soluton: a) The statements on lnes 01, 07 and 12 are dead once we propagate the correspondng assgnments to the nstructons on lnes 02, 08 and : t1 = 02: = A[] 03: = : = A[] 05: = + 06: = / 2 07: t7 = 08: B[] = 09: putparam 10: putparam 1 11: call F,2 12: t8 = 13: t9 = t8 + 2 Regster Allocaton Sample Exercses 11 Sprng 2014

12 b) The code below llustrates the resultng code under the assumpton that the varable s ntally stored at an negatve offset 16 of the Frame-Ponter (FP) regster. 01: r0 = FP 16 02: r0 = *r0 // loads the value of varable nto r0 02: r1 = A[r0] // r0,t1, r1, r2 empty 03: r2 = r0 + 1 // r0,t1, r1, r2 04: r0 = A[r2] // r0, r1, r2 05: r2 = r1 + r0 // r0, r1, r2 06: r0 = r2 / 2 // r0, r1, r2 07: r1 = FP - 16 // r0, r1,t7, r2 08: r1 = *r1 // r0, r1,t7, r2 08: B[r1] = r0 // r0, r1,t7, r2 09: putparam r1 10: putparam 1 11: call F,2 12: r0 = r1 // r0 t8, r1,t7, r2 13: r2 = r1 + 2 // r0 t8, r1,t7, r2 t9 c) For ths partcular case the argument value s already n regster r1, so we could elmnate the frst putparam nstructon provded now that when dong the regster allocaton for F we would start wth the assumpton that the frst parameter s already n r1. Regster Allocaton Sample Exercses 12 Sprng 2014

13 Problem 6: The code shown on the left s for a procedure n C where p and n are arguments to the functon. 1 func:getparam p 2 getparam n 3 = 0 4 a = 1 5 b = * 4 6 c = a + b 7 L1: f > n goto L2 8 c = a = b = * 4 11 f c <= p goto L3 12 e = 1 13 c = e - b 14 a = e 15 goto L4 16 L3: d = 2 17 c = d + b 18 a = d 19 L4: goto L1 20 L2: return For ths code determne the followng: a) The lve ranges for the varables, a, b, c, d, e. b) The nterference graph usng the smplest defnton of nterference where the webs nclude the lve range n terms of the lne numbers where an access to a varable (ether a read or a wrte operaton) occurs. Assume that the parameters n and p are not n regsters. c) Determne whch varables should be put n regsters usng the top-down regster allocaton algorthm descrbed n class gven that you only had 4 regsters. Explan. Soluton: a) Varables s lve at all nstructons n ths procedures and thus ts lve ranges are {3,, 20}. Varable a has two lve ranges r1 = {4,5,6,7,8,9,10,12,12,13,14} and r2 = {18, 19, 7, 8} n ths second range he value defned n lne 18 s used n nstructon 8 va the goto statement on lne 19. For varable b we have three lve ranges, r = {5,6}, r2 = {10,11,12,13} and r3 = {10,11,16,17}. For varable c we have 4 lve ranges r1 = {6}, r2 = {8,9,10,11}, r3 = {13} and r4 = {17}. For varable d we have a sngle lve range r1 = {16,17,18} and for e we have r1 = {12,13,14}. b) The nterference graph usng the smplest defnton of nterference where the webs nclude the lve range n terms of the lne numbers where an access to a varable (ether a read or a wrte operaton) occurs. Assume that the parameters n and p are not n regsters. Usng the nformaton from a) the nterference graph s as shown below. The only two varables that do not nterfere (usng ths defnton) wth each other are varables d and e. e a d b c Regster Allocaton Sample Exercses 13 Sprng 2014

14 c) Determne whch varables should be put n regsters usng the top-down regster allocaton algorthm descrbed n class gven that you only had 5 regsters. Explan. We need to determne the loop structure of the code so that we can weght the occurrences of each of the varables. By nspecton of the code we can see that there s a loop that contans all statements from lnes 7 through 19. Insde the loop there s an f-then-else construct so all the accesses nsde ths loop wth be weghted wth weght 10 as there s a sngle nested loop here. As such the table of weghts for ths code s as follows: Varable a b C d e Breakdown 4 x x x x x x Weght We can see that preferentally we should put n regsters the varables and c followed by the varables a and b and fnally the varables d and e. Note that because varables d and e do not nterference (see b) above they need only one regster and thus I would be able to allocate all of them to the 5 regsters provded. Regster Allocaton Sample Exercses 14 Sprng 2014

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

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

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

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

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

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

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

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

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

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

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

High level vs Low Level. What is a Computer Program? What does gcc do for you? Program = Instructions + Data. Basic Computer Organization

High level vs Low Level. What is a Computer Program? What does gcc do for you? Program = Instructions + Data. Basic Computer Organization What s a Computer Program? Descrpton of algorthms and data structures to acheve a specfc ojectve Could e done n any language, even a natural language lke Englsh Programmng language: A Standard notaton

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

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

Circuit Analysis I (ENGR 2405) Chapter 3 Method of Analysis Nodal(KCL) and Mesh(KVL)

Circuit Analysis I (ENGR 2405) Chapter 3 Method of Analysis Nodal(KCL) and Mesh(KVL) Crcut Analyss I (ENG 405) Chapter Method of Analyss Nodal(KCL) and Mesh(KVL) Nodal Analyss If nstead of focusng on the oltages of the crcut elements, one looks at the oltages at the nodes of the crcut,

More information

Array transposition in CUDA shared memory

Array transposition in CUDA shared memory Array transposton n CUDA shared memory Mke Gles February 19, 2014 Abstract Ths short note s nspred by some code wrtten by Jeremy Appleyard for the transposton of data through shared memory. I had some

More information

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements Module 3: Element Propertes Lecture : Lagrange and Serendpty Elements 5 In last lecture note, the nterpolaton functons are derved on the bass of assumed polynomal from Pascal s trangle for the fled varable.

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

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

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

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

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

LLVM passes and Intro to Loop Transformation Frameworks

LLVM passes and Intro to Loop Transformation Frameworks LLVM passes and Intro to Loop Transformaton Frameworks Announcements Ths class s recorded and wll be n D2L panapto. No quz Monday after sprng break. Wll be dong md-semester class feedback. Today LLVM passes

More information

Assembler. Shimon Schocken. Spring Elements of Computing Systems 1 Assembler (Ch. 6) Compiler. abstract interface.

Assembler. Shimon Schocken. Spring Elements of Computing Systems 1 Assembler (Ch. 6) Compiler. abstract interface. IDC Herzlya Shmon Schocken Assembler Shmon Schocken Sprng 2005 Elements of Computng Systems 1 Assembler (Ch. 6) Where we are at: Human Thought Abstract desgn Chapters 9, 12 abstract nterface H.L. Language

More information

AP PHYSICS B 2008 SCORING GUIDELINES

AP PHYSICS B 2008 SCORING GUIDELINES AP PHYSICS B 2008 SCORING GUIDELINES General Notes About 2008 AP Physcs Scorng Gudelnes 1. The solutons contan the most common method of solvng the free-response questons and the allocaton of ponts for

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

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

Programming in Fortran 90 : 2017/2018

Programming in Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Exercse 1 : Evaluaton of functon dependng on nput Wrte a program who evaluate the functon f (x,y) for any two user specfed values

More information

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman)

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman) CS: Algorthms and Data Structures Prorty Queues and Heaps Alan J. Hu (Borrowng sldes from Steve Wolfman) Learnng Goals After ths unt, you should be able to: Provde examples of approprate applcatons for

More information

UNIT 2 : INEQUALITIES AND CONVEX SETS

UNIT 2 : INEQUALITIES AND CONVEX SETS UNT 2 : NEQUALTES AND CONVEX SETS ' Structure 2. ntroducton Objectves, nequaltes and ther Graphs Convex Sets and ther Geometry Noton of Convex Sets Extreme Ponts of Convex Set Hyper Planes and Half Spaces

More information

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6)

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6) Harvard Unversty CS 101 Fall 2005, Shmon Schocken Assembler Elements of Computng Systems 1 Assembler (Ch. 6) Why care about assemblers? Because Assemblers employ some nfty trcks Assemblers are the frst

More information

Hermite Splines in Lie Groups as Products of Geodesics

Hermite Splines in Lie Groups as Products of Geodesics Hermte Splnes n Le Groups as Products of Geodescs Ethan Eade Updated May 28, 2017 1 Introducton 1.1 Goal Ths document defnes a curve n the Le group G parametrzed by tme and by structural parameters n the

More information

Storage Binding in RTL synthesis

Storage Binding in RTL synthesis Storage Bndng n RTL synthess Pe Zhang Danel D. Gajsk Techncal Report ICS-0-37 August 0th, 200 Center for Embedded Computer Systems Department of Informaton and Computer Scence Unersty of Calforna, Irne

More information

Loop Transformations, Dependences, and Parallelization

Loop Transformations, Dependences, and Parallelization Loop Transformatons, Dependences, and Parallelzaton Announcements Mdterm s Frday from 3-4:15 n ths room Today Semester long project Data dependence recap Parallelsm and storage tradeoff Scalar expanson

More information

3D vector computer graphics

3D vector computer graphics 3D vector computer graphcs Paolo Varagnolo: freelance engneer Padova Aprl 2016 Prvate Practce ----------------------------------- 1. Introducton Vector 3D model representaton n computer graphcs requres

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

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vdyanagar Faculty Name: Am D. Trved Class: SYBCA Subject: US03CBCA03 (Advanced Data & Fle Structure) *UNIT 1 (ARRAYS AND TREES) **INTRODUCTION TO ARRAYS If we want

More information

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016)

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016) Technsche Unverstät München WSe 6/7 Insttut für Informatk Prof. Dr. Thomas Huckle Dpl.-Math. Benjamn Uekermann Parallel Numercs Exercse : Prevous Exam Questons Precondtonng & Iteratve Solvers (From 6)

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

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

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

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

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

Report on On-line Graph Coloring

Report on On-line Graph Coloring 2003 Fall Semester Comp 670K Onlne Algorthm Report on LO Yuet Me (00086365) cndylo@ust.hk Abstract Onlne algorthm deals wth data that has no future nformaton. Lots of examples demonstrate that onlne algorthm

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

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

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

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

A SYSTOLIC APPROACH TO LOOP PARTITIONING AND MAPPING INTO FIXED SIZE DISTRIBUTED MEMORY ARCHITECTURES

A SYSTOLIC APPROACH TO LOOP PARTITIONING AND MAPPING INTO FIXED SIZE DISTRIBUTED MEMORY ARCHITECTURES A SYSOLIC APPROACH O LOOP PARIIONING AND MAPPING INO FIXED SIZE DISRIBUED MEMORY ARCHIECURES Ioanns Drosts, Nektaros Kozrs, George Papakonstantnou and Panayots sanakas Natonal echncal Unversty of Athens

More information

Comparison of Heuristics for Scheduling Independent Tasks on Heterogeneous Distributed Environments

Comparison of Heuristics for Scheduling Independent Tasks on Heterogeneous Distributed Environments Comparson of Heurstcs for Schedulng Independent Tasks on Heterogeneous Dstrbuted Envronments Hesam Izakan¹, Ath Abraham², Senor Member, IEEE, Václav Snášel³ ¹ Islamc Azad Unversty, Ramsar Branch, Ramsar,

More information

CS1100 Introduction to Programming

CS1100 Introduction to Programming Factoral (n) Recursve Program fact(n) = n*fact(n-) CS00 Introducton to Programmng Recurson and Sortng Madhu Mutyam Department of Computer Scence and Engneerng Indan Insttute of Technology Madras nt fact

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

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

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

Data Representation in Digital Design, a Single Conversion Equation and a Formal Languages Approach

Data Representation in Digital Design, a Single Conversion Equation and a Formal Languages Approach Data Representaton n Dgtal Desgn, a Sngle Converson Equaton and a Formal Languages Approach Hassan Farhat Unversty of Nebraska at Omaha Abstract- In the study of data representaton n dgtal desgn and computer

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

EECS 730 Introduction to Bioinformatics Sequence Alignment. Luke Huan Electrical Engineering and Computer Science

EECS 730 Introduction to Bioinformatics Sequence Alignment. Luke Huan Electrical Engineering and Computer Science EECS 730 Introducton to Bonformatcs Sequence Algnment Luke Huan Electrcal Engneerng and Computer Scence http://people.eecs.ku.edu/~huan/ HMM Π s a set of states Transton Probabltes a kl Pr( l 1 k Probablty

More information

On Some Entertaining Applications of the Concept of Set in Computer Science Course

On Some Entertaining Applications of the Concept of Set in Computer Science Course On Some Entertanng Applcatons of the Concept of Set n Computer Scence Course Krasmr Yordzhev *, Hrstna Kostadnova ** * Assocate Professor Krasmr Yordzhev, Ph.D., Faculty of Mathematcs and Natural Scences,

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

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

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

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

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE Yordzhev K., Kostadnova H. Інформаційні технології в освіті ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE Yordzhev K., Kostadnova H. Some aspects of programmng educaton

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

Polyhedral Compilation Foundations

Polyhedral Compilation Foundations Polyhedral Complaton Foundatons Lous-Noël Pouchet pouchet@cse.oho-state.edu Dept. of Computer Scence and Engneerng, the Oho State Unversty Feb 8, 200 888., Class # Introducton: Polyhedral Complaton Foundatons

More information

Q.1 Q.20 Carry One Mark Each. is differentiable for all real values of x

Q.1 Q.20 Carry One Mark Each. is differentiable for all real values of x Q. Q.0 Carry One Mark Each CS Computer Scence: Gate 007 Paper. Consder the followng two statements about the functon f ( x) = x : P. f ( x) s contnuous for all real values of x Q. f ( x) s dfferentable

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

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

Intra-Parametric Analysis of a Fuzzy MOLP

Intra-Parametric Analysis of a Fuzzy MOLP Intra-Parametrc Analyss of a Fuzzy MOLP a MIAO-LING WANG a Department of Industral Engneerng and Management a Mnghsn Insttute of Technology and Hsnchu Tawan, ROC b HSIAO-FAN WANG b Insttute of Industral

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

Vectorization in the Polyhedral Model

Vectorization in the Polyhedral Model Vectorzaton n the Polyhedral Model Lous-Noël Pouchet pouchet@cse.oho-state.edu Dept. of Computer Scence and Engneerng, the Oho State Unversty October 200 888. Introducton: Overvew Vectorzaton: Detecton

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

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

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

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

Interconnect Optimization for High-Level Synthesis of SSA Form Programs

Interconnect Optimization for High-Level Synthesis of SSA Form Programs Interconnect Optmzaton for Hgh-Level Synthess of SSA Form Programs Phlp Brsk Aay K. Verma Paolo Ienne Processor Archtecture Laboratory Swss Federal Insttute of Technology (EPFL) Lausanne, Swtzerland {phlp.brsk,

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

Repeater Insertion for Two-Terminal Nets in Three-Dimensional Integrated Circuits

Repeater Insertion for Two-Terminal Nets in Three-Dimensional Integrated Circuits Repeater Inserton for Two-Termnal Nets n Three-Dmensonal Integrated Crcuts Hu Xu, Vasls F. Pavlds, and Govann De Mchel LSI - EPFL, CH-5, Swtzerland, {hu.xu,vasleos.pavlds,govann.demchel}@epfl.ch Abstract.

More information

Greedy Technique - Definition

Greedy Technique - Definition Greedy Technque Greedy Technque - Defnton The greedy method s a general algorthm desgn paradgm, bult on the follong elements: confguratons: dfferent choces, collectons, or values to fnd objectve functon:

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

Evaluation of Parallel Processing Systems through Queuing Model

Evaluation of Parallel Processing Systems through Queuing Model ISSN 2278-309 Vkas Shnde, Internatonal Journal of Advanced Volume Trends 4, n Computer No.2, March Scence - and Aprl Engneerng, 205 4(2), March - Aprl 205, 36-43 Internatonal Journal of Advanced Trends

More information

Annales UMCS Informatica AI 1 (2003) UMCS. Designing of multichannel optical communication systems topologies criteria optimization

Annales UMCS Informatica AI 1 (2003) UMCS. Designing of multichannel optical communication systems topologies criteria optimization Annales Informatca AI 1 (2003) 277-284 Annales Informatca Lubln-Polona Secto AI http://www.annales.umcs.lubln.pl/ Desgnng of multchannel optcal communcaton systems topologes crtera optmzaton Mrosław Hajder,

More information

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example Unversty of Brtsh Columba CPSC, Intro to Computaton Jan-Apr Tamara Munzner News Assgnment correctons to ASCIIArtste.java posted defntely read WebCT bboards Arrays Lecture, Tue Feb based on sldes by Kurt

More information

CHOICE OF THE CONTROL VARIABLES OF AN ISOLATED INTERSECTION BY GRAPH COLOURING

CHOICE OF THE CONTROL VARIABLES OF AN ISOLATED INTERSECTION BY GRAPH COLOURING Yugoslav Journal of Operatons Research 25 (25), Number, 7-3 DOI:.2298/YJOR38345B CHOICE OF THE CONTROL VARIABLES OF AN ISOLATED INTERSECTION BY GRAPH COLOURING Vladan BATANOVIĆ Mhalo Pupn Insttute, Volgna

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Desgn and Analyss of Algorthms Heaps and Heapsort Reference: CLRS Chapter 6 Topcs: Heaps Heapsort Prorty queue Huo Hongwe Recap and overvew The story so far... Inserton sort runnng tme of Θ(n 2 ); sorts

More information

Loop Transformations for Parallelism & Locality. Review. Scalar Expansion. Scalar Expansion: Motivation

Loop Transformations for Parallelism & Locality. Review. Scalar Expansion. Scalar Expansion: Motivation Loop Transformatons for Parallelsm & Localty Last week Data dependences and loops Loop transformatons Parallelzaton Loop nterchange Today Scalar expanson for removng false dependences Loop nterchange Loop

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

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points;

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points; Subspace clusterng Clusterng Fundamental to all clusterng technques s the choce of dstance measure between data ponts; D q ( ) ( ) 2 x x = x x, j k = 1 k jk Squared Eucldean dstance Assumpton: All features

More information

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes SPH3UW Unt 7.3 Sphercal Concave Mrrors Page 1 of 1 Notes Physcs Tool box Concave Mrror If the reflectng surface takes place on the nner surface of the sphercal shape so that the centre of the mrror bulges

More information

OPL: a modelling language

OPL: a modelling language OPL: a modellng language Carlo Mannno (from OPL reference manual) Unversty of Oslo, INF-MAT60 - Autumn 00 (Mathematcal optmzaton) ILOG Optmzaton Programmng Language OPL s an Optmzaton Programmng Language

More information

Related-Mode Attacks on CTR Encryption Mode

Related-Mode Attacks on CTR Encryption Mode Internatonal Journal of Network Securty, Vol.4, No.3, PP.282 287, May 2007 282 Related-Mode Attacks on CTR Encrypton Mode Dayn Wang, Dongda Ln, and Wenlng Wu (Correspondng author: Dayn Wang) Key Laboratory

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

An Entropy-Based Approach to Integrated Information Needs Assessment

An Entropy-Based Approach to Integrated Information Needs Assessment Dstrbuton Statement A: Approved for publc release; dstrbuton s unlmted. An Entropy-Based Approach to ntegrated nformaton Needs Assessment June 8, 2004 Wllam J. Farrell Lockheed Martn Advanced Technology

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

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Priority queues and heaps Professors Clark F. Olson and Carol Zander Prorty queues and eaps Professors Clark F. Olson and Carol Zander Prorty queues A common abstract data type (ADT) n computer scence s te prorty queue. As you mgt expect from te name, eac tem n te prorty

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

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

CSCI Compiler Design

CSCI Compiler Design CSCI 565 - Compiler Design Spring 2010 Final Exam - Solution May 07, 2010 at 1.30 PM in Room RTH 115 Duration: 2h 30 min. Please label all pages you turn in with your name and student number. Name: Number:

More information

Synthesizer 1.0. User s Guide. A Varying Coefficient Meta. nalytic Tool. Z. Krizan Employing Microsoft Excel 2007

Synthesizer 1.0. User s Guide. A Varying Coefficient Meta. nalytic Tool. Z. Krizan Employing Microsoft Excel 2007 Syntheszer 1.0 A Varyng Coeffcent Meta Meta-Analytc nalytc Tool Employng Mcrosoft Excel 007.38.17.5 User s Gude Z. Krzan 009 Table of Contents 1. Introducton and Acknowledgments 3. Operatonal Functons

More information

Sorting. Sorting. Why Sort? Consistent Ordering

Sorting. Sorting. Why Sort? Consistent Ordering Sortng CSE 6 Data Structures Unt 15 Readng: Sectons.1-. Bubble and Insert sort,.5 Heap sort, Secton..6 Radx sort, Secton.6 Mergesort, Secton. Qucksort, Secton.8 Lower bound Sortng Input an array A of data

More information