The Complexity of XPath Query Evaluation

Size: px
Start display at page:

Download "The Complexity of XPath Query Evaluation"

Transcription

1 Th Complxity of XPath Qury Evaluation Gorg Gottlob Databas and AI Group Tchnisch Univrsität Win A-1040 Vinna, Austria Christoph Koch LFCS Univrsity of Edinburgh Edinburgh EH9 3JZ, UK Rinhard Pichlr Inst. für Computrsprachn Tchnisch Univrsität Win A-1040 Vinna, Austria ABSTRACT In this papr, w study th prcis complxity of XPath 1.0 qury procssing. Evn though havily usd by its incorporation into a varity of XML-rlatd standards, th prcis cost of valuating an XPath qury is not yt wllundrstood. Th first polynomial-tim algorithm for XPath procssing (with rspct to combind complxity) was proposd only rcntly, and vn to this day all major XPath ngins tak tim xponntial in th siz of th input quris. From th standpoint of thory, th prcis complxity of XPath qury valuation is opn, and it is thus unknown whthr th qury valuation problm can b paralllizd. In this work, w show that both th data complxity and th qury complxity of XPath 1.0 fall into lowr (highly paralllizabl) complxity classs, but that th combind complxity is PTIME-hard. Subsquntly, w study th sourcs of this hardnss and idntify a larg and practically important fragmnt of XPath 1.0 for which th combind complxity is LOGCFL-complt and, thrfor, in th highly paralllizabl complxity class NC INTRODUCTION XPath 1.0 is th nod-slcting qury languag cntral to most cor XML-rlatd tchnologis that ar undr th auspics of th W3C, including XQury, XSLT, and XML Schma. Evaluating XPath quris fficintly is ssntial to th ffctivnss and ral-world impact of ths tchnologis. Th most natural qustion rlatd to XPath qury procssing, its complxity, howvr, has rcivd surprisingly littl attntion. Th first polynomial-tim algorithms for XPath procssing (w.r.t. both th siz of th data and th qury, i.., combind complxity, cf. [10]) wr proposd only rcntly [3]. Apparntly, th fact that quris can b valuatd in polynomial tim with rspct to combind complxity for th full XPath 1.0 languag was not folklor. W bliv that at th tim of writing this, all publicly availabl XPath ngins and systms procssing languags containing XPath (such as XQury or XSLT procssors) tak Prmission to mak digital or hard copis of all or part of this work for prsonal or classroom us is grantd without f providd that copis ar not mad or distributd for profit or commrcial advantag and that copis bar this notic and th full citation on th first pag. To copy othrwis, to rpublish, to post on srvrs or to rdistribut to lists, rquirs prior spcific prmission and/or a f. PODS 2003, Jun 9-12, 2003, San Digo, CA. Copyright 2003 ACM /03/06...$5.00. tim xponntial in th sizs of th XPath xprssions in th input. This thsis is supportd by xprimntal vidnc on a numbr of popular systms in [3]. Morovr, immdiat functional implmntations of th standards documnts, of th currnt standard, XPath 1.0 [13], as wll as th now proposd XPath 2.0 languag 1 (through th nw XML Qury 1.0 Algbra) [14], lad to xponntial-tim procssing of XPath 1.0 quris. Th polynomial-tim rsult of [3] was shown using a form of dynamic programming. Basd on this, w prsntd algorithms that run in tim O( D 5 Q 2 ) and spac O( D 4 Q 2 ), whr D dnots th siz of th data and Q is th siz of th qury. W also introducd th logical cor fragmnt of XPath, calld Cor XPath, which includs th logical and path procssing faturs of XPath but xcluds arithmtics and string manipulations. Cor XPath quris can b valuatd in tim O( D Q ), i.. linar in th siz of th qury and of th data. In a scond papr [4], w improvd th abov uppr bounds on th complxity to tim O( D 4 Q 2 ) and spac O( D 2 Q 2 ). Morovr, w dfind a larg fragmnt of XPath for which w providd a quadratic-tim, linar-spac valuation algorithm. W also pointd out th faturs of XPath causing th various incrass in th dgrs of polynomials stablishd whn moving from a smallr XPath fragmnt to a largr on. Now that th combind complxity of XPath is known to b polynomial, a natural qustion mrgs, namly whthr XPath is also P-hard (i.., hard for polynomial tim), or altrnativly, whthr it is in th complxity class NC, and thus ffctivly paralllizabl. In cas th problm is P-hard, it is intrsting to undrstand th sourcs of this hardnss, and to find larg, ffctivly paralllizabl fragmnts. This papr thus studis th prcis complxity of XPath 1.0 qury procssing. Th contributions ar as follows. W stablish th combind complxity of XPath to b P-hard. This rmains tru vn for th Cor XPath fragmnt. W show that positiv Cor XPath, i.. Cor XPath without ngation, is LOGCFL-complt, and thus highly paralllizabl. Morovr, if th languag is furthr rstrictd to th path xprssions fragmnt (PF) without conditions, 1 XPath 2.0 now includs most of XQury and thus is Turingcomplt; howvr, most ral-world path quris will rmain xprssibl in XPath 1.0, which is a strict fragmnt of XPath 2.0.

2 P-complt Cor XPath WF pwf pos. Cor XPath LOGCFL LOGCFL-complt PF NL-complt XPath P pxpath Figur 1: Combind complxity of XPath. th complxity of valuating quris is complt for nondtrministic logarithmic spac. W xtnd Cor XPath by th arithmtics faturs of XPath, to th so-calld Wadlr Fragmnt (WF), and show that a larg fragmnt of it, which w call pwf ( positiv / paralll WF), is still in LOGCFL and can b massivly paralllizd. Th main faturs xcludd from WF to obtain pwf ar ngation and squncs of condition prdicats. This lads us to an vn largr fragmnt of XPath, calld pxpath, which w bliv contains most practical XPath quris and for which qury valuation can b massivly paralllizd (th combind complxity is still LOGCFL-complt). Finally, w complmnt our rsults on th combind complxity of XPath with a study of data complxity and qury complxity. Both problms fall into low (highly paralllizabl) complxity classs vn in th prsnc of ngation in quris. Th inclusion rlationships 2 btwn fragmnts discussd and thir (combind) complxitis ar shown in Figur 1. An arrow L 1 L 2 mans that languag L 1 is a fragmnt of languag L PRELIMINARIES 2.1 Complxity Classs W brifly discuss th complxity classs and som of thir charactrizations usd throughout th papr. For mor thorough survys of th rlatd thory s [6, 7]. 2 In th drawing, w assum that NL LOGCFL P. By P, L, and NL w dnot th wll-known complxity classs of problms solvabl in dtrministic polynomial tim, dtrministic logarithmic spac, and nondtrministic logarithmic spac, rspctivly, on Turing machins. It is conjcturd that problms complt for P ar inhrntly squntial and cannot profit from paralll computation. A problm is instad calld highly paralllizabl if it can b solvd within th complxity class NC of all problms solvabl in polylogarithmic tim on a polynomial numbr of procssors working in paralll [5]. By NC i, w dnot th class of problms solvabl in tim O(log i n) using O(n i ) procssors (in trms of th siz n of th input). A simpl modl of paralll computation is that of boolan circuits. By a monoton circuit, w dnot a circuit in which only -gats and -gats (but no -gats) ar usd. A family of circuits is a squnc G 0, G 1, G 2,..., whr th n-th circuit G n has n inputs. Such a family is L-uniform if thr xists an L-boundd dtrministic Turing machin which, on th input of n bits 1, outputs th circuit G n. A circuit or family of circuits has boundd fan-in if all of its gats hav fan-in boundd by som constant. A smi-unboundd circuit is a monoton circuit in which all -gats ar of boundd fan-in (w.l.o.g., w may rstrict th fan-in to two) but th -gats may hav unboundd fan-in. Dfinition 2.1. SAC 1 is th class of problms solvabl by L-uniform familis of smi-unboundd circuits of dpth O(log n) (SAC 1 circuits). LOGCFL is usually dfind as th complxity class consisting of all problms L-rducibl to a contxt-fr languag. Thr ar two important altrnativ charactrizations that w ar going to us. Proposition 2.2 ([11]). LOGCFL = SAC 1. SAC 1 circuit valu is LOGCFL-complt. A nondtrministic auxiliary pushdown automaton (NAux- PDA) is a nondtrministic Turing machin with a distinguishd input tap, a worktap, an output tap, and a stack (of which strictly only th topmost lmnt can b accssd at any tim). Proposition 2.3 ([9]). LOGCFL is th class of all dcision problms solvabl by an NAuxPDA with a logarithmic spac-boundd worktap in polynomial tim. ([1]). LOGCFL is closd undr com- Proposition 2.4 plmnt. Rgarding th containmnt of ths classs, w know that NC 1 L NL LOGCFL NC 2 NC P. P, LOGCFL, and NL ar closd undr L-rductions. 2.2 A Brif Introduction to XPath XPath 1.0 is a languag with a larg numbr of faturs and thrfor somwhat unwildy for thortical tratmnt. In this papr, w rstrict ourslvs to introducing only som of ths faturs, and to giving an informal xplanation of thir smantics. For a dtaild dfinition of th full XPath languag, w rfr to [13], and for a concis yt complt formal dfinition of th XPath smantics s [3]. In this sction, w dfin two basic fragmnts of XPath. Cor XPath, first dfind in [3], supports th most commonly usd faturs of XPath, path navigation and conditions with logical connctivs, but xcluds arithmtics,

3 string manipulations, and som of th mor sotric aspcts of th languag. Th scond fragmnt, which was first discussd in [12] by Wadlr, contains XPath s logical and arithmtic faturs, but xcluds string manipulations. W rfr to it as th Wadlr Fragmnt, short WF. W start by discussing Cor XPath. W sktch th fragmnt in trms of its syntax and thn informally discuss th smantics. Dfinition 2.5. Th syntax of Cor XPath is dfind by th grammar locpath ::= / locpath locpath / locpath locpath locpath locstp. locstp ::= axis :: ntst [ bxpr ]... [ bxpr ]. bxpr ::= bxpr and bxpr bxpr or bxpr not( bxpr ) locpath. axis ::= slf child parnt dscndant dscndant-or-slf ancstor ancstor-or-slf following following-sibling prcding prcding-sibling. whr locpath is th start production, axis dnots axis rlations (s blow), and ntst dnots tags labling documnt nods or th star * that matchs all tags ( nod tsts ). Th main syntactical fatur of Cor XPath ar location paths. Exprssions nclosd in brackts ar calld conditions or prdicats. Th main application of XPath is th navigation in XML documnt trs. This is don using th axis rlations, natural binary rlations such as child and dscndant btwn nods, which w do not dfin hr (but s [13, 3]; thy also hav th intuitiv manings convyd by thir nams). Th probably most common us of XPath is to compos axis applications with slctions of documnt nods by thir tags ( nod tsts ). For instanc, th qury /dscndant::a/child::b slcts all thos nods labld b that ar childrn of nods labld a that ar in turn dscndants of th root nod (dnotd by th initial slash). Conditions nclosd in squar brackts allow to impos additional constraints on nod slctions. For xampl, /dscndant::a/child::b[dscndant::c and not(following-sibling::d)] slcts xactly thos nods v from th nods in th rsult of /dscndant::a/child::b that hav at last on 3 dscndant labld c and do not hav a right sibling in th tr that is labld d (i.., thr is no child v of th parnt of v which follows v in th flow of th documnt and is labld d ). Dfinition 2.6. Th syntax of th WF-Quris is dfind by th Cor XPath grammar with th following xtnsions. bxpr is now bxpr ::= bxpr and bxpr bxpr or bxpr not( bxpr ) locpath nxpr rlop nxpr. 3 Location paths occurring in conditions i.., within squar brackts hav an xists -smantics, maning that at last on nod must match th location path starting from th currnt nod. Morovr, xpr ::= locpath bxpr nxpr. nxpr ::= position() last() numbr nxpr arithop nxpr. arithop ::= + - * div mod. rlop ::= =!= < <= > >=. xpr (rathr than locpath ) is now th start production and numbr dnots constant ral-valud numbrs. Evn though XPath is mainly undrstood as a languag for slcting a subst of th nods of an XML documnt tr, qury rsults can also b of diffrnt typs, namly for th WF numbrs and boolans (as wll as charactr strings for full XPath). XPath xprssions ar valuatd rlativ to a contxt, which by dfinition is a tripl of a contxt nod and two intgrs, th so-calld contxt position and th contxt siz. For dtails, w rfr to [13, 3], but considr th xampl qury child::a[position() + 1 = last()]. Rlativ to a contxt-tripl (v, i, j), i and j ar ignord whn th location stp child::a slcts thos childrn of v that ar labld a. Lt {w 1,..., w m} b this st of nods, whr th indics corrspond to th rlativ ordr of th nods in th documnt, simply spaking 4. Th application of an axis causs a chang of contxt to which th condition [position() + 1 = last()] is applid. Th condition is trid on ach of th tripls (w 1, 1, m),..., (w m, m, m). It will slct all thos nods w k for which k + 1 = m, i.. th position k in th slction is by on smallr than th last indx m, th siz of th slction. Proposition 2.7 ([3]). XPath qury valuation is in P with rspct to combind complxity. Cor XPath quris can vn b valuatd in tim O( Q D ), whr Q dnots th siz of th qury and D dnots th siz of th data. 3. COMPLEXITY OF CORE XPATH In this sction, w show that XPath and vn Cor XPath ar P-hard with rspct to combind complxity. Rmark 3.1. In th proof of th following thorm, w oftn assign svral labls to on and th sam nod, vn though ach nod of an XML documnt can hav only on tag. W assum ths labls to b assignd, say, using attributs or by childrn additionally introducd for this purpos 5. W add condition xprssions of th form T (l) (whr l is a labl) to Cor XPath. For instanc, w can writ child::*[t (a)] in plac of child::a and now raliz and vrify multipl labls of on and th sam nod (imagin child::*[t (a) and T (b) and T (c)]). Thorm 3.2. Cor XPath is P-complt with rspct to combind complxity. Proof. Mmbrship of th combind complxity vn of full XPath was shown to b in P in [3], thus all w nd to show is P-hardnss. This is don by rduction from th monoton boolan circuit valu problm, which is P-complt [7]. 4 To b prcis, for som axs this ordr is rvrsd, s [13]. 5 T (l) could b a shortcut for child::l.

