Bidirectionalizing Graph Transformations

Size: px
Start display at page:

Download "Bidirectionalizing Graph Transformations"

Transcription

1 Biiretionlizing Grph Trnsformtions Soihiro Hik Kzuhiro In Zhenjing Hu Hiroyuki Kto Ntionl Institute of Informtis, Jpn Kzutk Mtsu Tohoku University, Jpn Keisuke Nkno The University of Eletro-Communitions, Jpn Astrt Biiretionl trnsformtions provie novel mehnism for synhronizing n mintining the onsisteny of informtion etween input n output. Despite mny promising results on iiretionl trnsformtions, these hve een limite to the ontext of reltionl or XML (tree-like) tses. We hllenge the prolem of iiretionl trnsformtions within the ontext of grphs, y proposing forml efinition of well-ehve iiretionl semntis for UnCAL, i.e., grph lger for the known UnQL grph query lnguge. The key to our suessful formliztion is full utiliztion of oth the reursive n ulk semntis of struturl reursion on grphs. We refully refine the existing forwr evlution of struturl reursion so tht it n proue suffiient tre informtion for lter kwr evlution. We use the tre informtion for kwr evlution to reflet in-ple uptes n eletions on the view to the soure, n opt the universl resolving lgorithm for inverse omputtion n the nrrowing tehnique to tkle the iffiult prolem with insertion. We prove our iiretionl evlution is well-ehve. Our urrent implementtion is ville online n onfirms the usefulness of our pproh with nontrivil pplitions. Ctegories n Sujet Desriptors D.3.2 [Progrmming Lnguges]: Lnguge Clssifitions Speilize pplition lnguges; E. [Dt Strutures]: Grphs n networks Generl Terms Design, Lnguges Keywors iiretionl trnsformtion, view upting, grph query n trnsformtion, struturl reursion. Introution Biiretionl trnsformtions (Czrneki et l. 2009; Foster et l. 2005) provie novel mehnism for synhronizing n mintining the onsisteny of informtion etween input n output. They onsist of pir of well-ehve trnsformtions: forwr trnsformtion is use to proue trget view from soure, while the kwr trnsformtion is use to reflet moifition on the view to the soure. This pir of forwr n kwr trnsformtions shoul stisfy ertin iiretionl properties. Biiretionl trnsformtions re inee pervsive n n e seen in mny interesting Permission to mke igitl or hr opies of ll or prt of this work for personl or lssroom use is grnte without fee provie tht opies re not me or istriute for profit or ommeril vntge n tht opies er this notie n the full ittion on the first pge. To opy otherwise, to repulish, to post on servers or to reistriute to lists, requires prior speifi permission n/or fee. ICFP 0, Septemer 27 29, 200, Bltimore, Mryln, USA. Copyright 200 ACM /0/09... $0.00 pplitions, inluing the synhroniztion of replite t in ifferent formts (Foster et l. 2005), presenttion-oriente struture oument evelopment (Hu et l. 2008), intertive user interfe esign (Meertens 998), ouple softwre trnsformtion (Lämmel 2004), n the well-known view upting mehnism whih hs een intensively stuie in the tse ommunity (Bnilhon n Spyrtos 98; Dyl n Bernstein 982; Gottlo et l. 988; Hegner 990; Lehtenörger n Vossen 2003). Despite mny promising results on iiretionl trnsformtions, they re limite to the ontext of reltionl or XML (tree-like) tses. It remins unresolve (Czrneki et l. 2009) whether iiretionl trnsformtions n e resse within the ontext of grphs ontining noe shring n yles. It woul e remrkly useful in prtie if iiretionl trnsformtion oul e pplie to grph t strutures, euse grphs ply n irreplele role in nturlly representing more omplex t strutures suh s those in iologil informtion, WWW, UML igrms in softwre engineering (Stevens 2007), n the Ojet Exhnge Moel (OEM) use for exhnging ritrry tse strutures (Ppkonstntinou et l. 995). There re mny hllenges in ressing iiretionl trnsformtion on grphs. First, unlike reltionl or XML tses, there is no unique wy of representing, onstruting, or eomposing generl grph, n this requires more preise efinition of equivlene etween two grphs. Seon, grphs hve shre noes n yles, whih mkes oth forwr n kwr omputtion muh more omplite thn tht on trees; nïve omputtion on grphs woul visit the sme noes mny times n possily infinitely. It is prtiulrly iffiult to hnle insertion in kwr trnsformtion euse it requires suitle sugrph to e rete n inserte into proper ple in the soure. This pper reports our first solution to the prolem of iiretionl grph trnsformtion. We pproh this prolem y proviing iiretionl semntis for UnCAL, whih is grph lger for the known grph query lnguge UnQL (Bunemn et l. 2000); forwr semntis (forwr evlution) orrespons to forwr trnsformtion n kwr semntis (kwr evlution) orrespons to kwr trnsformtion. We hoose UnQL/UnCAL s the sis of our iiretionl grph trnsformtion for two min resons. First, UnQL/UnCAL is grph query lnguge tht hs een well stuie in the tse ommunity with soli fountion n effiient implementtion. It hs onise n prtil surfe syntx se on selet-where luses like SQL, n n e esily use to esrie mny interesting grph trnsformtions. Seon, n more importntly, grph trnsformtions in UnQL n e utomtilly mppe to those in terms of struturl reursion in UnCAL, whih n e evlute in ulk mnner (Bunemn et l. 2000); struturl reursion is evlute y first proessing in prllel on ll eges of the input grph n

2 then omining the results. This ulk semntis signifintly ontriutes to our iiretionliztion, proviing smrt wy of treting shre noes n yles in grphs n of tring k from the view to the soure. Our min tehnil ontriutions re summrize s follows. We re, s fr s we re wre, the first to hve reognize the importne of struturl reursion n its ulk semntis in ressing the hllenging prolem of iiretionl grph trnsformtion, n sueee in novel two-stge frmework of iiretionl grph trnsformtion se on struturl reursion. We emonstrte tht grph trnsformtions efine in terms of struturl reursions (eing suitle for optimiztion s hve een intensively stuie thus fr (Bunemn et l. 2000)) mke kwr evlution esier. We give forml efinition of iiretionl semntis for Un- CAL y () refining the existing forwr evlution so tht it n proue useful tre informtion for lter kwr evlution (Setion 4), n (2) using the tre informtion to reflet in-ple uptes n eletions on the view to the soure, n opt the nrrowing tehnique to tkle the iffiult prolem with insertion (Setion 5). We prove our iiretionl evlution is well-ehve. We hve fully implemente our iiretionliztion presente in this pper n onfirme the effetiveness of our pproh through mny non-trivil exmples, inluing ll those presente in this pper n some typil iiretionl grph trnsformtions in tse mngement n softwre engineering. More exmples n emos re ville on our BiG projet We site. We onsier n opertion se pproh, whih mens tht the user expliitly provies eiting opertions in terms of renme, elete, n insert. Currently these opertions re trete oring to the orer speifie y users. It might e hllenging to proue these opertion sequenes utomtilly from the sttes efore n fter user s moifitions on the view, ut it is eyon the sope of this pper. The forwr trnsformtions we onsier is se on UnCAL, whih is isimultion generi, mening tht the trnsformtion n t istinguish etween grphs tht re isimilr. For exmple, it n t extrt first hil of noe. Extening our moel to ope with orer is inlue in our future work. Also note tht kwr trnsformtion is not isimultion generi, mening tht two results of uptes tht re isimilr o not lwys le to isimilr soure. However, this is not neessrily limittion introue y our iiretionliztion, sine this symmetry omes from the expressiveness of onitionl expression in the originl UnCAL grph lger. Similr rgument pply for isomorphi uptes. Outline We strt with rief review of the si onept of grph t moel n the struturl reursion of UnCAL in Setion 2. Then, we lrify the iiretionl properties within our ontext n give n overview of our two-stge frmework for iiretionlizing grph trnsformtions in Setion 3. After explining how to exten the forwr evlution of UnCAL with tre informtion in Setion 4, we give forml efinition of iiretionl semntis for UnCAL n prove tht it is well-ehve in Setion 5. We isuss implementtion issues in Setion 6 n relte work in Setion 7. We onlue the pper in Setion () A Simple Grph () An Equivlent Grph Figure. Grph Equivlene Bse on Bisimultion 2. UnCAL: A Grph Alger We opte UnCAL (Bunemn et l. 2000), well-stuie grph lger, s the sis of our iiretionl grph trnsformtion. We will riefly review its grph t moel n the ore of UnCAL. 2. Grph Dt Moel We el with roote, irete, n ege-lele grphs with no orer on outgoing eges. They re ege-lele in the sense tht ll informtion is store on lels of eges while lels of noes serve only s unique ientifier without prtiulr mening. UnCAL grph t moel hs two prominent fetures, mrkers n ε-eges. Noes my e mrke with input n output mrkers, whih re use s n interfe to onnet them to other grphs. An ε-ege represents shortut of two noes, working like the ε-trnsition in n utomton. We use Lel to enote the set of lels n M to enote the set of mrkers. Formlly, grph G, sometimes enote y G (V,E,I,O), is quruple (V, E, I, O), where V is set of noes, E V (Lel {ε}) V is set of eges, I M V is set of pirs of n input mrker n the orresponing input noe, n O V M is set of pirs of output noes n ssoite output mrkers. For eh mrker &x M, there is t most one noe v suh tht (&x, v) I. The noe v is lle n input noe with mrker &x n is enote y I(&x). Unlike input mrkers, more thn one noe n e mrke with n ientil output mrker. They re lle output noes. Intuitively, input noes re root noes of the grph (we llow grph to hve multiple root noes, n for singly roote grphs, we often use efult mrker & to inite the root), while n output noe n e seen s ontext-hole of grphs where n input noe with the sme mrker will e plugge lter. We write inmrker(g) to enote the set of input mrkers n outmrker(g) to enote the set of output mrkers in grph G. In ition, we write lel(ζ) to enote the lel of the ege ζ. Note tht multiple-mrker grphs re ment to e n internl t struture for grph omposition. In ft, the initil soure grphs of our trnsformtion hve one input mrker (single-roote) n no output mrkers (no holes). For instne, the grph in Figure () is enote y (V, E, I, O) where V = {, 2, 3, 4, 5, 6}, E = {(,, 2), (,, 3), (,, 4), (2,, 5), (3,, 5), (4,, 4), (5,, 6)}, I = {(&, )}, n O = {}. Vlue Equivlene etween Grphs Two grphs re vlue equivlent if they re isimilr. Plese refer to (Bunemn et l. 2000) for the omplete efinition. Informlly, grph G is isimilr to grph This nlogy woul hoose NFA rther thn DFA, sine we llow multiple outgoing eges with ientil lels from noe. 4 4

