Maximizing Conjunctive Views in Deletion Propagation

Size: px
Start display at page:

Download "Maximizing Conjunctive Views in Deletion Propagation"

Transcription

1 Maximizing Conjunctiv Viws in Dltion Propagation Bnny Kimlfld Jan Vondrá Ryan Williams IBM Rsarch Almadn San Jos, CA 9510, USA {imlfld, jvondra, ABSTRACT In dltion propagation, tupls from th databas ar dltd in ordr to rflct th dltion of a tupl from th viw. Such an opration may rsult in th (oftn ncssary) dltion of additional tupls from th viw, bsids th intntionally dltd on. Th complxity of dltion propagation is studid, whr th viw is dfind by a conjunctiv qury (CQ), and th goal is to maximiz th numbr of tupls that rmain in th viw. Bunman t al. showd that for som simpl CQs, this problm can b solvd by a trivial algorithm. This papr idntifis additional cass of CQs whr th trivial algorithm succds, and in contrast, it provs that for som othr CQs th problm is NP-hard to approximat bttr than som constant ratio. In fact, this papr shows that among th CQs without slf joins, th hard CQs ar xactly th ons that th trivial algorithm fails on. In othr words, for vry CQ without slf joins, dltion propagation is ithr APX-hard or solvabl by th trivial algorithm. Th papr thn prsnts approximation algorithms for crtain CQs whr dltion propagation is APX-hard. Spcifically, two constant-ratio (and polynomial-tim) approximation algorithms ar givn for th class of star CQs without slf joins. Th first algorithm is a grdy algorithm, and th scond is basd on randomizd rounding of a linar program. Whil th first algorithm is mor fficint, th scond on has a bttr approximation ratio. Furthrmor, th scond algorithm can b xtndd to a significant gnralization of star CQs. Finally, th papr shows that slf joins can hav a major ngativ ffct on th approximability of th problm. Catgoris and Subjct Dscriptors: H. [Databas Managmnt]: Systms, Databas Administration Gnral Trms: Algorithms, Thory Kywords: Dltion propagation, dichotomy, approximation Prmission to ma digital or hard copis of all or part of this wor 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 11, Jun 13 15, 011, Athns, Grc. Copyright 011 ACM /11/06...$ INTRODUCTION Classical in databas managmnt is th viw updat problm [, 8, 9, 11, 15, 0]: translat an updat opration on th viw to an updat of th sourc databas, so that th updat on th viw is proprly rflctd. A spcial cas of this problm is that of dltion propagation in rlational databass: givn an undsird tupl in th viw (dfind by som monotonic qury), dlt som tupls from th bas rlations (whr such tupls ar rfrrd to as facts), so that th undsird tupl disappars from th viw, but th othr tupls in th viw rmain. Th databas rsulting from this dltion of tupls is said to b sid-ffct fr [4], whr th sid ffct is th st of dltd viw tupls that ar diffrnt from th undsird on. Vry oftn, a solution that is sid-ffct fr dos not xist, and hnc, th tas is rlaxd to that of minimizing th sid ffct [4,8]. That is, th problm is to dlt tupls from th sourc rlations so that th undsird tupl disappars from th viw, and th maximum possibl numbr of othr tupls rmain in th viw. Though viw updat is a classical databas problm, rcnt applications provid a rnwd motivation for it. Spcifically, viw updat naturally ariss whn dbugging Information Extraction (IE) programs, which can b highly complicatd [3]. As a concrt xampl, th MIDAS systm [1] xtracts basic rlations from multipl (publicly availabl) financial data sourcs, som of which ar smistructurd or just txt, and intgrats thm into composit ntitis, vnts and rlationships. Naturally, this tas is rror pron, and du to th magnitud and complxity of MIDAS, it is practically impossibl to rach complt prcision. An rronous conclusion, though, can b obsrvd by a usr viwing th final output of MIDAS, and such a conclusion is lily to b th rsult of rrors or ambiguity in th bas rlations. Whn th intgration qury is tan as th viw dfinition, dltion propagation bcoms th tas of suggsting tupls to b dltd from th bas rlations for liminating th rronous conclusion, whil minimizing th ffct on th rmaining conclusions. Furthrmor, liminating tupls from th bas rlations may itslf ntail dltion propagation, sinc ths tupls ar typically xtractd by consulting xtrnal (possibly unclan) data sourcs [3, 5]. Anothr motivation ariss in businss rorganization, and th spcific application is that of liminating undsird lins, such as btwn a spcific mploy and a spcific customr. This problm is nicly illustratd by th following simpl xampl by Cui and Widom [10] (also rfrncd and usd by Bunman t al. [4]). Lt GroupUsr(group, usr) and GroupFil(group, fil) b two rlations rprsnting mm-

2 brships of usrs in groups and accss prmissions of groups to fils. A usr u can accss th fil f if u blongs to a group that can accss f; that is, thr is som g, such that GroupUsr(g, u) and GroupFil(g, f). Suppos that w want to rstrict th accss of a spcific usr to a spcific fil, by liminating som usr-group or group-fil pairings. Furthrmor, w would li to do so in a way that a maximum numbr of usr-fil accss prmissions rmain. This is xactly th dltion-propagation problm, whr th viw is dfind by th following conjunctiv qury (CQ): Accss(y 1, y ) : GroupUsr(x, y 1 ), GroupFil(x, y ) (1) A formal dfinition of a CQ is givn in Sction. For som of th abov applications of dltion propagation (.g., IE), th involvd quris can b much mor complicatd than CQs. Nvrthlss, w bliv that undrstanding dltion propagation for th basic class of CQs is an ssntial stp towards practical algorithms for ths applications. Hnc, th focus of this papr is on th complxity of dltion propagation, whr th viw is dfind by a CQ. Formally, for a CQ Q (th viw dfinition), th input for th dltion-propagation problm consists of a databas instanc I and a tupl a Q(I). A solution is an subinstanc J of I (i.., J is obtaind from I by dlting facts) such that a / Q(J), and an optimal solution maximizs th numbr of tupls in Q(J). Th sid ffct is (Q(I) \ {a}) \ Q(J). Bunman t al. [4] idntify som classs of CQs (.g., projction-fr CQs) for which a straightforward algorithm producs an optimal solution in polynomial tim; w rcall this algorithm in Sction 3 and call it th trivial algorithm. But thos tractabl classs ar highly rstrictd, as Bunman t al. show that vn for a CQ as simpl as th abov Accss(y 1, y ), tsting whthr thr is a solution that is sid-ffct fr is NP-complt. Thrfor, finding an optimal solution minimizing th sid ffct is NP-hard for Accss(y 1, y ). Of cours, on can oftn sttl for a solution that is just approximatly optimal, such as a solution that has a sid ffct that is at most twic as larg as th minimum. Nvrthlss, as notd by Bunman t al. [4], approximating th minimum sid ffct is still hard, sinc such an approximation can b usd to tst for th xistnc of a sid-ffct fr solution (bcaus an approximatly optimal solution must b sid-ffct fr whn a sid-ffct-fr solution xists). In spit of th abov hardnss in dltion propagation, w still want to dsign algorithms (at last for important classs of CQs) with provabl guarants on th quality of a solution. W achiv that by slightly twaing th optimization masur: instad of trying to minimiz th sid ffct (i.., th cardinality of (Q(I) \ {a}) \ Q(J)), our goal is to maximiz th numbr of rmaining tupls (i.., th cardinality of Q(J)). W dnot this problm by MaxDP Q. Of cours, for finding an optimal solution, this maximization problm is th sam as th original minimization problm. But in trms of approximation, th pictur drastically changs. For xampl, w show that for vry CQ Q without slf joins, MaxDP Q is approximabl by a constant factor that dpnds only on Q. Mor spcifically, for vry CQ Q without slf joins thr is a constant α Q (0, 1) (lowr boundd by th rciprocal of th arity of Q), such that th solution J producd by th trivial algorithm satisfis Q(J) α Q Q(J ) for all solutions J. In Sction 4, w formulat th had-domination proprty of CQs. W prov that whn a CQ Q without slf joins has this proprty, MaxDP Q is solvd optimally (and in polynomial tim) by th trivial algorithm. Unfortunatly, for many othr CQs thr is a limit to th xtnt to which MaxDP Q can b approximatd. Particularly, w considr th slf-join-fr CQs, and show a rmarabl phnomnon (Thorm 4.8): for thos CQs that do not hav th had domination proprty, not only is th trivial algorithm suboptimal for MaxDP Q, this problm is hard to solv optimally, and vn hard to approximat bttr than som constant ratio. Mor prcisly, w show th following dichotomy. For vry CQ Q without slf joins, on of th following holds: Q has th had-domination proprty (thus, th trivial algorithm optimally solvs MaxDP Q in polynomial tim). Thr is a constant α Q (0, 1), such that MaxDP Q is NP-hard to α Q-approximat. Th proof of this dichotomy is nontrivial. Rgarding th constant α Q, w show that it is ncssary to hav it dpndnt on Q, sinc thr is no global constant α (0, 1) that wors for all th CQs Q (without slf joins); howvr, w show that such a global constant xists for a larg class of CQs (that contains th acyclic CQs [3, 1]). Th abov dichotomy also holds for th aformntiond problms of Bunman t al. [4]. That is, for th problm of dtrmining whthr thr is a sid-ffct-fr solution, and for th problm of finding an optimal solution, th following holds whn thr ar no slf joins: if th CQ has th had-domination proprty, thn th problms ar solvabl by th trivial algorithm; othrwis, ths problms ar NP-hard. So far, th only algorithm w hav considrd for dltion propagation is th trivial on. Rcall that for vry CQ Q without slf joins, th trivial algorithm is a constant-factor approximation (with a constant dpnding on Q). In Sction 5, w dvis approximation algorithms with much bttr ratios, for th important class of star CQs without slf joins 1 (which gnraliz th quris that ar procssd by th Fagin algorithm [13] and th thrshold algorithm [14]). W first giv an algorithm that provids a 1 -approximation for MaxDP Q, whr Q is a star CQ without slf joins. This algorithm, which w call th grdy algorithm, is basd on purly combinatorial argumnts. This algorithm is vry simpl and has a highly dsirabl complxity: its running tim is polynomial not just undr th standard data complxity, but also undr qury-and-data complxity (which mans that th worst-cas cost of this algorithm is significantly smallr than that of valuating th CQ ovr th databas instanc). W thn prsnt an approximation for MaxDP Q that is basd on randomizd rounding of a linar program (LP). This randomizd algorithm is mor complicatd than th grdy algorithm. W formulat th problm as an intgr linar program, which is rlaxd to an ordinary linar program by mans of randomizd rounding that translats th rsulting LP solution into a probabilistic choic of tupls to dlt. Th LP-basd algorithm trminats in polynomial tim, but unli th grdy algorithm, th polynomial is only undr data complxity (as it ssntially rquirs th 1 S Sction 5 for th xact dfinition of a star CQ. A discussion on randomnss in optimization is givn in Sction 5.

3 valuation of th CQ). Howvr, th LP-basd algorithm has important two advantags ovr th grdy on. Th first advantag of th LP-basd algorithm is that its approximation ratio is highr: 1 1 (roughly, 0.63) rathr than 1 (which is shown to b tight for th grdy algorithm). Th scond advantag is that th LP-basd algo- rithm can b xtndd to a significant gnralization of star CQs. Roughly spaing, in this gnralization (which w formally dfin in Sction 5) th star rstriction is limitd just to th xistntial variabls. As w dmonstrat, th grdy algorithm inhrntly fails on CQs of this gnralization. Th LP-basd approach alon is not nough for this gnralization, but intrstingly, th trivial algorithm handls th cass whr th LP fails. Hnc, our gnralizd algorithm tas th bst solution from thos rturnd by th LP-basd algorithm and th trivial algorithm. Finally, in Sction 6 w show that slf joins in CQs introduc inhrnt hardnss. Rcall that for vry CQ Q without slf joins, MaxDP Q can b fficintly α Q-approximatd by th trivial algorithm, whr α Q is boundd by th rciprocal of th arity of Q. W show that this rsult dos not xtnd to CQs with slf joins. Spcifically, th trivial algorithm fails to giv th dsird approximation, and furthrmor, w show an infinit st of CQs Q, such that th achivabl approximation ratio for MaxDP Q is xponntially smallr than th rciprocal of th arity of Q. In addition, w show a CQ Q with slf joins, such that Q has th had-domination proprty and yt th trivial algorithm is sub-optimal; furthrmor, MaxDP Q is hard to approximat bttr than som constant ratio. Not that th wor rportd hr considrs a basic and rstrictd cas of th viw updat problm: dltion propagation for conjunctiv viws, with th goal of prsrving as many tupls of th viw as possibl. W found that vn in this basic cas, approximation is a nontrivial topic. W bliv that th insights and tchniqus drawn from this wor will b hlpful in th xploration of additional aspcts of viw updat, and dltion propagation in particular, li thos studid in th litratur. For xampl, dltion propagation has bn xplord undr th goal of minimizing th sourc sid ffct [4,8], namly, finding a solution with a minimal numbr of missing facts. Cong t al. [8] also studid th complxity of dltion propagation (with th goal of finding an optimal solution) in th prsnc of y constraints. Naturally, updat oprations othr than dltion (.g., insrtion and rplacmnt) hav also bn invstigatd [], and spcially in th prsnc of functional dpndncis [9, 11, 0]. Th wor of Cosmadais and Papadimitriou [9] is distinguishd by thir rquirmnt for a viw to p intact a complmnt viw (which has also bn xplord mor rcntly by Lchtnbörgr and Vossn []) that, intuitivly, contains th information ignord by th viw. Du to a lac of spac, som of th proofs ar prsntd in th xtndd vrsion of this papr [1].. PRELIMINARIES.1 Schmas, Instancs, and CQs W fix an infinit st Const of constants. W usually dnot constants by lowrcas lttrs from th bginning of th Latin alphabt (.g., a, b and c). A schma is a finit squnc R = R 1,..., R m of distinct rlation symbols, whr ach R i has an arity r i > 0. An instanc I (ovr R) is a squnc R1, I..., Rm, I such that ach Ri I is a finit rlation of arity r i ovr Const (i.., Ri I is a finit subst of Const r i ). W may abus this notation and us R i to dnot both th rlation symbol and th rlation Ri I that intrprts it. If c Const r i, thn R i (c) is calld a fact, and it is a fact of th instanc I if c Ri I. Notationally, w viw an instanc as th st of its facts (hnc, w may writ R(c) I to say that R(c) is a fact of I). If I and J ar two instancs ovr R = R 1,..., R m, thn J is a sub-instanc of I, dnotd J I, if Ri J Ri I for all i = 1,..., m. W fix an infinit st Var of variabls, and assum that Const and Var ar disjoint sts. W usually dnot variabls by lowrcas lttrs from th nd of th Latin alphabt (.g., x, y and z). W us th Datalog styl for dnoting a conjunctiv qury (abbrv. CQ): a CQ ovr a schma R is an xprssion of th form Q(y) : ϕ(x, y, c) whr x and y ar tupls of variabls (from Var), c is a tupl of constants (from Const), and ϕ(x, y, c) is a conjunction of atomic formulas R i(x, y, c) ovr R; an atomic formula is also calld an atom. W may writ just Q(y) or Q if ϕ(x, y, c) is irrlvant. W dnot by atoms(q) th st of atoms of Q. W usually writ ϕ(x, y, c) by simply listing atoms(q). W ma th rquirmnt that ach variabl occurs at most onc in x and y, and no variabl occurs in both x and y. Furthrmor, w rquir vry variabl of y to occur (at last onc) in ϕ(x, y, c). Whn w mntion a CQ Q, w usually avoid spcifying th undrlying schma R, and rathr assum that this schma is th on that consists of th rlation symbols (with th propr aritis) that appar in Q. Whn w want to rfr to that schma, w dnot it by schma(q). Multipl occurrncs of th sam rlation symbol in Q form a slf join; hnc, whn w say that Q has no slf joins w man that vry rlation symbol appars at most onc in ϕ(x, y, c). Lt Q(y) : ϕ(x, y, c) b a CQ. A variabl of x is calld an xistntial variabl of Q, and a variabl of y is calld a had variabl of Q. W us Var (Q) and Var h (Q) to dnot th sts of xistntial variabls and had variabls of Q, rspctivly. Similarly, if φ is an atom of Q, thn Var (φ) and Var h (φ) dnot th st of xistntial variabls and had variabls, rspctivly, that occur in φ. W dnot by Var(Q) and Var(φ) th unions Var (Q) Var h (Q) and Var (φ) Var h (φ), rspctivly. A join variabl of Q is a variabl that occurs in two or mor atoms of Q (not that a join variabl can b an xistntial variabl or a had variabl). Finally, th arity of Q, dnotd arity(q), is th lngth of th tupl y. Exampl.1. An important CQ in this wor is th CQ Q, which is th sam as th CQ Accss(y 1, y ) dfind in (1) (and discussd in th introduction), up to rnaming of rlation symbols. Q (y 1, y ) : R 1 (x, y 1 ), R (x, y ) () Hr and latr, in our xampls R i and R j ar assumd to b diffrnt symbols whn i j. Th atoms of Q ar φ 1 = R 1(x, y 1) and φ = R (x, y ). Not that Q has no slf joins (but it would hav a slf join if w rplacd th symbol R with R 1 ). Thr is only on xistntial variabl in Q, namly x, and th two had variabls ar y 1 and y.

4 Hnc Var (Q) = {x} and Var h (Q) = {y 1, y }. Furthrmor, Var (φ 1 ) = {x} and Var h (φ 1 ) = {y 1 }. Finally, not that x is th singl join variabl of Q. W gnraliz th notation Q to Q, for all positiv intgrs, whr th CQ Q is dfind as follows. Q (y 1,..., y ) : R 1 (x, y 1 ),..., R (x, y ) (3) Not that schma(q ) consists of th (distinct) binary rlations R 1,..., R. Obsrv that th CQ Q from Exampl.1 dos not contain any constants. An xampl of a qury with th constant Emma is th following. Q(y 1, y ) : R 1 (x, y 1 ), R (x, y, Emma) Considr th CQ Q(y), and lt I b an instanc ovr schma(q). An assignmnt for Q is a mapping µ : Var(Q) Const. For an assignmnt µ for Q, th tupl µ(y) is th on obtaind from y by rplacing vry had variabl y with th constant µ(y). Similarly, for an atom φ atoms(q), th fact µ(φ) is th on obtaind from φ by rplacing vry variabl z with th constant µ(z). A match for Q in I is an assignmnt µ for Q, such that µ(φ) is a fact of I for all atoms φ atoms(q). If µ is a match for Q in I, thn µ(y) is calld an answr (for Q in I). Th rsult of valuating Q ovr I, dnotd Q(I), is th st of all th answrs for Q in I.. Dltion Propagation Lt Q b a CQ. Th problm of maximizing th viw in dltion propagation, with Q as th viw dfinition, is dnotd by MaxDP Q and is dfind as follows. Th input consists of an instanc I ovr schma(q), and a tupl a Q(I). A solution (for I and a) is an instanc J I, such that a / Q(J). Th goal is to find an optimal solution, which is a solution J that maximizs Q(J) ; that is, J is such that Q(J) Q(K) for all solutions K. As w discuss latr, finding an optimal solution for th problm MaxDP Q may b intractabl. Oftn, though, w can sttl for approximations, which w naturally dfin as follows. For a numbr α [0, 1], a solution J is α-optimal if Q(J) α Q(K) for all solutions K. An α-approximation for MaxDP Q is an algorithm that, givn I and a, always rturns an α-optimal solution. 3. THE TRIVIAL ALGORITHM In this sction, w rcall a straightforward algorithm of Bunman t al. [4], which thy gav for proving th tractability of finding a solution J with a minimum-siz sid ffct (rcall that th sid ffct is th st (Q(I) \ {a}) \ Q(J)), in th cas whr thr is no projction (i.., Q has no xistntial variabls); hr, w trivially xtnd that algorithm to gnral CQs. Considr a CQ Q(y), and suppos that I and a ar input for MaxDP Q. Lt φ b an atom of Q. A φ-fact of I is a fact f I that is qual to µ(φ) for som assignmnt µ for Q (not that µ is not ncssarily a match for Q in I); furthrmor, if thr is such µ that satisfis µ(y) = a (in addition to µ(φ) = f), thn w say that f is consistnt with a. Th trivial algorithm for gnrating a solution for I and a is as follows. For ach φ atoms(q), w obtain from I th sub-instanc J φ by rmoving all of th φ-facts that ar consistnt with a. Thn, w rturn th J φ that maximizs Q(J φ ). Psudo-cod for Trivial Q is shown in Figur 1. Algorithm Trivial Q (I, a) 1: J : for all φ atoms(q) do 3: J φ I 4: rmov from J φ all φ-facts consistnt with a 5: if Q(J φ ) > Q(J) thn 6: J J φ 7: rturn J Figur 1: Th trivial algorithm Exampl 3.1. Considr th following CQ Q 3, which is a spcial cas of (3). Q 3(y 1, y, y 3) : R 1(x, y 1), R (x, y ), R 3(x, y 3). Figur shows an instanc I 3 ovr schma(q 3), and lt a b th tupl (,, ). Lt us show how th trivial algorithm oprats on I 3 and a. For i {1,, 3}, lt φ i b th atom R i (x, y i ). Thn atoms(q 3) = {φ 1, φ, φ 3 }. For i {1,, 3}, th φ i -facts ar thos that blong to th rlation R i, and th ons that ar consistnt with a ar thos of th form R i(j, ); th solution J φi is thrfor obtaind from I 3 by rmoving from R i all th facts xcpt for R i(i, ). Thus, w hav Q 3(J φ1 ) = {(,, )}, Q 3(J φ ) = {(,, )}, and Q 3(J φ3 ) = {(,, )}. It follows that Q 3(J φi ) = 1 for all i {1,, 3}, and thrfor, th trivial algorithm can rturn any J φi (dpnding on th travrsal ordr ovr th atoms). Th following (straightforward) proposition stats th corrctnss and fficincy of th trivial algorithm. Unlss statd othrwis, in this papr w us data complxity [6] for analyzing th complxity of dltion propagation and algorithms throf; this mans that th CQ Q is hld fixd, and th input consists of th instanc I and th tupl a. Proposition 3.. Trivial Q rturns a solution, and trminats in polynomial tim. Nxt, w show that in th cas whr Q has no slf joins, th trivial algorithm approximats MaxDP Q within a constant ratio that dpnds only on Q. (A discussion on CQs with slf joins is in Sction 6.) 3.1 Approximation Th following proposition shows that, if Q is a CQ without slf joins, thn th trivial algorithm is a constant-factor approximation for MaxDP Q (whr th constant dpnds on Q). Th proof is fairly straightforward. Proposition 3.3. If Q is a CQ without slf joins, thn Trivial Q is a 1 -approximation for MaxDP Q, whr = min{arity(q), atoms(q) }. Nxt, w will show that 1 is also a tight lowr bound on th approximation ratio of th trivial algorithm, for som quris without slf joins. Mor prcisly, w will show that for all natural numbrs, th CQ Q (Exampl.1), which satisfis arity(q ) = atoms(q) =, is such that th trivial

5 R 1 R R Figur : Instanc I 3 ovr schma(q 3) R(y 1, x 1 ) S(x 1, x ) U(y, y 3, x 4) R(y 1, x 1 ) S(x 1, x ) T (x, y, x 3 ) T (x, y, x 3 ) U(y, y 3, x 4) V (y 1, y ) Figur 3: Th graphs G (Q) and G (Q ) for th CQs Q and Q of Exampl 4. algorithm rturns no bttr than a 1 -approximation. So, lt b a natural numbr. W will construct an instanc I and a tupl a Q (I ) that raliz th 1 ratio. Each of th rlations R i contains th tupls (1, ),..., (, ); in addition, ach rlation R i contains th tupl (i, ). As an xampl, Figur shows I 3. Th tupl a is (i.., a tupl that consists of diamonds). To s that I and a ar as dsird, lt J b th subinstanc of I that is obtaind by rmoving (i, ) from ach rlation R i. Thn Q (J) contains tupls b 1,..., b, whr ach b i is th tupl that compriss only s, xcpt for th ith lmnt that is. Not that J is optimal, sinc Q (I ) = Q (J) {a}. Nvrthlss, th trivial algorithm will rmov from on of th rlations, say R i, all th tupls of th form (x, ), as dscribd for = 3 in Exampl 3.1. By doing so, th trivial algorithm producs a sub-instanc J, such that Q (J ) contains xactly on tupl, thus no bttr than a 1 -approximation. In th nxt sction w will charactriz th CQs, among thos without slf joins, for which th trivial algorithm is optimal. Furthrmor, w will show that (in th absnc of slf joins) th trivial algorithm is optimal for MaxDP Q prcisly for thos CQs Q with a tractabl MaxDP Q ; for th rmaining CQs Q, MaxDP Q is hard, and vn hard to approximat bttr than som constant ratio. 4. DICHOTOMY In this sction, w dfin th had-domination proprty of a CQ, and show that if a CQ Q without slf joins has this proprty, thn th trivial algorithm (optimally) solvs MaxDP Q. Furthrmor, w show that this proprty xactly capturs th tractability of MaxDP Q, in th sns that in th absnc of this proprty, MaxDP Q is not only intractabl, but actually cannot b approximatd bttr than som constant ratio (it is APX-hard). 4.1 Had Domination Lt Q b a CQ. Th xistntial-connctivity graph of Q, dnotd G (Q), is th undirctd graph that has atoms(q) as th st of nods, and that has an dg {φ 1, φ } whnvr φ 1 and φ hav at last on xistntial variabl in common (that is, Var (φ 1 ) Var (φ ) ). Lt φ b an atom of Q, and lt P b a st of atoms of Q. W say that P is haddominatd by φ if φ contains all th had variabls that occur in P (i.., Var h (φ ) Var h (φ) for all φ P ). Dfinition 4.1. (Had Domination) A CQ Q has th had-domination proprty if for vry connctd componnt P of G (Q) thr is an atom φ atoms(q), such that P is had-dominatd by φ. As an xampl, for th CQ Q dfind in (3), th graph G (Q ) is a cliqu ovr atoms(q ), and so it has only on connctd componnt. For > 1, non of th atoms of Q contains all th had variabls y i, and hnc, Q dos not hav th had-domination proprty. (Not that Q 1 has th had-domination proprty, as dos vry CQ with only on atom or only on had variabl.) Anothr xampl follows. Exampl 4.. Considr th CQ Q dfind by Q(y 1, y, y 3) : R(y 1, x 1), S(x 1, x ), T (x, y, x 3), U(y, y 3, x 4 ). Th lft sid of Figur 3 shows th graph G (Q). Not that G (Q) has two connctd componnts: th first componnt is {R(y 1, x 1), S(x 1, x ), T (x, y, x 3)} and th scond is {U(y, y 3, x 4)}. Th CQ Q dos not hav th haddomination proprty, sinc th first connctd componnt is not had-dominatd by any atom of Q (sinc no atom contains both y 1 and y ). Now, considr th following CQ Q, which is obtaind from Q by adding an atom V (y 1, y ). Q (y 1, y, y 3) : R(y 1, x 1), S(x 1, x ), T (x, y, x 3), U(y, y 3, x 4 ), V (y 1, y ) Th graph G (Q ) is shown on th right of Figur 3. Not that th atom V (y 1, y ) had-dominats th connctd componnt {R(y 1, x 1 ), S(x 1, x ), T (x, y, x 3 )}; hnc, Q has th had-domination proprty. 4. Optimality of th Trivial Algorithm Th following thorm stats that if a CQ Q without slf joins has th had-domination proprty, thn th trivial algorithm is optimal for MaxDP Q. Thorm 4.3. Lt Q b a CQ without slf joins. If Q has th had-domination proprty, thn Trivial Q optimally solvs MaxDP Q. Proof. Lt Q b a CQ without slf joins, such that Q has th had-domination proprty. Considr th input I and a for MaxDP Q. Lt J b any solution (.g., an optimal solution). Lt f b a fact in I \ J. Not that such a fact f must xist, sinc a Q(I) and a / Q(J). Assum, w.l.o.g., that a Q(J {f}); othrwis, f can b addd to J without losing any tupl from Q(J), and thn w can choos anothr f, and so on. Lt φ b th atom of Q, such that f is a φ-fact. Lt P f b th connctd componnt of φ in G (Q), and lt γ b an atom of Q such that γ dominats P f. Such an atom γ xists, sinc Q has th had-domination proprty. Considr th solution J γ that th trivial algorithm constructs (by rmoving from I all th γ-facts that ar consistnt with a). W will prov th thorm by showing that Q(J) Q(J γ) (and hnc, Q(J) Q(J γ) ). If J J γ, thn th claim is obvious (sinc Q is a monotonic qury). Othrwis, lt g b a fact in J \ J γ. Thn g is a γ-fact that is consistnt with a, sinc g / J γ. W will prov that thr

6 is no match µ for Q in J, such that µ(γ) = g. Sinc Q has no slf joins, this would man that g is actually uslss for producing Q(J). As a rsult, by rpating this argumnt for all g J \ J γ w will gt that for J = J J γ it holds that Q(J) = Q(J ); and sinc Q(J ) Q(J γ ) (as J J γ and Q is monotonic), it holds that Q(J) Q(J γ ). Suppos, by way of contradiction, that µ g is a match for Q in J, such that µ g(γ) = g. W will show that a Q(J), and thrby obtain a contradiction to th fact that J is a solution. Lt y b th tupl of had variabls of Q. Rcall that a Q(J {f}), and lt µ f b a match for Q in J {f} with µ f (y) = a. Not that µ f (φ) = f. (Rmmbr that Q has no slf joins.) Obsrv that µ f and µ g agr on all th had variabls of P φ, du to th fact that γ contains all ths variabls, and du to th fact that g is consistnt with a. Also not that no xistntial variabl occurs both in P φ and outsid P φ, sinc P φ is a connctd componnt. It thus follows that µ f and µ g agr on all th variabls that occur both insid P φ and outsid P φ. W now construct a match µ for Q in J, as follows: for ach z Var(Q) w dfin µ(z) = µ g(z) if z appars in P φ, and othrwis µ(z) = µ f (z). Rcall that φ is in P φ, and hnc, µ(φ) = µ g (φ); thus, µ(φ) blongs to J (and in particular, µ(φ) f). It follows that µ is indd a match for Q in J. To complt th proof, w will show that µ(y) = a. Suppos that y = (y 1,..., y ) and a = (a 1,..., a ). Lt i b an indx in {1,..., }. If y i appars in P φ, thn µ(y i) = a i, sinc µ(y i ) = µ g (y i ), µ g (γ) = g, and g is consistnt with a. If y i dos not appar in P φ, thn µ(y i ) = a i again, sinc µ(y i ) = µ f (y i ) and µ f (y) = a. W conclud that µ(y) = a, and hnc, a Q(J), as claimd. As a simpl consqunc of Thorm 4.3, if Q is a CQ without slf joins, and vry join variabl of Q is a had variabl, thn th trivial algorithm optimally solvs MaxDP Q (sinc thn G (Q) has no dgs). Actually, w can show that if vry had variabl is a join variabl, thn this statmnt is tru vn without rquiring lac of slf joins. Howvr, in Sction 6 w show that Thorm 4.3 is not corrct for all th CQs that hav slf joins. Spcifically, w show an xampl of a CQ Q with slf joins, such that Q has th haddomination proprty, and yt th trivial algorithm dos not optimally solv MaxDP Q ; vn mor, for that Q w show that MaxDP Q is hard to approximat bttr than som constant ratio. 4.3 Hardnss Th following thorm 3 stats that if a CQ Q without slf joins dos not hav th had-domination proprty, thn in contrast to Thorm 4.3, MaxDP Q is hard, and vn hard to approximat bttr than som constant ratio. In Sction w discuss th proof. Thorm 4.4. Assum P NP, and lt Q b a CQ without slf joins. If Q dos not hav th had-domination proprty, thn thr is a constant α Q (0, 1), such that MaxDP Q cannot b α Q-approximatd in polynomial tim. 3 This rsult was found aftr th submission of th rviwd vrsion of this papr, and was addd (with th consnt of th program committ) aftr th papr was accptd for publication. In th rviwd vrsion, a similar rsult was shown for a mor rstrictd class of CQs without slf joins. On may wondr whthr, in Thorm 4.4, it is ncssary to hav α Q dpnding on Q. In othr words, dos Thorm 4.4 hold for a global α that is applicabl to all th CQs without slf joins? Th following thorm shows that th answr is positiv if w ar rstrictd to th class of acyclic CQs [3, 1] and th class of CQs ovr binary 4 rlation symbols. Th proof is, ssntially, through insights on th rductions usd for proving Thorm 4.4 (s Sction 4.3.1) in ths spcial cass. Thorm 4.5. Thr is a constant α (0, 1), such th following holds for vry CQ Q without slf joins, providd that Q is acyclic or schma(q) consists of binary rlation symbols. If Q dos not hav th had-domination proprty, thn it is NP-hard to α-approximat MaxDP Q. Howvr, in contrast to Thorm 4.5, th following proposition shows that no such global α xists for th class of all th CQs without slf joins. Proposition 4.6. For all natural numbrs > 1, thr xists a CQ Q with th following proprtis. 1. Q has no slf joins.. Q dos not hav th had-domination proprty. 3. Trivial Q is a (1 1 )-approximation for MaxDP Q. Proof. W dfin Q as follows. Th schma of Q has rlation symbols R 1,..., R, whr ach R i is -ary. Dfin Q (y 1,..., y ) : φ 1, φ,..., φ whr, for i = 1,...,, th atom φ i is givn by φ i = R i(x, y 1,..., y i 1, y i+1,..., y ). Not that φ i contains all th variabls of Q, xcpt for y i. Clarly, Q satisfis Proprtis 1 and (i.., Q has no slf joins and it violats th had-domination proprty). It is lft to prov Proprty 3. Lt I and a b input for MaxDP Q. Lt i and j b such that 1 i < j, and lt f i and f j b a φ i -fact and a φ j -fact, rspctivly, that ar consistnt with a (whr consistncy is dfind in Sction 3). Th only answr of Q(I) that agrs with both f i and f j on th had variabls is a. Thrfor, among th answrs in Q(I) \ {a}, thos that rquir f i ar disjoint from thos that rquir f j. Hnc, if w ta th bst J φ constructd by Trivial Q (Figur 1), it must b th cas that Q(J φ ) misss at most 1 of th tupls in Q(I) \ {a}. In particular, th bst J φ is a (1 1 )-approximation, as claimd. Nxt, w discuss th proof of Thorm Proving Thorm 4.4 Th full proof of Thorm 4.4 is in th xtndd vrsion of this papr [1]. Hr, w giv a brif ovrviw of th proof. Our first stp is to show hardnss of Q (dfind in ()), which is a spcial cas of a CQ that dos not hav th haddomination proprty. Bunman t al. [4] showd that dciding whthr thr is a solution that is sid-ffct fr is NP-complt for Q. To show that, thy dscribd a rduction from non-mixd 3-satisfiability, which is th problm of dciding on th satisfiability of a formula in 3-CNF, 4 This thorm furthr xtnds to th class of CQs whr ach atom has at most two influntial variabls, whr an influntial variabl is ithr a join or a had variabl

7 whr no claus contains both ngatd and non-ngatd variabls (that is, ach claus is th disjunction of thr litrals, whr th thr ar ithr all ngativ or all positiv). Guruswami [17] showd a constant-factor bound on th approximability of non-mixd 3-satisfiability. Howvr, w cannot simply combin th rduction of Bunman t al. and th rsult of Guruswami, sinc that rduction dos not prsrv approximation (or PTAS). Nvrthlss, w prov inapproximability by combining that rduction with a mor rcnt rsult of Guruswami and Khot [18] showing constant-factor inapproximability for non-mixd 3-satisfiability in th cas whr ach variabl occurs in at most fiv clauss. Thus, w gt th following. Lmma 4.7. Thr is a constant α (0, 1), such that MaxDP Q is NP-hard to α-approximat. Nxt, w fix a CQ Q, such that Q has nithr slf joins nor th had-domination proprty. Our goal is to prov that MaxDP Q is hard to approximat within som factor α Q. W fix a componnt P of G (Q), such that P is haddominatd by non of th atoms of Q. W call two variabls y and y atomic nighbors if Q has an atom that contains both y and y. An important ida in th proof is to distinguish btwn two cass. Th first cas is whr two of th had variabls of P ar not atomic nighbors. Th scond cas is th complmnt: vry two had variabls of P ar atomic nighbors. In th first cas, suppos that y 1 and y ar had variabls of P that ar not atomic nighbors. W show a (fairly simpl) rduction from MaxDP Q to MaxDP Q whr, roughly spaing, th variabl y i (i = 1, ) of Q simulats th variabl y i of Q. In th scond cas, w again show a rduction from th problm MaxDP Q to MaxDP Q, and w again find y 1 and y in Q that can simulat y 1 and y, rspctivly, in Q ; but hr this tas is much mor subtl. In ssnc, for th proof to wor w nd to b abl to assum that in a solution, it is not worth to rmov any φ-fact if φ contains both y 1 and y. To do that, w choos y 1 and y carfully, and w handl diffrntly thos φ that ar insid P and thos that ar outsid P. By handling φ w ssntially augmnt th constructd instanc I (ovr schma(q)) with additional tupls; this is also subtl, sinc w nd to ma sur that not too many answrs ar addd to Q(I), or ls w can asily los th (rough) prsrvation of th approximation ratio in th rduction. Ndd for facing th last problm is th fact that vry two had variabls in P ar atomic nighbors. 4.4 Dichotomy W summariz this sction with th following dichotomy 3 that is obtaind by combining Thorm 4.3 and 4.4. Thorm 4.8 (Dichotomy). For a CQ Q without slf joins, on of th following holds. 1. Th trivial algorithm optimally solvs MaxDP Q in polynomial tim.. Thr is a constant α Q (0, 1), such that it is NP-hard to α Q -approximat MaxDP Q. Morovr, 1 holds if and only if Q has th had-domination proprty. A proof similar to (actually, simplr than) that of Thorm 4.8 givs a similar dichotomy for th problm of tsting whthr thr is a solution that is sid-ffct fr (i.., a solution J such that Q(J) = Q(I)\{a}), which has bn studid by Bunman t al. [4]. Spcifically, for a CQ Q without slf joins, tsting whthr thr is a sid-ffct-fr solution is in polynomial tim whn Q has th had-domination proprty (du to Thorm 4.3), and is NP-complt othrwis. 5. APPROXIMATIONS FOR STAR CQS A CQ is a star CQ if vry join variabl occurs in vry atom; in othr words, a CQ Q is a star CQ if thr is a st Z Var(Q), such that Z = Var(φ 1 ) Var(φ ) whnvr φ 1, φ Q and φ 1 φ (not that Z can b mpty). As an xampl, vry Q (dfind in (3)) is a star CQ (with Z = {x}). Furthrmor, vry CQ with two or fwr atoms is a star CQ. An additional xampl is th following. Q 1 (y 1, y, y 3 ) : R(x 1, y 1 ), S(y 1, x 1, y ), T (x 3, y 1, x 1, x 1 ) Not that in Q 1, th join variabls ar x 1 and y 1, and thy indd occur in ach of th thr atoms. In this sction, w prsnt approximation algorithms for th problms MaxDP Q, whr Q is a star CQ without slf joins. Th following corollary of Thorm 4.5 (for th cas of acyclic CQs) shows that star CQs ar intractabl to approximat within som factor α, xcpt for trivial cass. Corollary 5.1. Thr is a numbr α (0, 1), such that th following holds for all star CQs Q without slf joins. If vry join variabl is a had variabl, or on of th atoms contains all th had variabls, thn Trivial Q optimally solvs MaxDP Q ; othrwis, α-approximating MaxDP Q is NP-hard. Th constant factor α that w found for th hardnss part Thorm 5.1 is fairly clos to 1 (it is largr than 0.9), so this rsult dos not prclud good approximations (though it dos prclud PTAS algorithms). Rcall from Proposition 3.3 that for vry CQ Q without slf joins, MaxDP Q is 1 -approximatd using th trivial algorithm, whr = min{arity(q), atoms(q) }. In this sction, w giv constantfactor approximation algorithms for MaxDP Q, whr th factor dos not dpnd on Q, assuming that Q is a star CQ without slf joins. Towards th nd of this sction, w will show how to xtnd on of th approximations to a significant gnralization of star CQs. 5.1 A Grdy Algorithm W now prsnt a 1 -approximation for MaxDP Q, for th cas whr Q is a star CQ without slf joins. W first considr th spcial cas whr Q is th CQ Q (for som > 0). Latr on, w will discuss th xtnsion of th algorithm to th gnral cas. Fix a natural numbr > 0. Th goal is to approximat MaxDP Q. W call th approximation algorithm w prsnt hr th grdy approximation, and dnot it by Grdy. Figur 4 shows psudo-cod for th algorithm. Th input includs an instanc I and a tupl a = (a 1,..., a ), and th algorithm rturns a solution J. W us th following notation. For a tupl d = (d 1,..., d ), w call a constant b Const a d-joining constant if R i(b, d i) is a fact of I for all i = 1,..., (i.., thr is a match µ for Q in I, such that µ(y) = d and µ(x) = b).

8 Algorithm Grdy (I, a) 1: lt a = (a 1,..., a ) : J I 3: for all a-joining constants b do 4: if xists j whr R j (b, c) I for som c a j thn 5: i a minimal j with R j(b, c) I for som c a j 6: ls 7: i an arbitrary numbr in {1,..., } 8: dlt R i (b, a i ) from J 9: rturn J Figur 4: Grdy approximation for MaxDP Q Th algorithm Grdy starts with J = I. It travrss ovr all th a-joining constants b. For ach b, th fact R i (b, a i ) is dltd from J, whr i is chosn to b th minimal j such that I contains a fact R j (b, c) for som c a j; if no such j xists, thn i is chosn arbitrarily among {1,..., }. Th following lmma stats that th algorithm rturns a solution. Th proof is immdiat from th fact that for ach a-joining constant b, th rturnd instanc J misss R i (b, a i ) for som (actually, for xactly on) i {1,..., }. Lmma 5.. Grdy (I, a) rturns a solution. Nxt, w show that Grdy is a -approximation for MaxDP Q. Fix th input I for th algorithm, and lt J b th rturnd sub-instanc of I. W will show that Q (J) Q (I) \ {a} /. This implis that Grdy is a 1 -approximation rgardlss of th prformanc of an optimal algorithm, sinc Q (J ) Q (I) \ {a} holds for vry solution J. Morovr, this implis that thr is always a solution that rtains at last half of th original (non-a) tupls of Q (I). To show that Q (J) Q (I) \ {a} /, w us th following counting argumnt. W map th surviving answrs to dltd answrs in a way that ach dltd answr is th imag of som surviving answr. Sinc no surviving answr has two imags, this will imply that th numbr of surviving answrs is at last as larg as th numbr of dltd answrs. Th intuitiv rason for th xistnc of such a mapping is that w try to dlt only facts R i (b, a i ) whr thr is an altrnativ fact R i (b, c) for th sam joining constant b; th fact R i (b, c) will prsrv som answrs to account for thos that hav bn dltd. Formally, w dfin a function Ψ : Q (J) Const, and show that Ψ is onto (Q (I) \ {a}) \ Q (J). Th function Ψ is dfind as follows. For a tupl c Q (J), whr c = (c 1,..., c ), th tupl Ψ(c) is obtaind from c by choosing th minimal i with c i a i, and rplacing that occurrnc of c i with a i. For xampl, for = 4 and a = (,,, ), th tupl Ψ(,,, ) is (,,, ). Lmma 5.3. Ψ is onto (Q (I) \ {a}) \ Q (J). Proof. Lt d = (d 1,..., d ) b a tupl of Q (I), such that d is nithr a nor in Q (J). W nd to show that thr is som c Q (J), such that Ψ(c) = d. Lt b b a... n R R 1 1 c 1 c... c n a 1 a Figur 5: An instanc I whr Grdy (I, a) provids a ( )-approximation n d-joining constant (b xists sinc d Q (I)). Th fact that d / Q (J) implis that b is an a-joining constant, and that whn b was visitd w dltd on of th R i(b, d i). Considr such an indx i, and not that d i = a i follows from th dfinition of th algorithm. Now, d a implis that, in th itration of b, th condition of Lin 4 is tru, and hnc, th dltd fact R i (b, d i ) satisfis that i is th minimal j whr R i(b, c) I for som c a i. Hnc, w must hav d j = a j for all j < i (and rcall that w also hav d i = a i). Lt c a i b a constant such that R i (b, c) I, and lt c b obtaind from d by rplacing th ith lmnt, d i, with c. W hav that c Q (J) and, morovr, Ψ(c) = d, as rquird. From Lmmas 5. and 5.3 w gt th following thorm. Thorm 5.4. Grdy is a 1 -approximation for th problm MaxDP Q. Nxt, w show that in th worst cas, Grdy indd givs just 1 -approximation. Our xampl is for =, and it is dpictd in Figur 5. Th rlation R 1 contains th tupls (i, a 1) and (i, ), for all i {1,..., n}. Not that th visual position of nods on th dgs that corrspond to R 1 is in opposition to th ordr of th valus in R 1 (i.., th dg from to corrsponds to th fact R 1 (, )). Th rlation R contains th tupls (i, a ) and (i, c i ) for all i {1,..., n}. Th grdy algorithm will rmov all th facts R 1(i, a 1), gnrating a sub-instanc J with Q (J) = n + 1. On th othr hand, on could rmov all th facts R (i, a ), and thn gt a solution J, such that Q (J ) = n. Hnc, th approximation ratio is at most n Finally, w discuss th gnralization of th grdy algorithm to gnral star CQs without slf joins. Lt Q b a star CQ without slf joins. Suppos that Q has atoms. W rduc MaxDP Q to MaxDP Q in an approximationprsrving mannr. Spcifically, givn th input I and a for MaxDP Q, w gnrat an instanc I ovr schma(q ) and a tupl a, and apply Grdy (I, a ) to gt a solution J for I and a. Finally, w transform J into a solution J for I and a. This rduction is fairly straightforward, and th dtails ar in th xtndd vrsion of this papr [1]. In conclusion, w gt th following thorm. Thorm 5.5. Lt Q b a star CQ without slf joins. Thr is a 1 -approximation for MaxDP Q, whr th running tim is polynomial undr qury-and-data complxity. Rcall that qury-and-data complxity mans that th running tim is masurd as if th qury Q is givn as part of

9 th input (in addition to I and a), and is not fixd. Th polynomial running tim undr qury-and-data complxity is du to th fact that both Grdy and th rduction from MaxDP Q to MaxDP Q ta polynomial tim undr qury-and-data complxity. In contrast, rcall that th trivial algorithm is polynomial tim only undr data complxity (sinc it rquirs th valuation of Q ovr th J φ ). 5. A Randomizd-Rounding Algorithm In this sction, w dscrib a randomizd-rounding algorithm for approximating MaxDP Q whn Q is a star CQ without slf joins. W will show that this algorithm givs an approximation ratio that is highr than Grdy, namly, 1 1 (which is, roughly, 0.63) instad of 1 ; th running tim is still polynomial, but it is not as fast as Grdy. In particular, th algorithm w dscrib hr will trminat in polynomial tim undr (th usual) data complxity, but not undr qury-and-data complxity. At th nd of this sction, w will show that this algorithm can b usd to approximat CQs from a class that significantly gnralizs th star CQs without slf joins. Mor prcisly, th algorithm w prsnt is a randomizd (1 1 )-approximation, whr a randomizd α-approximation for MaxDP Q is a randomizd algorithm that, givn I and a, rturns a solution J such that th xpctd Q(J) is at last α Q(K) for all solutions K. Put diffrntly, if J opt is an optimal solution, thn E[ Q(J) ] α Q(J opt ). This is a standard notion of randomizd optimization (.g., [16, 19]). Such a randomizd algorithm can b asily transformd into a randomizd algorithm that rturns an α-approximation, whr α is arbitrarily clos to (1 1 ), and th rror probability is arbitrarily small. W furthr not that th algo- rithm w prsnt hr can b drandomizd into a dtrministic (i.., ordinary) (1 1 )-approximation, using th pipag-rounding tchniqu of Calinscu t al. [5]; howvr, that drandomization is byond th scop of this papr. Our algorithm uss idas from th framwor of submodular maximization subjct to a matroid constraint [5, 6]. In fact, our problm can b formally rducd to th problm of maximizing a monoton submodular function subjct to a matroid constraint, for which a (1 1 )-approximation has bn dvlopd rcntly [6]. Howvr, it is simplr (and maximiz X d Q (I) Y d subjct to d Q (I) Y d X b JC (a) b JC (d) X Xi b = 1 i=1 b JC (a), i [] 0 X b i 1 d Q (I) 0 Y d 1 X i []\(d a) Figur 6: Th program LP(I, a) X b i Algorithm RRLP (I) 1: lt a = (a 1,..., a ) : J I 3: solv LP(I, a) 4: for all a-joining constants b do 5: indpndntly pic a random i [] with probability X b j for j 6: dlt R i (b, a i ) from J 7: rturn J Figur 7: Randomizd rounding for MaxDP Q mor instructiv) to giv a slf-containd dscription, which is what w do in th rmaindr of this sction. As w did in th prvious sction, w will first dscrib th algorithm for th spcial CQs Q (dfind in (3)), and considr gnral star CQs latr. W fix th input I and a = (a 1,..., a ). Rcall that for a tupl d = (d 1,..., d ), a d- joining constant is a constant b Const such that R i (b, d i ) I for all i = 1,...,. W ma th assumption that for ach fact R i(b, d) of I, th constant b is an a-joining constant. Thr is no loss of gnrality in maing this assumption, sinc thr is no rason to dlt a fact R i (b, d) if b is not an a-joining constant; hnc, th xistnc of such R i (b, d) can only incras th approximation ratio that w achiv by th algorithm. For a tupl d Q (I), w dnot by JC (d) th st of all th d-joining constants. Not that our assumption abov implis that JC (d) JC (a) for all d Q (I). Lt us first formulat MaxDP Q as an intgr linar program (LP). For vry a-joining constant b and indx i {1,..., }, w hav th variabl Xi b that gts valus in {0, 1}. W intrprt Xi b = 1 as saying that th fact R i (b, a i ) should b rmovd. So, w will hav th following constraints which nsur that th rsulting sub-instanc is a solution. Not that [] is a shorthand notation for {1,..., }. b JC (a) X Xi b = 1 i=1 b JC (a), i [] X b i {0, 1} Nxt, w construct th objctiv function. Suppos that d = (d 1,..., d ) is a tupl in Q (I). W dfin th variabl Y d that gts th valu 1 if d survivs (i.., blongs to Q (J)), and 0 othrwis. For that, w dnot by d a th st of indics i [], such that d i = a i. For xampl, if a = (,,, ) and d = (,,, ), thn d a = {1, 4}. So, w hav th following constraint: d Q (I) 0 Y d = X X 1 A b JC (d) i []\(d a) Not that P i []\(d a) Xb i 1 mans that th fact R i(b, a i) that w dlt is such that a i d i, and hnc, non of th R j(b, d j) is dltd (and thn d survivs). Finally, th goal is to maximiz th sum of th Y d. Figur 6 shows th program LP(I, a), which is th LP rlaxation of th intgr LP. X b i

10 Th algorithm for MaxDP Q, calld RRLP (I, a), is dscribd by th psudo-cod of Figur 7. Th algorithm first solvs LP(I, a), and as a rsult, gts an optimal (fractional) assignmnt for ach Xi b and Y d. Li Grdy (I, a), this algorithm constructs a sub-instanc J of I and rturns J in th last lin. Still similarly to Grdy (I, a), for ach a-joining constant b, th algorithm slcts an indx i [] and dlts from J th fact R i(i, a i). Th diffrnc btwn th algorithms is in th way i is chosn. Hr, w apply th standard action in randomizd rounding, namly, i is picd randomly and indpndntly from [], whr th probability of th indx j is Xj b. Not that th constraints of LP(I, a) nsur that, for a spcific b, th Xi b constitut a probability distribution ovr []. Nxt, w prov th corrctnss of RRLP (I, a). Th following lmma shows that th algorithm rturns a solution, and that its running tim is polynomial. Th proof is straightforward. In particular, as notd bfor Lmma 5. about Grdy, for ach a-joining constant b th rturnd instanc J misss R i(b, a i) for som (actually, for xactly on) i []. Lmma 5.6. RRLP (I, a) rturns a solution, and trminats in polynomial tim. Nxt, w show that RRLP (I) is a randomizd (1 1 )- approximation. Th proof is basd on th following lmma, which stats that a tupl d Q(I) survivs with a probability of at last (1 1 )Y d. Lmma 5.7. Considr an xcution of RRLP (I, a) that rsults in a random solution J, and lt d Q (I). Pr (d Q (J)) (1 1 )Y d. Basd on Lmma 5.7, w nxt prov that RRLP (I) is indd a randomizd (1 1 )-approximation. Thorm 5.8. Considr an xcution of RRLP (I, a) that rsults in a random solution J, and lt J opt b an optimal solution. Thn E[ Q (J) ] (1 1 ) Q (J opt). Proof. Considr th xcution of LP(I, a) in Lin 3 of RRLP (I, a). Lt M b th sum P d Q (I) Y d. W.l.o.g., w can assum that in J opt it holds that for all a-joining constants b, xactly on R i(b, a i) is missing. Thn J opt dfins a solution for LP(I, a), and thrfor, M Q (J opt). On th othr hand, from Lmma 5.7 and th linarity of xpctation w hav that E[ Q (J) ] = X Pr(d Q (J)) d Q (I) (1 1 ) X d Q (I) Y d = (1 1 )M Thrfor, E[ Q (J) ] (1 1 ) Q (J opt ), as claimd. W now considr gnral star CQs without slf joins. As w notd bfor Thorm 5.5, thr is a simpl approximationprsrving (and polynomial-tim) rduction from th problm MaxDP Q, whr Q is a star CQ without slf joins, to MaxDP Q, whr = atoms(q). Hnc, Thorm 5.8 immdiatly implis th following rsult. Thorm 5.9. Lt Q b a star CQ without slf joins. Thr is a randomizd (1 1 )-approximation for MaxDP Q, with a polynomial running tim. 5.3 Byond Star CQs In this sction, w xtnd Thorm 5.9 to th class of xistntially star CQs, which gnralizs th class of star CQs without slf joins. Intuitivly, in an xistntially star CQ th star rquirmnt is rstrictd to th xistntial variabls of th qury. Mor formally, lt Q b a CQ. W dnot by Var (Q) th st of xistntial join variabls of Q. W say that Q is xistntially star if for vry atom φ of Q, ithr vry variabl of Var (Q) occurs in Q, or non of thm dos. Exampl Considr th following CQ: Q(y 1, y, y 3, y 4 ) : R(x 1, y 1, y ), S(x 1, y, y 3 ), T (y 3, y 1, x ) Th CQ Q is xistntially star, sinc Var (Q) = {x 1}, and vry atom ithr contains x 1 or not. Actually, by th sam argumnt, vry CQ that has at most on xistntial join variabl is xistntially star. Nxt, w giv a short ovrviw of how w handl xistntially star CQs without slf joins. W dnot by Q th CQ that compriss all th atoms φ of Q having Var (Q) Var(φ). Not that if Q is xistntially star, thn Q is also xistntially star. Also obsrv that th arity of Q can b strictly largr than that of Q. As an xampl, for th CQ Q of Exampl 5.10, th CQ Q is: Q (y 1, y, y 3 ) : R(x 1, y 1, y ), S(x 1, y, y 3 ) Not that th arity of Q is 4, whil that of Q is 3. Lt Q b an xistntially-star CQ Q without slf joins. Our gnral approach to approximating MaxDP Q is as follows. Instad of approximating MaxDP Q, w approximat MaxDP Q ; furthrmor, instad of using th input tupl a of MaxDP Q, for MaxDP Q w us th rstriction of a to th had variabls of Q. Finally, w viw vry occurrnc of a had join variabl as a distinct had variabl, and thus assum that vry join variabl is xistntial. Hnc, w trat Q as if it is a star CQ, and thn w apply Thorm 5.9, to gt a solution J. Thr ar two main problms with th abov approach. First, by rstricting to Q and ignoring th fact that had variabls can b join variabls, whn solving MaxDP Q w may nd up saving tupls of Q (J) that do not giv ris to any tupl of Q(J), whil liminating tupls of Q (I) that giv ris to multipl tupls of Q(I). To handl that, w considr again th program LP(I, a) of Figur 6, and obsrv that w can assign a wight w(d) to ach variabl Y d. That is, th objctiv function can b as follows. X maximiz w(d) Y d d Q (I) Indd, w ar abl to handl th first problm by using propr wights w(d). Lt us call th final algorithm that rducs MaxDP Q to MaxDP Q and uss wights as dscribd abov th xtndd RRLP. Unfortunatly, th xtndd RRLP dos not guarant a propr approximation, du to a scond problm, which is th following. By rstricting to Q instad of Q, w ignor th φ-facts of I for φ atoms(q) \ atoms(q ). But it may still b th cas that dlting facts among thos φ-facts is ncssary to obtain a propr approximat solution. As an xampl, considr th following xistntially-star CQ. Q(y 1, y, y 3 ) : R 1 (x, y 1 ), R (x, y ), R 3 (y, y 3 )

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

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

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

Maximizing Conjunctive Views in Deletion Propagation

Maximizing Conjunctive Views in Deletion Propagation Maximizing Conjunctive Views in Deletion Propagation Extended Version Benny Kimelfeld Jan Vondrák Ryan Williams IBM Research Almaden San Jose, CA 9510, USA {kimelfeld, jvondrak, ryanwill}@us.ibm.com ABSTRACT

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

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

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

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

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

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

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

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

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

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

(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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Finding low cost TSP and 2-matching solutions using certain half integer subtour vertices

Finding low cost TSP and 2-matching solutions using certain half integer subtour vertices Finding low cost TSP and 2-matching solutions using crtain half intgr subtour vrtics Sylvia Boyd and Robrt Carr Novmbr 996 Introduction Givn th complt graph K n = (V, E) on n nods with dg costs c R E,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Stochastic Submodular Maximization

Stochastic Submodular Maximization Stochastic Submodular Maximization Arash Asadpour, Hamid Nazrzadh, and Amin Sabri Stanford Univrsity, Stanford, CA. {asadpour,hamidnz,sabri}@stanford.du Abstract. W study stochastic submodular maximization

More information

Approximation and Inapproximation for The Influence Maximization Problem in Social Networks under Deterministic Linear Threshold Model

Approximation and Inapproximation for The Influence Maximization Problem in Social Networks under Deterministic Linear Threshold Model 20 3st Intrnational Confrnc on Distributd Computing Systms Workshops Approximation and Inapproximation for Th Influnc Maximization Problm in Social Ntworks undr Dtrministic Linar Thrshold Modl Zaixin Lu,

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

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

Combinatorial Networks Week 1, March 11-12

Combinatorial Networks Week 1, March 11-12 1 Nots on March 11 Combinatorial Ntwors W 1, March 11-1 11 Th Pigonhol Principl Th Pigonhol Principl If n objcts ar placd in hols, whr n >, thr xists a box with mor than on objcts 11 Thorm Givn a simpl

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

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

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

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

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

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

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

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

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

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

Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers Roy D. Yates and David J.

Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers Roy D. Yates and David J. Probability and Stochastic Procsss: A Frindly Introduction for Elctrical and Computr Enginrs Roy D. Yats and David J. Goodman Problm Solutions : Yats and Goodman,4.3. 4.3.4 4.3. 4.4. 4.4.4 4.4.6 4.. 4..7

More information

1 Isoparametric Concept

1 Isoparametric Concept UNIVERSITY OF CALIFORNIA BERKELEY Dpartmnt of Civil Enginring Spring 06 Structural Enginring, Mchanics and Matrials Profssor: S. Govindj Nots on D isoparamtric lmnts Isoparamtric Concpt Th isoparamtric

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

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

Mor Tutorial at www.dumblittldoctor.com Work th problms without a calculator, but us a calculator to chck rsults. And try diffrntiating your answrs in part III as a usful chck. I. Applications of Intgration

More information

Limiting value of higher Mahler measure

Limiting value of higher Mahler measure Limiting valu of highr Mahlr masur Arunabha Biswas a, Chris Monico a, a Dpartmnt of Mathmatics & Statistics, Txas Tch Univrsity, Lubbock, TX 7949, USA Abstract W considr th k-highr Mahlr masur m k P )

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

Elements of Statistical Thermodynamics

Elements of Statistical Thermodynamics 24 Elmnts of Statistical Thrmodynamics Statistical thrmodynamics is a branch of knowldg that has its own postulats and tchniqus. W do not attmpt to giv hr vn an introduction to th fild. In this chaptr,

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

First order differential equation Linear equation; Method of integrating factors

First order differential equation Linear equation; Method of integrating factors First orr iffrntial quation Linar quation; Mtho of intgrating factors Exampl 1: Rwrit th lft han si as th rivativ of th prouct of y an som function by prouct rul irctly. Solving th first orr iffrntial

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

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

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

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

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

Separating principles below Ramsey s Theorem for Pairs

Separating principles below Ramsey s Theorem for Pairs Sparating principls blow Ramsy s Thorm for Pairs Manul Lrman, Rd Solomon, Hnry Towsnr Fbruary 4, 2013 1 Introduction In rcnt yars, thr has bn a substantial amount of work in rvrs mathmatics concrning natural

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

Differentiation of Exponential Functions

Differentiation of Exponential Functions Calculus Modul C Diffrntiation of Eponntial Functions Copyright This publication Th Northrn Albrta Institut of Tchnology 007. All Rights Rsrvd. LAST REVISED March, 009 Introduction to Diffrntiation of

More information

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis Middl East Tchnical Univrsity Dpartmnt of Mchanical Enginring ME 43 Introduction to Finit Elmnt Analysis Chaptr 3 Computr Implmntation of D FEM Ths nots ar prpard by Dr. Cünyt Srt http://www.m.mtu.du.tr/popl/cunyt

More information

Tight Bounds on the Round Complexity of the Distributed Maximum Coverage Problem

Tight Bounds on the Round Complexity of the Distributed Maximum Coverage Problem Tight Bounds on th Round Complxity of th Distributd Maximum Covrag Problm Sphr Assadi Sanjv Khanna Abstract W study th maximum k-st covrag problm in th following distributd stting. A collction of input

More information

Alpha and beta decay equation practice

Alpha and beta decay equation practice Alpha and bta dcay quation practic Introduction Alpha and bta particls may b rprsntd in quations in svral diffrnt ways. Diffrnt xam boards hav thir own prfrnc. For xampl: Alpha Bta α β alpha bta Dspit

More information

Electrical Flows, Laplacian Systems, and Faster Approximation of Maximum Flow in Undirected Graphs

Electrical Flows, Laplacian Systems, and Faster Approximation of Maximum Flow in Undirected Graphs Elctrical Flows, Laplacian Systms, and Fastr Approximation of Maximum Flow in Undirctd Graphs Paul Christiano MIT Jonathan A. Klnr MIT Alksandr Mądry MIT Shang-Hua Tng Univrsity of Southrn California Octobr

More information

Linear-Phase FIR Transfer Functions. Functions. Functions. Functions. Functions. Functions. Let

Linear-Phase FIR Transfer Functions. Functions. Functions. Functions. Functions. Functions. Let It is impossibl to dsign an IIR transfr function with an xact linar-phas It is always possibl to dsign an FIR transfr function with an xact linar-phas rspons W now dvlop th forms of th linarphas FIR transfr

More information

A Maximizing Conjunctive Views in Deletion Propagation

A Maximizing Conjunctive Views in Deletion Propagation A Maximizing Conjunctive Views in Deletion Propagation Benny Kimelfeld, IBM Research Almaden Jan Vondrák, IBM Research Almaden Ryan Williams, Stanford University In deletion propagation, tuples from the

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

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

1 A lower bound. Lecture notes: Online bipartite matching algorithms

1 A lower bound. Lecture notes: Online bipartite matching algorithms Cornll Univrsity, Fall 217 Lctur nots: Onlin bipartit matching algorithms CS 682: Algorithms 6 8 Spt In practic whn dsigning algorithms, it is oftn th cas that th input is a stram of data arriving ovr

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

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

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

Economics 201b Spring 2010 Solutions to Problem Set 3 John Zhu

Economics 201b Spring 2010 Solutions to Problem Set 3 John Zhu Economics 20b Spring 200 Solutions to Problm St 3 John Zhu. Not in th 200 vrsion of Profssor Andrson s ctur 4 Nots, th charactrization of th firm in a Robinson Cruso conomy is that it maximizs profit ovr

More information

Vishnu V. Narayan. January

Vishnu V. Narayan. January A 17 12 -approimation algorithm for 2-rt-connctd spanning subgraphs on graphs with minimum dgr at last arxi:1612.047902 [cs.ds] 17 Jan 2017 Vishnu V. Naraan Januar 17 2017 W obtain a polnomial-tim 17 -approimation

More information

Hydrogen Atom and One Electron Ions

Hydrogen Atom and One Electron Ions Hydrogn Atom and On Elctron Ions Th Schrödingr quation for this two-body problm starts out th sam as th gnral two-body Schrödingr quation. First w sparat out th motion of th cntr of mass. Th intrnal potntial

More information

Solution of Assignment #2

Solution of Assignment #2 olution of Assignmnt #2 Instructor: Alirza imchi Qustion #: For simplicity, assum that th distribution function of T is continuous. Th distribution function of R is: F R ( r = P( R r = P( log ( T r = P(log

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