4 G 9 G 6 G 7 G 1 G 2 G 3 G 4 (a 1 ) (b 1 ) (a 0 ) (b 0 ) G 8 G 5 Figur 2: A 2-bit full addr carry-bit circuit. Givn an instanc of this problm (a monoton boolan circuit), lt M dnot th numbr of input gats and lt N dnot th numbr of all othr gats in th circuit. Lt th gats b namd G 1... G M+N. Without loss of gnrality 6, w may assum that th gats G 1... G M+N ar numbrd in som ordr such that no gat G i dpnds on th output of anothr gat G j with j > i. In particular, th input gats ar namd G 1... G M and th output gat is G M+N. An xampl of a circuit with appropriatly numbrd gats is shown in Figur 2. This circuit computs th carry-bit of a two-bit full-addr, i.. it tlls whthr adding th two-bit numbrs a 1a 0 and b 1b 0 lads to an ovrflow. Th carry-bit c 1 is computd as (a 1 b 1) (a 1 c 0) (b 1 c 0) whr c 0 = a 0 b 0 is th carry-bit of th lowr digit (a 0 and b 0). Th documnt tr is of vry simpl and rgular structur; it consists of a root nod v 0 with M + N childrn v 1... v M+N, of which ach v i again has xactly on child v i (thus, th tr has dpth thr). For our carry-bit xampl of Figur 2 with M = 4 and N = 5, th tr is v 0 v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 v 9 v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 v 9 Nod labls ar takn from th alphabt {0, 1, G, R, I 1,..., I N, O 1,..., O N } and ach tr nod is assignd a st of such labls. This is don as follows. Th root nod v 0 has no labls. Th nods v 1... v M+N ar assignd th labl G ach. (In a way dscribd latr, nod v i rprsnts th valu of gat G i). Nod v M+N is also assignd labl R (for rsult ). Each nod out of v 1... v M is assignd th truth valu at th input gat of th sam indx (i.., out of G 1... G M), rspctivly. This is ithr th labl 0 or 1. Morovr, if th output of gat G i is an input of gat G M+k (thus, by our gat ordring rquirmnt, i < M + k), w add I k to th labls of v i and O k to th labls of v M+k. In our xampl, th nods v 1... v 9 ar labld 6 Th gats can b sortd to adhr to such an ordring in logarithmic spac. L 5 L 4 L 3 L 2 L 1 v 1 v 6 v 2 v 7 v 9 v 8 v 3 v 5 v 4 I 3 O 2 I 2 G 6 G 1 G 2 v(a 1 ) v(b 1 ) I I 4 4 G 8 I 2 G 7 G 9 I 5 I 5 I 5 O 3 O 5 O 4 I 1 G 5 I 3 O 1 I1 G 3 G 4 v(a 0 ) v(b 0 ) Figur 3: Circuit of Figur 2 with gats srializd. v 1: {G, v(a 1), I 2, I 3} v 2: {G, v(b 1), I 2, I 4} v 3: {G, v(a 0), I 1} v 4: {G, v(b 0), I 1} v 5: {G, O 1, I 3, I 4} v 6: {G, O 2, I 5} v 7: {G, O 3, I 5} v 8: {G, O 4, I 5} v 9: {G, R, O 5} whr v(a 1), v(b 1), v(a 0), v(b 0) {0, 1} ar th truth valus a 1, b 1, a 0, and b 0, rspctivly, at th input gats. Figur 3 shows how th I k and O k labls ar assignd to th nods v 1... v M+N. (Figur 3 is xplaind in mor dtail blow.) Finally, th nods v 1... v M ar labld {I 1,..., I N, O 1,..., O N } ach and th nods v M+i, for 1 i N, ar labld {I k, O k i k N}. Th qury valuating a circuit uss th intuition of procssing on gat out of G M+1... G M+N at a tim, in th ordr of ascnding indx. It is /dscndant-or-slf::*[t (R) and ϕ N ] with, for 1 k N, th condition xprssions and ϕ k := dscndant-or-slf::*[t (O k ) and parnt::*[ψ k ]] ψ k := not(child::*[t (I k ) and not(π k )]) if th typ of gat G M+k is and othrwis, and ψ k := child::*[t (I k ) and π k ] π k := ancstor-or-slf::*[t (G) and ϕ k 1 ]. Morovr, ϕ 0 := T (1). It is asy to s that th rduction can b ffctd in logarithmic spac. W nxt argu that it is also corrct. Discussion. W us th ordring of th circuit in that w, intuitivly, will valuat th circuit in Cor XPath on gat at a tim. W trat th circuit as if layrd, with all gats of a layr of th sam typ ( or ) and only

5 xactly on with fan-in gratr than on. (Our ncoding prmits unboundd fan-in, including on.) Figur 3 shows this altrnativ viw of th xampl circuit of Figur 2. Th N = 5 non-input gats hav bn alignd using fiv layrs L 1... L 5. Th smallr mpty circls dnot dummy gats of fan-in on, which ar ndd to propagat th valus of gats that ar alrady availabl to th layrs abov. In our ncoding, intuitivly, all gats of layr L k hav to hav th sam typ. Th typ of th dummy gats 7 in layr L k is thus dtrmind by th typ of th on gat of fan-in gratr than on (namly G M+k ). In th xampl, all gats of layrs L 1... L 4 ar of typ and th gats of layr L 5 ar all of typ. Th ϕ k, ψ k, and π k all ar condition xprssions, and thr is a natural maning to ϕ k matchs nod w or quivalntly nod w satisfis ϕ k, which w will dnot as w [ϕ k ] blow. Formally, w [ϕ k ] if and only if qury /dscndant-or-slf::*[ϕ k ] slcts nod w. W dfin w [ψ k ] and w [π k ] analogously. This notation hlps to imagin th qury (tr) bing procssd bottom-up. Claim. Lt 0 k N and 1 i M + k. Thn, v i [ϕ k ] gat G i valuats to tru. This can b shown by an asy induction. Induction start (k = 0). Th gats G 1... G M+k ar prcisly th input gats, which hav bn assignd thir initial valu (ithr 0 or 1) as labl. Th labl 1 is not usd lswhr in th tr. By dfinition, ϕ 0 is th xprssion T (1), so v i [ϕ 0 ] iff th valu of th input gat G i is 1. Thus our claim holds for k = 0. Induction stp. Now assum that our claim holds for k 1 0 (i.., v i [ϕ k 1 ] iff gat G i has bn stablishd to b tru by stp k 1). W show that it also holds for k. W procd by computing first [π k ], thn [ψ k ], and finally [ϕ k ]. On can vrify by inspction of π k that [π k ] = {v i, v i 1 i M + k, v i [ϕ k 1 ]} (Not that only th nods v 1... v M+k ar labld G.) ψ k is at th hart of our construction and prforms th actual computation of th M + k gats at layr k. Ths gats ar th M + k 1 dummy gats of fan-in on which just propagat th input and thus mak sur that th truth valu of gat G i (1 i < M + k), onc computd, rmains availabl to layrs abov, and th gat G M+k of fan-in gratr than on. In our documnt, nod v i is labld I k iff gat G M+k taks input from gat G i. By th dfinition of ψ k, v 0 [ψ k ] if and only if all childrn (for G M+k a -gat) or at last on child (for G M+k a -gat) that is labld I k matchs π k. Thus, v 0 [ψ k ] G M+k valuats to tru. For th dummy gats, th I k labls ar on lvl dpr down in th tr. (Th sol purpos of π k was to push th prviously computd valu of G i as a matching on nod v i to two diffrnt dpths to allow for diffrnt handling of dummy gats and gat G M+k by th sam XPath xprssion ψ k.) Nod v i has th labl I k for ach 1 i < M + k. Th parnt of v i howvr, v i, has only on child (namly, v i), so 7 In fact, th typs of gats of fan-in on do not mattr in th circuit: th conjunction as wll as th disjunction of a singl truth valu is th idntity. For this rason, and to sav spac, w do not show th typs of th dummy gats in Figur 3. G, I k v i π k v 0 ϕ k, ψ k π k I k, O k v ϕ k G v i π k, ψ k, ϕ k v i (a) π k, ϕ k G, I k v j π k π k G, O k v i v j v k+m (b) v k+m ϕ k Figur 4: Schmatic dsign of rlvant tr rgion and ϕ k /ψ k /π k -matchings mad for (a) dummy gats and (b) gats of fan-in gratr than on (hr, two). it dos not mattr whthr ψ k is of th - or th -typ. For 1 i < M + k, v i [ψ k ] gat G i valuats to tru. [ψ k ] computs (or prsrvs, in th cas of dummy gats) th truth valus of th gats, but th matchings that witnss ths truth valus nd up bing at diffrnt dpths in th tr, dpnding on th gat. ϕ k stors th matchings at th sam dpth (th nods v 1... v M+k ) for 1 i M + k: v i [ϕ k ] gat G i valuats to tru. This provs our claim. (ϕ k also matchs othr nods abov and blow v 1... v M+k, but this dos not mattr bcaus ths nods ar labld nithr G nor R.) Th schmatic dsigns of Figur 4 show th rgions of th documnt tr that w ar intrstd in, th rlvant labls, and th matchings of condition xprssions ϕ k, ψ k, and π k at stp k, for both cass of gats (dummy gats in Figur 4 (a) and gats G M+k in Figur 4 (b)). Th ovrall qury /dscndant-or-slf::*[t (R) and ϕ N ] has a nonmpty rsult xactly if th output gat G M+N of th circuit valuats to tru, bcaus v M+N is th only nod labld R and v M+N [ϕ N ] if and only if G M+N valuats to tru. Corollary 3.3. Cor XPath rmains P-hard vn if 1. th documnt tr is limitd to dpth thr and 2. only th axs child, parnt, and dscndant-or-slf ar allowd. Proof. Th prvious proof has th statd proprtis, xcpt that it uss th ancstor-or-slf axis in th dfinition of π k. All w nd to do is to rplac ancstor-or-slf::* in