3 G {} { : G} &x... &xm &z G G2 G G G2 &x... &xm &x... &xm G G 2 &y... &yn &y... &yn G G 2 &z := G &z () &x... &x m G &y... &yn ε ε &y... &yn ε G2 &z... &zp G@G2 &z Figure 2. Grph Construtors &x... &xm ε ε &x... &x m G &x... &x m yle (G) ε e ::= {} {l : e} e e &x := e &y () e e e yle(e) { onstrutor } $g { grph vrile } if l = l then e else e { onitionl } re(λ($l, $g).e)(e) { struturl reursion pplition } l ::= $l { lel ( Lel) n lel vrile } Figure 3. Core UnCAL Lnguge Exmple. The grph equivlent to tht in Figure () n e onstrute s follows (though not uniquely). yle((&z := { : { : &z }} { : { : &z }} { : &z 2 }) (&z := { : {}}) (&z 2 := { : &z 2})) For simpliity, we often write { : G,..., n : G n } to enote { : G } { n : G n }. G 2 if every noe x in G hs t lest isimilr ounterprt x 2 in G 2 n vie vers, n if there is n ege from x to y in G, then there is orresponing ege from x 2 to y 2 in G 2 tht is isimilr ounterprt of y, n vie vers. Therefore, unfoling yle or upliting shre noes oes not relly hnge grph. This notion of isimultion is extene to ope with ε-eges. For instne, the grph in Figure () is vlue equivlent to the grph in Figure (); the new grph hs n itionl ε-ege (enote y the otte line), uplites the grph roote t noe 5, n unfols n splits the yle t noe 4. Unrehle prts re lso isregre, i.e., two isimilr grphs re still isimilr if one s sugrphs unrehle from input noes. Grph Construtors Figure 2 summrizes the nine grph onstrutors tht re powerful enough to esrie ritrry (irete, ege-lele, n roote) grphs (Bunemn et l. 2000): G ::= {} { single noe grph } { : G} { n ege pointing to grph } G G 2 { grph union } &x := G { lel the root noe with n input mrker } &y { noe grph with n output mrker } () { empty grph } G G 2 { isjoint grph union } G 2 { ppen of two grphs } yle(g) { grph with yles } Here, {} onstruts root-only grph, { : G} onstruts grph y ing n ege with lel Lel {ε} pointing to the root of grph G, n G G 2 s two ε-eges from the new root to the roots of G n G 2. Also, &x := G ssoites n input mrker, &x, to the root noe of G, &y onstruts grph with single noe mrke with one output mrker &y, n () onstruts n empty grph tht hs neither noe nor n ege. Further, G G 2 onstruts grph y using omponentwise (V, E, I n O) union. iffers from in tht unifies input noes while oes not. requires input mrkers of operns to e isjoint, while requires them to e ientil. G 2 omposes two grphs vertilly y onneting the output noes of G with the orresponing input noes of G 2 with ε-eges, n yle(g) onnets the output noes with the input noes of G to form yles. Newly rete noes hve unique ientifiers. We will give this retion rule extene for our iiretionliztion in Setion 4.. The efinition here is se on grph isomorphism (ientil grph onstrution expressions results in ientil grphs up to isomorphism), n they re, together with other opertors, lso isimultion generi (Bunemn et l. 2000), i.e., isimilr result is otine for isimilr inputs. 2.2 The Core UnCAL UnCAL (Unstruture Clulus) is n internl grph lger for the grph query lnguge UnQL, n its ore syntx is epite in Figure 3. It onsists of the grph onstrutors, vriles, onitionls, n struturl reursion. We hve lrey etile the t onstrutors, while vriles n onitionls re self explntory. Therefore, we will fous on struturl reursion, whih is powerful mehnism in UnCAL to esrie grph trnsformtions. A funtion f on grphs is lle struturl reursion if it is efine y the following equtions f({}) = {} f({$l : $g}) = f($g) f($g $g 2 ) = f($g ) f($g 2 ), where the expression e my ontin referenes to vriles $l n $g (ut no reursive lls to f). Sine the first n the thir equtions re ommon in ll struturl reursions, we write the struturl reursion in UnCAL simply s f($) = re(λ($l, $g).e)($). Despite its simpliity, the ore UnCAL is powerful enough to esrie interesting grph trnsformtion inluing ll grph queries (in UnQL) (Bunemn et l. 2000), n nontrivil moel trnsformtions (Hik et l. 2009). Some simple exmples re given elow. Exmple 2. The following struturl reursion 2 reples ege lel with n leves other lels unhnge. 2($) = re(λ($l, $g). if $l = then { : & } 2 else {$l : & 3 } 4 ) ($) 5 (The supersripts re for ientifying oe positions, whih will e importnt in Setion 4; they n simply e ignore for now.) Here is n instne of n exeution: ( 2 ) = where enotes the root of the grph. Informlly, the mening of this efinition n e onsiere to e fixe point (though my not neessrily unique) over the grph, whih is gin efine y set of equtions using the three onstrutors {}, :, n. For instne, the grph in Figure () n e onsiere to e the fixe point of the following equtions: G root = { : { : G 5 }, : { : G 5 }, : G 4 } G 5 = { : {}} G 4 = { : G 4 }.

4 () Before Removing ε-eges S2 S3 S4 E2 2 S25 E25 5 S56 E56 E3 3 S35 E35 E4 4 S44 E44 6 () Removing ε- eges () After Removing ε- eges Figure 4. Bulk Semntis of Struturl Reursion in UnCAL Exmple 3. The following struturl reursion 2 x reples ll lels with n removes eges lele. 2 x($) = re(λ($l, $g). if $l = then { : & } 2 else if $l = then {ε : & 3 } 4 else {$l : & 5 } 6 ) ($) 7 Applying the funtion 2 x to the grph in Figure () yiels the grph in Figure 4(). Exmple 4. The following struturl reursion onseutive extrts sugrphs tht n e essile y trversing two onnete eges of the sme lel. onseutive($) = re(λ($l, $g). re(λ($l, $g ). if $l = $l then {result : $g } else {} 2 )($g) 3 )($) 4 For exmple, we hve ( ) onseutive X Y = result X Note tht the struturl reursive efinition of onseutive uses grph prmeter $g to hieve the trnsformtion. Also note tht struturl reursions re llowe to e neste, n inner reursion n refer to outer vriles (s $l in the exmple). This enles us to express the join of multiple queries. Exmple 5. Although the exmples given so fr re self-reursive, it is possile to simulte mutul reursion y returning grphs with multiple mrkers. For instne, the following funtion ($) = re(λ($l, $g). &z :={ : &z 2 } &z 2 :={ : &z })($) hnges ll eges of even istnes from the root noe to, n o istne eges to. We my onsier the mrkers &z i s mutully reursive ll, n to onsist of two mutul reursive funtions. The first is &z, whih, t eh ege in the originl grph, genertes new ege pointing to the result of &z 2 t the originl estintion noe. The seon is &z 2 tht genertes eges pointing to the result of &z from its estintion. The result of the whole expression is efine to e the result of the &z t the root noe of the rgument grph. The following figure shoul e helpful. The she eges enote the eges tht re unrehle from the output root noe. ( e ) = = 2.3 Bulk Semntis of Struturl Reursion By llowing ε-eges, we n evlute struturl reursion in ulk mnner. Consier the struturl reursion, re(λ($l, $g). e) whih is to e pplie to n input grph G. In ulk semntis, we pply oy e inepenently on every ege (, G ) in G where is the lel of the ege n G is the grph tht the ege is pointing to, then join the results with ε-eges (s in onstrutor). Rell the struturl reursion 2 x efine in Exmple 3. Applying it to the input grph in Figure () yiels the grph in Figure 4(), where eh ege from i to j in the input grph les to sugrph ontining grph with n ege from Sij to Eij in the output grph (where the otte ege enotes n ε-ege), n these sugrphs re onnete with ε-eges oring to the originl shpe of the grph. If we eliminte ll ε-eges s expline in Setion 3.2, we otin stnr grph in Figure 4(). One istint feture of ulk semntis is tht the shpe of the input grph is rememere through itionl ε-eges, whih will e fully utilize in our lter iiretionliztion. 3. Overview: Biiretionlizing UnCAL It is more hllenging to iiretionlize trnsformtions on grphs thn trees, euse grphs my ontin shre noes or yles. We shll emonstrte tht the struturl reursion in UnCAL n serve s the sis to solve this prolem. Although struturl reursion ws propose within the ontext of query optimiztion, we will show tht it plys ruil role in our iiretionliztion. 3. Biiretionl Properties Biiretionliztion is use to erive kwr trnsformtion from forwr trnsformtion. We pproh the prolem of iiretionliztion in grph trnsformtion y proviing iiretionl semntis for UnCAL; forwr semntis (forwr evlution) orrespons to forwr trnsformtion n kwr semntis (kwr evlution) orrespons to kwr trnsformtion. Before giving our iiretionl semntis for UnCAL, let us lrify the iiretionl properties tht the forwr n kwr evlutions shoul stisfy. Let F[[e]]ρ enote forwr evlution (get) of expression e uner environment ρ to proue view, n B[[e]](ρ, G ) enote kwr evlution (put) of expression e uner environment ρ to reflet possily moifie view G to the soure y omputing n upte environment. ρ is set of mppings with form $x G with grph (or lel) G. The following re two importnt properties: F[[e]]ρ = G B[[e]](ρ, G) = ρ (GETPUT) B[[e]](ρ, G ) = ρ G Rnge(F[[e]]) F[[e]]ρ = G (PUTGET) The (GETPUT) property sttes tht unhnge view G shoul give no hnge on the environment ρ in the kwr evlution, while the (PUTGET) property sttes tht if view is moifie to G whih is in the rnge of the forwr evlution, then this moifition n e reflete to the soure suh tht forwr evlution will proue the sme view G.