6 π k by dscndant-or-slf::*/parnt::*. π k thn additionally matchs th root nod v 0, but this dos not mattr to th rmaindr of th construction bcaus v 0 nvr carris an I k labl and thus nvr has an impact on ψ k. W ovrstatd th rquird tr dpth in Corollary 3.3 to allow for multipl nod labls to b ncodd as additional childrn, as discussd in Rmark 3.1. Th documnt trs of th ncoding of th proof of Thorm 3.2 ar only of dpth two. Not also that th quris usd in th ncoding ssntially do not branch out in trms of axis applications. That is, in ach conjunction ( or is not usd) of xprssions, thr is at most on subxprssion that contains an axis application. 4. INSIDE CORE XPATH Th rsult of th prvious sction is ssntially ngativ: As Cor XPath is P-hard, it is considrd unlikly that a paralll algorithm xists for valuating all quris of this languag. It is thus natural to sarch for fragmnts of Cor XPath that w can show to b in NC and thrfor highly paralllizabl. In fact, such a fragmnt is obtaind by rmoving ngation ( not ) from Cor XPath. This fragmnt will b calld positiv Cor XPath. Thorm 4.1. Th combind complxity of positiv Cor XPath is in LOGCFL. W postpon th proof of this thorm to th nxt sction, whr w will nginr a strictly and considrably largr LOGCFL fragmnt of XPath (s Thorm 5.5). As w will s nxt, th gnral proof tchniqu usd to show Thorm 3.2 can b mployd to prov furthr hardnss rsults of XPath fragmnts (insid P) using circuits. (Rcall that th proof of Thorm 3.2 dos not rquir gats to hav boundd fan-in.) Thorm 4.2. Positiv Cor XPath is LOGCFL-hard w.r.t. combind complxity. Proof (Sktch). By rduction from SAC 1 circuit valu, which is LOGCFL-complt (s Proposition 2.2). Givn a SAC 1 circuit, w us th construction of th proof of Thorm 3.2 with th following changs: In th documnt, thr ar xactly two I k -labls now for ach -layr. W call thm I 1 k and I 2 k. For dummy - gats propagating th valu of gat G i, th singl input lin, nod v i, is assignd both I 1 k and I 2 k. W construct quris as usual, but instad of ngation (which allows to xprss an unboundd for all ), w us th XPath languag construct and with two inputs, on labld I 1 k and on I 2 k. That is, for gats of typ, ψ k is rplacd by ψ k := child::*[t (I 1 k) and π k ] and child::*[t (I 2 k) and π k ] Thus at vry -stp of th qury, th subxprssion of th qury nds to b insrtd twic. Although th qury grows xponntially in th dpth of th circuit, it can b computd in L bcaus th dpth of th circuit (and thus th siz of subxprssions to b copid) is only logarithmic. v 1 v 4 v 2 v 3 (a) (b) (c) c Figur 5: Graph (a), its (transposd) adjacncy matrix (b), and tr of th ncoding (c). All ls of th rduction rmains th sam. Lt PF b th fragmnt of Cor XPath containing only th location paths, without conditions (i.., no xprssions nclosd in brackts ar prmittd). Thorm 4.3. With rspct to combind complxity, PF is NL-complt undr L-rductions. Proof (Sktch). Mmbrship in NL is obvious: w can just guss th path whil w vrify it in L. NL-hardnss follows from a L-rduction from th dirctd graph rachability problm, which is NL-complt (cf. [7]). Th rduction is quit simpl, so w just provid an xampl (s Figur 5). Lt G = (V, E) b th dirctd input graph. Assum w look for a path from nod v i to nod v j. W abbrviat th n-tims rpatd application of an axis χ as χ n ::*. By χ n ::c, w dnot (χ::*/) n 1 χ::c. As is asy to vrify, givn a positiv intgr m, th qury /dscndant::v i/ϕ m with ϕ k := child::c/dscndant::/parnt 2 V ::*/child V ::c/ parnt::*/ϕ k 1 and ϕ 0 := slf::v j computs th nod labld v j if and only if nod v j is rachabl from nod v i in m stps. To xtnd this to rachability, w add a loop for ach nod of th graph (or quivalntly, st th main diagonal of th adjacncy matrix to ons only) and hav m := E. 5. PARALLELIZING WF W ar now going to sarch for rstrictions on WF that push down th complxity of th qury valuation problm to th highly paralllizabl complxity class LOGCFL. To achiv this, w rquir that scalar valus (i.., valus diffrnt from nod sts) can b stord in logarithmic spac. Morovr, w also hav to xclud two important constructs from WF, namly itratd prdicats of th form χ :: t[ 1]... [ k ] with k 2 and th not-function. Th rsulting XPath fragmnt will b rfrrd to as th positiv (or paralll ) WF (short pwf). It is formally dfind as follows: Dfinition 5.1. pwf is obtaind by rstricting WF in th following way: c c c v 1 v 2 v 3 v 4

7 1. Exprssions of th form χ :: t[ 1]... [ k ] with k 2 ar not allowd, whr χ dnots an axis, t is a nod tst and th i s ar XPath xprssions. 2. Th not-function may not b usd. 3. Th nsting dpth of arithmtic oprators is boundd by som constant k. Th first two rstrictions abov man that th grammar from Dfinitions 2.5 and 2.6 has to b modifid as follows: locstp ::= axis :: ntst [ bxpr ] bxpr ::= bxpr and bxpr bxpr or bxpr locpath nxpr rlop nxpr. Rmark 5.2. Not that positiv Cor XPath is strictly a fragmnt of pwf. This is du to th fact that th first rstriction abov plays no rol in Cor XPath. Mor gnrally, an XPath xprssion of th form χ :: t[ 1]... [ k ] is quivalnt to χ :: t[ 1 and... and k ] as long as position() and last() ar not usd. Th classical dcision problm rgarding qury valuation (also known as th Succss problm) is, givn a databas, a qury, and a qury rsult, to dcid whthr th givn qury rsult is corrct for th givn qury on th input databas. In our contxt, th XML documnt taks th plac of th databas, th XPath qury in conjunction with a contxttripl th plac of th qury, and finally, a valu that is ithr of typ boolan, numbr, string, or nod st assums th plac of th qury rsult to b chckd. For our purposs, it is convnint to work with th following slightly diffrnt dcision problm. Dfinition 5.3 (Singlton-Succss). Input: A tupl (D, Q, c, v), whr D is an XML documnt, Q an XPath qury, c a contxt-tripl, and v a valu. If Q is of typ numbr or string, thn v is a valu of this typ. If Q is of typ boolan, thn v is th valu tru. Finally, if Q is of typ nod st, thn v is a singl nod. Qustion: Dos qury Q on documnt D and contxt c valuat to v (in cas of rsult typ numbr, string or boolan) or dos it valuat to som nod st X with v X? Lmma 5.4. Th Singlton-Succss problm for pwf can b dcidd in LOGCFL. Proof (Sktch). W dscrib a NAuxPDA that dcids th Singlton-Succss problm for quris from pwf. Th LOGCFL-mmbrship of this problm will follow immdiatly from th corrctnss and th fact that th NAux- PDA runs simultanously with a logarithmic spac-boundd worktap and in polynomial tim. Notation. Lt an instanc of th Singlton-Succss problm b givn through som XML documnt D, XPath qury Q, contxt-tripl c and valu v. By T Q, w dnot th pars tr of Q. Th root nod of T Q will b dnotd by R. Rcall that vry nod N in T Q corrsponds to a subxprssion of Q, which w shall dnot by xpr(n). Finally, w writ K to dnot th maximum numbr of child nods of th nods in T Q. Actually, for pwf, K = 2 holds. Basics of th NAuxPDA. Th principal ida of th NAux- PDA is to travrs T Q along its dgs in dpth-first, lft-toright ordr. Along this travrsal, w basically pass through vry nod N in th qury tr T Q at most onc in downward dirction and at most K tims in upward dirction. If w visit a nod N in downward dirction, thn w mak som gusss (namly, a contxt c and th corrsponding rsult of valuating th subxprssion xpr(n) of Q on th documnt D for this contxt c ). If w procss a nod N in upward dirction and no furthr child nod of N has to b procssd (i.., ithr, thy hav all bn procssd or th rsult valu of xpr(n) is fully dtrmind by thos which hav alrady bn procssd), thn w carry out crtain consistncy chcks btwn th gusss at th currnt nod and at its child nods. Similarly, if w rach a laf nod N, thn w hav to chck whthr th contxt and th rsult valu gussd at N ar consistnt with th xprssion xpr(n). Our travrsal of th qury tr T Q starts at th root R of T Q in downward dirction. Evntually, w shall hav visitd all nods of T Q that ar rquird to dtrmin th ovrall rsult and w shall com back to th root R of th qury tr. If all th consistncy chcks thus carrid out wr succssful, thn th ovrall rsult of our computation is succss. As soon as on such chck fails, w halt with th ovrall rsult failur. Worktap and stack of th NAuxPDA. On our worktap, w maintain two intgrs CurrN and AuxN as wll as a variabl Dir which can hav on of th valus down or up. Morovr, our worktap contains th K + 2 main data structurs CurrVal, AuxVal, and ChildVal[i] with i {1,..., K}, ach consisting of four componnts cnod, cpos, csiz, and rs, which stand for contxt-nod, contxt-position, contxt-siz, and rsult, rspctivly. Th variabls CurrN and AuxN hold nod-ids of nods in th qury tr. CurrN dnots th currnt nod in th qury tr and AuxN is an auxiliary variabl. Dir dnots th dirction of th last mov (i.., ithr downward or upward) of our travrsal of T Q. CurrVal and ChildVal[i] with i {1,..., K} contain th valus of cnod, cpos, csiz, and rs that wr gussd whn procssing th currnt nod in th qury tr and th i-th child of this nod, rspctivly. AuxVal is usd as an auxiliary variabl for copying purposs. All of ths data structurs ar initially st to th valu undf. Th valus of CurrVal, ChildVal[1],..., ChildVal[K], and CurrN ar pushd onto th stack whn a nod is lft in downward dirction. Convrsly, ths valus ar poppd from th stack bfor a nod is ntrd in upward dirction. Consquntly, whnvr w start to procss a nod N, thn th stack contains th valus CurrVal, ChildVal[1],..., ChildVal[K], and CurrN for all nods along th path from R to th parnt of N. Initialization and main procdur. In th bginning, w slct th root nod R of T Q as th currnt nod CurrN and fill in th contxt and rsult valu from th input into th variabl CurrVal (rathr than gussing ths valus, as w shall do for all furthr nods). All th othr data structurs ChildVal[i] ar initializd to undf. If R is a laf nod (i.., T Q consists of th root R only), thn w chck th consistncy of th contxt and rsult valu in CurrVal with th XPath xprssion xpr(r). If this chck is succssful, thn th ovrall rsult of th NAuxPDA is succss, othrwis th NAuxPDA halts with failur. On th othr hand, if R is not a laf nod, thn w hav to mov downward in th qury tr. If th XPath xprssion xpr (R) is of th form 1 or 2 or of th form π 1 π 2, thn w choos nondtr-