5 v ε losure v ε losure Figure 5. Generl ε-ege Elimintion Proeure These two properties re essentilly the sme s those in (Foster et l. 2005). One prolem with the (PUTGET) property is tht it nees to hek whether grph is in the rnge of forwr evlution, whih is iffiult to o in prtie. To voi this rnge heking, we llow the moifie view n the view otine y kwr evlution followe y forwr evlution to iffer, ut require oth views to hve the sme effet on the originl soure if kwr evlution is pplie. B[[e]](ρ, G ) = ρ F [e]ρ = G B [e](ρ, G ) = ρ (WPUTGET) The get in our (WPUTGET) n e onsiere s n menment of the moifie view G to G. Certinly, if the (PUTGET) property hols, so oes the (WPUTGET). We sy tht pir of forwr n kwr evlutions is well-ehve if it stisfies (GETPUT) n (WPUTGET) properties. In the rest of this pper, we will give iiretionl evlution (semntis) for UnCAL, n prove the following theorem, whih is iret onsequene of Lemms 2, 3, n 4 tht will e isusse lter. Theorem (Well-ehveness). Our forwr n kwr evlutions re well-ehve, provie their evlutions suee. 3.2 Two-Stge Biiretionliztion Rell 2 x, whih mps the soure grph in Figure () to the view grph in Figure 4(). The ig gp etween the soure n the view mkes it hr to reflet hnges on the view to the soure. Our ie to rige this gp ws to ivie the forwr evlution into two esily hnle stges: Stge : Forwr evlution (in the ulk semntis) with suffiient ε-eges, so tht the output grph will hve similr shpe to the input grph, mking the lter kwr evlution esier. Stge 2: Elimintion of ε-eges to proue usul view. For 2 x, Stge mps the soure grph to the intermeite grph in Figure 4(), n Stge 2 mps the intermeite grph to the view grph (Figure 4()). By oing so, eh stge eomes esier to iiretionlize. First, let us onsier Stge 2. The ε-ege elimintion proeure is simple: new eges re e to skip the ε-losure (Figure 5). It is esy to efine well-ehve kwr evlution for this proeure. First, ll noes in the result grph, G v, exist in the originl grph, G s, so eh noe in G v n e tre to G s. Seon, lthough n ege in G s my e uplite in G v ((E25,, E56) n (E35,, E56) in Figure 4()), eh ege in G v shoul hve uniquely orresponing ege in G s. Therefore, ing new noe to G v orrespons to ing new noe to G s, n ing new ege to G v orrespons to ing new ege etween two orresponing noes in G s. Similr orresponene hols for eletions of noes n eges, n in-ple uptes of eges. Note tht Figure 4() oes not hve this uplition euse for this prtiulr grph, it is sfe to glue the soure n the estintion noes of n ε-ege together. It is unsfe, if n only if, the soure hs nother outgoing ege n the estintion hs nother inoming ege. Here, uplition is unvoile. Next, let us onsier Stge. One ft worth noting is tht fter the kwr evlution in Stge 2, the moifition to the view in Stge stisfies the ε-mrker preserving property: () No ε-eges re e or elete, (2) Mrkers re not e, elete, or hnge n (3) Unrehle prts re not moifie. This property is very importnt in our iiretionliztion, euse it not only enfores the nine grph onstrutors so tht they re invertile, ut it lso mkes it esy to iiretionlize struturl reursion euse there is ler orresponene etween the input n output grphs. In the rest of this pper, we will fous on iiretionl grph trnsformtion in Stge. 4. Trele Forwr Evlution An UnCAL expression usully speifies forwr evlution mpping grph tse (whih is just grph) to view grph (in Setion 2). The min purpose of the present pper is to give kwr evlution (kwr semntis), whih speifies how to reflet view uptes to the grph tse. For this purpose, we hve to etet how eh noe of the view is generte, prtiulrly when it is onstrute through onneting input/output mrkers n removing ε-eges, whih re no longer in the view. To mke the view more informtive, viz., trele, we enrih the originl semntis of UnCAL y emeing tre informtion (like provenne tres (Cheney et l. 2008)) in ll noes of the view tht possily inlues ε-eges. In this setion, we explin wht kin of tre informtion is emee in the view, n exten the originl semntis for UnCAL expressions to e evlute into trele views. 4. Trele Views A view is otine y evluting n UnCAL expression with tse. Every noe of the view origintes in either noe of the tse or onstrut in the UnCAL expression, exept when the noe is generte through struturl reursion with re onstrut (in the ulk semntis). Rell tht n expression re(λ($l, $g).e )(e 2 ) is evlute y ining vriles $l n $g in e to prt of the evlution result of e 2. In this se, noe in the view my originte not only in the whole re expression ut lso su-expression in e 2. A trele view is view eh noe of whih hs informtion for tring its origin. The informtion, lle tre ID, is efine y TreID ::= SrID Coe Pos Mrker ReN Pos TreID Mrker ReE Pos TreID Ege, where SrID rnges over ientifiers uniquely ssigne to ll noes of the tse, Pos rnges over oe positions in the UnCAL expression, Mrker rnges over input/output mrkers, n Ege stns for TreID Lel TreID with set of lels Lel. We now riefly explin the mening of eh tre ID. Let i e tre ID of noe u in trele view. When i is noe ientifier in SrID, noe u origintes in the noe ssigne y i in the tse. When i is Coe p &m with oe position p n input mrker &m, noe u origintes in the suexpression t p in the UnCAL expression. The mrker &m is only require when the suexpression is given y the or yle onstrut. This is euse these onstruts yiel s mny ε-eges s input mrkers. When i is either ReN p i 0 &m or ReE p i 0 (i,, i 2 ), noe u is generte through the re onstrut t the oe position p. ReN n ReE stn for wht noe n ege, respetively, of the rgument of the reursion, the noe origintes in. Let us explin these ses through n exmple where the Un- CAL expression 2 x in Exmple 3 is pplie to the tse G sr in Figure (). The trele view we wnt n e o-