8 xprssions xpr(currn) at laf nods of th qury tr T Q xpr(currn) local consistncy condition χ :: t r can b rachd from n via χ :: t position() r = p last() r = s c (= constant numbr) r = c xprssions xpr(currn) at intrnal nods of th qury tr T Q xpr(currn) local consistncy condition /π n = root r = r 1 π 1 π 2 (n = n 1 r = r 1) (n = n 2 r = r 2) π 1/π 2 (n = n 1 n 2 = r 1 r = r 2) χ :: t[] lt Y = {y dom y can b rachd from n via χ :: t} (first child of CurrN corrsponds r Y (lt p nw = position of r in Y, lt s nw = Y to, th scond on to χ :: t) n 1 = r p 1 = p nw s 1 = s nw r = tru) boolan(π) r = tru (n 1 = n p 1 = p s 1 = s r 1 dom) 1 and 2 r = tru [(n 1 = n p 1 = p s 1 = s r 1 = tru) (n 2 = n p 2 = p s 2 = s r 2 = tru)] 1 or 2 r = tru [(n 1 = n p 1 = p s 1 = s r 1 = tru) (n 2 = n p 2 = p s 2 = s r 2 = tru)] 1 RlOp 2 r = tru r 1 RlOp r 2 [(n 1 = n p 1 = p s 1 = s) (both 1 and 2 ar numbrs) (n 2 = n p 2 = p s 2 = s)] 1 ArithOp 2 r = r 1 ArithOp r 2 [(n 1 = n p 1 = p s 1 = s) (both 1 and 2 ar numbrs) (n 2 = n p 2 = p s 2 = s)] lgnd: n, p, s, r: CurrVal.cnod CurrVal.cpos CurrVal.csiz CurrVal.rs n 1, p 1, s 1, r 1 : ChildVal[1].cnod ChildVal[1].cpos ChildVal[1].csiz ChildVal[1].rs n 2, p 2, s 2, r 2 : ChildVal[2].cnod ChildVal[2].cpos ChildVal[2].csiz ChildVal[2].rs Tabl 1: Local consistncy chcks for pwf. ministically a singl child of R (and ignor th whol subtr of T Q rootd at th othr child nod of R). Othrwis w mov on to th first child of R. In ithr cas, th currnt valus of CurrN, CurrVal, ChildVal[1],..., ChildVal[K] ar pushd onto th stack and CurrN is assignd th nod-id of th lmnt nod to b visitd nxt. Procssing a nod in downward dirction. If a nod is ntrd in downward dirction, thn w guss th componnts of CurrVal. Aftr that w basically procd lik in th main procdur xplaind abov. In particular, th data structurs ChildVal[i] ar initializd to undf. Morovr, if th currnt nod is not a laf nod, thn w mak th sam downward mov as in th main procdur. Othrwis, if th currnt nod is a laf nod, thn w carry out th sam consistncy chck as bfor. In cas of a ngativ rsult of this chck, w again halt with failur. Howvr, in cas of a succssful chck, w ar of cours not yt allowd to halt with succss. Instad, w mov upward in th qury tr. For this upward mov, w sav th currnt valu of CurrN and CurrVal to th auxiliary variabls AuxN and AuxVal, rspctivly. Thn w pop CurrN, CurrVal, ChildVal[1],..., ChildVal[K] from th stack and finally assign AuxVal to th appropriat variabl ChildVal[1],..., ChildVal[K], i.., if th upward mov startd at th i-th child of its parnt, thn AuxVal is assignd to ChildVal[i]. Procssing a nod in upward dirction. Now suppos that w hav ntrd th currnt nod by an upward mov from its i-th child. If th currnt nod contains a child that has to b procssd yt, thn w mov on to this child by a downward mov. Of cours, prior to this mov, th variabls CurrN, CurrVal, ChildVal[1],..., ChildVal[K] hav to b pushd onto th stack. Othrwis, if thr ar no mor child nods lft to b procssd, thn th consistncy of th valus CurrVal and ChildVal[1],..., ChildVal[K] with th xprssion xpr(currn) has to b chckd. If this chck is succssful, thn w mak th sam kind of upward mov as in cas of a laf nod that is procssd in downward dirction. Othrwis, w halt with failur. Consistncy chcks for th currnt nod. If a laf nod in th qury tr has bn rachd, thn w hav to chck whthr th chosn combination of th componnts of CurrVal is indd allowd for th subxprssion xpr(currn). Similarly, if th contxt and rsult valu hav alrady bn dtrmind for a non-laf nod plus th rquird child nods, thn w hav to chck whthr th nondtrministic choics wr consistnt with th subxprssion xpr(currn). All possibl kinds of chcks thus rquird ar givn in Tabl 1, whr w us th following notation: W writ χ :: t for a location stp consisting of an axis χ and a nod tst t. stands for any XPath xprssion whil π stands for a location path. By RlOp and ArithOp w dnot rlational oprators (=,,,... ) and arithmtic oprators (+,,,... ), rspctivly. Th st of all lmnt nods in D is dnotd by dom and root dnots th concptual root nod in th XPath data modl (cf. [13]). Morovr, w assum w.l.o.g., that typ convrsions from nod sts to boolan valus ar mad xplicit via th XPath-function boolan. Finally, w do not trat th cas of undfind componnts sparatly. In gnral, w assum that conditions on undfind valus yild th rsult undf. But of cours, w assum that tru undf tru holds. Discussion. As for th corrctnss of this NAuxPDA, it

9 has to b shown that an instanc (D, Q, cn, cp, cs, v) of th Singlton-Succss problm of pwf yilds th answr ys iff thr xists a run of th NAuxPDA that halts with succss. A dtaild proof of this is providd in th full papr. It rmains to b shown that th NAuxPDA works simultanously in L and P. As for th tim complxity, rcall that th NAuxPDA travrss (parts of) th qury tr T Q in dpth-first, lft-to-right ordr. Along this travrsal, vry nod N is procssd at most onc in downward dirction and at most K tims (with K = 2 in cas of pwf) in upward dirction. Morovr, th actions rquird to procss a nod onc can b clarly don in polynomial tim. As for th spac complxity, not that th variabls of th worktap plus a fixd numbr of countrs and auxiliary variabls clarly fit into logarithmic spac. Th crucial obsrvation for th logarithmic spac complxity is that w nvr hav to xplicitly comput nod sts,.g., chcking r Y and dtrmining th position of r in Y and th siz of Y can b don without xplicitly computing th nod st Y itslf (cf. th consistncy chck for χ :: t[] in Tabl 1). Thorm 5.5. pwf is in LOGCFL with rspct to combind complxity. Proof (Sktch). Th NAuxPDA of th prvious proof nondtrministically gusss and vrifis a rsult, or in th cas of quris rturning a nod st, a singl nod of th rsult. Chcking whthr a givn XPath qury valuats to som nod st X (or quivalntly, computing that nod st) can b don by dciding th Singlton-Succss problm in a loop ovr all lmnts v X without a significant incras of th ovrall complxity. In our dfinition of th Singlton- Succss problm, w assumd th tchnical rstriction that rsults of boolan XPath quris can b only chckd to b tru. Chcking whthr a givn XPath qury with boolan rsult valu valuats to fals is th co-problm of chcking whthr a qury valuats to tru. Howvr, by Proposition 2.4, LOGCFL is closd undr complmntation. Rmark 5.6. It is wll-known that th complxity class LOGCFL is insid th class NC 2 of problms solvabl in tim O(log 2 n) with quadratically many procssors working in paralll. In fact, givn this intuition and th insight obtaind from th rduction to NAuxPDA, it is not hard to find a highly paralll algorithm for valuating pwf quris. Th intuition for matching straight-lin path quris (cf. our PF fragmnt from Sction 4) is similar to paralll algorithms for graph rachability (cf. [7]); howvr, rathr than conncting nods in a graph, th goal is to connct contxts with nods in th qury rsult. Additional synchronization is rquird for branchs in th qury tr (.g. and ), which is not surprising as graph rachability is in NL and thus prsumably simplr than a LOGCFL-complt problm. Howvr, at th branchs, th subxprssions blow can b valuatd in paralll bfor finalizing th branch (i.., procding bottom-up). Th nxt rsult shows that pwf is in a sns a maximal LOGCFL fragmnt of WF. Of cours, w ar not rally intrstd in daling with arbitrarily big numbr xprssions. As far as th othr two rstrictions in Dfinition 5.1 ar concrnd, non of thm can b simply omittd. This is clar for ngation, as Cor XPath is strictly a fragmnt of pwf xtndd by ngation. As shown nxt, th final rstriction is ssntial as wll. By itratd prdicats, w again rfr to location stps of th form χ :: t[ 1]... [ k ] with k 2. Thorm 5.7. Th combind complxity of pwf quris xtndd by itratd prdicats is P-complt. Proof (Sktch). Th proof gos by an appropriat modification of th XML documnt D and th location paths ϕ, ψ, and π from th proof of Thorm 3.2. XML documnt. W xtnd D by adding on additional child w i to vry nod v i with i {0,..., M + N} (as th right-most child, say). Each nod w i is labld W. Hnc, th condition T (W ) is fulfilld xactly by ths nw nods. Morovr, for th nod v 0, w introduc an additional labl A ( auxiliary ). Thus, th condition T (A) is only fulfilld by th root nod v 0. Th nw documnt tr corrsponding to th xampl in th proof of Thorm 3.2 looks as follows: v 0 v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 v 9 v 1 w v 2 v 3 1 w 2 w 3 w 6 w 8 w 9 v 4 w v 5 w v w 0 v 7 w v 8 7 XPath qury. Th dsird qury Q (ncoding th valu of th gat G M+N ) is /dscndant-or-slf::*[t (R) and ϕ N ] whr th auxiliary location paths ϕ k, ψ k, and π k with 1 k N ar dfind as follows: and ϕ k := dscndant-or-slf::*[t (O k ) and parnt::*[ψ k]] ψ k := child::*[(t (I k ) and π k[last()=1]) or T (W )][last()=1], if th typ of gat G M+k is and othrwis, and ψ k := child::*[t (I k ) and π k[last() > 1]] π k := ancstor-or-slf::*[(t (G) and ϕ k 1) or T (A)]. Morovr, w st ϕ 0 := T (1) as in Thorm 3.2. In ordr to prov th corrctnss of this problm rduction, w introduc th following notion: Lt ρ and σ b XPath quris that ar valuatd on th documnt D or on D, rspctivly. Thn w call ρ and σ quivalnt on a nod x (that occurs both in D and D ), iff th valuation of boolan(ρ) on D and th valuation of boolan(σ) on D for th contxtnod x yild th sam rsult. Thn th following quivalncs hold for any k 1 (in cas of ψ k and π k ) and for any k 0 (in cas of ϕ k ): (1) ϕ k and ϕ k ar quivalnt on v 1,..., v M+N. (2) ψ k and ψ k ar quivalnt on v 0,..., v M+N. (3) π k and π k[last() > 1] as wll as not(π k ) and π k[last() = 1] ar quivalnt on v 1,..., v M+N, v 1,..., v M+N. Ths quivalncs can b shown by an asy induction argumnt. W only discuss (3) hr, in ordr to point out v 9