6 tine from the grph G view in Figure 4() y ssigning tre IDs to ll noes. The tre ID ssigne to noe in G view is (ReN 7 &) euse the noe origintes in noe of G sr in SrID, whih is use s prt of the rgument of the re onstrut t oe position 7 in 2 x. The tre ID ssigne to noe S2 in G view is (ReE 7 (Coe 2) (,, 2)) euse the noe origintes in the -lele ege from noe to 2 of G sr in Ege through the grph onstrutor { : } t oe position 2 in the re onstrut t 7 in 2 x. When the rgument of the re onstrut is lso re expression, ReN n ReE in the tre ID re neste like (ReN p (ReE p... )... ) n (ReE p (ReE p... ) (ReN...,, ReN... )). A trele view is enote y quruple (V, E, I, O) just like n orinry UnCAL grph. The only ifferene is tht in trele views, tre IDs re ssigne to ll noes. 4.2 Enrihe Forwr Semntis Trele views n e ompute y simple extension of the originl forwr semntis of UnCAL so tht tring informtion is reore when noe is rete. Let e p enote n UnCAL suexpression e t oe position p. We write ρ($x) for G when ($x G) ρ. ρ is nturlly use s vrile sustitution in UnCAL expressions, e.g., eρ for n expression e. We inutively efine the enrihe forwr semntis F [e p ]ρ for eh UnCAL onstrut of e. Grph Construtor Expressions. The semntis of grph onstrutor expressions is strightforwr oring to the onstrution in Figure 2. For instne, we hve F[[{} p ]]ρ = ({Coe p},, {(&, Coe p)}, ), whih retes grph hving single noe with the tre ID of Coe p (initing the noe is onstrute y the oe t position p), no eges, n input noe (the single noe itself), n no output noes. As nother exmple, the semntis for the expression e e 2 is efine elow to unify two grphs y onneting their input noes with mthing mrkers using ε-eges: F[[(e e 2) p ]]ρ = F [e ]ρ p F [e 2]]ρ, where p is union opertor for two grphs onerning position p n is efine y G p G 2 = (V V V 2, E E E 2, I, O O 2 ) where (V, E, I, O ) = G (V 2, E 2, I 2, O 2 ) = G 2 M = inmrker(g ) = inmrker(g 2) V = {Coe p &m &m M} E = {(Coe p &m, ε, v) (&m, v) I I 2 } I = {(&m, Coe p &m) &m M}. We omit efinitions for other onstrutor expressions. Vrile. A vrile looks up its ining from environment ρ. Conition. F [($v) p ]ρ = ρ($v) The forwr semntis of onition is efine s F[[(if l { = l 2 then e else e 2 ) p ]ρ F [e ]ρ if l = ρ = l 2 ρ F [e 2 ]ρ otherwise. It first evlutes the onitionl expression l = l 2, n with the result it evlutes either the then rnh or the else rnh. Struturl Reursion. The semntis of struturl reursion is given y ulk semntis s reviewe in Setion 2.3, whih n e formlly efine y F[[(re(λ($l, $g). e )(e )) p ]]ρ = ompose p re(fw ehege(g, ρ, e ), G, M) where M = inmrker(e ) outmrker(e ) G = F[[e ]]ρ, where fw ehege n ompose re re efine in Figure 6. Intuitively, fw ehege evlutes the oy expression e t eh ege ζ of the rgument grph G otine y evluting e n returns the set of result grphs. Then, ompose p re glues ll the grphs together long the struture of G onerning oe position p. Note tht sugrph(g, ζ) enotes the sugrph to whih the ege ζ is pointing in the grph G. Exmple 6. We will now illustrte the semntis of re through n exmple: the struturl reursion 2 x, whih is efine with position informtion in Exmple 3, is pplie to G sr in Figure (), n the trele view is grph similr to G view in Figure 4(). First, G sr is oun to vrile $. Then, fw ehege genertes set of pirs of n ege n lol result for eh ege in G sr. The lol result is otine y evluting the oy of re uner ρ = {$ G sr } {$l L, $g G} with the lel L of the ege n sugrph G rehle from the ege. For exmple, s the lol result for ege (3,, 5) in G sr, ege (Coe 2,, Coe ) with input noe Coe 2 n output noe Coe is generte euse the suexpression { : & } 2 is use ue to $l =. The funtion ompose p re glues ll pirs of n ege n lol result fter ing ReN or ReE to their noes. For exmple, regring pir of ege ζ = (3,, 5) n its lol result ontining ege (Coe 2,, Coe ), the set E ReE ontins ege (ReE 7 (Coe 2) ζ,, ReE 7 (Coe ) ζ) where 7 is the oe position of the onerne re, while set E ReN ontins ege (ReN 7 3 &, ε, ReE 7 (Coe 2) ζ) n (ReE 7 (Coe ) ζ, ε, ReN 7 5 &) ue to (&, Coe 2) I n (Coe, &) O. The former orrespons to the ege from S35 to E35 of G view n the ltter orrespons to two eges from 3 to S35 n from E35 to 5 of G view. In this exmple, E ε is n empty set sine G sr hs no ε-eges. The sets I ReN n O ReN of input n output noes re otine with I = {(&, )} n O =, respetively, whih re those of G sr. Hene, I ReN = {(&.&, ReN 7 &)} n O ReN = euse M = inmrker(e ) outmrker(e ) = {&}. Here,. enotes Skolem funtion (Bunemn et l. 2000) tht stisfies (&x.&y).&z = &x.(&y.&z) (ssoitivity) n &.&x = &x.& = &x (left n right ientity). More onretely, if the soure grph is s = 2 x(s) gives the grph ReN 7 & ReE 7 (Coe 6) (,, 2) ReE 7 (Coe 5) (,, 2) ReN 7 2 & whih is isimilr to the grph 5. Bkwr Evlution of UnCAL ReE 7 (Coe 2) (,, 2) ReE 7 (Coe ) (,, 2). 2, With trele views n the ε-mrker preserving property (Setion 3) on the moifition of suh views, kwr evlution (in Stge ) turns out to e simpler for two resons. First, the grph onstrutors eome invertile. For instne, if G = G G 2, G is moifie to G, ut the moifition is

7 { } fw ehege(g (,E,, ), ρ, e) = (ζ, F[[e]]ρ ζ ) ζ E, lel(ζ) ε, ρ ζ = ρ {$l lel(ζ), $g sugrph(g, ζ)} ompose p re(g, (V, E, I, O), M) = (V ReE V ReN, E ReE E ReN E ε, I ReN, O ReN ) where V ReE = {ReE p v ζ (ζ, (V ζ,,, )) G, v V ζ } E ReE = {(ReE p u ζ,, ReE p v ζ) (ζ, (, E ζ,, )) G, (u,, v) E ζ } V ReN = {ReN p v &m v V, &m M} E ReN = {(ReN p v &m, ε, ReE p u ζ) &m M, (ζ = (v,, ), (,, I ζ, )) G, (&m, u) I ζ } {(ReE p u ζ, ε, ReN p v &m) &m M, (ζ = (,, v), (,,, O ζ )) G, (u, &m) O ζ } E ε = {(ReN p v &m, ε, ReN p u &m) (v, ε, u) E, &m M} I ReN = {(&n.&m, ReN p v &m) (&n, v) I, &m M} O ReN = {(ReN p v &m, &n.&m) (v, &n) O, &m M} Figure 6. Core of Forwr Semntis of re t Coe Position p ε-mrker preserving; then, we n follow tring informtion, ε-eges, n mrker informtion to uniquely eompose G to G n G 2 suh tht G G 2 G hols. We will write this eomposition s eomp G G 2, n pplying it to G will give (G, G 2). Seon, kwr evlution of struturl reursion re(e) is reue to tht of its oy e (followe y result gluing), euse of the ulk semntis of struturl reursion. Bkwr evlution gretly epens on wht uptes re llowe on the view. We llow the following three generl uptes on our ege-lele grphs: () in-ple uptes s moifition of ege lels, (2) eletion of eges, n (3) insertion of eges or sugrph roote t noe. An we ept sequene of these uptes on the view n reflet them to the soure. In the rest of this setion, we shll explin the respetive kwr evlution for these uptes on views. 5. Refletion of In-ple Uptes In this setion, we formlly efine kwr semntis for UnCAL, where only in-ple uptes re onsiere. Rell tht kwr semntis B[[e](ρ, G ) is use to ompute new environment from the originl input environment ρ n the moifie view G. Like forwr semntis, kwr semntis n e efine inutively over the onstrution of expression. 5.. Bkwr Evlution of Simple Expressions Grph Construtor Expressions. Sine eh onstrutor is revertile n is ssoite with eomposition funtion, we n eompose the views of onstrutor expressions so s to efine the kwr semntis inutively. For exmple, we hve B[[(e e 2 ) p ]](ρ, G ) = B [e ]](ρ, G ) ρ B [e 2 ](ρ, G 2) where G = F [e ]]ρ G 2 = F [e 2]]ρ (G, G 2) = eomp G G 2 (G ) Unlike Foster et l. (2005), we hve vrile ining, n therefore multiple environments proue y kwr evlution of the operns re merge y ρ efine elow, using n pproh similr to tht in Liu et l. (2007), whih els with vrile G (V,E,I,O ) G 2(V2,E 2,I 2,O 2 ), the ext equivlene of two grphs, is efine y V = V 2 E = E 2 I = I 2 O = O 2. It woul e more preise to write it s eomp G,,G 2 in tht the eomposition epens on three rguments. inings. (ρ ρ ρ 2 ) = ($v mg(g, G ($v G ) ρ,, G 2 ) ($v G) ρ, ($v G 2) ρ 2 G if G 2 = G G = G 2 where mg(g, G, G 2 ) = G 2 if G = G FAIL otherwise ρ unifies eh ining y mg. If only the ining on the left hn sie is moifie (G 2 = G), or oth re onsistently upte (G = G 2), then the ining on the left is opte, n vie vers. If oth re upte to ifferent vlues, it fils, leing to the filure of the entire kwr evlution. Lel vrile inings re trete similrly. We hve omite the efinitions for other onstrutor expressions, whih n e efine similrly. Vrile. A vrile simply uptes its ining s B[[$v]](ρ, G ) = ρ[$v G ]. Here, ρ[$v G ] is n revition for (ρ \ {$v G }. Conition. }) {$v The kwr evlution of onition is efine y B[[if l = l 2 then e else e 2 ]](ρ, G ) ρ if l ρ = l 2ρ l ρ = l 2ρ = ρ 2 if l ρ l 2ρ l ρ 2 l 2ρ 2 FAIL otherwise where ρ = B[[e ]](ρ, G ) ρ 2 = B[[e 2]](ρ, G ), whih is reue to the kwr evlution of e if l = l 2 hols, n to the kwr evlution of e 2 otherwise. To gurntee well-ehveness, we ensure tht l = l 2 oes not hnge fter kwr evlution Bkwr Evlution of Struturl Reursion Due to the trele ulk forwr evlution of struturl reursion re n the ε-mrker preserving property tht retins similrity in shpe etween input n output grphs, kwr semntis n esily e efine s B[[re(λ($l, $g). e )(e )]](ρ, G ) = merge(ρ, e, E, w ehege(g, ρ, e, eomp re (G, E ))) where G = (, E,, ) = F[[e ]]ρ This efinition is esy to unerstn if we note ulity with the efinition of its forwr semntis. Bkwr semntis first eomposes through eomp re the moifie result grph G into piees of grphs, whih is intuitively n inverse opertion of ompose re.

8 ζ E, lel(ζ) ε, V eomp re ((V, E, I, O ), E ) = (ζ, (V ζ, E ζ, I ζ, O ζ )) ζ = {w (ReE p w ζ) V }, E ζ = {(w,, w 2 ) (ReE p w ζ,, ReE p w 2 ζ) E }, I ζ = {(&m, w) (ReN p v &m, ε, ReE p w ζ) E }, O ζ = {(w, &m) (ReE p w ζ, ε, ReN p v &m) E } { } w ehege(g, ρ, e, G ) = (ζ, B[[e]](ρ ζ, G ζ )) (ζ, G ζ ) G, ρ ζ = ρ {$l lel(ζ), $g sugrph(g, ζ)} merge(ρ, e, E, R) = B[[e ]](ρ, G { } ) ρ ρ ζ \ {$l } \ {$g } (ζ, ρ ζ ) R ( where G = V ζ, E eps ) E ζ, I, O E eps = {(u, ( ε, v) (u, ε, v) E } ) (V ζ, E ζ ) = V ζ {u}, E ζ {(u, ρ ζ ($l), I ζ (&))} for eh (ζ, ρ ζ ) R, letting (u,, ) = ζ n (V ζ, E ζ, I ζ, O ζ ) = ρ ζ ($g) Figure 7. Core of Bkwr Semntis of re t Coe Position p For every non-ε ege ζ E in the soure rgument grph, the eomposition extrts (possily moifie) suprt G ζ of G, whih origintes t the result G ζ of the forwr omputtion on the ege. Then, in w ehege, we rry out kwr omputtion of the oy expression e on eh ege n ompute the upte environment ρ ζ. Finlly, these environments re merge into the upte environment ρ of the whole expression. The merge funtion oes two piees of work. First, y omining the informtion ρ ζ($l) n ρ ζ($g) from the upte environments (n ε-eges existing in the eges E of the soure rgument grph), it omputes the moifie rgument grph G. Then, we inutively rry out kwr evlution on the rgument expression e to otin nother upte environment ρ. This ρ n ll ρ ζs re merge into ρ. Let us explin in more etil the efinition of eomp re, whih is the key point of the kwr evlution. The funtion first extrts from result grph G noes V ζ n eges E ζ tht elong to eh ege ζ y mthing tre ID ReE p ζ. Note tht if there re noes tht hve een freshly inserte into the view, we lso require these noes to hve this struture, so tht these noes re lso psse to the kwr evlution of the reursion oy. Input n output noes with mrker &m re reovere y seleting those pointe from/to hu noes hving struture ReN &m. Top-level onstrutors of tre ID re erse so tht we n inutively ompute the kwr imge from the oy expression. Exmple 7. Rell the simple exmple in Exmple 3 where the soure is s = 2, n 2 x(s) gives the grph G. If the grph G is moifie to G where the ege lel is upte to X, then B[[2 x]]({$ s}, G ) returns ining {$ s } X where s = 2. Therefore, the in-ple upte of the hnge on the view grph is reflete to the soure. Lemm 2 (Well-ehveness for In-ple Uptes). If output grphs re moifie y in-ple uptes on eges, then for ny expression e, the two evlutions F[[e] n B [e](, ) form well-ehve iiretionl trnsformtion, if they suee. Proof. This sttement n e prove y inution on the struture of e. For the se se where e is vrile, it lerly hols. Consiering the inutive se, () if e is onstrutor expression, it hols euse eh onstrutor is revertile within our ontext, (2) if e is onition, its kwr evlution is reue to tht on either its true rnh or its flse rnh, so the sttement hols y inution, n (3) if e is struturl reursion, y ulk semntis, its kwr omputtion is reue to its oy expression, so the sttement hols y inution. 5.2 Refletion of Deletion Deletion in view is reflete s eletion of the orresponing prt in the soure y using tre IDs. Suppose we wnt to elete the ege lele in the view of Exmple 7. Sine oth enpoints of the ege hve tre IDs of the form ReE 7 (,, 2), we n see tht the selete ege hs een generte ue to the existene of the soure ege (,, 2), whih is the orresponing prt to e elete in the soure. In generl, for lele ege ζ = (u,, v) with ε, its orresponing ege orr(ζ) is efine s: orr((u,, v)) = (u,, v) if u, v SrID orr((ree p u ζ {,, ReE p v ζ )) orr((u,, v)) if orr((u,, v)) FAIL = orr(ζ ) if orr((u,, v)) = FAIL orr(ζ) = FAIL otherwise. Here, FAIL mens filure on fining the orresponing ege. The first se mens tht if the ege ζ is opy of n ege in the soure, then ζ itself is the orresponing ege. The seon n the thir ses re for when ζ is result of some struturl reursion. Aoring to the forwr semntis of re in Figure 6, the non-ε ege ζ must hve the form (ReE p u ζ,, ReE p v ζ ) for some p, u, v, n nother non-ε ege ζ. This mens tht ζ onsists of n ege (u,, v) originting from n evlution of reursion-oy t ζ. Hene, for this se, we first reursively tre the orresponing soure of (u,, v), n if this fils, then try tht of ζ. In other ses, orr fils to fin the orresponing soure, euse it must e the se tht u hs tre ID of the form Coe, mening tht the ege is not erive from the soure ut from n UnCAL expression. Let $ e the soure grph, G view e the view proue y F[[e]]ρ from forwr omputtion of expression e with environment ρ, n G view e grph from G view with set of eges D out = {ζ,..., ζ n } remove. Our kwr evlution B[[e]](ρ, G view) onsists of the following three steps.. Compute the set of soure eges D in = {orr(ζ i ) ζ i is not n ε-ege}. 2. If FAIL D in, kwr evlution fils. If it is otine suessfully without filure, ompute G sr = ρ($) D in, where G E enotes removl of the eges in the set E from grph G. 3. Return ρ = ρ[$ G sr] s the result if F[[e]]ρ = G view, n fil otherwise.

9 Lemm 3 (Well-ehveness for Deletion). If output grphs re moifie y ege eletion, then for ny expression e, the two evlutions F[[e]] n B[[e](, ) form well-ehve iiretionl trnsformtion, if they suee. Proof. The (GETPUT) property is ler euse of the ft tht D in = if D out =. For the (WPUTGET) property, it hols euse the thir step tully oes this hek. 5.3 Refletion of Insertion Refletion of insertion is muh more omplite thn tht of inple-upting n eletion. This is euse there re no orresponing eges in the soure for the freshly inserte eges in the view, whih requires us not only to rete new informtion ut lso to it to proper lotion in the soure grph. Our ie ws to use the Universl Resolving Algorithm (URA) (Armov n Glük 2002), powerful metho of inversion omputtion, to erive right inverse of the forwr evlution, n use the istriutive property of struturl reursion re(e)($g $g 2 ) = re(e)($g ) re(e)($g 2 ) to properly reflet insertion to the soure. In this setion, we shll give our lgorithm for this refletion, efore we highlight how URA n e use to erive the right inverse Insertion Refletion with Right Inverse We ssume the monotoniity of insertion in tht n insertion on the view is trnslte to n insertion on the soure rther thn other upting opertions. The monotoniity omes from the sene of isempty (Bunemn et l. 2000) in our ore UnCAL. We only onsier insertion on the view grph proue y forwr omputtion of vrile expression or struturl reursion. For the se of vrile, this refletion is one in the sme wy s in Setion 5... Insertion for struturl reursion, the si omputtion unit in Un- CAL, nees to e refully esigne. In the following, we will fous on struturl reursion, omitting other ses for simpliity. Before giving our refletion lgorithm, we shoul lrify the mening of right inverse. In generl, funtion h is si to e right inverse of f if for ny x in the rnge of f, f(h(x)) = x hols. Within our ontext, for n expression e n grph G, F [[e]](g) is si to e right inverse omputtion if it returns ρ suh tht F[[e]]ρ = G. Now, we will return to our refletion lgorithm. Let G sr e the soure grph, G view = F [re(e)($)]ρ, where ρ = {$ G sr }, n G view e grph from G with new eges inserte. Notie tht it is suffiient to onsier $ s the rgument of re, euse $ n e oun to other expression. Our kwr evlution B[[re(e)($)](ρ, G view) returns ρ s the result if there re no new eges inserte in G view ; otherwise, it oes the following:. Extrt the inserte sugrph G from G view suh tht G view = G view G. 2. Compute with right inverse omputtion: ρ = F [[re(e)($)]](g ). 3. Return ρ 2 = {$ G sr ρ ($)} s the result. The first step of extrtion is possile provie tht insertion hppens t the root noe. The seon step of right inverse omputtion will e expline in Setion The lst step is to upte Insertions to non-root positions re possile ue to ulk semntis tht llows similr tretment for every noe. the ining of $ n return this environment s our result. The following lemm shows the orretness of the lgorithm. Lemm 4 (Well-ehveness for Insertion). If output grphs re moifie y ege insertion, then for struturl reursion of the form re(e)($) where e ontins no free vriles, then two evlutions F[[e]] n B[[e]](, ) form well-ehve iiretionl trnsformtion, if they suee. Proof. First, the (GETPUT) property lerly hols euse ρ is returne when no insertions our. Next, we prove the (WPUTGET) property y using the following lultion. F[[re(e)($)]]ρ 2 = { prtil pplition } F[[re(e)(ρ 2($))]]ρ 2 = { ef. of ρ 2 } F[[re(e)(G sr ρ ($))]]ρ 2 = { struturl reursion property } F[[re(e)(G sr ) re(e)(ρ ($)))]]ρ 2 = { forwr evlution } F[[re(e)(G sr )]]ρ 2 F[[re(e)(ρ ($)))]ρ 2 = { e oes not ontin free vrile } G view F[[re(e)($)]]ρ = { right inversion } G view G It is worth noting tht we hve simplifie our isussion in oth the ove lgorithm n lemm y mking it requirement tht e in re(e)($) oes not ontin ny free vriles. With this requirement, our forwr n kwr evlution stisfies the stronger (PUTGET) property. In ft, it is eptle to relx this onition y llowing e to ontin other free vriles n the initil ρ ontins ining of other vriles. Then, right inversion will proue ρ tht will e use to upte ll vrile inings in ition to $. In this se, F[[re(e)(G sr )]]ρ my proue grph tht is ifferent from the originl view G view. In ny se, this ifferent grph will not hve n itionl effet on the soure when we pply kwr evlution to this new grph. Therefore, (WPUTGET) lwys hols. With this ie, we shll propose n lgorithm in whih (PUTGET) property is stisfie without ny itionl requirements. The ie is to utilize the Tre ID informtion, s will e isusse lter Improving Insertion Refletion The metho ove stisfies the (PUTGET) property only if the vriles of e re isjoint from the vriles oun in the initil environment ρ. However, in generl, sine trnsformtion my hve multiple vrile referenes, more effort is require to hieve the (PUTGET) property. We tkle the prolem y first loting where we insert grph y using tre IDs, n then pplying the URA lgorithm (to e esrie lter) to fin wht grph shoul e inserte. Consier the trnsformtion 2 x n the view in Exmple 6. Suppose we wnt to insert grph G vins roote t the view noe v = ReN 7 2 &. Where shoul some grph e inserte into the soure to reflet this insertion? The nswer is tht we must insert grph roote t the soure noe 2 euse there woul e no ege from v in the view unless there were n ege from 2 in the soure oring to the ulk semntis of struturl reursion. Now, our next tsk is to fin wht grph shoul e inserte uner the soure

10 noe 2. Tht is, we hope to fin G sins suh tht the following hols. ( ) 2 x 2 G sins ReN 7 & ReE 7 (Coe 4) (,, 2) = ReE 7 (Coe 3) (,, 2) ReN 7 2 & ReE 7 (Coe 2) (,, 2) ReE 7 (Coe ) (,, 2) G vins URA n help us to fin suh G sins for G vins. For exmple, if G vins is { : {}}, then URA returns G sins = { : {}}. If G vins is { : {}}, then URA returns one of the possiilities, G sins = { : {}} or G sins = { : {}}, epening on the serh metho use in URA. Aoring to the sounness n the ompleteness of URA, the refletion y URA is lwys orret in the sense tht (PUTGET) hols, n moreover URA lwys returns G sins if suh G sins exists. Of these, sounness is the key to insertion refletion stisfying (PUTGET) for generl UnCAL trnsformtions. In summry, our insertion-refletion lgorithm is s follows.. Let v e noe uner whih we wnt to insert grph G vins. 2. By using the tr funtion in Figure 8, we fin the soure noe u = tr(v) uner whih we insert grph to reflet the insertion. 3. Let G view e grph otine from the view y ing ε-ege from v to G vins. 4. We fin grph G sins onnete from u y n ε-ege, y pplying URA for G view. 5. We return grph G sr otine from the soure y ing n ε-ege from u to G sins. The sounness of the insertion-refletion lgorithm is iretly erive from the sounness of URA. Lemm 5 (Sounness of Insertion). Our insertion-refletion lgorithm stisfies (PUTGET). Note tht we use URA for G view inste of G vins. Thus, URA rejets ny insertion of G sins tht violtes (PUTGET). In ition, our insertion-refletion lgorithm is omplete in the sense tht, if there exist some soure insertions to reflet the view insertion uner some onitions, the lgorithm will fin one of them. Lemm 6 (Completeness of Insertion). Let v e noe suh tht tr(v) FAIL. For ny soure grph G, we n insert ny grph into its view if there exists soure insertion tht reflets the view insertion n v still ours in the view of the insertion-reflete soure. Rell tht we only onsier insertion on the view grph proue y forwr omputtion of vrile expression or struturl reursion, whih is expresse y tr(v) FAIL. This lemm n e prove using the property of tre IDs stting tht, to insert grph roote t view noe v, we must insert grph roote t soure noe tr(v). By inution on the tre ID of v, we n show tht, if there is n ege from v, it must e the se tht there is n ege from tr(v), whih is implie y the property of tre IDs. Note tht G vins hs no ege to the originl view. However, this is not restrition sine if there is rossing ege pointing to sugrph of the originl view, we n uplite the sugrph n integrte it to G vins so tht the ege n e eliminte. tr(srid) = SrID tr(ren v ) = tr(v) tr(coe ) = FAIL tr(ree v ) = tr(v) Figure 8. Tring Noe ID Right Inverse Computtion y URA Rell tht the right inverse omputtion of n expression e is to tke grph G view n return ρ suh tht F[[e]]ρ = G view. We opt the universl resolving lgorithm (URA) (Armov n Glük 2002), powerful n generl inversion mehnism, to ompute ρ. The si ie ehin URA is to serh on perfet proess tree (Glük n Klimov 993), whih represents ll possile omputtions of n expression, n to fin omputtion pth tht proue the result. Our right inverse omputtion onsists of three steps.. It lzily enumertes possile evlution pths y symoli omputtion lle neee nrrowing (Antoy et l. 994). 2. From the generte evlution pths, it onstruts tle of input/output pirs of omputtions. 3. If there is pir in the tle whose output is G view, it genertes sustitution (environment) from the pth n returns it s the result. Exmple 8. As simple exmple, let us see how we fin ρ suh tht F[[2 x($x)]]ρ = G view where G view = { : {}}. We serh ρ y symoli evlution of 2 x($x). To evlute 2 x($x), we unfol $x n reursively evlute 2 x, i.e., struturl reursion. There re mny wys to instntite $x suh s $x {}, $x {$l : $x }, $x {$l : $x, $l 2 : $x 2}. If we hoose $x {}, the omputtion finishes, yieling tle onsisting of n input/output pir ({}, {}). Sine this tle oes not ontin pir whose output is G view, we ontinue serhing. Assume tht we hoose $x {$l : $x }. Then 2 x($x) is unfole to (if $l = then { : &} else (if $l = then {ε : &} else {$l : 2 x($x ). As evlution gets stuk here euse of free vrile $l in the if onition, we fin suitle $l to resume the evlution. If we hoose $l, then the expression is reue to { : 2 x($x ) n input/output pir ({ : {}}, { : {}}) is otine y hoosing $x {}. Sine G view = { : {}}, we gther ll inings long this omputtion n return the following environment s the result. {$x { : {}}} Figure 9 shows prt of perfet proess tree in our right-inverse omputtion: the left is the tree n the right is tle of pir of input/output grph templtes (it is more generl thn pir of input/output grph instnes, s we isusse ove). Note this tree is vrint of SLD-resolution trees (Glük n Sørensen 994). To use URA effetively for our right inverse omputtion of UnCAL, we efine smll-step semntis for UnCAL suh tht perfet proess tree n e onstrute though these smll steps. The only non-stnr feture of this semntis is tht we use memoiztion to voi infinite loops proly use y yles in the soure grph (See Appenix of (Hik et l. 200) for etils). In ition, we provie Dijkstr-serhing strtegy to enumerte ll the possile evlution pths so tht solution n lwys e The sme notion is lle riving (Glük n Klimov 993; Glük n Sørensen 994) in (Armov n Glük 2002).

CS 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

More information

I 3 2 = I I 4 = 2A

I 3 2 = I I 4 = 2A ECE 210 Eletril Ciruit Anlysis University of llinois t Chigo 2.13 We re ske to use KCL to fin urrents 1 4. The key point in pplying KCL in this prolem is to strt with noe where only one of the urrents

More information

2.4 Theoretical Foundations

2.4 Theoretical Foundations 2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level

More information

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

Bidirectionalizing Graph Transformations

Bidirectionalizing Graph Transformations Biiretionalizing Graph Transformations Soihiro Hiaka Kazuhiro Inaa Zhenjiang Hu Hiroyuki Kato National Institute of Informatis, Japan {hiaka,hu,kinaa,kato}@nii.a.jp Kazutaka Matsua Tohoku University, Japan

More information

Lecture 2: Cayley Graphs

Lecture 2: Cayley Graphs Mth 137B Professor: Pri Brtlett Leture 2: Cyley Grphs Week 3 UCSB 2014 (Relevnt soure mteril: Setion VIII.1 of Bollos s Moern Grph Theory; 3.7 of Gosil n Royle s Algeri Grph Theory; vrious ppers I ve re

More information

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of: 22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)

More information

Solutions to Problem Set #1

Solutions to Problem Set #1 CSE 233 Spring, 2016 Solutions to Prolem Set #1 1. The movie tse onsists of the following two reltions movie: title, iretor, tor sheule: theter, title The first reltion provies titles, iretors, n tors

More information

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4 Am Blnk Leture 13 Winter 2016 CSE 332 CSE 332: Dt Astrtions Sorting Dt Astrtions QuikSort Cutoff 1 Where We Are 2 For smll n, the reursion is wste. The onstnts on quik/merge sort re higher thn the ones

More information

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014 S 224 DIGITAL LOGI & STATE MAHINE DESIGN SPRING 214 DUE : Mrh 27, 214 HOMEWORK III READ : Relte portions of hpters VII n VIII ASSIGNMENT : There re three questions. Solve ll homework n exm prolems s shown

More information

Lecture 8: Abstract Algebra

Lecture 8: Abstract Algebra Mth 94 Professor: Pri Brtlett Leture 8: Astrt Alger Week 8 UCSB 2015 This is the eighth week of the Mthemtis Sujet Test GRE prep ourse; here, we run very rough-n-tumle review of strt lger! As lwys, this

More information

CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computation 1. Graphs and Digraphs CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

More information

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

More information

CSC2542 State-Space Planning

CSC2542 State-Space Planning CSC2542 Stte-Spe Plnning Sheil MIlrith Deprtment of Computer Siene University of Toronto Fll 2010 1 Aknowlegements Some the slies use in this ourse re moifitions of Dn Nu s leture slies for the textook

More information

System Validation (IN4387) November 2, 2012, 14:00-17:00

System Validation (IN4387) November 2, 2012, 14:00-17:00 System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise

More information

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 ) Neessry n suient onitions for some two vrile orthogonl esigns in orer 44 C. Koukouvinos, M. Mitrouli y, n Jennifer Seerry z Deite to Professor Anne Penfol Street Astrt We give new lgorithm whih llows us

More information

Factorising FACTORISING.

Factorising FACTORISING. Ftorising FACTORISING www.mthletis.om.u Ftorising FACTORISING Ftorising is the opposite of expning. It is the proess of putting expressions into rkets rther thn expning them out. In this setion you will

More information

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point GCSE C Emple 7 Work out 9 Give your nswer in its simplest form Numers n inies Reiprote mens invert or turn upsie own The reiprol of is 9 9 Mke sure you only invert the frtion you re iviing y 7 You multiply

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS The University of ottinghm SCHOOL OF COMPUTR SCIC A LVL 2 MODUL, SPRIG SMSTR 2015 2016 MACHIS AD THIR LAGUAGS ASWRS Time llowed TWO hours Cndidtes my omplete the front over of their nswer ook nd sign their

More information

6.5 Improper integrals

6.5 Improper integrals Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =

More information

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106 8. Problem Set Due Wenesy, Ot., t : p.m. in - Problem Mony / Consier the eight vetors 5, 5, 5,..., () List ll of the one-element, linerly epenent sets forme from these. (b) Wht re the two-element, linerly

More information

Automata and Regular Languages

Automata and Regular Languages Chpter 9 Automt n Regulr Lnguges 9. Introution This hpter looks t mthemtil moels of omputtion n lnguges tht esrie them. The moel-lnguge reltionship hs multiple levels. We shll explore the simplest level,

More information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Project 6: Minigoals Towards Simplifying and Rewriting Expressions MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

More information

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into

More information

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx Applitions of Integrtion Are of Region Between Two Curves Ojetive: Fin the re of region etween two urves using integrtion. Fin the re of region etween interseting urves using integrtion. Desrie integrtion

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

Particle Physics. Michaelmas Term 2011 Prof Mark Thomson. Handout 3 : Interaction by Particle Exchange and QED. Recap

Particle Physics. Michaelmas Term 2011 Prof Mark Thomson. Handout 3 : Interaction by Particle Exchange and QED. Recap Prtile Physis Mihelms Term 2011 Prof Mrk Thomson g X g X g g Hnout 3 : Intertion y Prtile Exhnge n QED Prof. M.A. Thomson Mihelms 2011 101 Rep Working towrs proper lultion of ey n sttering proesses lnitilly

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

Nondeterministic Automata vs Deterministic Automata

Nondeterministic Automata vs Deterministic Automata Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n

More information

CS 360 Exam 2 Fall 2014 Name

CS 360 Exam 2 Fall 2014 Name CS 360 Exm 2 Fll 2014 Nme 1. The lsses shown elow efine singly-linke list n stk. Write three ifferent O(n)-time versions of the reverse_print metho s speifie elow. Eh version of the metho shoul output

More information

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005 RLETON UNIVERSIT eprtment of Eletronis ELE 2607 Swithing iruits erury 28, 05; 0 pm.0 Prolems n Most Solutions, Set, 2005 Jn. 2, #8 n #0; Simplify, Prove Prolem. #8 Simplify + + + Reue to four letters (literls).

More information

Section 2.3. Matrix Inverses

Section 2.3. Matrix Inverses Mtri lger Mtri nverses Setion.. Mtri nverses hree si opertions on mtries, ition, multiplition, n sutrtion, re nlogues for mtries of the sme opertions for numers. n this setion we introue the mtri nlogue

More information

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching CS261: A Seon Course in Algorithms Leture #5: Minimum-Cost Biprtite Mthing Tim Roughgren Jnury 19, 2016 1 Preliminries Figure 1: Exmple of iprtite grph. The eges {, } n {, } onstitute mthing. Lst leture

More information

Lecture 11 Binary Decision Diagrams (BDDs)

Lecture 11 Binary Decision Diagrams (BDDs) C 474A/57A Computer-Aie Logi Design Leture Binry Deision Digrms (BDDs) C 474/575 Susn Lyseky o 3 Boolen Logi untions Representtions untion n e represente in ierent wys ruth tle, eqution, K-mp, iruit, et

More information

Subsequence Automata with Default Transitions

Subsequence Automata with Default Transitions Susequene Automt with Defult Trnsitions Philip Bille, Inge Li Gørtz, n Freerik Rye Skjoljensen Tehnil University of Denmrk {phi,inge,fskj}@tu.k Astrt. Let S e string of length n with hrters from n lphet

More information

Now we must transform the original model so we can use the new parameters. = S max. Recruits

Now we must transform the original model so we can use the new parameters. = S max. Recruits MODEL FOR VARIABLE RECRUITMENT (ontinue) Alterntive Prmeteriztions of the pwner-reruit Moels We n write ny moel in numerous ifferent ut equivlent forms. Uner ertin irumstnes it is onvenient to work with

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

INTRODUCTION TO AUTOMATA THEORY

INTRODUCTION TO AUTOMATA THEORY Chpter 3 INTRODUCTION TO AUTOMATA THEORY In this hpter we stuy the most si strt moel of omputtion. This moel els with mhines tht hve finite memory pity. Setion 3. els with mhines tht operte eterministilly

More information

The DOACROSS statement

The DOACROSS statement The DOACROSS sttement Is prllel loop similr to DOALL, ut it llows prouer-onsumer type of synhroniztion. Synhroniztion is llowe from lower to higher itertions sine it is ssume tht lower itertions re selete

More information

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)} Grph Theory Simple Grph G = (V, E). V ={verties}, E={eges}. h k g f e V={,,,,e,f,g,h,k} E={(,),(,g),(,h),(,k),(,),(,k),...,(h,k)} E =16. 1 Grph or Multi-Grph We llow loops n multiple eges. G = (V, E.ψ)

More information

Unfoldings of Networks of Timed Automata

Unfoldings of Networks of Timed Automata Unfolings of Networks of Time Automt Frnk Cssez Thoms Chtin Clue Jr Ptrii Bouyer Serge H Pierre-Alin Reynier Rennes, Deemer 3, 2008 Unfolings [MMilln 93] First efine for Petri nets Then extene to other

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

More information

Compression of Palindromes and Regularity.

Compression of Palindromes and Regularity. Compression of Plinromes n Regulrity. Kyoko Shikishim-Tsuji Center for Lierl Arts Eution n Reserh Tenri University 1 Introution In [1], property of likstrem t t view of tse is isusse n it is shown tht

More information

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals AP Clulus BC Chpter 8: Integrtion Tehniques, L Hopitl s Rule nd Improper Integrls 8. Bsi Integrtion Rules In this setion we will review vrious integrtion strtegies. Strtegies: I. Seprte the integrnd into

More information

A Disambiguation Algorithm for Finite Automata and Functional Transducers

A Disambiguation Algorithm for Finite Automata and Functional Transducers A Dismigution Algorithm for Finite Automt n Funtionl Trnsuers Mehryr Mohri Cournt Institute of Mthemtil Sienes n Google Reserh 51 Merer Street, New York, NY 1001, USA Astrt. We present new ismigution lgorithm

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233,

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233, Surs n Inies Surs n Inies Curriulum Rey ACMNA:, 6 www.mthletis.om Surs SURDS & & Inies INDICES Inies n surs re very losely relte. A numer uner (squre root sign) is lle sur if the squre root n t e simplifie.

More information

POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS

POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS Bull. Koren Mth. So. 35 (998), No., pp. 53 6 POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS YOUNG BAE JUN*, YANG XU AND KEYUN QIN ABSTRACT. We introue the onepts of positive

More information

Computing all-terminal reliability of stochastic networks with Binary Decision Diagrams

Computing all-terminal reliability of stochastic networks with Binary Decision Diagrams Computing ll-terminl reliility of stohsti networks with Binry Deision Digrms Gry Hry 1, Corinne Luet 1, n Nikolos Limnios 2 1 LRIA, FRE 2733, 5 rue u Moulin Neuf 80000 AMIENS emil:(orinne.luet, gry.hry)@u-pirie.fr

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

Total score: /100 points

Total score: /100 points Points misse: Stuent's Nme: Totl sore: /100 points Est Tennessee Stte University Deprtment of Computer n Informtion Sienes CSCI 2710 (Trnoff) Disrete Strutures TEST 2 for Fll Semester, 2004 Re this efore

More information

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA Common intervls of genomes Mthieu Rffinot CNRS LIF Context: omprtive genomis. set of genomes prtilly/totlly nnotte Informtive group of genes or omins? Ex: COG tse Mny iffiulties! iology Wht re two similr

More information

Bisimulation, Games & Hennessy Milner logic

Bisimulation, Games & Hennessy Milner logic Bisimultion, Gmes & Hennessy Milner logi Leture 1 of Modelli Mtemtii dei Proessi Conorrenti Pweł Soboiński Univeristy of Southmpton, UK Bisimultion, Gmes & Hennessy Milner logi p.1/32 Clssil lnguge theory

More information

If the numbering is a,b,c,d 1,2,3,4, then the matrix representation is as follows:

If the numbering is a,b,c,d 1,2,3,4, then the matrix representation is as follows: Reltions. Solutions 1. ) true; ) true; ) flse; ) true; e) flse; f) true; g) flse; h) true; 2. 2 A B 3. Consier ll reltions tht o not inlue the given pir s n element. Oviously, the rest of the reltions

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Lecture 4: Graph Theory and the Four-Color Theorem

Lecture 4: Graph Theory and the Four-Color Theorem CCS Disrete II Professor: Pri Brtlett Leture 4: Grph Theory n the Four-Color Theorem Week 4 UCSB 2015 Through the rest of this lss, we re going to refer frequently to things lle grphs! If you hen t seen

More information

Solids of Revolution

Solids of Revolution Solis of Revolution Solis of revolution re rete tking n re n revolving it roun n is of rottion. There re two methos to etermine the volume of the soli of revolution: the isk metho n the shell metho. Disk

More information

= state, a = reading and q j

= state, a = reading and q j 4 Finite Automt CHAPTER 2 Finite Automt (FA) (i) Derterministi Finite Automt (DFA) A DFA, M Q, q,, F, Where, Q = set of sttes (finite) q Q = the strt/initil stte = input lphet (finite) (use only those

More information

arxiv: v2 [math.co] 31 Oct 2016

arxiv: v2 [math.co] 31 Oct 2016 On exlue minors of onnetivity 2 for the lss of frme mtrois rxiv:1502.06896v2 [mth.co] 31 Ot 2016 Mtt DeVos Dryl Funk Irene Pivotto Astrt We investigte the set of exlue minors of onnetivity 2 for the lss

More information

Algebra 2 Semester 1 Practice Final

Algebra 2 Semester 1 Practice Final Alger 2 Semester Prtie Finl Multiple Choie Ientify the hoie tht est ompletes the sttement or nswers the question. To whih set of numers oes the numer elong?. 2 5 integers rtionl numers irrtionl numers

More information

Symbolic Automata for Static Specification Mining

Symbolic Automata for Static Specification Mining Symoli Automt for Stti Speifition Mining Hil Peleg 1, Shron Shohm, Ern Yhv, n Hongseok Yng 1 Tel Aviv University, Isrel Tel Aviv-Yffo Aemi College, Isrel University of Ofor, UK Tehnion, Isrel Astrt. We

More information

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE M. STISSING, C. N. S. PEDERSEN, T. MAILUND AND G. S. BRODAL Bioinformtis Reserh Center, n Dept. of Computer Siene, University

More information

Behavior Composition in the Presence of Failure

Behavior Composition in the Presence of Failure Behvior Composition in the Presene of Filure Sestin Srdin RMIT University, Melourne, Austrli Fio Ptrizi & Giuseppe De Giomo Spienz Univ. Rom, Itly KR 08, Sept. 2008, Sydney Austrli Introdution There re

More information

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:

More information

Section 2.1 Special Right Triangles

Section 2.1 Special Right Triangles Se..1 Speil Rigt Tringles 49 Te --90 Tringle Setion.1 Speil Rigt Tringles Te --90 tringle (or just 0-60-90) is so nme euse of its ngle mesures. Te lengts of te sies, toug, ve very speifi pttern to tem

More information

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable INTEGRATION NOTE: These notes re supposed to supplement Chpter 4 of the online textbook. 1 Integrls of Complex Vlued funtions of REAL vrible If I is n intervl in R (for exmple I = [, b] or I = (, b)) nd

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

Introduction to Olympiad Inequalities

Introduction to Olympiad Inequalities Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................

More information

Implication Graphs and Logic Testing

Implication Graphs and Logic Testing Implition Grphs n Logi Testing Vishwni D. Agrwl Jmes J. Dnher Professor Dept. of ECE, Auurn University Auurn, AL 36849 vgrwl@eng.uurn.eu www.eng.uurn.eu/~vgrwl Joint reserh with: K. K. Dve, ATI Reserh,

More information

Computing on rings by oblivious robots: a unified approach for different tasks

Computing on rings by oblivious robots: a unified approach for different tasks Computing on rings y olivious roots: unifie pproh for ifferent tsks Ginlorenzo D Angelo, Griele Di Stefno, Alfreo Nvrr, Niols Nisse, Krol Suhn To ite this version: Ginlorenzo D Angelo, Griele Di Stefno,

More information

F / x everywhere in some domain containing R. Then, + ). (10.4.1)