10 th cntral ida of ncoding th not-function by itratd prdicats: By th induction hypothsis, ϕ k 1 and ϕ k 1 ar quivalnt on v 1,..., v M+N, that is, on th nods for which th condition T (G) is tru. By th nw disjunct T (A) in th prdicat of π k, th location path π k valuats to th sam st as π k plus th nod v 0. Morovr, by th condition T (G), th nod st rsulting from π k nvr contains th nod v 0. Th quivalnc of π k with π k[last() > 1] and th quivalnc of not(π k ) with π k[last() = 1] (on v 1,..., v M+N, v 1,..., v M+N ) ar thus obvious. Th corrctnss of th whol problm rduction follows immdiatly from th quivalnc (1) for k = N. Not that in th abov proof of Thorm 5.7, w only mad us of prdicat squncs [ 1]... [ k ] whos lngth k was boundd by 2. W thus hav: Corollary 5.8. Th combind complxity of pwf xtndd by itratd prdicats of th form χ :: t[ 1][ 2] is P- complt. Dspit th ngativ rsults of Thorms 3.2 and 5.7, on possibl dirction into which pwf can b xtndd without laving th complxity class LOGCFL is to bound th dpth of ngation, i.., th maximum dpth of nstd occurrncs of th not-function in quris. Thorm 5.9. Th combind complxity of pwf quris augmntd by ngation with boundd dpth is in LOGCFL. Proof (Sktch). W modify th NAuxPDA ncoding in th proof of Lmma 5.4 as follows: First, w transform th input qury Q by mans of d Morgan s laws in such a way that all occurrncs of th not-function ar ithr shiftd immdiatly in front of rlational oprators RlOp or location paths π. Exprssions of th form 1 RlOp 2 whr both oprands ar numbrs can b rplacd by 1 not(rlop) 2. In othr words, = is rplacd by, < is rplacd by, tc. W thus gt an quivalnt qury Q whr th not only occurs in th form not(π). Thn w hav to modify our NAuxPDA in such a way, that it trats subxprssions of th form not(π) by chcking in a loop ovr all lmnt nods x in D whthr x is in th nod st rsulting from th valuation of π for th contxt-nod CurrVal.cnod. This chck is don by calling th NAuxPDA rcursivly. Th corrctnss of this algorithm follows immdiatly from th corrctnss of th NAuxPDA in th proof of Lmma 5.4. Th spac complxity clarly dos not significantly incras compard to th NAuxPDA in Lmma 5.4. Morovr, by th xistnc of a constant bound K on th nsting of ngation (and, hnc, by th sam bound K on th nsting of th loops in th abov dscribd modifid vrsion of our NAuxPDA), th polynomial tim uppr bound on this computation is also prsrvd. 6. PARALLELIZING XPATH In Sction 5, w provd th LOGCFL-mmbrship for a fragmnt of XPath that was drivd from WF by imposing som rstrictions. In fact, w can gt a much largr LOGCFL fragmnt of XPath by starting from full XPath and dfining th analogous rstrictions. Th important fact is again that th valuation can b don without th nd to vr comput nod sts xplicitly and without having to dal with scalars (i.., valus diffrnt from nod sts) that do not fit into L. Analogously to pwf, w thus dfin: Dfinition 6.1. Positiv (or paralll) XPath (pxpath) is obtaind by imposing th following rstrictions on XPath: 1. Exprssions of th form χ :: t[ 1]... [ k ] with k 2 ar not allowd. 2. Th following functions may not b usd: not, count, sum, string, and numbr as wll as th string functions local-nam, namspac-uri, nam, string-lngth, and normaliz-spac. 3. Constructs of th form 1 RlOp 2 whr at last on of th xprssions i is of typ boolan, ar forbiddn. 4. Th dpth of nsting of arithmtic oprators and of th concat-function is boundd by som givn constant K. Likwis, th arity of th concat-function is boundd by K. Th abov rstrictions xtnd th ons in Dfinition 5.1 in th following way: Th valuation of xprssions of th form count() and sum() rquirs th xplicit computation of th nod st valu of unlss w again introduc loops ovr dom into th NAuxPDA as in Thorm 5.9. With th functions string and numbr as wll as th string functions listd abov, w would hav to manipulat itms of information in th documnt D whos siz is not ncssarily logarithmically boundd. Morovr, th functions string and numbr could also b usd to ncod ngation,.g., numbr() = 0 for a boolan xprssion valuats to tru, iff valuats to fals. Similarly, constructs of th form 1 RlOp 2 whr at last on of th xprssions i is of typ boolan ar forbiddn sinc thy can also b usd to ncod ngation,.g., by an xprssion of th form tru(). Analogously to Thorm 5.5, w hav Thorm 6.2. Th combind complxity of pxpath is in LOGCFL. Proof (Sktch). Th LOGCFL-mmbrship of th problm Singlton-Succss and (as a consqunc, s th proof of Thorm 5.5) th combind complxity of pxpath can b stablishd by almost th sam NAuxPDA as in Sction 5. Th only adaptation rquird is an xtnsion of Tabl 1. In principl, for ach of th additionally allowd XPath constructs, a nw lin with th corrsponding local consistncy chck has to b addd. Altrnativly, w can covr ths nw lins via th ffctiv smantics function F of XPath oprators Op that was introducd in [3] for all XPath constructs xcpt for location paths and th functions position() and last() (whos smantics was dfind sparatly in [3]). Thn th consistncy chck for an xprssion of th form Op( 1,..., l ) coms down to th condition ( l i=1 (n i = n p i = p s i = s)) r = F [Op](r 1,..., r l ) Morovr, in cas of a boolan xprssion, w add th conjunct r = tru. Not that th last four lins in Tabl 1 ar (quivalnt formulations of) spcial cass of this principl with F [and] =, F [or ] =, F [RlOp] = RlOp, and F [ArithOp] = ArithOp, rspctivly. Of cours, th polynomial tim and logarithmic spac uppr bound on th complxity also holds for th thus xtndd NAuxPDA. Finally, w mntion that also pxpath can b xtndd by ngation with boundd dpth without dstroying th

11 LOGCFL-mmbrship. Th following rsult is statd without proof. Thorm 6.3. Th combind complxity of pxpath augmntd by ngation with boundd dpth is in LOGCFL. Concptually, this can b shown xactly lik Thorm 5.9. Howvr, thr ar now quit a fw nw constructs which hav to b considrd sparatly sinc ngation cannot b shiftd insid thm,.g., not( 1 RlOp 2) whr at last on of th oprands i is a nod st has to b tratd in a loop ovr all nods x dom just lik xprssions of th form not(π) in Thorm QUERY AND DATA COMPLEXITY In this papr, w hav addrssd th combind complxity of various fragmnts of XPath. Whil th gnral problm is P-hard, w hav nginrd larg fragmnts that can b massivly paralllizd. W conclud this tratmnt with an outlook towards th two main othr complxity masurs, th complxity of quris whn ithr th siz of th qury or of th data is fixd. Thorm 7.1. PF is L-hard undr NC 1-rductions (with rspct to data complxity). Proof. Givn a tr in which all nods hav a uniqu labl, th qury /dscndant-or-slf::v 1/dscndant::v 2 from our path xprssions fragmnt PF (s Sction 4) slcts a nod if and only if v 2 is rachabl from v 1 in th tr. This is dirctd tr rachability, which is L-complt undr NC 1- rductions [2]. Th qury is constant and can b assumd to work on th sam tr as th dirctd tr rachability problm. Th rsult follows. Thorm 7.2. XPath is in L w.r.t. data complxity. Proof (Sktch). Th basic ida for an XPath valuation algorithm that runs in L is motivatd by th bottom-up dynamic programming algorithm for full XPath of [3], which was basd on th notion of so-calld contxt-valu tabls, rlations consisting of tupls containing a contxt and a corrsponding valu for (a subxprssion of) th givn qury, on tupl for ach maningful contxt. W comput on such contxt-valu tabl for ach nod of th qury tr. Givn th contxt-valu tabls for th dirct subxprssions 1,..., n, computing th contxt-valu tabl of xprssion Op( 1,..., n), whr Op is an atomic XPath opration (a nod in th qury tr), only rquirs a vry simpl computational task which can b carrid out in L. Sinc w considr data complxity, th qury and th numbr of oprations in its qury tr is assumd fixd. W can compos a fixd numbr of stps that individually run in L into an algorithm that runs in L ovrall. Thorm 7.3. XPath without multiplication or th concat opration is in L w.r.t. qury complxity. Proof (Sktch). Lt Q b th input qury and D th (fixd) documnt. All oprations in Q hav a fixd arity not gratr than K = 3. Lt us first assum that Q dos not contain oprations such as + that mak strings or numbrs grow (logarithmically) with th siz of th qury. Thn, it is known from [3] that th siz of ach contxt-valu tabl is boundd by th constant D 4. To comput th contxt-valu tabl holding th rsult of Q on D, w simply hav to mak a bottom-up travrsal of th qury tr of Q, which can b prformd in L. Rgarding storag rquirmnts, only a stack boundd by K log Q contxt-valu tabls is ndd, which holds contxt-valu tabls computd bottom-up but not usd yt and waiting to b mployd for th computation of contxtvalu tabls highr up in th qury tr. (Not that this is not th dpth of th qury tr, which is not ncssarily boundd by O(log Q).) Computing contxt-valu tabls bottom-up stp by stp is important for handling path xprssions and ngation wll. For string- or numbr-typd xprssions, ths rlations do not hav to b matrializd, but rsults can b gnratd and chckd top-down whn computing a nod st-typd contxt-valu tabl for an xprssion that contains as a dirct subxprssion with only an additional D log Q sizd mmory window. W did not provid a lowr bound for th qury complxity of XPath, but conjctur a considrabl fragmnt of XPath to b ALOGTIME-complt with rspct to qury complxity. Acknowldgmnts This work was supportd by th EU Rsarch Training Ntwork GAMES. Th first author was partially fundd by grant Z29-N04 of th Austrian Rsarch Fund (FWF). Th scond author s visit to th Univrsity of Edinburgh s Laboratory for Foundations of Computr Scinc was sponsord by Erwin Schrödingr grant J2169 of th FWF. Th papr [8], also to b found in this procdings volum, contains a numbr of rlatd and ovrlapping rsults on th complxity of XPath, and is work indpndnt from ours. 8. REFERENCES [1] A. Borodin, S. A. Cook, P. W. Dymond, W. L. Ruzzo, and M. Tompa. Two Applications of Inductiv Counting for Complmntation Problms. SIAM Journal of Computing, 18: , [2] S. A. Cook and P. McKnzi. Problms Complt for Dtrministic Logarithmic Spac. J. Algorithms, 8: , [3] G. Gottlob, C. Koch, and R. Pichlr. Efficint Algorithms for Procssing XPath Quris. In Procdings of th 28th Intrnational Confrnc on Vry Larg Data Bass (VLDB 02), Hong Kong, China, Aug [4] G. Gottlob, C. Koch, and R. Pichlr. XPath Qury Evaluation: Improving Tim and Spac Efficincy. In Procdings of th 19th IEEE Intrnational Confrnc on Data Enginring (ICDE 03), pags , Bangalor, India, Mar [5] R. Grnlaw, H. J. Hoovr, and W. L. Ruzzo. Limits to Paralll Computation: P-Compltnss Thory. Oxford Univrsity Prss, [6] D. S. Johnson. A Catalog of Complxity Classs. In J. van Luwn, ditor, Handbook of Thortical Computr Scinc, volum 1, chaptr 2, pags Elsvir Scinc Publishrs B.V., 1990.

Roadmap. XML Indexing. DataGuide example. DataGuides. Strong DataGuides. Multiple DataGuides for same data. CPS Topics in Database Systems

Roadmap. XML Indexing. DataGuide example. DataGuides. Strong DataGuides. Multiple DataGuides for same data. CPS Topics in Database Systems Roadmap XML Indxing CPS 296.1 Topics in Databas Systms Indx fabric Coopr t al. A Fast Indx for Smistructurd Data. VLDB, 2001 DataGuid Goldman and Widom. DataGuids: Enabling Qury Formulation and Optimization

More information

CS 361 Meeting 12 10/3/18

CS 361 Meeting 12 10/3/18 CS 36 Mting 2 /3/8 Announcmnts. Homwork 4 is du Friday. If Friday is Mountain Day, homwork should b turnd in at my offic or th dpartmnt offic bfor 4. 2. Homwork 5 will b availabl ovr th wknd. 3. Our midtrm

More information

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018 Propositional Logic Combinatorial Problm Solving (CPS) Albrt Olivras Enric Rodríguz-Carbonll May 17, 2018 Ovrviw of th sssion Dfinition of Propositional Logic Gnral Concpts in Logic Rduction to SAT CNFs

More information

Introduction to Arithmetic Geometry Fall 2013 Lecture #20 11/14/2013

Introduction to Arithmetic Geometry Fall 2013 Lecture #20 11/14/2013 18.782 Introduction to Arithmtic Gomtry Fall 2013 Lctur #20 11/14/2013 20.1 Dgr thorm for morphisms of curvs Lt us rstat th thorm givn at th nd of th last lctur, which w will now prov. Thorm 20.1. Lt φ:

More information

cycle that does not cross any edges (including its own), then it has at least