F / x everywhere in some domain containing R. Then, + ). (10.4.1) 0.4 Green's theorem in the plne Double integrls over plne region my be trnsforme into line integrls over the bounry of the region n onversely. This is of prtil interest beuse it my simplify the evlution

More information

Eigenvectors and Eigenvalues

Eigenvectors and Eigenvalues MTB 050 1 ORIGIN 1 Eigenvets n Eigenvlues This wksheet esries the lger use to lulte "prinipl" "hrteristi" iretions lle Eigenvets n the "prinipl" "hrteristi" vlues lle Eigenvlues ssoite with these iretions.

More information

Exam 1 Study Guide. Differentiation and Anti-differentiation Rules from Calculus I

Exam 1 Study Guide. Differentiation and Anti-differentiation Rules from Calculus I Exm Stuy Guie Mth 26 - Clulus II, Fll 205 The following is list of importnt onepts from eh setion tht will be teste on exm. This is not omplete list of the mteril tht you shoul know for the ourse, but

More information

If we have a function f(x) which is well-defined for some a x b, its integral over those two values is defined as

If we have a function f(x) which is well-defined for some a x b, its integral over those two values is defined as Y. D. Chong (26) MH28: Complex Methos for the Sciences 2. Integrls If we hve function f(x) which is well-efine for some x, its integrl over those two vlues is efine s N ( ) f(x) = lim x f(x n ) where x

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt

More information

Finite State Automata and Determinisation

Finite State Automata and Determinisation Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions

More information

A Primer on Continuous-time Economic Dynamics

A Primer on Continuous-time Economic Dynamics Eonomis 205A Fll 2008 K Kletzer A Primer on Continuous-time Eonomi Dnmis A Liner Differentil Eqution Sstems (i) Simplest se We egin with the simple liner first-orer ifferentil eqution The generl solution

More information

SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVEX STOCHASTIC PROCESSES ON THE CO-ORDINATES

SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVEX STOCHASTIC PROCESSES ON THE CO-ORDINATES Avne Mth Moels & Applitions Vol3 No 8 pp63-75 SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVE STOCHASTIC PROCESSES ON THE CO-ORDINATES Nurgül Okur * Imt Işn Yusuf Ust 3 3 Giresun University Deprtment

More information

XML and Databases. Exam Preperation Discuss Answers to last year s exam. Sebastian Maneth NICTA and UNSW

XML and Databases. Exam Preperation Discuss Answers to last year s exam. Sebastian Maneth NICTA and UNSW XML n Dtses Exm Prepertion Disuss Answers to lst yer s exm Sestin Mneth NICTA n UNSW CSE@UNSW -- Semester 1, 2008 (1) For eh of the following, explin why it is not well-forme XML (is WFC or the XML grmmr

More information

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE M. STISSING, C. N. S. PEDERSEN, T. MAILUND AND G. S. BRODAL Bioinformtis Reserh Center, n Dept. of Computer Siene, University

More information

Let s divide up the interval [ ab, ] into n subintervals with the same length, so we have

Let s divide up the interval [ ab, ] into n subintervals with the same length, so we have III. INTEGRATION Eonomists seem muh more intereste in mrginl effets n ifferentition thn in integrtion. Integrtion is importnt for fining the epete vlue n vrine of rnom vriles, whih is use in eonometris

More information

Logic, Set Theory and Computability [M. Coppenbarger]

Logic, Set Theory and Computability [M. Coppenbarger] 14 Orer (Hnout) Definition 7-11: A reltion is qusi-orering (or preorer) if it is reflexive n trnsitive. A quisi-orering tht is symmetri is n equivlene reltion. A qusi-orering tht is nti-symmetri is n orer

More information

Discrete Structures Lecture 11

Discrete Structures Lecture 11 Introdution Good morning. In this setion we study funtions. A funtion is mpping from one set to nother set or, perhps, from one set to itself. We study the properties of funtions. A mpping my not e funtion.

More information

Situation Calculus. Situation Calculus Building Blocks. Sheila McIlraith, CSC384, University of Toronto, Winter Situations Fluents Actions

Situation Calculus. Situation Calculus Building Blocks. Sheila McIlraith, CSC384, University of Toronto, Winter Situations Fluents Actions Plnning gent: single gent or multi-gent Stte: complete or Incomplete (logicl/probbilistic) stte of the worl n/or gent s stte of knowlege ctions: worl-ltering n/or knowlege-ltering (e.g. sensing) eterministic

More information

Aperiodic tilings and substitutions

Aperiodic tilings and substitutions Aperioi tilings n sustitutions Niols Ollinger LIFO, Université Orléns Journées SDA2, Amiens June 12th, 2013 The Domino Prolem (DP) Assume we re given finite set of squre pltes of the sme size with eges

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Separable discrete functions: recognition and sufficient conditions

Separable discrete functions: recognition and sufficient conditions Seprle isrete funtions: reognition n suffiient onitions Enre Boros Onřej Čepek Vlimir Gurvih Novemer 21, 217 rxiv:1711.6772v1 [mth.co] 17 Nov 217 Astrt A isrete funtion of n vriles is mpping g : X 1...

More information

Monochromatic Plane Matchings in Bicolored Point Set

Monochromatic Plane Matchings in Bicolored Point Set CCCG 2017, Ottw, Ontrio, July 26 28, 2017 Monohromti Plne Mthings in Biolore Point Set A. Krim Au-Affsh Sujoy Bhore Pz Crmi Astrt Motivte y networks interply, we stuy the prolem of omputing monohromti

More information

Computing the Quartet Distance between Evolutionary Trees in Time O(n log n)

Computing the Quartet Distance between Evolutionary Trees in Time O(n log n) Computing the Qurtet Distne etween Evolutionry Trees in Time O(n log n) Gerth Stølting Brol, Rolf Fgererg Christin N. S. Peersen Mrh 3, 2003 Astrt Evolutionry trees esriing the reltionship for set of speies

More information

On the Spectra of Bipartite Directed Subgraphs of K 4

On the Spectra of Bipartite Directed Subgraphs of K 4 On the Spetr of Biprtite Direte Sugrphs of K 4 R. C. Bunge, 1 S. I. El-Znti, 1, H. J. Fry, 1 K. S. Kruss, 2 D. P. Roerts, 3 C. A. Sullivn, 4 A. A. Unsiker, 5 N. E. Witt 6 1 Illinois Stte University, Norml,

More information

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz Welome nge Li Gørt. everse tehing n isussion of exerises: 02110 nge Li Gørt 3 tehing ssistnts 8.00-9.15 Group work 9.15-9.45 isussions of your solutions in lss 10.00-11.15 Leture 11.15-11.45 Work on exerises

More information

Metaheuristics for the Asymmetric Hamiltonian Path Problem

Metaheuristics for the Asymmetric Hamiltonian Path Problem Metheuristis for the Asymmetri Hmiltonin Pth Prolem João Pero PEDROSO INESC - Porto n DCC - Fule e Ciênis, Universie o Porto, Portugl jpp@f.up.pt Astrt. One of the most importnt pplitions of the Asymmetri

More information

Electromagnetism Notes, NYU Spring 2018

Electromagnetism Notes, NYU Spring 2018 Eletromgnetism Notes, NYU Spring 208 April 2, 208 Ation formultion of EM. Free field desription Let us first onsider the free EM field, i.e. in the bsene of ny hrges or urrents. To tret this s mehnil system

More information

On a Class of Planar Graphs with Straight-Line Grid Drawings on Linear Area

On a Class of Planar Graphs with Straight-Line Grid Drawings on Linear Area Journl of Grph Algorithms n Applitions http://jg.info/ vol. 13, no. 2, pp. 153 177 (2009) On Clss of Plnr Grphs with Stright-Line Gri Drwings on Liner Are M. Rezul Krim 1,2 M. Siur Rhmn 1 1 Deprtment of

More information

Solving the Class Diagram Restructuring Transformation Case with FunnyQT

Solving the Class Diagram Restructuring Transformation Case with FunnyQT olving the lss Digrm Restruturing Trnsformtion se with FunnyQT Tssilo Horn horn@uni-kolenz.e Institute for oftwre Tehnology, University Kolenz-Lnu, Germny FunnyQT is moel querying n moel trnsformtion lirry

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information