cycle that does not cross any edges (including its own), then it has at least W prov th following thorm: Thorm If a K n is drawn in th plan in such a way that it has a hamiltonian cycl that dos not cross any dgs (including its own, thn it has at last n ( 4 48 π + O(n crossings Th

More information

UNTYPED LAMBDA CALCULUS (II)

UNTYPED LAMBDA CALCULUS (II) 1 UNTYPED LAMBDA CALCULUS (II) RECALL: CALL-BY-VALUE O.S. Basic rul Sarch ruls: (\x.) v [v/x] 1 1 1 1 v v CALL-BY-VALUE EVALUATION EXAMPLE (\x. x x) (\y. y) x x [\y. y / x] = (\y. y) (\y. y) y [\y. y /

More information

Higher order derivatives

Higher order derivatives Robrto s Nots on Diffrntial Calculus Chaptr 4: Basic diffrntiation ruls Sction 7 Highr ordr drivativs What you nd to know alrady: Basic diffrntiation ruls. What you can larn hr: How to rpat th procss of

More information

Construction of asymmetric orthogonal arrays of strength three via a replacement method

Construction of asymmetric orthogonal arrays of strength three via a replacement method isid/ms/26/2 Fbruary, 26 http://www.isid.ac.in/ statmath/indx.php?modul=prprint Construction of asymmtric orthogonal arrays of strngth thr via a rplacmnt mthod Tian-fang Zhang, Qiaoling Dng and Alok Dy

More information

1 Minimum Cut Problem

1 Minimum Cut Problem CS 6 Lctur 6 Min Cut and argr s Algorithm Scribs: Png Hui How (05), Virginia Dat: May 4, 06 Minimum Cut Problm Today, w introduc th minimum cut problm. This problm has many motivations, on of which coms

More information

(Upside-Down o Direct Rotation) β - Numbers

(Upside-Down o Direct Rotation) β - Numbers Amrican Journal of Mathmatics and Statistics 014, 4(): 58-64 DOI: 10593/jajms0140400 (Upsid-Down o Dirct Rotation) β - Numbrs Ammar Sddiq Mahmood 1, Shukriyah Sabir Ali,* 1 Dpartmnt of Mathmatics, Collg

More information

Week 3: Connected Subgraphs

Week 3: Connected Subgraphs Wk 3: Connctd Subgraphs Sptmbr 19, 2016 1 Connctd Graphs Path, Distanc: A path from a vrtx x to a vrtx y in a graph G is rfrrd to an xy-path. Lt X, Y V (G). An (X, Y )-path is an xy-path with x X and y

More information

Homework #3. 1 x. dx. It therefore follows that a sum of the

Homework #3. 1 x. dx. It therefore follows that a sum of the Danil Cannon CS 62 / Luan March 5, 2009 Homwork # 1. Th natural logarithm is dfind by ln n = n 1 dx. It thrfor follows that a sum of th 1 x sam addnd ovr th sam intrval should b both asymptotically uppr-

More information

Searching Linked Lists. Perfect Skip List. Building a Skip List. Skip List Analysis (1) Assume the list is sorted, but is stored in a linked list.

Searching Linked Lists. Perfect Skip List. Building a Skip List. Skip List Analysis (1) Assume the list is sorted, but is stored in a linked list. 3 3 4 8 6 3 3 4 8 6 3 3 4 8 6 () (d) 3 Sarching Linkd Lists Sarching Linkd Lists Sarching Linkd Lists ssum th list is sortd, but is stord in a linkd list. an w us binary sarch? omparisons? Work? What if

More information

COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM

COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM Jim Brown Dpartmnt of Mathmatical Scincs, Clmson Univrsity, Clmson, SC 9634, USA jimlb@g.clmson.du Robrt Cass Dpartmnt of Mathmatics,

More information

Addition of angular momentum

Addition of angular momentum Addition of angular momntum April, 0 Oftn w nd to combin diffrnt sourcs of angular momntum to charactriz th total angular momntum of a systm, or to divid th total angular momntum into parts to valuat th

More information

CPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming

CPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming CPSC 665 : An Algorithmist s Toolkit Lctur 4 : 21 Jan 2015 Lcturr: Sushant Sachdva Linar Programming Scrib: Rasmus Kyng 1. Introduction An optimization problm rquirs us to find th minimum or maximum) of

More information

Addition of angular momentum

Addition of angular momentum Addition of angular momntum April, 07 Oftn w nd to combin diffrnt sourcs of angular momntum to charactriz th total angular momntum of a systm, or to divid th total angular momntum into parts to valuat

More information

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, April 04, 2005, 8:35 AM) PART I: CHAPTER TWO COMB MATH.

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, April 04, 2005, 8:35 AM) PART I: CHAPTER TWO COMB MATH. C:\Dallas\0_Courss\03A_OpSci_67\0 Cgh_Book\0_athmaticalPrliminaris\0_0 Combath.doc of 8 COPUTER GENERATED HOLOGRAS Optical Scincs 67 W.J. Dallas (onday, April 04, 005, 8:35 A) PART I: CHAPTER TWO COB ATH

More information

Abstract Interpretation. Lecture 5. Profs. Aiken, Barrett & Dill CS 357 Lecture 5 1

Abstract Interpretation. Lecture 5. Profs. Aiken, Barrett & Dill CS 357 Lecture 5 1 Abstract Intrprtation 1 History On brakthrough papr Cousot & Cousot 77 (?) Inspird by Dataflow analysis Dnotational smantics Enthusiastically mbracd by th community At last th functional community... At

More information

The Matrix Exponential

The Matrix Exponential Th Matrix Exponntial (with xrciss) by D. Klain Vrsion 207.0.05 Corrctions and commnts ar wlcom. Th Matrix Exponntial For ach n n complx matrix A, dfin th xponntial of A to b th matrix A A k I + A + k!

More information

From Elimination to Belief Propagation

From Elimination to Belief Propagation School of omputr Scinc Th lif Propagation (Sum-Product lgorithm Probabilistic Graphical Modls (10-708 Lctur 5, Sp 31, 2007 Rcptor Kinas Rcptor Kinas Kinas X 5 ric Xing Gn G T X 6 X 7 Gn H X 8 Rading: J-hap

More information

The Matrix Exponential

The Matrix Exponential Th Matrix Exponntial (with xrciss) by Dan Klain Vrsion 28928 Corrctions and commnts ar wlcom Th Matrix Exponntial For ach n n complx matrix A, dfin th xponntial of A to b th matrix () A A k I + A + k!

More information

Abstract Interpretation: concrete and abstract semantics

Abstract Interpretation: concrete and abstract semantics Abstract Intrprtation: concrt and abstract smantics Concrt smantics W considr a vry tiny languag that manags arithmtic oprations on intgrs valus. Th (concrt) smantics of th languags cab b dfind by th funzcion

More information

That is, we start with a general matrix: And end with a simpler matrix:

That is, we start with a general matrix: And end with a simpler matrix: DIAGON ALIZATION OF THE STR ESS TEN SOR INTRO DUCTIO N By th us of Cauchy s thorm w ar abl to rduc th numbr of strss componnts in th strss tnsor to only nin valus. An additional simplification of th strss

More information

On the irreducibility of some polynomials in two variables

On the irreducibility of some polynomials in two variables ACTA ARITHMETICA LXXXII.3 (1997) On th irrducibility of som polynomials in two variabls by B. Brindza and Á. Pintér (Dbrcn) To th mmory of Paul Erdős Lt f(x) and g(y ) b polynomials with intgral cofficints

More information

EEO 401 Digital Signal Processing Prof. Mark Fowler

EEO 401 Digital Signal Processing Prof. Mark Fowler EEO 401 Digital Signal Procssing Prof. Mark Fowlr Dtails of th ot St #19 Rading Assignmnt: Sct. 7.1.2, 7.1.3, & 7.2 of Proakis & Manolakis Dfinition of th So Givn signal data points x[n] for n = 0,, -1

More information

Strongly Connected Components

Strongly Connected Components Strongly Connctd Componnts Lt G = (V, E) b a dirctd graph Writ if thr is a path from to in G Writ if and is an quivalnc rlation: implis and implis s quivalnc classs ar calld th strongly connctd componnts

More information

On spanning trees and cycles of multicolored point sets with few intersections

On spanning trees and cycles of multicolored point sets with few intersections On spanning trs and cycls of multicolord point sts with fw intrsctions M. Kano, C. Mrino, and J. Urrutia April, 00 Abstract Lt P 1,..., P k b a collction of disjoint point sts in R in gnral position. W

More information

A Propagating Wave Packet Group Velocity Dispersion

A Propagating Wave Packet Group Velocity Dispersion Lctur 8 Phys 375 A Propagating Wav Packt Group Vlocity Disprsion Ovrviw and Motivation: In th last lctur w lookd at a localizd solution t) to th 1D fr-particl Schrödingr quation (SE) that corrsponds to

More information

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation.

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation. MAT 444 H Barclo Spring 004 Homwork 6 Solutions Sction 6 Lt H b a subgroup of a group G Thn H oprats on G by lft multiplication Dscrib th orbits for this opration Th orbits of G ar th right costs of H

More information

Search sequence databases 3 10/25/2016

Search sequence databases 3 10/25/2016 Sarch squnc databass 3 10/25/2016 Etrm valu distribution Ø Suppos X is a random variabl with probability dnsity function p(, w sampl a larg numbr S of indpndnt valus of X from this distribution for an

More information

MATH 319, WEEK 15: The Fundamental Matrix, Non-Homogeneous Systems of Differential Equations

MATH 319, WEEK 15: The Fundamental Matrix, Non-Homogeneous Systems of Differential Equations MATH 39, WEEK 5: Th Fundamntal Matrix, Non-Homognous Systms of Diffrntial Equations Fundamntal Matrics Considr th problm of dtrmining th particular solution for an nsmbl of initial conditions For instanc,

More information

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1 Chaptr 11 Th singular sris Rcall that by Thorms 10 and 104 togthr provid us th stimat 9 4 n 2 111 Rn = SnΓ 2 + on2, whr th singular sris Sn was dfind in Chaptr 10 as Sn = q=1 Sq q 9, with Sq = 1 a q gcda,q=1

More information

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES DONALD M. DAVIS Abstract. If p is a prim (implicit in notation and n a positiv intgr, lt ν(n dnot th xponnt of p in n, and U(n n/p ν(n, th unit

More information

u 3 = u 3 (x 1, x 2, x 3 )

u 3 = u 3 (x 1, x 2, x 3 ) Lctur 23: Curvilinar Coordinats (RHB 8.0 It is oftn convnint to work with variabls othr than th Cartsian coordinats x i ( = x, y, z. For xampl in Lctur 5 w mt sphrical polar and cylindrical polar coordinats.

More information

ECE602 Exam 1 April 5, You must show ALL of your work for full credit.

ECE602 Exam 1 April 5, You must show ALL of your work for full credit. ECE62 Exam April 5, 27 Nam: Solution Scor: / This xam is closd-book. You must show ALL of your work for full crdit. Plas rad th qustions carfully. Plas chck your answrs carfully. Calculators may NOT b

More information

The Equitable Dominating Graph

The Equitable Dominating Graph Intrnational Journal of Enginring Rsarch and Tchnology. ISSN 0974-3154 Volum 8, Numbr 1 (015), pp. 35-4 Intrnational Rsarch Publication Hous http://www.irphous.com Th Equitabl Dominating Graph P.N. Vinay

More information

Basic Polyhedral theory

Basic Polyhedral theory Basic Polyhdral thory Th st P = { A b} is calld a polyhdron. Lmma 1. Eithr th systm A = b, b 0, 0 has a solution or thr is a vctorπ such that π A 0, πb < 0 Thr cass, if solution in top row dos not ist

More information

Mutually Independent Hamiltonian Cycles of Pancake Networks

Mutually Independent Hamiltonian Cycles of Pancake Networks Mutually Indpndnt Hamiltonian Cycls of Pancak Ntworks Chng-Kuan Lin Dpartmnt of Mathmatics National Cntral Univrsity, Chung-Li, Taiwan 00, R O C discipl@ms0urlcomtw Hua-Min Huang Dpartmnt of Mathmatics

More information

Derangements and Applications

Derangements and Applications 2 3 47 6 23 Journal of Intgr Squncs, Vol. 6 (2003), Articl 03..2 Drangmnts and Applications Mhdi Hassani Dpartmnt of Mathmatics Institut for Advancd Studis in Basic Scincs Zanjan, Iran mhassani@iasbs.ac.ir

More information

22/ Breakdown of the Born-Oppenheimer approximation. Selection rules for rotational-vibrational transitions. P, R branches.

22/ Breakdown of the Born-Oppenheimer approximation. Selection rules for rotational-vibrational transitions. P, R branches. Subjct Chmistry Papr No and Titl Modul No and Titl Modul Tag 8/ Physical Spctroscopy / Brakdown of th Born-Oppnhimr approximation. Slction ruls for rotational-vibrational transitions. P, R branchs. CHE_P8_M

More information

First derivative analysis

First derivative analysis Robrto s Nots on Dirntial Calculus Chaptr 8: Graphical analysis Sction First drivativ analysis What you nd to know alrady: How to us drivativs to idntiy th critical valus o a unction and its trm points

More information

Supplementary Materials

Supplementary Materials 6 Supplmntary Matrials APPENDIX A PHYSICAL INTERPRETATION OF FUEL-RATE-SPEED FUNCTION A truck running on a road with grad/slop θ positiv if moving up and ngativ if moving down facs thr rsistancs: arodynamic

More information

SCHUR S THEOREM REU SUMMER 2005

SCHUR S THEOREM REU SUMMER 2005 SCHUR S THEOREM REU SUMMER 2005 1. Combinatorial aroach Prhas th first rsult in th subjct blongs to I. Schur and dats back to 1916. On of his motivation was to study th local vrsion of th famous quation

More information

Estimation of apparent fraction defective: A mathematical approach

Estimation of apparent fraction defective: A mathematical approach Availabl onlin at www.plagiarsarchlibrary.com Plagia Rsarch Library Advancs in Applid Scinc Rsarch, 011, (): 84-89 ISSN: 0976-8610 CODEN (USA): AASRFC Estimation of apparnt fraction dfctiv: A mathmatical

More information

4. Money cannot be neutral in the short-run the neutrality of money is exclusively a medium run phenomenon.

4. Money cannot be neutral in the short-run the neutrality of money is exclusively a medium run phenomenon. PART I TRUE/FALSE/UNCERTAIN (5 points ach) 1. Lik xpansionary montary policy, xpansionary fiscal policy rturns output in th mdium run to its natural lvl, and incrass prics. Thrfor, fiscal policy is also

More information

Thus, because if either [G : H] or [H : K] is infinite, then [G : K] is infinite, then [G : K] = [G : H][H : K] for all infinite cases.

Thus, because if either [G : H] or [H : K] is infinite, then [G : K] is infinite, then [G : K] = [G : H][H : K] for all infinite cases. Homwork 5 M 373K Solutions Mark Lindbrg and Travis Schdlr 1. Prov that th ring Z/mZ (for m 0) is a fild if and only if m is prim. ( ) Proof by Contrapositiv: Hr, thr ar thr cass for m not prim. m 0: Whn

More information

Problem Set 6 Solutions

Problem Set 6 Solutions 6.04/18.06J Mathmatics for Computr Scinc March 15, 005 Srini Dvadas and Eric Lhman Problm St 6 Solutions Du: Monday, March 8 at 9 PM in Room 3-044 Problm 1. Sammy th Shark is a financial srvic providr

More information

Application of Vague Soft Sets in students evaluation

Application of Vague Soft Sets in students evaluation Availabl onlin at www.plagiarsarchlibrary.com Advancs in Applid Scinc Rsarch, 0, (6):48-43 ISSN: 0976-860 CODEN (USA): AASRFC Application of Vagu Soft Sts in studnts valuation B. Chtia*and P. K. Das Dpartmnt

More information

Square of Hamilton cycle in a random graph

Square of Hamilton cycle in a random graph Squar of Hamilton cycl in a random graph Andrzj Dudk Alan Friz Jun 28, 2016 Abstract W show that p = n is a sharp thrshold for th random graph G n,p to contain th squar of a Hamilton cycl. This improvs

More information

In the previous two chapters, we clarified what it means for a problem to be decidable or undecidable.

In the previous two chapters, we clarified what it means for a problem to be decidable or undecidable. Chaptr 7 Computational Complxity 7.1 Th Class P In th prvious two chaptrs, w clarifid what it mans for a problm to b dcidabl or undcidabl. In principl, if a problm is dcidabl, thn thr is an algorithm (i..,

More information

SECTION where P (cos θ, sin θ) and Q(cos θ, sin θ) are polynomials in cos θ and sin θ, provided Q is never equal to zero.

SECTION where P (cos θ, sin θ) and Q(cos θ, sin θ) are polynomials in cos θ and sin θ, provided Q is never equal to zero. SETION 6. 57 6. Evaluation of Dfinit Intgrals Exampl 6.6 W hav usd dfinit intgrals to valuat contour intgrals. It may com as a surpris to larn that contour intgrals and rsidus can b usd to valuat crtain

More information

General Notes About 2007 AP Physics Scoring Guidelines

General Notes About 2007 AP Physics Scoring Guidelines AP PHYSICS C: ELECTRICITY AND MAGNETISM 2007 SCORING GUIDELINES Gnral Nots About 2007 AP Physics Scoring Guidlins 1. Th solutions contain th most common mthod of solving th fr-rspons qustions and th allocation

More information

Fourier Transforms and the Wave Equation. Key Mathematics: More Fourier transform theory, especially as applied to solving the wave equation.

Fourier Transforms and the Wave Equation. Key Mathematics: More Fourier transform theory, especially as applied to solving the wave equation. Lur 7 Fourir Transforms and th Wav Euation Ovrviw and Motivation: W first discuss a fw faturs of th Fourir transform (FT), and thn w solv th initial-valu problm for th wav uation using th Fourir transform

More information

The second condition says that a node α of the tree has exactly n children if the arity of its label is n.

The second condition says that a node α of the tree has exactly n children if the arity of its label is n. CS 6110 S14 Hanout 2 Proof of Conflunc 27 January 2014 In this supplmntary lctur w prov that th λ-calculus is conflunt. This is rsult is u to lonzo Church (1903 1995) an J. arkly Rossr (1907 1989) an is

More information

Aim To manage files and directories using Linux commands. 1. file Examines the type of the given file or directory

Aim To manage files and directories using Linux commands. 1. file Examines the type of the given file or directory m E x. N o. 3 F I L E M A N A G E M E N T Aim To manag ils and dirctoris using Linux commands. I. F i l M a n a g m n t 1. il Examins th typ o th givn il or dirctory i l i l n a m > ( o r ) < d i r c t

More information

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES. 1. Statement of results

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES. 1. Statement of results BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES DONALD M. DAVIS Abstract. If p is a prim and n a positiv intgr, lt ν p (n dnot th xponnt of p in n, and u p (n n/p νp(n th unit part of n. If α

More information

Chapter 10. The singular integral Introducing S(n) and J(n)

Chapter 10. The singular integral Introducing S(n) and J(n) Chaptr Th singular intgral Our aim in this chaptr is to rplac th functions S (n) and J (n) by mor convnint xprssions; ths will b calld th singular sris S(n) and th singular intgral J(n). This will b don

More information

The van der Waals interaction 1 D. E. Soper 2 University of Oregon 20 April 2012

The van der Waals interaction 1 D. E. Soper 2 University of Oregon 20 April 2012 Th van dr Waals intraction D. E. Sopr 2 Univrsity of Orgon 20 pril 202 Th van dr Waals intraction is discussd in Chaptr 5 of J. J. Sakurai, Modrn Quantum Mchanics. Hr I tak a look at it in a littl mor

More information

EXST Regression Techniques Page 1

EXST Regression Techniques Page 1 EXST704 - Rgrssion Tchniqus Pag 1 Masurmnt rrors in X W hav assumd that all variation is in Y. Masurmnt rror in this variabl will not ffct th rsults, as long as thy ar uncorrlatd and unbiasd, sinc thy

More information

Quasi-Classical States of the Simple Harmonic Oscillator

Quasi-Classical States of the Simple Harmonic Oscillator Quasi-Classical Stats of th Simpl Harmonic Oscillator (Draft Vrsion) Introduction: Why Look for Eignstats of th Annihilation Oprator? Excpt for th ground stat, th corrspondnc btwn th quantum nrgy ignstats

More information

The graph of y = x (or y = ) consists of two branches, As x 0, y + ; as x 0, y +. x = 0 is the

The graph of y = x (or y = ) consists of two branches, As x 0, y + ; as x 0, y +. x = 0 is the Copyright itutcom 005 Fr download & print from wwwitutcom Do not rproduc by othr mans Functions and graphs Powr functions Th graph of n y, for n Q (st of rational numbrs) y is a straight lin through th

More information

Function Spaces. a x 3. (Letting x = 1 =)) a(0) + b + c (1) = 0. Row reducing the matrix. b 1. e 4 3. e 9. >: (x = 1 =)) a(0) + b + c (1) = 0

Function Spaces. a x 3. (Letting x = 1 =)) a(0) + b + c (1) = 0. Row reducing the matrix. b 1. e 4 3. e 9. >: (x = 1 =)) a(0) + b + c (1) = 0 unction Spacs Prrquisit: Sction 4.7, Coordinatization n this sction, w apply th tchniqus of Chaptr 4 to vctor spacs whos lmnts ar functions. Th vctor spacs P n and P ar familiar xampls of such spacs. Othr

More information

Lecture 37 (Schrödinger Equation) Physics Spring 2018 Douglas Fields

Lecture 37 (Schrödinger Equation) Physics Spring 2018 Douglas Fields Lctur 37 (Schrödingr Equation) Physics 6-01 Spring 018 Douglas Filds Rducd Mass OK, so th Bohr modl of th atom givs nrgy lvls: E n 1 k m n 4 But, this has on problm it was dvlopd assuming th acclration

More information

5.80 Small-Molecule Spectroscopy and Dynamics

5.80 Small-Molecule Spectroscopy and Dynamics MIT OpnCoursWar http://ocw.mit.du 5.80 Small-Molcul Spctroscopy and Dynamics Fall 008 For information about citing ths matrials or our Trms of Us, visit: http://ocw.mit.du/trms. Lctur # 3 Supplmnt Contnts

More information

Brief Introduction to Statistical Mechanics

Brief Introduction to Statistical Mechanics Brif Introduction to Statistical Mchanics. Purpos: Ths nots ar intndd to provid a vry quick introduction to Statistical Mchanics. Th fild is of cours far mor vast than could b containd in ths fw pags.

More information

There is an arbitrary overall complex phase that could be added to A, but since this makes no difference we set it to zero and choose A real.

There is an arbitrary overall complex phase that could be added to A, but since this makes no difference we set it to zero and choose A real. Midtrm #, Physics 37A, Spring 07. Writ your rsponss blow or on xtra pags. Show your work, and tak car to xplain what you ar doing; partial crdit will b givn for incomplt answrs that dmonstrat som concptual

More information

Computing and Communications -- Network Coding

Computing and Communications -- Network Coding 89 90 98 00 Computing and Communications -- Ntwork Coding Dr. Zhiyong Chn Institut of Wirlss Communications Tchnology Shanghai Jiao Tong Univrsity China Lctur 5- Nov. 05 0 Classical Information Thory Sourc

More information

Equidistribution and Weyl s criterion

Equidistribution and Weyl s criterion Euidistribution and Wyl s critrion by Brad Hannigan-Daly W introduc th ida of a sunc of numbrs bing uidistributd (mod ), and w stat and prov a thorm of Hrmann Wyl which charactrizs such suncs. W also discuss

More information

3 Finite Element Parametric Geometry

3 Finite Element Parametric Geometry 3 Finit Elmnt Paramtric Gomtry 3. Introduction Th intgral of a matrix is th matrix containing th intgral of ach and vry on of its original componnts. Practical finit lmnt analysis rquirs intgrating matrics,

More information

u x v x dx u x v x v x u x dx d u x v x u x v x dx u x v x dx Integration by Parts Formula

u x v x dx u x v x v x u x dx d u x v x u x v x dx u x v x dx Integration by Parts Formula 7. Intgration by Parts Each drivativ formula givs ris to a corrsponding intgral formula, as w v sn many tims. Th drivativ product rul yilds a vry usful intgration tchniqu calld intgration by parts. Starting

More information

Symmetric centrosymmetric matrix vector multiplication

Symmetric centrosymmetric matrix vector multiplication Linar Algbra and its Applications 320 (2000) 193 198 www.lsvir.com/locat/laa Symmtric cntrosymmtric matrix vctor multiplication A. Mlman 1 Dpartmnt of Mathmatics, Univrsity of San Francisco, San Francisco,

More information

Einstein Equations for Tetrad Fields

Einstein Equations for Tetrad Fields Apiron, Vol 13, No, Octobr 006 6 Einstin Equations for Ttrad Filds Ali Rıza ŞAHİN, R T L Istanbul (Turky) Evry mtric tnsor can b xprssd by th innr product of ttrad filds W prov that Einstin quations for

More information

The Average Sensitivity of Bounded-Depth Formulas

The Average Sensitivity of Bounded-Depth Formulas Th Avrag Snsitivity of Boundd-Dpth Formulas Bnjamin Rossman Univrsity of Toronto July 25, 206 Abstract W show that unboundd fan-in boolan formulas of dpth d + and siz s hav avrag snsitivity O d log sd.

More information

4.2 Design of Sections for Flexure

4.2 Design of Sections for Flexure 4. Dsign of Sctions for Flxur This sction covrs th following topics Prliminary Dsign Final Dsign for Typ 1 Mmbrs Spcial Cas Calculation of Momnt Dmand For simply supportd prstrssd bams, th maximum momnt

More information

Differential Equations

Differential Equations Prfac Hr ar m onlin nots for m diffrntial quations cours that I tach hr at Lamar Univrsit. Dspit th fact that ths ar m class nots, th should b accssibl to anon wanting to larn how to solv diffrntial quations

More information

Exam 1. It is important that you clearly show your work and mark the final answer clearly, closed book, closed notes, no calculator.

Exam 1. It is important that you clearly show your work and mark the final answer clearly, closed book, closed notes, no calculator. Exam N a m : _ S O L U T I O N P U I D : I n s t r u c t i o n s : It is important that you clarly show your work and mark th final answr clarly, closd book, closd nots, no calculator. T i m : h o u r

More information

What is a hereditary algebra?

What is a hereditary algebra? What is a hrditary algbra? (On Ext 2 and th vanishing of Ext 2 ) Claus Michal Ringl At th Münstr workshop 2011, thr short lcturs wr arrangd in th styl of th rgular column in th Notics of th AMS: What is?

More information

EEO 401 Digital Signal Processing Prof. Mark Fowler

EEO 401 Digital Signal Processing Prof. Mark Fowler EEO 401 Digital Signal Procssing Prof. Mark Fowlr ot St #18 Introduction to DFT (via th DTFT) Rading Assignmnt: Sct. 7.1 of Proakis & Manolakis 1/24 Discrt Fourir Transform (DFT) W v sn that th DTFT is

More information

A Uniform Approach to Three-Valued Semantics for µ-calculus on Abstractions of Hybrid Automata

A Uniform Approach to Three-Valued Semantics for µ-calculus on Abstractions of Hybrid Automata A Uniform Approach to Thr-Valud Smantics for µ-calculus on Abstractions of Hybrid Automata (Haifa Vrification Confrnc 2008) Univrsity of Kaisrslautrn Octobr 28, 2008 Ovrviw 1. Prliminaris and 2. Gnric

More information

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN Intrnational Journal of Scintific & Enginring Rsarch, Volum 6, Issu 7, July-25 64 ISSN 2229-558 HARATERISTIS OF EDGE UTSET MATRIX OF PETERSON GRAPH WITH ALGEBRAI GRAPH THEORY Dr. G. Nirmala M. Murugan

More information

ME 321 Kinematics and Dynamics of Machines S. Lambert Winter 2002

ME 321 Kinematics and Dynamics of Machines S. Lambert Winter 2002 3.4 Forc Analysis of Linkas An undrstandin of forc analysis of linkas is rquird to: Dtrmin th raction forcs on pins, tc. as a consqunc of a spcifid motion (don t undrstimat th sinificanc of dynamic or

More information

Two Products Manufacturer s Production Decisions with Carbon Constraint

Two Products Manufacturer s Production Decisions with Carbon Constraint Managmnt Scinc and Enginring Vol 7 No 3 pp 3-34 DOI:3968/jms9335X374 ISSN 93-34 [Print] ISSN 93-35X [Onlin] wwwcscanadant wwwcscanadaorg Two Products Manufacturr s Production Dcisions with Carbon Constraint

More information

CS 6353 Compiler Construction, Homework #1. 1. Write regular expressions for the following informally described languages:

CS 6353 Compiler Construction, Homework #1. 1. Write regular expressions for the following informally described languages: CS 6353 Compilr Construction, Homwork #1 1. Writ rgular xprssions for th following informally dscribd languags: a. All strings of 0 s and 1 s with th substring 01*1. Answr: (0 1)*01*1(0 1)* b. All strings

More information

Homogeneous Constant Matrix Systems, Part I

Homogeneous Constant Matrix Systems, Part I 39 Homognous Constant Matrix Systms, Part I Finally, w can start discussing mthods for solving a vry important class of diffrntial quation systms of diffrntial quations: homognous constant matrix systms

More information

1.2 Faraday s law A changing magnetic field induces an electric field. Their relation is given by:

1.2 Faraday s law A changing magnetic field induces an electric field. Their relation is given by: Elctromagntic Induction. Lorntz forc on moving charg Point charg moving at vlocity v, F qv B () For a sction of lctric currnt I in a thin wir dl is Idl, th forc is df Idl B () Elctromotiv forc f s any

More information

Background: We have discussed the PIB, HO, and the energy of the RR model. In this chapter, the H-atom, and atomic orbitals.

Background: We have discussed the PIB, HO, and the energy of the RR model. In this chapter, the H-atom, and atomic orbitals. Chaptr 7 Th Hydrogn Atom Background: W hav discussd th PIB HO and th nrgy of th RR modl. In this chaptr th H-atom and atomic orbitals. * A singl particl moving undr a cntral forc adoptd from Scott Kirby

More information

CHAPTER 1. Introductory Concepts Elements of Vector Analysis Newton s Laws Units The basis of Newtonian Mechanics D Alembert s Principle

CHAPTER 1. Introductory Concepts Elements of Vector Analysis Newton s Laws Units The basis of Newtonian Mechanics D Alembert s Principle CHPTER 1 Introductory Concpts Elmnts of Vctor nalysis Nwton s Laws Units Th basis of Nwtonian Mchanics D lmbrt s Principl 1 Scinc of Mchanics: It is concrnd with th motion of matrial bodis. odis hav diffrnt

More information

Homotopy perturbation technique

Homotopy perturbation technique Comput. Mthods Appl. Mch. Engrg. 178 (1999) 257±262 www.lsvir.com/locat/cma Homotopy prturbation tchniqu Ji-Huan H 1 Shanghai Univrsity, Shanghai Institut of Applid Mathmatics and Mchanics, Shanghai 272,

More information

Answer Homework 5 PHA5127 Fall 1999 Jeff Stark

Answer Homework 5 PHA5127 Fall 1999 Jeff Stark Answr omwork 5 PA527 Fall 999 Jff Stark A patint is bing tratd with Drug X in a clinical stting. Upon admiion, an IV bolus dos of 000mg was givn which yildd an initial concntration of 5.56 µg/ml. A fw

More information

What are those βs anyway? Understanding Design Matrix & Odds ratios

What are those βs anyway? Understanding Design Matrix & Odds ratios Ral paramtr stimat WILD 750 - Wildlif Population Analysis of 6 What ar thos βs anyway? Undrsting Dsign Matrix & Odds ratios Rfrncs Hosmr D.W.. Lmshow. 000. Applid logistic rgrssion. John Wily & ons Inc.

More information

Enumerating Unlabeled and Root Labeled Trees for Causal Model Acquisition

Enumerating Unlabeled and Root Labeled Trees for Causal Model Acquisition Enumrating Unlabld and Root Labld Trs for Causal Modl Acquisition Yang Xiang, Zo Jingyu Zhu, and Yu Li Univrsity of Gulph, Canada Abstract. To spcify a Bays nt (BN), a conditional probability tabl (CPT),

More information

Some remarks on Kurepa s left factorial

Some remarks on Kurepa s left factorial Som rmarks on Kurpa s lft factorial arxiv:math/0410477v1 [math.nt] 21 Oct 2004 Brnd C. Kllnr Abstract W stablish a connction btwn th subfactorial function S(n) and th lft factorial function of Kurpa K(n).

More information

Network Congestion Games

Network Congestion Games Ntwork Congstion Gams Assistant Profssor Tas A&M Univrsity Collg Station, TX TX Dallas Collg Station Austin Houston Bst rout dpnds on othrs Ntwork Congstion Gams Travl tim incrass with congstion Highway

More information

Data Assimilation 1. Alan O Neill National Centre for Earth Observation UK

Data Assimilation 1. Alan O Neill National Centre for Earth Observation UK Data Assimilation 1 Alan O Nill National Cntr for Earth Obsrvation UK Plan Motivation & basic idas Univariat (scalar) data assimilation Multivariat (vctor) data assimilation 3d-Variational Mthod (& optimal

More information

Deift/Zhou Steepest descent, Part I

Deift/Zhou Steepest descent, Part I Lctur 9 Dift/Zhou Stpst dscnt, Part I W now focus on th cas of orthogonal polynomials for th wight w(x) = NV (x), V (x) = t x2 2 + x4 4. Sinc th wight dpnds on th paramtr N N w will writ π n,n, a n,n,

More information

Category Theory Approach to Fusion of Wavelet-Based Features

Category Theory Approach to Fusion of Wavelet-Based Features Catgory Thory Approach to Fusion of Wavlt-Basd Faturs Scott A. DLoach Air Forc Institut of Tchnology Dpartmnt of Elctrical and Computr Enginring Wright-Pattrson AFB, Ohio 45433 Scott.DLoach@afit.af.mil

More information

2.3 Matrix Formulation

2.3 Matrix Formulation 23 Matrix Formulation 43 A mor complicatd xampl ariss for a nonlinar systm of diffrntial quations Considr th following xampl Exampl 23 x y + x( x 2 y 2 y x + y( x 2 y 2 (233 Transforming to polar coordinats,

More information

LINEAR DELAY DIFFERENTIAL EQUATION WITH A POSITIVE AND A NEGATIVE TERM

LINEAR DELAY DIFFERENTIAL EQUATION WITH A POSITIVE AND A NEGATIVE TERM Elctronic Journal of Diffrntial Equations, Vol. 2003(2003), No. 92, pp. 1 6. ISSN: 1072-6691. URL: http://jd.math.swt.du or http://jd.math.unt.du ftp jd.math.swt.du (login: ftp) LINEAR DELAY DIFFERENTIAL

More information

Cramér-Rao Inequality: Let f(x; θ) be a probability density function with continuous parameter

Cramér-Rao Inequality: Let f(x; θ) be a probability density function with continuous parameter WHEN THE CRAMÉR-RAO INEQUALITY PROVIDES NO INFORMATION STEVEN J. MILLER Abstract. W invstigat a on-paramtr family of probability dnsitis (rlatd to th Parto distribution, which dscribs many natural phnomna)

More information