Answering Queries Using Views with Arithmetic. comparisons.

Size: px
Start display at page:

Download "Answering Queries Using Views with Arithmetic. comparisons."

Transcription

1 Answeing Queies Using Views with Aithmetic Compaisons Foto Afati Electical and Computing Engineeing National Technical Univesity Athens, Geece Chen Li Infomation and Compute Science Univesity of Califonia Ivine, CA Pasenjit Mita Depatment of Electical Engineeing Stanfod Univesity, CA ABSTRACT We conside the poblem of answeing queies using views, whee queies and views ae conjunctive queies with aithmetic compaisons (CQACs) ove dense odes. Pevious wok only consideed limited vaiants of this poblem, without giving a complete solution. We have developed a novel algoithm to obtain maximally-contained ewitings (MCRs) fo queies having left (o ight) semi-inteval-compaison pedicates. Fo semi-inteval queies, we show that the language of finite unions of CQAC ewitings is not sufficient to find a maximally-contained solution, and identify cases whee datalog is sufficient. Finally, we show that it is decidable to obtain equivalent ewitings fo CQAC queies. 1. INTRODUCTION In many data-management applications, such as infomation integation [4, 11, 18, 20, 25, 26, 27, 33], data waehousing [31], web-site designs [15], and quey optimization [9], the poblem of answeing queies using views [24] has taken on special significance. The poblem can be stated as follows: given a quey on a database schema and a set of views ove the same schema, can we answe the quey using only the answes to the views? Most of the ecent wok has addessed the poblem when both queies and views ae conjunctive. See [23] fo a good suvey. In most commecial scenaios, uses equie the flexibility to pose queies using conjunctive queies along with aithmetic compaisons (e.g., <,») between vaiables and constants that can take anyvalue fom a dense domain (e.g., eal numbes). Similaly, views ae also descibed using conjunctive queies with aithmetic compaisons. Although pio eseach has addessed the issue of containment of conjunctive queies with inequalities [17, 21], not many esults ae known on the poblem of answeing queies with inequality pedicates using views. When answeing queies using views, we often need to Pemission to make digital o had copies of all o pat of this wok fo pesonal o classoom use is ganted without fee povided that copies ae not made o distibuted fo pofit o commecial advantage and that copies bea this notice and the full citation on the fist page. To copy othewise, to epublish, to post on seves o to edistibute to lists, equies pio specific pemission and/o a fee. PODS 2002, Madison, Wisconsin, USA Copyight 2002 ACM /97/05...$5.00. find equivalent ewitings fo a quey [3, 24], o a maximallycontained ewiting (MCR) [1, 29]. EXAMPLE 1.1. Conside the following quey Q 1, and views v 1 and v 2. Q 1(A) :- (A);A <4 v 1(Y; Z) :- (X);s(Y; Z);Y» X; X» Z v 2(Y; Z) :- (X);s(Y; Z);Y» X; X < Z The following quey P is a contained ewiting (CR) of the quey Q 1 using v 1: P (A) :- v 1(A; A);A <4 To see why, suppose we expand this quey by eplacing the view subgoal v 1(A; A) by its definition. We get the expansion of P : P (A) :- (X);s(A; A);A» X; X» A; A < 4 Thus we can equate X and A, and the expansion is contained in Q 1. Notice that the pesence of the compaison pedicates affects the existence of the ewiting. Although v 1 and v 2 diffe only on thei second inequalities, v 2 cannot be used to answe Q 1, since vaiable X of (X) in v 2 cannot be expoted" in its head, hence constaint A < 4 cannot be enfoced. On the othe hand, P is an equivalent ewiting (ER) of the following quey: Q 0 1(A) :- (A);s(A; A);A<4 EXAMPLE 1.2. The following quey and views show that thee ae cases whee thee is no maximally-contained ewiting that is a finite union of conjunctive queies with aithmetic compaisons. Q 2() :- e(x; Z);e(Z; Y );X >5;Y < 7 v 1(X; Y ) :- e(x; Z);e(Z; Y );Z >5 v 2(X; Y ) :- e(x; Z);e(Z; Y );Z <7 v 3(X; Y ) :- e(x; Z);e(Z; Y ) We can show that fo any positive intege k>1, the following is a CR: P k () :- v 1(X; W 1);v 3(W 1;W 2);v 3(W 2;W 3);::: ; v 3(W k 1 ;W k );v 2(W k ;Y) 2

2 We can show that thee is no finite union of conjunctive queies with aithmetic compaisons that contains all these P k 's. It is easy to obseve, howeve, that the following ecusive datalog pogam is a CR of the quey that contains all the P k 's: Q 2() :- v 1(X; W);T(W;Z);v 2(Z; Y ) T (W;W) :- T (W;Z) :- T (W;U);v 3(U; Z) In this pape we study the poblem of finding ewitings of a quey using views, when the quey and views ae conjunctive with compaisons (e.g., <,», >, ), called CQAC queies. We conside both equivalent queies (ERs) and contained ewitings (CRs). We fist eview peliminay esults in the liteatue on this poblem (Section 2). We give a esult on the existence of a single containment mapping between two CQAC queies (Theoem 2.3), which is stonge than the esult in [17, 21], and it leads to the algoithm in Section 4. In Section 3, we study the decidability of finding equivalent ewitings (ERs) and maximally-contained ewitings (MCRs) in the space of finite unions of CQACs. We fist extend the decidability esult in [34] to show that it is decidable to find ERs. Fo MCRs, in the case whee all view vaiables ae distinguished, we show that it is decidable whethe thee exists an MCR in the language of finite unions of CQACs. In Section 4, we conside the poblem of geneating MCRs in the case whee queies ae left-semi-inteval (LSI) o ightsemi-inteval (RSI), and views have geneal compaisons. We pesent an algoithm fo geneating MCRs efficiently. We show the subtleties of finding MCRs in the pesence of compaisons, which make ou algoithm diffeent fom pevious algoithms in the liteatue. In Section 5, we fist give the following obsevation. When the quey is conjunctive with semi-inteval aithmetic compaisons (some of which ae left and some ight semi-inteval compaisons), then thee is no MCR in the language of finite unions of CQACs, even if the views have no compaison pedicates. Then we conside a subcase whee thee exists an MCR in datalog with semi-inteval pedicates. We show that quey containment in this case can be educed to the containment of a CQ in a datalog quey. Based on this esult, we develop an algoithm fo finding MCRs. We also obtain a esult of independent inteest, that is, the containment poblem is in NP fo this special case. In the est of the pape, we take the open-wold assumption (OWA) [13]. That is, the views do not guaantee that they expot all tuples in the wold that satisfy thei definitions. Instead, views expot only a subset of such tuples. Due to space limitations, we do not povide all the poofs of the lemmas and theoems. Some esults ae explained in the complete vesion of this pape [2]. 1.1 Related Wok Ou poblem is closely elated to testing quey containment. In [8] the poblems of containment, minimization, and equivalence of CQs ae shown NP-complete. In [21], it is shown that containment of CQs with inequality compaison pedicates is in Π P 2, wheeas when only left o ight semi-inteval compaisons ae used, the containment poblem is in NP. In [35], containment fo CQs with inequality compaison pedicates is poven to be Π P 2 -complete. In [21], 2 seaching fo othe classes of CQs with inequality compaison pedicates fo which containment is in NP is stated as an open poblem. [22] studies the computational complexity of the quey-containment poblem of queies with (6=). Containment of a CQ in a datalog quey is shown to be EXPTIME-complete [12, 7]. Containment among ecusive and nonecusive datalog queies is studied in [10]. The poblem of answeing queies using views has been studied extensively. Table 1 summaizes the esults pesented in this pape, and othe known esults in the liteatue. (Please see Table 2 fo the notations.) [36] studied conjunctive queies with aithmetic compaisons in the famewok of finding whethe a conjunctive quey always poduces an empty elation on database instances satisfying a given set of constaints. [5, 6] deal with the poblem of answeing CQs ove desciption logics using views expessed in desciption logics. Howeve, the diffeence in expessiveness of desciption logics and the fact that it allows only unay o binay pedicates make thei poblem diffeent fom the one of conjunctive queies with aithmetic compaisons. 2. PRELIMINARIES Conjunctive Queies with Compaisons We focus on conjunctive queies and views with aithmetic compaisons of the following fom: h( μ X):-g1( μ X1);::: ;g n( μ Xn);C 1;::: ;C m The head h( X) μ epesents the esults of the quey. The vaiables X μ ae called distinguished vaiables. Each gi( X1) μ in the body is an odinay subgoal. Each C i is an aithmetic compaison in the fom of A 1 A 2," whee A 1 and A 2 ae vaiables o constants. If they ae vaiables, they appea in the odinay subgoals. Opeato " is <,», >, o. Fo sake of simplicity, we use CQ" to epesent a conjunctive quey, AC" fo an aithmetic compaison, and CQAC" fo a conjunctive quey with aithmetic compaisons. If a CQAC is witten as Q = Q 0 + fi It means that fi" is the ACs of Q, and Q 0" is the quey obtained by deleting the ACs fom Q. Quey Containment and Equivalence A quey Q 1 is contained in a quey Q 2, denoted Q 1 v Q 2,if fo any database D, the set of answes to Q 1 is a subset of the answes to Q 2. The two queies ae equivalent, denoted Q 1 Q 2,ifQ 1 v Q 2 and Q 2 v Q 1. Chanda and Melin [8] showed that fo two CQs Q 1 and Q 2, Q 1 v Q 2 if and only if thee is a containment mapping fom Q 2 to Q 1. Fo containment between CQACs, [17, 21] gave the following theoem. 1 Theoem 2.1. Let Q 1 = Q 10 + fi 1 and Q 2 = Q 20 + fi 2 be two CQACs, whee each fi i (i =1; 2) does not imply =" estictions. Let μ 1;::: ;μ k be all the containment mappings fom Q 10 to Q 20. Then Q 2 v Q 1 if and only if: fi 2 ) μ 1(fi 1) _ :::_ μ k (fi 1) (1) 1 In [17], they assume that no vaiable appeas twice among thei odinay subgoals, and no constant appeas in thei odinay subgoals. Theoem 2.1 is a vaiation of thei esult.

3 Quey Views MCR Refeences CQ CQ union of CQs [16, 25, 28, 29] Datalog CQ Datalog [14] CQ with LSI, RSI CQ with LSI, RSI union of CQs with LSI, RSI [29] CQ(6=) CQ co-np-had (data complexity) [1] CQ with compaisons CQ with compaisons union of CQs with compaisons Section 3 (all vaiables distinguished) CQ with LSI, RSI CQ with compaisons union of CQs with LSI, RSI Section 4 CQ with LSI1, RSI1 CQ with SI Datalog (SI) Section 5 Table 1: Results on MCRs i.e., fi 2 logically implies (denoted )") the disjunction of the images of fi 1 unde these mappings. 2 In the theoem we assume that the ACs do not imply =" estictions. That is, they do not imply any AC of the fom X = A, whee X isavaiable and A is a vaiable o a constant. This assumption is not moe estictive than the esult in [17], because we can do a pepocessing on any CQAC quey, and identify any set of vaiables that ae implied equal. Then we can eplace these equal vaiables with one of them. Fo example, fo quey q(x; Z) :-e(x; Y );e(y;z);x» Y; Y» X Its ACs imply X = Y. So the quey can be equivalently witten as: q(x; Z) :-e(x; X);e(X; Z) Also notice that the OR opeation ( _") in Equation 1 is citical, since thee might not be a single mapping μ i fom Q 10 to Q 20, such that fi 2 ) μ i(fi 1). Answeing Queies Using Views The poblem of answeing queies using views [24] is as follows. Given a quey on a database schema and views ove the same schema, can we answe the quey using only the answes to the views? The following notations define the poblem fomally. Definition 2.1. (Expansion) The expansion of a quey P on a set of views V, denoted byp exp, is obtained fom P by eplacing all the views in P with thei coesponding base elations. Nondistinguished vaiables in a view ae eplaced by fesh vaiables in P exp. 2 Let Q be a quey and V be a set of views. 1. A quey P is a contained ewiting ( CR" fo shot) of quey Q using V if P uses only the views in V, and P exp v Q. That is, P computes a patial answe to the quey A contained ewiting P of Q is an equivalent ewiting ( ER" fo shot) of Q using V if P exp Q. 3. Given a language L, a quey P is a maximally-contained ewiting ( MCR" fo shot) of Q using the views w..t. the language L if: (a) P 2 L is a contained ewiting of Q; and 2 In the est of the pape, we use ewitings" to mean contained ewitings." (b) Fo evey contained ewiting P 1 2 L of Q, P 1 v P as queies. In this pape, we focus on the languages of finite unions of CQACs, and Datalog with aithmetic compaisons. Seveal algoithms have been developed in the liteatue fo answeing queies using views, such as the bucket algoithm [25, 16], the invese-ule algoithm [30, 14], and the algoithms in [3, 28, 29]. The complexity of answeing queies using views is studied in [24, 1]. In paticula, it has been shown that the poblem of finding a ewiting of a quey using views is NP-had, even if the quey and views ae conjunctive. In this pape we study how to constuct ERs and MCRs of a CQAC quey using CQAC views. Notice that a CR can be in a language diffeent fom that of the quey and views. Existence of a Single Containment Mapping Theoem 2.1 is a fundamental esult to solve ou poblem. Howeve, the union opeation in the logical implication makes the poblem much hade than the case whee the quey and views ae puely CQs. In paticula, the following example shows that it is not clea how to constuct the ACs in an MCR, since its ACs could be quite diffeent fom those in the quey and views. Conside the following two CQACs, illustated by Figue 1. Q 1() :- (X 1;X 2);(X 2;X 3);(X 3;X 4); (X 4;X 5);(X 5;X 1);X 1 <X 2 Q 2() :- (X 1;X 2);(X 2;X 3);(X 3;X 4); (X 4;X 5);(X 5;X 1);X 1 <X 3 X 5 X 4 X 1 X 3 X 2 X 5 X 4 X 1 Q 1 : X 1 <X 2 Q 2 : X 1 <X 3 X 3 X 2 Figue 1: Two equivalent CQACs. These two queies have same odinay subgoals but diffeent ACs. We can show that these two queies ae in fact equivalent. Now conside the following two views that ae decomposed" fom Q 2. v 1(X 1;X 3) :- (X 1;X 2);(X 2;X 3) v 2(X 1;X 3) :- (X 3;X 4);(X 4;X 5);(X 5;X 1) The following is an ER of Q 1 using the views: Q 1() :- v 1(X 1;X 3);v 2(X 1;X 3);X 1 <X 3

4 Notice that the AC X 1 <X 3" in this ewiting is diffeent fom the AC X 1 <X 2"inQ 1. Ou poblem becomes easie to solve if a single containment mapping can pove containment between two CQACs. One such case is whee CQACs have ACs that ae left o ight semi-inteval. A CQAC is called left semi-inteval ( LSI" fo shot), if all its ACs ae of the fom X < c o X» c, whee X is a vaiable, and c is a constant. A ight semi-inteval CQAC ( RSI quey" fo shot) is defined similaly. The following theoem is fom [21]. 3 Theoem 2.2. Let Q 1 = Q 10 + fi 1 and Q 2 = Q 20 + fi 2 be two LSI queies. Then Q 2 v Q 1 if and only if thee isa single containment mapping μ fom Q 10 to Q 20, such that fi 2 ) μ(fi 1). 2 Ou fist contibution in this pape is to extend this theoem by allowing fi 2 to include any ACs. Theoem 2.3. Let Q 1 = Q 10 + fi 1 be an LSI quey, and Q 2 = Q 20 + fi 2 be a CQAC quey. Then Q 2 v Q 1 if and only if thee isasingle containment mapping μ fom Q 10 to Q 20, such that fi 2 ) μ(fi 1). 2 The diffeence between these two theoems is that Theoem 2.3 allows Q 2 to have geneal ACs. This theoem is a coollay of the following lemma. Lemma 2.1. Let D 1;:::;D n be conjunctions of LSI ACs, and E be aconjunction of geneal ACs. Then E ) (D 1 _ :::_ D n) if and only if E ) D i fo some 1» i» n. 2 The poof is simila to that of Theoem 2.2 in [17]. The If" pat is staightfowad. The Only If" pat uses the following esult. Fo any constants a 1 and a 2 fo a vaiable X i, and constants b 1 and b 2 foavaiable X j,wehave: (a 1 b 1) ^ (a 2 b 2) ) max(a 1;a 2) max(b 1;b 2) Symbol CQ AC CQAC ER CR MCR SI LSI RSI SI1 Meaning Conjunctive Quey Aithmetic Compaison Conjunctive Quey with ACs Equivalent Rewiting Contained Rewiting Maximally-Contained Rewiting Semi-inteval (X c, whee 2f<;»;>; g) Left-semi-inteval (X c, whee 2f<;»g) Right-semi-inteval (X c, whee 2f>; g) one LSI AC + seveal RSI ACs; o one RSI AC + seveal LSI ACs Table 2: Symbols. Table 2 summaizes the symbols used in this pape. 3. DECIDABILITY RESULTS In this section we study the decidability of finding ERs and MCRs of a CQAC quey using CQAC views. Fo ERs, The following decidability esult is fom [34]. 3 The esults on LSI queies in this pape ae also tue fo RSI queies. We focus on LSI queies fo sake of simplicity. Theoem 3.1. It is decidable whethe thee is a single- CQAC ER of a CQAC quey using CQAC views. 2 Poof. The key of the poof is to compae a CQAC quey Q with the expansion E of an ER P, which is a single CQAC. Suppose Q has s vaiables. We conside all 2 s odeings of the vaiables of Q that satisfy the compaisons in Q. Fo each total odeing, thee must be a containment mapping fom E to Q that peseves ode. Associate with each vaiable of E a list of the 2 s vaiables that each of these mappings sends the vaiable of E to. We define two vaiables of E ae equivalent" if thei lists ae the same. Since lists ae of length 2 s and each enty on the list has one of s values, thee ae at most s 2s equivalence classes. Design a new solution P 0 that equates all equivalent vaiables. P 0 is suely contained in P afte expansion, since all we did was equate vaiables, thus esticting P and E. Howeve, E 0, the expansion of P 0, has containment mappings to Q fo all odeings, since all we did was equate vaiables that always went to the same vaiable of Q anyway. Thus Q is contained in P 0. Since Q contains E, which contains E 0, it is also tue that E 0 is contained in E. Thus, P 0 is anothe ER of Q. Thus, thee is a doubly exponential bound on the numbe of subgoals in P 0, since thee ae only s 2s vaiables, and a finite numbe of pedicates each with finite aity. The conclusion is that we need to look only at some doubly-exponentially sized solutions. Coollay 3.1. The poblem of deciding whethe thee is an ER, which is a finite union of CQACs, of a CQAC quey using CQAC views is decidable. 2 Poof. (Sketch) We can extend the poof of Theoem 3.1 to the case whee an ER is a union of CQACs. The main idea is to conside all total odeings of the vaiables in the quey, and each coesponding quey is contained in one of the CQACs in the ER. Fo MCRs, we fist conside the case whee all view vaiables ae distinguished. Theoem 3.2. Given a CQAC quey Q, and a set V of CQAC views, such that all view vaiables ae distinguished, conside the ewiting language L of finite unions of CQACs. It is decidable if thee is an empty MCR (in L) ofq using V. In addition, such an MCR can be found in exponential time. 2 Poof. (Sketch) If thee is a CQAC CR P of Q using V,we can constuct a set of CRs whose union contains P. In addition, fo each of them, thee is a single containment mapping that poves containment in the quey. The latte is feasible because all view vaiables ae distinguished, and ACs can be enfoced on them. A consequence of a single containment mapping is that the numbe of odinay subgoals fo each of those CRs is bounded by the numbe of odinay subgoals of the quey. As illustated by the quey Q 2 in Section 1, if some view vaiables ae not distinguished, we might need ecusive datalog pogams to epesent MCRs. In Section 5 we will conside this case.

5 4. AN ALGORITHM FOR FINDING MCRS FOR LSI QUERIES In this section, we pesent a novel algoithm fo geneating maximally-contained ewitings fo left-semi-inteval (LSI) and ight-semi-inteval (RSI) queies using views with geneal aithmetic compaisons. We assume that the ACs in each view and quey cannot imply equalities. This assumption can be enfoced by ewiting the quey using a pepocessing step (See Section 2). In addition, the compaisons ae consistent, i.e., thee exists an assignment of constants to the vaiables, so that all the compaisons ae tue. To the best of ou knowledge, thee exists no published algoithm that ewites LSI queies using views that have aithmetic compaisons. Theoem 2.3 allows us to design such an algoithm. Ou algoithm shaes the same steps as the known algoithms in the liteatue [25, 28, 29]. That is, it fist adds views to buckets epesenting quey subgoals, and then constucts a ewiting by choosing views fom the buckets. In this section, we fist biefly eview existing algoithms, and then outline ou algoithm. 4.1 The MS Algoithms We fist eview the MiniCon algoithm [29] and the Shaed- Vaiable-Bucket algoithm [28], which shae simila steps. Thus we will efe them as the MS algoithms heetofoe. The MS algoithms have two steps. In the fist step, they map each quey subgoal to a view subgoal, and detemine if thee is a patial mapping fom the quey subgoal to the view subgoal. One impotant obsevation is the following. If a vaiable, say, X, appeas multiple times in the quey, and it maps to a nondistinguished view vaiable in a quey ewiting, then all the quey subgoals in which X occus must map to subgoals in the body of the view. X is called a shaed vaiable. [29] efes to the set of such quey subgoals that have to be mapped to subgoals fom one view (and the mapping infomation) as a MiniCon Desciption (MCD). We illustate the MS algoithms using the following example. Suppose we have thee pedicates, ca, loc, and colo. A tuple ca(c; d) means that a ca c is sold by deale d. A tuple loc(d; p) means that a deale d is located in place p. A tuple colo(a; b) means that a ca a has colo b. Conside the following quey and views. (We use uppe-case names fo pedicates and constants, and lowe-case names fo vaiables.) Q: q(c; L) :- ca(c; A);loc(A; L); colo(c; ed) V 1: v 1(X; Y ) :- ca(x; D);loc(D; Y ) V 2: v 2(W;Z) :- colo(w;z) Conside the fist quey subgoal g 1 = ca(c; A) and view V 1. The vaiable C maps to the view vaiable X. The shaed vaiable A maps to a nondistinguished view vaiable D. Theefoe, the MS algoithms ty to map all quey subgoals in which A occus to subgoals in view V 1. Vaiable A occus in the fist two quey subgoals, which map to the two subgoals in V 1 using the mapping fc! X; A! D; L! Y g Thus the algoithms ceate an MCD coesponding to quey subgoals g 1 and g 2, whee g 2 is the second quey subgoal. Similaly, we have an MCD fo the thid quey subgoal and view V 2. Table 3 shows the two MCDs ceated by the algoithms. MCD Quey subgoals View subgoals 1 ca(c; A);loc(A; L) V 1 : ca(x; D);loc(D; Y ) 2 colo(c; ed) V 2 : colo(w;z) Table 3: MCDs. We then combine the MCDs to fom the ewiting: q(c; L) :-v 1(C; L);v 2(C; ed) 4.2 Algoithm: RewiteLSIQuey We develop an algoithm, called RewiteLSIQuey," that finds an MCR of an LSI quey Q using views V, whee the views in V can have geneal ACs. It shaes the main steps of the MS algoithms. Howeve, the pesence of ACs intoduces additional complexity to the poblem. Ou algoithm is novel in the following aspects. 1. Some nondistinguished vaiables can be expoted" and then teated as distinguished vaiables (Section 4.3). 2. Thee ae seveal ways to satisfy the ACs in the quey (Section 4.4). Figue 2 shows the algoithm. In the next two subsections we will focus on the two novelties of ou algoithm. Algoithm RewiteLSIQuey Input: ffl Q: an LSI quey. ffl V : a set of CQAC views. Output: An MCR of Q using V. Method: Step 1: MCD Constuction fo each subgoal g in Q fo each view v 2 V, each subgoal g 0 in v: 1. Constuct a mapping μ i fom g to g 0 consideing expotable vaiables in g 0 as distinguished vaiables. (See Section 4.3.) 2. Constuct a least estictive set of head homomophisms H, such that 8h i 2 H, μ i is a mapping fom g to the expansion of g 0 in h i (v). 3. Fo each valid h i, ceate an MCD fo g. Step 2: Rewiting Constuction Select a set of MCDs such that thei quey subgoals ae disjoint, and they cove all the subgoals in Q. Fo each chosen set of MCDs, fom a CR P by joining thei views, and equating the diffeent distinguished view vaiables that one quey vaiable maps to. // Satisfy quey's ACs. (See Section 4.4.) Fo each AC X c"in Q: 1) If ACs in P aleady imply μ(x) c, then continue. 2) else, if possible, add ACs to P to satisfy μ(x) c. 3) else, mak this P as an invalid ewiting. Retun the union of all valid CRs. Figue 2: Algoithm: RewiteLSIQuey.

6 4.3 Expoting Nondistinguished Vaiables In the fist step of the algoithm, we check ifthee is a mapping fom a quey subgoal to a view subgoal. In Example 1.1, we expoted a nondistinguished view vaiable using the ACs in the view by equating it to anothe distinguished vaiable. Let an expoted view vaiable X be equated to a distinguished view vaiable Y. The view supplies values fo the distinguished view vaiable Y, and these values can be used to satisfy estictions on the distinguished quey vaiable that maps to X. Theefoe, while constucting the mapping in the fist step, we allow expotable nondistinguished view vaiables to be teated as distinguished view vaiables. In this subsection we discuss how we can expot a nondistinguished view vaiable. We fist eview the concept of head homomophisms [29]. A head homomophism of the head vaiables in a view is a patitioning of these vaiables, such that all the vaiables in each patition ae equated. Fo instance, in Example 1.1, ffy; Zgg and ffy g; fzgg ae two head homomophisms of the head vaiables of v 1. Notice that those vaiables not in the same patition still have the feedom to be equated. Definition 4.1. (expotable view vaiables) We say a nondistinguished vaiable X in a view v is expotable if thee is a head homomophism h on v, such that the inequalities in h(v) imply that X is equal to a distinguished vaiable in v. 2 To find expotable nondistinguished vaiables in a view v, we use the ACs in v to constuct its inequality gaph [21], denoted by G(v). That is, fo each compaison pedicate A B," whee is < o», weintoduce two nodes labeled A and B, and an edge labeled fom A to B. Clealy if thee is a path between the two nodes A and C, we have A» C. If thee is a <-labeled edge on any path between A and C, then A<C. We need the following concepts to show how to expot a nondistinguished view vaiable. Definition 4.2. (leq-set) Let X be a nondistinguished vaiable in a view v. The leq-set (less-than-o-equal-to set) of X, denoted by S» (v; X), includes all distinguished vaiables Y of v that satisfy the following conditions. Thee exists a path fom Y to X in the inequality gaph G(v), and all edges on all paths fom Y to X ae labeled». In addition, in all paths fom Y to X, thee is no othe distinguished vaiable except Y. 2 Coespondingly, we define the geq-set (geate-than-oequal-to set) of a vaiable X, denoted by S (v; X). The following lemma can help us decide if a view vaiable is expotable. Lemma 4.1. A nondistinguished vaiable X in view v is expotable iff both S» (v; X) and S (v; X) ae nonempty. 2 EXAMPLE 4.1. Conside the following view v. v(x 1;X 3;X 4;X 5;X 7;X 8) :- (X 2;X 6); s(x 1;X 3;X 4;X 5;X 7;X 8); X 1» X 2;X 2» X 3;X 4» X 5; X 5» X 6;X 6» X 7;X 8» X 6 Figue 3 shows the inequality gaph G(v). Fo the two nondistinguished vaiables, X 2 and X 6, we have:»» X 1 X 2 X 3»»» X 4 X 5 X 6 X 7» X 8 Figue 3: An inequality gaph G(v). S» (v; X 2)=fX 1g, S (v; X 2)=fX 3g. S» (v; X 6)=fX 5;X 8g, S (v; X 6)=fX 7g. Note that X 4 is not in S» (v; X 6), because X 5 lies in the path fom X 4 to X 6. 2 To expot a nondistinguished vaiable X, we can just equate any pai of vaiables (Y 1;Y 2), whee Y 1 2 S» (v; X) and Y 2 2 S (v; X). Then X becomes equal to Y 1 and Y 2,as ae all vaiables in the path fom Y 1 to Y 2. In the example above, X 2 is expoted by equating X 1 and X 3, coesponding to the following head homomophism: h 1 = ffx 1;X 3g; fx 4g; fx 5g; fx 7g; fx 8gg Similaly, the following head homomophisms can expot vaiable X 6. They coespond to equating X 5 and X 7, and equating X 8 and X 7, espectively. h 2 = ffx 5;X 7g; fx 1g; fx 3g; fx 4g; fx 8gg h 3 = ffx 8;X 7g; fx 1g; fx 3g; fx 4g; fx 5gg Notice that we could equate vaiables X 4 and X 7 to expot X 6. Howeve, the coesponding head homomophism h is moe estictive than h 3, since h equies X 4 = X 5, while h 2 allows X 4» X 5. To expot two nondistinguished vaiables, we need to combine thei coesponding head homomophisms. Fo instance, we can combine h 1 and h 2 above to fom the following moe estictive head homomophism: h 4 = ffx 1;X 3g; fx 5;X 7g; fx 4g; fx 8gg which expots and expots both vaiables X 2 and X 6. If a quey vaiable maps to two distinguished vaiables, a head homomophism is constucted to equate the two distinguished vaiables. Similaly, if a distinguished vaiable is equated to an expotable vaiable, o two expotable vaiables ae equated, the coesponding head homomophisms ae combined. Fo example, we can equate X 1 and X 5 in h 4 to have the following head homomophism: h 5 = ffx 1;X 3;X 5;X 7g; fx 4g; fx 8gg which equates the two nondistinguished vaiables X 2 and X 6. Hee is anothe example to show how to combine head homomophisms. Conside the following view: v(x 1;X 3;X 4):- (X 2;X 5);s(X 1;X 3;X 4); X 1» X 2;X 2» X 3;X 1» X 5; X 5» X 3;X 4» X 5 We can expot X 2 using the head homomophism: h 6 = ffx 1;X 3g; fx 4gg

7 and expot X 5 using eithe h 6 o h 7 = ffx 4;X 3g; fx 1gg Now let us conside the case whee both X 2 and X 5 need to be expoted in an MCD. Thee ae two ways to combine the head homomophisms to expot both vaiables: (1) h 6 and h 7; (2) h 6 and h 6. Clealy, the fist combination gives a homomophism that is moe estictive than the homomophism geneated in the second case. Theefoe, we conside only h 6(v) fo insetion into the MCD. In geneal, to expot seveal equied nondistinguished vaiables, we conside all possible combinations of the homomophisms that expot the vaiables, and choose the least estictive combinations. 4.4 Satisfying The Quey s Compaisons In the second step of the algoithm, we combine diffeent MCDs to fom a candidate CR, and then add compaisons to satisfy the ACs in the quey. In this subsection, we discuss how to satisfy the quey's aithmetic compaisons. Fo each candidate ewiting P, conside an AC A c in the quey. Suppose μ is the mapping fom the quey to the expansion of P, and μ maps A to a view vaiable X. Without loss of geneality, assume is < o». The expansion of the coesponding CR using P should imply the image of this estiction, i.e., X c. Thee ae thee possible cases to satisfy X c. 1. The ACs in the expansion of P aleady imply X c. 2. If X is a distinguished view vaiable, then we can just add an AC X c"top. 3. X is a nondistinguished vaiable. Thee is a view v of X in the MCDs of P, whose inequality gaph G(v) has the following popety. Thee is a path fom X to a distinguished vaiable Y, such that the labels of all the edges in the path ae eithe in < o». If the path contains a label <, we add Y» c. Othewise, we add Y c. Fo example, conside the following quey and views. Q(A) :- p(a);a <3 v 1(X 2) :- p(x 1);s(X 2);X 1 < 2 v 2(X 1) :- p(x 1) v 3(X 2;X 3) :- p(x 1);(X 2;X 3;X 4);X 1» X 3 v 4(X 2;X 3) :- p(x 1);(X 2;X 3;X 4);X 2» X 1; X 3» X 1;X 1» X 4 While mapping the quey subgoal p(a) to the view subgoal p(x 1) in view v 1, we have a patial mapping μ that maps vaiable A to X 1. Fo a ewiting that uses this view, its expansion should entail μ(a < 3), i.e., X 1 < 3. We satisfy this inequality using case (1), since the compaison pedicate X 1 < 2 in v 1 implies X 1 < 3. The compaison pedicate in v 2 belongs to case (2). Since vaiable X 1 is distinguished, we can add a compaison X 1 < 3. The compaison pedicate in v 3 belongs to case (3). In paticula, since v 2 has a compaison pedicate X 1» X 3, and X 3 is distinguished, we can just add X 3» 3 to satisfy the inequality X 1» 3. The compaison pedicates in v 4 do not belong to eithe case, thus v 4 cannot be used to cove the quey subgoal. Due to the compaison pedicates in the views, the final compaisons in a ewiting might not be sound. Fo example, afte combining MCDs fo diffeent quey subgoals, we may have a ewiting with compaisons Y <Z and Y >Z. In this case we can just discad this ewiting. Finally, we take the union of these ewitings fom diffeent combinations of MCDs, and fom an MCR of the quey using the views. Nowwe illustate how the complete algoithm woks using an example. Conside the following quey and views. Q(A) :- p(a; B);(C);A>5;B >3 v 1(X 1;X 2;X 3) :- p(x; Y );s(x 1;X 2;X 3);X 3» X; X» X 1;X» X 2;X 3» Y v 2(U) :- (U) We constuct the mapping fom the fist quey subgoal to the fist subgoal in v 1. Vaiable X needs to be expoted, since it is used in A > 5. The following head homomophisms can expot X. h 1 = ffx 1;X 3g; fx 2gg; h 2 = ffx 2;X 3g; fx 1gg: So we put v 1(A; X 2;A) and v 1(X 1;A;A) (coesponding to h 1 and h 2, espectively) into the two MCDs fo the fist quey subgoal. We also ceate an MCD fo the second quey subgoal and view v 2. Then we conside the combinations of these MCDs to fom CRs, and add necessay compaisons. Since B maps to view vaiable Y, its compaison B > 3 needs to be satisfied by Y. The ACs in view v 1 do not automatically satisfy Y > 3. Howeve, since Y X 3, we can use X 3 > 3 to satisfy it. Theefoe, we geneate an MCR that is a union of the following CRs: P 1 : Q(A) :-v 1(A; X 2;A);v 2(C);A>5;A>3 P 2 : Q(A) :-v 1(X 1;A;A);v 2(C);A>5;A>3 Optionally, we might emove the AC A > 3 fom the ewitings, since it is implied by A > 5. Note that the algoithm can be optimized by checking whethe the quey's compaison pedicates ae satisfied in Step 1 [2]. 4.5 Coectness of RewiteLSIQuey In this subsection, we pove the soundness and completeness of the RewiteLSIQ algoithm. The following theoem poves the soundness. Theoem 4.1. Given an LSI quey Q, and a set of CQAC views V, the RewiteLSIQuey algoithm geneates a union of CQACs that is contained in Q. 2 Poof. (Sketch) By Theoem 2.3, it suffices to show that fo each geneated contained ewiting P i in the MCR, thee exists a containment mapping μ fom Q to P exp i, such that fi(p exp i ) ) μ(fi(q)). Hee fi(q) and fi(p exp i ) ae the ACs of Q and P exp i, espectively. If the algoithm maps a quey vaiable to a nondistinguished view vaiable, then all occuences of X map to the same vaiable in the view in the coesponding MCD. If X occus in two MCDs, the algoithm only maps it to distinguished o expotable vaiables. In Step 2, these vaiables ae equated. Thus, thee exists a mapping μ fom the quey to the expansion of the ewiting. Note that P i is

8 constucted by choosing MCDs, whose sets of quey subgoals ae disjoint. That is, each quey subgoal is coveed by exactly one MCD. Thus combining the patial mappings fom the quey to the expansion of each MCD gives us the mapping μ. It emains to show that fi(p exp i ) ) μ(fi(q)). By constuction in step 2, fo each compaison in the quey, a contained ewiting geneated by the algoithm can guaantee to satisfy this compaison. Theefoe, P exp i v Q. The following theoem poves the completeness. Theoem 4.2. Let R be a single-cqac ewiting of an LSI quey Q using views V. Thee exists a containment ewiting R 0 in the union of CRs geneated by the RewiteL- SIQuey algoithm, such that R v R 0. 2 Poof. (Sketch) Since R is a ewiting of Q, R exp v Q. Thus, thee exists a mapping μ fom Q to R exp. Let μ map a quey subgoal g to g 0 in R exp. Assume g 0 is deived fom h(v) fo some head homomophism h on a view v. The algoithm geneates the (patial) mapping fom g to g 0 in the the MCD-constuction step. The patial mapping is at least as elaxed as μ. The combination of such patial mappings constucts a mapping fom the quey to the expansion of a ewiting, such that the combined mapping is still at least as elaxed as μ. Futhemoe, we can pove that the algoithm fo expoting vaiables and satisfying the ACs in the quey ae sound and complete. They can guaantee that no valid patial mapping is missed in the MCD-constuction step. The existence of the moe elaxed mapping allows us to pove that RewiteLSIQuey will geneate a CR R 0 that contains R. 4.6 Efficiency of RewiteLSIQuey The RewiteLSIQuey algoithm shaes the same basic steps as the MS algoithms. We analyze the cost of the exta phases in the algoithm in the pesence of ACs. To expot a vaiable X of a view v, we need to compute the S» (v; X) and S (v; X), which takes linea time in tems of the numbe of view vaiables. The numbe of head homomophisms to expot such avaiable can be quadatic with espect to the numbe of view vaiables. Finding the set of the least estictive head homomophisms can be exponential with espect to the numbe of distinguished view vaiables. Howeve, the numbe of head homomophisms tend to be small in pactice. Satisfying the ACs of the quey vaiables can be done in time polynomial with espect to the numbe of view vaiables, since it involves finding paths to distinguished vaiables in the inequality gaph. In summay, the phases we added ove those in the MS algoithms have eithe polynomial o exponential complexity. Since the wost-case complexity of the MS algoithms is exponential, ou algoithm has the same complexity. 5. RECURSIVE MCRS Example 1.2 in Section 1 showed if some view vaiables ae not distinguished, we can have an MCR that is a ecusive datalog pogam. We can show that if we only conside the language of finite unions of CQACs, the quey Q 2 does not have an MCR. This obsevation is not supising given the esults in [1], even though it does not follow diectly fom the esults in that pape. Poposition 5.1. Fo the quey Q 2 in Example 1.2, thee is no finite union of CQAC ewitings that contains all the P k 's. 2 In this section, we conside the following case of answeing a quey Q using views V : 1. The quey Q contains (possibly) a single left-semiinteval inequality and seveal ight-semi-inteval inequalities; o symmetically, it contains a single ightsemi-inteval inequality and seveal left-semi-inteval inequalities. (This kind of queies ae called CQAC- SI1 queies.) 2. The views ae CQAC-SI views, i.e., they only contain semi-inteval inequalities. We believe that this case appeas in many applications, and it is moe geneal than those consideed in pevious wok. We show that in this case, containment of a CQAC- SI quey in a CQAC-SI1 quey can be educed to the containment of a CQ in a datalog quey. Based on this esult, we develop an algoithm fo finding MCRs. Without loss of geneality, in this section we estict ou attention to boolean queies. When we efe to SI inequality" o simply to inequality" in this section, we mean an inequality of the fom X c, whee X isavaiable, c is a constant, and is in f<; >;»; g. 5.1 A Motivating Example The following is a motivating example. EXAMPLE 5.1. Conside the following two queies. Q 1() :- e(x; Y );e(y;z);x >5;Z <8 Q 2() :- e(a; B);e(B;C);e(C; D);e(D; E); A>6;E <7 Thee ae thee containment mappings fom the odinay subgoals of Q 1 to the odinay subgoals of Q 2: μ 1: μ 2: μ 3: The following entailment holds. X! A; Y! B; Z! C X! B; Y! C; Z! D X! C; Y! D; Z! E A>6 ^ E<7 ) μ 1(X >5 ^ Z<8) _μ 3(X >5 ^ Z<8) By Theoem 2.1, Q 2 is contained inq 1. 2 To look in details of this entailment, let us ewite it as: A>6 ^ E<7 ) (A >5 ^ C<8) _ (C >5 ^ E<8) It is equivalent to: A>6 ^ E<7 ) (A >5 _ C>5) ^ (A >5 _ E<8) ^(C <8 _ C>5) ^ (C <8 _ E<8) The latte holds because 1. A>6 ) A>5, and E<7 ) E<8; 2. tue ) C<8 _ C>5. In othe wods, the entailment of each conjunct in the ight-hand side follows eithe

9 1. because a single inequality in the left-hand side implies a single inequality in the ight-hand side (called a diect implication); o 2. because the disjunction of two inequalities in the ighthand side is tue (called coupling implication). It tuns out that we only need to conside these two kinds of implications fo SI inequalities. Lemma 5.1. Let b 1;::: ;b k and e 1;::: ;e n be SI inequalities. Then b 1 ^ :::^ b k ) e 1 _ :::_ e n iff eithe (a) thee ae b k and e i such that b k ) e i (diect implication), o (b) thee ae e i and e j such that tue ) e i _ e j (coupling implication). 2 Poof. Note that b 1 ^ :::^ b k ) e 1 _ :::_ e n is equivalent to the following boolean expession (denoted by ffi): :(b 1 ^ :::^ b k ) ^ (:e 1) :::^ (:e n) (2) Since the boolean expession ffi is tue, :ffi must be a contadiction. Note that :ffi is a conjunction of SI inequalities, so its implication gaph has a cycle. Fo example, X<5 ) X<6 :(X <5) _ (X <6) :((X <5) ^:(X <6)) :((X <5) ^ (X 6)) The implication gaph of (X < 5) ^ (X 6) has a <- edge fom X to 5, a»-edge fom 6 to X, and an obvious <-edge fom 5 to 6. The pesence of the contadiction" cycle poves that X<5 ) X<6is tue, and vice vesa. In geneal, we claim that if thee is a cycle in the implication gaph of :ffi, then thee is an implication that uses at most two SIACs, thus pove the lemma. To pove the claim, note that SI ACs intoduce constants in the cycle. Moeove, if thee ae moe than two SIs in the implication cycle, then thee ae at least two constants, with both paths between them in the cycle containing at least one vaiable. In this case, we can constuct a cycle with at most two SI ACs, by shotcutting" a pai of constants c i and c j. We choose them to eliminate any othe constant on the cycle. Fo instance, suppose we have a contadiction cycle: X < c 1 < Y < c 3 < W < c 2 < X. Then we can shotcut c 1 and c 2, and get anothe contadiction cycle X<c 1 <c 2 <X. Afte the shotcutting, we get a cycle with two SIACs. Since we assumed that the left-hand side does not contain a contadiction, the two ACs cannot be both fom the lefthand side of the oiginal entailment. Theefoe, thee ae two possible cases about the two SIACs in the cycle. 1. One AC is fom the left-hand side and one is fom the ight-hand side of the oiginal entailment. 2. Both ae fom the ight-hand side of the oiginal entailment. These cases coespond to case (a) and case (b) in the lemma, espectively. The pesence of the cycle poves the coesponding implication. 5.2 Reducing CQAC-SI Containment to Datalog Containment Let P be a CQAC-SI quey. Suppose we want to check whethe P is contained in the quey Q 1 in Example 5.1. We define a new quey, denoted P CQ, based on the inequalities of Q 1 as follows. 1. It etains the odinay subgoals of P. 2. Conside each inequality of the fom X c 1 in P. Fo each constant c that appeas in Q 1, if (X c 1) ) (X c), then add unay pedicate U c (X). 3. It dops othe inequalities in P. Fo example, fo the Q 2 in Example 5.1, we have: Q CQ 2 () :- e(a; B);e(B;C);e(C; D);e(D; E);U >5(A);U <8(E) Stictly speaking, the aboveisq CQ 2 with espect to Q 1.Howeve, in most cases, once the coesponding Q 1 is clealy stated, we will efe to it as simply Q CQ 2 without mentioning Q 1 evey time. Notice that fo any vaiable X in P and any constant c in Q 1, U c (X) isinp CQ iff X c is implied by the AC pedicates in P. The key obsevation now is that we can educe checking fo an implication as in Example 5.1 to checking fo the existence of a containment mapping between conjunctive queies. To illustate this obsevation, we pove the following poposition. (It is puely a motivating poposition, but its poof pesents the main technical points involved in the poof of Theoem 5.1, the main esult of this section, and hence some intuition.) Poposition 5.2. Let P be a CQAC-SI quey. Suppose we know that eithe P is not contained in the quey Q 1 in Example 5.1, o exactly two mappings ae sufficient and necessay to pove containment of P in Q 1. Then P is contained inq 1 iff P CQ is contained in the following quey: Q 0 1() :- e(x 1;Y 1);e(Y 1;X 2);e(X 2;Y 2);e(Y 2;Z 1); U >5(X 1);U <8(Z 1) Poof. Let P = Q 0 + fi, and Q 1 = Q 10 + fi 1. Conside the if" diection. If P CQ is contained in Q 0 1, then thee is a containment mapping μ fom the subgoals of Q 0 1 into the subgoals of P CQ. Conside the following two mappings fom the odinay subgoals of Q 1 into the subgoals of Q 0 1: μ 0 1: X! X 1;Y! Y 1;Z! X 2 μ 0 2: X! X 2;Y! Y 2;Z! Z 1. Constuct the mappings μ 1 and μ 2 fom the odinay subgoals of Q 1 into the subgoals of P CQ (and hence into the odinay subgoals of P )tobeμ 0 1 followed by μ, and μ 0 2 followed by μ, espectively. We claim that μ 1 and μ 2 pove the containment ofp in Q 1. That is, we need to pove the following implication. fi ) (μ 1(X) > 5 ^ μ 1(Z) < 8) _ (μ 2(X) > 5 ^ μ 2(Z) < 8) To pove the satisfaction of the implication, we ague on how the ight-hand side is implied due to diect implications (a) and due to coupling (b): 2

10 (a) (Diect implication) μ maps the unay pedicate's U >5 vaiable X 1 into a vaiable μ(x 1), such that μ(x 1) > 5is implied by the ACs in P (i.e., it is implied by fi). Howeve, μ 1(X) =μ(x 1) is tue by constuction. Hence μ 1(X) > 5 is implied by the ACs in P. The same claim holds fo U <8, hence μ 2(Z) < 8 is implied by the ACs in P. (b) (Coupling) By constuction, howeve, wehave μ 1(Z) = μ 2(X). Summaizing (a) and (b), we have: fi ) μ 1(X) > 5 and fi ) μ 2(Z) < 8 and μ 1(Z) =μ 2(X). Theefoe fi implies the ight-hand side of the above implication. The only if" diection. If two mappings ae necessay and sufficient to pove containmentofp in Q 1, then we show that thee is a containment mapping fom the subgoals of Q 0 1 into the subgoals of P CQ. Let μ 1 and μ 2 be the two mappings. We know that: fi ) (μ 1(X) > 5 ^ μ 1(Z) < 8) _ (μ 2(X) > 5 ^ μ 2(Z) < 8) (3) Assuming that two mappings ae necessay and sufficient to pove containment ofp in Q 1,we shall show in the est of the poof the following: If Entailment 3 is satisfied, then thee is a containment mapping fom the subgoals of Q 0 1 into the subgoals of P CQ. To pove this claim, we ague as follows on the possibilities of satisfaction of the ight-hand side of Entailment 3. Fist, we use the fact that exactly two mappings ae needed. Hence one mapping will not do. Theefoe, (i) one of the μ 1(X) > 5 and μ 1(Z) < 8 is not implied by the left-hand side. (Othewise mapping μ 1 would suffice fo the implication to be satisfied.) (ii) one of the μ 2(X) > 5 and μ 2(Z) < 8 is not implied by the left-hand side. (Othewise, mapping μ 2 would suffice fo the implication to be satisfied.) It leaves the possibility of eithe (a) μ 1(X) > 5 is not implied, and μ 2(Z) < 8 is not implied; o (b) μ 1(Z) < 8 is not implied, and μ 2(X) > 5 is not implied. (All othe possibilities would neve end up in satisfying the implication.) In case (a), fo the implication to be satisfied, the following should hold: μ 1(X) =μ 2(Z). In case case (b), similaly, μ 1(Z) =μ 2(X) should hold. Now, it is easy to veify that, in both cases, μ 1 and μ 2 can be viewed as a mapping μ that maps: e(x 1;Y 1);e(Y 1;X 2);e(X 2;Y 2);e(Y 2;Z 1) into the odinay subgoals of P, such that X 1 > 5 and Z 1 < 8 ae implied by the ACs in P. As fi ) μ(x 1) > 5 and fi ) μ(z 1) < 8 ae encoded by the unay pedicates U >5(μ(X 1));U <8(μ(Z 1)) in P CQ, mapping μ also maps the unay pedicates. Thus it is a containment mapping fom the subgoals of Q 0 1 into the subgoals of P CQ. In the poof of the only if" diection, we easoned on the possibilities of satisfaction of Entailment 3. As the ighthand side of the implication was concete, we could eason by complete enumeation of the possibilities. In the geneal case, howeve, we need the following lemma. Lemma 5.2. Let Q 1 = Q 10 + fi 1 be a CQAC-SI1 quey, and Q 2 = Q 20+fi 2 be a CQAC-SI quey. Suppose μ 1;::: ;μ n ae containment mappings fom Q 10 to Q 20, such that fi 2 ) μ 1(fi 1) _ :::_ μ n(fi 1) Then thee isaμ i(fi 1) with each inequality, except possibly one inequality, diectly implied byaninequality of fi 2. 2 In Example 5.1, it tuns out that the tick that woks fo wheneve exactly two mappings pove containment can be genealized fo any numbe of mappings by means of a Datalog pogam: Q datalog 1 () :- e(x; Y );e(y;z);i >5(X);U <8(Z) I >5(Z) :- e(x; Y );e(y;z);i >5(X) I >5(Z) :- U >5(X) The unay pedicates in the pogam ae used to encode conditions fo the satisfaction of the implication. The EDB unay pedicate U <8 (and similaly the U >5) encodes diect implications. That is, fo any containment mapping, the vaiable in the agument ofu <8 maps on a vaiable X, such that X < 8 is implied by the ACs in Q 2. The IDB unay pedicates encode both coupling, and (in the initialization ule) diect implication. That is, wheneve we unfold the ecusive ule into I >5 in the body, we ensue that we get an additional mapping that offes a coupling inequality to X< Constucting Queies Q datalog 1 and Q CQ 2 In this subsection, we give a pocedue that takes as input any CQAC-SI1 quey Q 1, and outputs a datalog pogam Q datalog 1. We also give a pocedue that takes as input any CQAC-SI quey Q 2, and outputs a CQ Q CQ 2 without aithmetic compaisons. Finally, we pove that Q 2 is contained in Q 1 if and only if Q CQ 2 is contained in Q datalog 1. We will descibe the constuction assuming we have only stict inequality SIs. It extends easily to the case thee ae SIs with both <, >,», and. We descibe the constuction of Q datalog 1 and Q CQ 2 using the following example (same as 5.1): Q 1() :- e(x; Y );e(y;z);x >5;Z <8 Q 2() :- e(a; B);e(B;C);e(C; D);e(D; E); A>6;E <7 We fist constuct Q CQ 2 fo Q 2 as follows. We intoduce new unay IDB pedicates [32], two fo each constant c in Q 2, namely I >c and I <c. We also intoduce EDB pedicates U >c and U <c, two fo each constant c in Q 1. Fo each AC of the fom X c (whee X is a vaiable), we efe to I c (U c espectively) as the associated I-pedicate (U-pedicate espectively). We intoduce one ecusive ule fo Q CQ 2. We copy the egula subgoals of Q 2. Fo each AC X i c i in fi 2, we add a unay pedicate subgoal I ci (X i). We add a set of initialization linking ules that link the inequalities in Q 2 to the inequalities in Q 1. Fo each pai of constants c and c 0, whee c is a constant ofq 1 and c 0 a constant ofq 2 such that X c is implied by X c 0, and thee is an inequality X 0 c in Q 1,we add an initialization linking ule: I c 0(X) : U c (X) Note that Q CQ 2 is equivalent to a CQ. The following is the Q CQ 2 fo Q 2 in ou unning example. (Note this Q CQ 2 is a diffeent epesentation of the conjunctive quey Q CQ in Section 5.2.) Q CQ 2 :- e(a; B);e(B; C);e(C; D);e(D; E); I >6(A);I <7(E) I >6(A) :- U >5(A) I <7(E) :- U <8(E)

11 We constuct the following datalog pogam Q datalog 1 fo Q 1. Q datalog 1 J <8(Z) :- e(x; Y );e(y;z);i >5(X);I <8(Z) :- e(x; Y );e(y;z);i >5(X) mapping ule J >5(X) :- e(x; Y );e(y;z);i <8(Z) mapping ule I <8(X) :- J >5(X) coupling ule I >5(X) :- J <8(X) coupling ule I >5(A) :- U >5(A) initialization ule I <8(E) :- U <8(E) initialization ule We give the details of the constuction of Q datalog 1. We fist constuct a single quey ule (the fist one in the pogam). We then constuct thee kinds of ules: mapping ules, coupling ules, and initialization ules. Weintoduce new unay IDB pedicates, two pais fo each constant c in Q 1, namely (I >c, I <c) and (J >c, J <c). Fo each pai of one inequality X c and one IDB pedicate atom I c (X) (J c (X) espectively), we efe to each othe as the associated I-atom (associated J-atom espectively) o the associated AC. The quey ule copies in its body all subgoals of Q 1 and eplaces each ACofQ 1 by its associated I-atom. We get one mapping ule fo each single inequality e in Q 1. The body is a copy of the body of the quey ule, only that the I-atom associated to e is deleted. The head is associated to the J-atom associated to e. Fo evey pai of constants c 1» c 2 contained in Q 1,we constuct two coupling ules. One ule is I <c2 (X) :-J >c1 (X), and the othe is I >c1 (X) :-J <c2 (X). In ou unning example, we want to show that Q CQ 2 is contained in Q datalog 1. We unfold the ules in Q datalog 1 and tansfom the pogam to the quey ule: Q datalog 1 :- e(x; Y );e(y;z);e(x 1;Y 1);e(Y 1;X); U >5(X 1);U <8(Z) This CQ maps to Q CQ 2,thus shows the containment. Theoem 5.1. Let Q 1 be a CQAC-SI1 quey and Q 2 be a CQAC-SI quey. Then Q 2 v Q 1 iff Q CQ 2 v Q datalog 1. 2 The following esult is a consequence of this eduction. Theoem 5.2. The complexity of checking containment of a CQSI quey in a CQSI1 quey is in NP An Algoithm fo Finding MCRs We use the esult in the pevious subsection to constuct an algoithm that poduces an MCR fo a CQAC-SI1 quey using CQAC-SI views, whee some view vaiables can be nondistinguished The deived MCR is a datalog pogam with semi-inteval compaisons. The esult in this subsection is an immediate consequence of the esults in the pevious subsection and the esults in [14]. The pove the coectness of the algoithm, we need the following lemma. Lemma 5.3. Let Q be a CQAC-SI quey. Let P be acr of Q using views. Then thee is a union of CRs of Q that contains P, and uses only SI ACs. 2 The following theoem poves the coectness of the algoithm. Theoem 5.3. Each datalog quey with compaison pedicates that is contained inq is contained in the MCR poduced by the algoithm. 2 Input: ffl Q: a CQAC-SI1 quey. ffl V : a set of CQAC-SI views. Output: An MCR of Q using V. Method: 1. Constuct the datalog quey Q datalog fo Q. 2. Fo each view v i 2 V, constuct a new view v CQ i. 3. Fo each unay pedicate U c, constuct a view u c as: u c (X) :-U c (X). 4. Find an MCR P (using the esults in [14]) fo the datalog quey Q datalog using the views v CQ i 's and u c 's. 5. Replace each v CQ i by v i, and each u c (X) inp by AC X c. 6. Retun the esult as an MCR of Q. Figue 4: Constucting an MCR of a CQAC-SI1 quey using CQAC-SI views. Poof. Suppose P D is a datalog quey with compaisons, and P D is contained in Q. Fo each CQPD 1 with compaison pedicates that is poduced by P D,we shall pove that PD 1 is contained in P. Because of Lemma 5.3, it suffices to pove that fo any CQ P 1 with SI pedicates that is contained in Q, itiscontained in the MCR (denoted P ) geneated by the algoithm. As P 1 is contained in Q, P exp 1 is contained in Q, hence (by Theoem 5.1) (P exp 1 ) CQ is contained in Q datalog. By constuction of the MCR in step 4 in the algoithm, (P 1) CQ is contained in the MCR of Q datalog. Since the tanslation of this MCR into the MCR of Q using the oiginal views maps the unay pedicates of the fome one-to-one to the associated compaisons of the latte, P 1 is contained in the MCR of Q poduced by the algoithm. 6. CONCLUSION In this pape we studied the poblem of answeing a quey using views in the pesence of aithmetic compaisons. A conjunctive quey with aithmetic compaisons is called a CQAC quey. We fist gave the decidable esults in the case of finding equivalent ewitings, and the case of finding maximally-contained ewitings (MCRs) when all view vaiables ae distinguished. Then we developed a novel algoithm, called RewiteLSIQuey, fo finding an MCR (in the space of finite unions of CQACs) fo a quey using views, whee the quey has left-semi-inteval compaisons only (o ight-semi-inteval compaisons only). This algoithm shaes the basic steps as two existing algoithms in the liteatue. It is novel in dealing with nondistinguished view vaiables, and satisfying compaisons in the quey. In the case whee some view vaiables ae nondistinguished, we showed that an MCR can be a ecusive datalog pogam. Then we studied one case of the poblem, whee the views contain semi-inteval compaisons (called CQAC-SI views), and the quey contains (possibly) a single left-semi-inteval inequality and seveal ight-semi-inteval inequalities and its symmetic case (called a CQAC-SI1 quey). In this case we showed that thee is an MCR w..t. the language of datalog with semi-inteval pedicates, wheeas thee is no MCR w..t. the language of finite unions of CQACs. We developed an algoithm fo finding an MCR in this case. The esults in this pape indicate that the pesence of aithmetic compaisons in the quey intoduce most of the complications in the poblem of finding ewitings. In that espect, it might not be too had to extend the esults in

(CR) of the quey Q using v : P (A) :-v (A; A);A <4 To see why, suppose we expand this quey by eplacing the view subgoal v (A; A) by its definition. We

(CR) of the quey Q using v : P (A) :-v (A; A);A <4 To see why, suppose we expand this quey by eplacing the view subgoal v (A; A) by its definition. We Answeing Queies Using Views with Aithmetic Compaisons Pape 87 Foto Afati National Technical Univesity of Athens 57 73 Athens, Geece afati@cs.ece.ntua.g Chen Li Λ Infomation and Compute Science Univesity

More information

A Bijective Approach to the Permutational Power of a Priority Queue

A Bijective Approach to the Permutational Power of a Priority Queue A Bijective Appoach to the Pemutational Powe of a Pioity Queue Ia M. Gessel Kuang-Yeh Wang Depatment of Mathematics Bandeis Univesity Waltham, MA 02254-9110 Abstact A pioity queue tansfoms an input pemutation

More information

New problems in universal algebraic geometry illustrated by boolean equations

New problems in universal algebraic geometry illustrated by boolean equations New poblems in univesal algebaic geomety illustated by boolean equations axiv:1611.00152v2 [math.ra] 25 Nov 2016 Atem N. Shevlyakov Novembe 28, 2016 Abstact We discuss new poblems in univesal algebaic

More information

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland)

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland) Syntactical content of nite appoximations of patial algebas 1 Wikto Batol Inst. Matematyki, Uniw. Waszawski, 02-097 Waszawa (Poland) batol@mimuw.edu.pl Xavie Caicedo Dep. Matematicas, Univ. de los Andes,

More information

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs Math 30: The Edős-Stone-Simonovitz Theoem and Extemal Numbes fo Bipatite Gaphs May Radcliffe The Edős-Stone-Simonovitz Theoem Recall, in class we poved Tuán s Gaph Theoem, namely Theoem Tuán s Theoem Let

More information

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012 Stanfod Univesity CS59Q: Quantum Computing Handout 8 Luca Tevisan Octobe 8, 0 Lectue 8 In which we use the quantum Fouie tansfom to solve the peiod-finding poblem. The Peiod Finding Poblem Let f : {0,...,

More information

arxiv: v1 [math.co] 4 May 2017

arxiv: v1 [math.co] 4 May 2017 On The Numbe Of Unlabeled Bipatite Gaphs Abdullah Atmaca and A Yavuz Ouç axiv:7050800v [mathco] 4 May 207 Abstact This pape solves a poblem that was stated by M A Haison in 973 [] This poblem, that has

More information

THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX. Jaejin Lee

THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX. Jaejin Lee Koean J. Math. 23 (2015), No. 3, pp. 427 438 http://dx.doi.og/10.11568/kjm.2015.23.3.427 THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX Jaejin Lee Abstact. The Schensted algoithm fist descibed by Robinson

More information

Journal of Inequalities in Pure and Applied Mathematics

Journal of Inequalities in Pure and Applied Mathematics Jounal of Inequalities in Pue and Applied Mathematics COEFFICIENT INEQUALITY FOR A FUNCTION WHOSE DERIVATIVE HAS A POSITIVE REAL PART S. ABRAMOVICH, M. KLARIČIĆ BAKULA AND S. BANIĆ Depatment of Mathematics

More information

The Chromatic Villainy of Complete Multipartite Graphs

The Chromatic Villainy of Complete Multipartite Graphs Rocheste Institute of Technology RIT Schola Wos Theses Thesis/Dissetation Collections 8--08 The Chomatic Villainy of Complete Multipatite Gaphs Anna Raleigh an9@it.edu Follow this and additional wos at:

More information

On the integration of the equations of hydrodynamics

On the integration of the equations of hydrodynamics Uebe die Integation de hydodynamischen Gleichungen J f eine u angew Math 56 (859) -0 On the integation of the equations of hydodynamics (By A Clebsch at Calsuhe) Tanslated by D H Delphenich In a pevious

More information

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany Relating Banching Pogam Size and omula Size ove the ull Binay Basis Matin Saueho y Ingo Wegene y Ralph Wechne z y B Infomatik, LS II, Univ. Dotmund, 44 Dotmund, Gemany z ankfut, Gemany sauehof/wegene@ls.cs.uni-dotmund.de

More information

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies Supplementay infomation Efficient Enumeation of Monocyclic Chemical Gaphs with Given Path Fequencies Masaki Suzuki, Hioshi Nagamochi Gaduate School of Infomatics, Kyoto Univesity {m suzuki,nag}@amp.i.kyoto-u.ac.jp

More information

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0}, ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION E. J. IONASCU and A. A. STANCU Abstact. We ae inteested in constucting concete independent events in puely atomic pobability

More information

Compactly Supported Radial Basis Functions

Compactly Supported Radial Basis Functions Chapte 4 Compactly Suppoted Radial Basis Functions As we saw ealie, compactly suppoted functions Φ that ae tuly stictly conditionally positive definite of ode m > do not exist The compact suppot automatically

More information

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis Bief summay of functional analysis APPM 5440 Fall 014 Applied Analysis Stephen Becke, stephen.becke@coloado.edu Standad theoems. When necessay, I used Royden s and Keyzsig s books as a efeence. Vesion

More information

The Substring Search Problem

The Substring Search Problem The Substing Seach Poblem One algoithm which is used in a vaiety of applications is the family of substing seach algoithms. These algoithms allow a use to detemine if, given two chaacte stings, one is

More information

Surveillance Points in High Dimensional Spaces

Surveillance Points in High Dimensional Spaces Société de Calcul Mathématique SA Tools fo decision help since 995 Suveillance Points in High Dimensional Spaces by Benad Beauzamy Januay 06 Abstact Let us conside any compute softwae, elying upon a lage

More information

Probablistically Checkable Proofs

Probablistically Checkable Proofs Lectue 12 Pobablistically Checkable Poofs May 13, 2004 Lectue: Paul Beame Notes: Chis Re 12.1 Pobablisitically Checkable Poofs Oveview We know that IP = PSPACE. This means thee is an inteactive potocol

More information

Pushdown Automata (PDAs)

Pushdown Automata (PDAs) CHAPTER 2 Context-Fee Languages Contents Context-Fee Gammas definitions, examples, designing, ambiguity, Chomsky nomal fom Pushdown Automata definitions, examples, euivalence with context-fee gammas Non-Context-Fee

More information

Solution to HW 3, Ma 1a Fall 2016

Solution to HW 3, Ma 1a Fall 2016 Solution to HW 3, Ma a Fall 206 Section 2. Execise 2: Let C be a subset of the eal numbes consisting of those eal numbes x having the popety that evey digit in the decimal expansion of x is, 3, 5, o 7.

More information

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi Opuscula Math. 37, no. 3 (017), 447 456 http://dx.doi.og/10.7494/opmath.017.37.3.447 Opuscula Mathematica ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS D.A. Mojdeh and B. Samadi Communicated

More information

On the ratio of maximum and minimum degree in maximal intersecting families

On the ratio of maximum and minimum degree in maximal intersecting families On the atio of maximum and minimum degee in maximal intesecting families Zoltán Lóánt Nagy Lale Özkahya Balázs Patkós Máté Vize Septembe 5, 011 Abstact To study how balanced o unbalanced a maximal intesecting

More information

Lecture 28: Convergence of Random Variables and Related Theorems

Lecture 28: Convergence of Random Variables and Related Theorems EE50: Pobability Foundations fo Electical Enginees July-Novembe 205 Lectue 28: Convegence of Random Vaiables and Related Theoems Lectue:. Kishna Jagannathan Scibe: Gopal, Sudhasan, Ajay, Swamy, Kolla An

More information

Unobserved Correlation in Ascending Auctions: Example And Extensions

Unobserved Correlation in Ascending Auctions: Example And Extensions Unobseved Coelation in Ascending Auctions: Example And Extensions Daniel Quint Univesity of Wisconsin Novembe 2009 Intoduction In pivate-value ascending auctions, the winning bidde s willingness to pay

More information

On the ratio of maximum and minimum degree in maximal intersecting families

On the ratio of maximum and minimum degree in maximal intersecting families On the atio of maximum and minimum degee in maximal intesecting families Zoltán Lóánt Nagy Lale Özkahya Balázs Patkós Máté Vize Mach 6, 013 Abstact To study how balanced o unbalanced a maximal intesecting

More information

Conspiracy and Information Flow in the Take-Grant Protection Model

Conspiracy and Information Flow in the Take-Grant Protection Model Conspiacy and Infomation Flow in the Take-Gant Potection Model Matt Bishop Depatment of Compute Science Univesity of Califonia at Davis Davis, CA 95616-8562 ABSTRACT The Take Gant Potection Model is a

More information

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE THE p-adic VALUATION OF STIRLING NUMBERS ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE Abstact. Let p > 2 be a pime. The p-adic valuation of Stiling numbes of the

More information

On decompositions of complete multipartite graphs into the union of two even cycles

On decompositions of complete multipartite graphs into the union of two even cycles On decompositions of complete multipatite gaphs into the union of two even cycles A. Su, J. Buchanan, R. C. Bunge, S. I. El-Zanati, E. Pelttai, G. Rasmuson, E. Spaks, S. Tagais Depatment of Mathematics

More information

Math 124B February 02, 2012

Math 124B February 02, 2012 Math 24B Febuay 02, 202 Vikto Gigoyan 8 Laplace s equation: popeties We have aleady encounteed Laplace s equation in the context of stationay heat conduction and wave phenomena. Recall that in two spatial

More information

Fractional Zero Forcing via Three-color Forcing Games

Fractional Zero Forcing via Three-color Forcing Games Factional Zeo Focing via Thee-colo Focing Games Leslie Hogben Kevin F. Palmowski David E. Robeson Michael Young May 13, 2015 Abstact An -fold analogue of the positive semidefinite zeo focing pocess that

More information

Exploration of the three-person duel

Exploration of the three-person duel Exploation of the thee-peson duel Andy Paish 15 August 2006 1 The duel Pictue a duel: two shootes facing one anothe, taking tuns fiing at one anothe, each with a fixed pobability of hitting his opponent.

More information

Chem 453/544 Fall /08/03. Exam #1 Solutions

Chem 453/544 Fall /08/03. Exam #1 Solutions Chem 453/544 Fall 3 /8/3 Exam # Solutions. ( points) Use the genealized compessibility diagam povided on the last page to estimate ove what ange of pessues A at oom tempeatue confoms to the ideal gas law

More information

THE CONE THEOREM JOEL A. TROPP. Abstract. We prove a fixed point theorem for functions which are positive with respect to a cone in a Banach space.

THE CONE THEOREM JOEL A. TROPP. Abstract. We prove a fixed point theorem for functions which are positive with respect to a cone in a Banach space. THE ONE THEOEM JOEL A. TOPP Abstact. We pove a fixed point theoem fo functions which ae positive with espect to a cone in a Banach space. 1. Definitions Definition 1. Let X be a eal Banach space. A subset

More information

EM Boundary Value Problems

EM Boundary Value Problems EM Bounday Value Poblems 10/ 9 11/ By Ilekta chistidi & Lee, Seung-Hyun A. Geneal Desciption : Maxwell Equations & Loentz Foce We want to find the equations of motion of chaged paticles. The way to do

More information

EQUI-PARTITIONING OF HIGHER-DIMENSIONAL HYPER-RECTANGULAR GRID GRAPHS

EQUI-PARTITIONING OF HIGHER-DIMENSIONAL HYPER-RECTANGULAR GRID GRAPHS EQUI-PARTITIONING OF HIGHER-DIMENSIONAL HYPER-RECTANGULAR GRID GRAPHS ATHULA GUNAWARDENA AND ROBERT R MEYER Abstact A d-dimensional gid gaph G is the gaph on a finite subset in the intege lattice Z d in

More information

Construction and Analysis of Boolean Functions of 2t + 1 Variables with Maximum Algebraic Immunity

Construction and Analysis of Boolean Functions of 2t + 1 Variables with Maximum Algebraic Immunity Constuction and Analysis of Boolean Functions of 2t + 1 Vaiables with Maximum Algebaic Immunity Na Li and Wen-Feng Qi Depatment of Applied Mathematics, Zhengzhou Infomation Engineeing Univesity, Zhengzhou,

More information

Matrix Colorings of P 4 -sparse Graphs

Matrix Colorings of P 4 -sparse Graphs Diplomabeit Matix Coloings of P 4 -spase Gaphs Chistoph Hannnebaue Januay 23, 2010 Beteue: Pof. D. Winfied Hochstättle FenUnivesität in Hagen Fakultät fü Mathematik und Infomatik Contents Intoduction iii

More information

3.1 Random variables

3.1 Random variables 3 Chapte III Random Vaiables 3 Random vaiables A sample space S may be difficult to descibe if the elements of S ae not numbes discuss how we can use a ule by which an element s of S may be associated

More information

NOTE. Some New Bounds for Cover-Free Families

NOTE. Some New Bounds for Cover-Free Families Jounal of Combinatoial Theoy, Seies A 90, 224234 (2000) doi:10.1006jcta.1999.3036, available online at http:.idealibay.com on NOTE Some Ne Bounds fo Cove-Fee Families D. R. Stinson 1 and R. Wei Depatment

More information

working pages for Paul Richards class notes; do not copy or circulate without permission from PGR 2004/11/3 10:50

working pages for Paul Richards class notes; do not copy or circulate without permission from PGR 2004/11/3 10:50 woking pages fo Paul Richads class notes; do not copy o ciculate without pemission fom PGR 2004/11/3 10:50 CHAPTER7 Solid angle, 3D integals, Gauss s Theoem, and a Delta Function We define the solid angle,

More information

Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version

Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version The Binomial Theoem Factoials Auchmuty High School Mathematics Depatment The calculations,, 6 etc. often appea in mathematics. They ae called factoials and have been given the notation n!. e.g. 6! 6!!!!!

More information

arxiv: v1 [math.nt] 12 May 2017

arxiv: v1 [math.nt] 12 May 2017 SEQUENCES OF CONSECUTIVE HAPPY NUMBERS IN NEGATIVE BASES HELEN G. GRUNDMAN AND PAMELA E. HARRIS axiv:1705.04648v1 [math.nt] 12 May 2017 ABSTRACT. Fo b 2 and e 2, let S e,b : Z Z 0 be the function taking

More information

Exploiting Equality Generating Dependencies in Checking Chase Termination

Exploiting Equality Generating Dependencies in Checking Chase Termination Exploiting Equality Geneating Dependencies in Checking Chase Temination Maco Calautti Univesity of Calabia 87036 Rende, Italy calautti@dimes.unical.it Segio Geco Univesity of Calabia 87036 Rende, Italy

More information

Chapter 5 Linear Equations: Basic Theory and Practice

Chapter 5 Linear Equations: Basic Theory and Practice Chapte 5 inea Equations: Basic Theoy and actice In this chapte and the next, we ae inteested in the linea algebaic equation AX = b, (5-1) whee A is an m n matix, X is an n 1 vecto to be solved fo, and

More information

Encapsulation theory: radial encapsulation. Edmund Kirwan *

Encapsulation theory: radial encapsulation. Edmund Kirwan * Encapsulation theoy: adial encapsulation. Edmund Kiwan * www.edmundkiwan.com Abstact This pape intoduces the concept of adial encapsulation, wheeby dependencies ae constained to act fom subsets towads

More information

A Multivariate Normal Law for Turing s Formulae

A Multivariate Normal Law for Turing s Formulae A Multivaiate Nomal Law fo Tuing s Fomulae Zhiyi Zhang Depatment of Mathematics and Statistics Univesity of Noth Caolina at Chalotte Chalotte, NC 28223 Abstact This pape establishes a sufficient condition

More information

Math 2263 Solutions for Spring 2003 Final Exam

Math 2263 Solutions for Spring 2003 Final Exam Math 6 Solutions fo Sping Final Exam ) A staightfowad appoach to finding the tangent plane to a suface at a point ( x, y, z ) would be to expess the cuve as an explicit function z = f ( x, y ), calculate

More information

A proof of the binomial theorem

A proof of the binomial theorem A poof of the binomial theoem If n is a natual numbe, let n! denote the poduct of the numbes,2,3,,n. So! =, 2! = 2 = 2, 3! = 2 3 = 6, 4! = 2 3 4 = 24 and so on. We also let 0! =. If n is a non-negative

More information

Conservative Averaging Method and its Application for One Heat Conduction Problem

Conservative Averaging Method and its Application for One Heat Conduction Problem Poceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER THERMAL ENGINEERING and ENVIRONMENT Elounda Geece August - 6 (pp6-) Consevative Aveaging Method and its Application fo One Heat Conduction Poblem

More information

On the Structure of Linear Programs with Overlapping Cardinality Constraints

On the Structure of Linear Programs with Overlapping Cardinality Constraints On the Stuctue of Linea Pogams with Ovelapping Cadinality Constaints Tobias Fische and Mac E. Pfetsch Depatment of Mathematics, TU Damstadt, Gemany tfische,pfetsch}@mathematik.tu-damstadt.de Januay 25,

More information

CALCULUS II Vectors. Paul Dawkins

CALCULUS II Vectors. Paul Dawkins CALCULUS II Vectos Paul Dawkins Table of Contents Peface... ii Vectos... 3 Intoduction... 3 Vectos The Basics... 4 Vecto Aithmetic... 8 Dot Poduct... 13 Coss Poduct... 21 2007 Paul Dawkins i http://tutoial.math.lama.edu/tems.aspx

More information

KOEBE DOMAINS FOR THE CLASSES OF FUNCTIONS WITH RANGES INCLUDED IN GIVEN SETS

KOEBE DOMAINS FOR THE CLASSES OF FUNCTIONS WITH RANGES INCLUDED IN GIVEN SETS Jounal of Applied Analysis Vol. 14, No. 1 2008), pp. 43 52 KOEBE DOMAINS FOR THE CLASSES OF FUNCTIONS WITH RANGES INCLUDED IN GIVEN SETS L. KOCZAN and P. ZAPRAWA Received Mach 12, 2007 and, in evised fom,

More information

The Congestion of n-cube Layout on a Rectangular Grid S.L. Bezrukov J.D. Chavez y L.H. Harper z M. Rottger U.-P. Schroeder Abstract We consider the pr

The Congestion of n-cube Layout on a Rectangular Grid S.L. Bezrukov J.D. Chavez y L.H. Harper z M. Rottger U.-P. Schroeder Abstract We consider the pr The Congestion of n-cube Layout on a Rectangula Gid S.L. Bezukov J.D. Chavez y L.H. Hape z M. Rottge U.-P. Schoede Abstact We conside the poblem of embedding the n-dimensional cube into a ectangula gid

More information

Do Managers Do Good With Other People s Money? Online Appendix

Do Managers Do Good With Other People s Money? Online Appendix Do Manages Do Good With Othe People s Money? Online Appendix Ing-Haw Cheng Haison Hong Kelly Shue Abstact This is the Online Appendix fo Cheng, Hong and Shue 2013) containing details of the model. Datmouth

More information

ASTR415: Problem Set #6

ASTR415: Problem Set #6 ASTR45: Poblem Set #6 Cuan D. Muhlbege Univesity of Mayland (Dated: May 7, 27) Using existing implementations of the leapfog and Runge-Kutta methods fo solving coupled odinay diffeential equations, seveal

More information

Information Retrieval Advanced IR models. Luca Bondi

Information Retrieval Advanced IR models. Luca Bondi Advanced IR models Luca Bondi Advanced IR models 2 (LSI) Pobabilistic Latent Semantic Analysis (plsa) Vecto Space Model 3 Stating point: Vecto Space Model Documents and queies epesented as vectos in the

More information

Additive Approximation for Edge-Deletion Problems

Additive Approximation for Edge-Deletion Problems Additive Appoximation fo Edge-Deletion Poblems Noga Alon Asaf Shapia Benny Sudakov Abstact A gaph popety is monotone if it is closed unde emoval of vetices and edges. In this pape we conside the following

More information

Goodness-of-fit for composite hypotheses.

Goodness-of-fit for composite hypotheses. Section 11 Goodness-of-fit fo composite hypotheses. Example. Let us conside a Matlab example. Let us geneate 50 obsevations fom N(1, 2): X=nomnd(1,2,50,1); Then, unning a chi-squaed goodness-of-fit test

More information

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic.

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic. Chapte 9 Pimitive Roots 9.1 The multiplicative goup of a finite fld Theoem 9.1. The multiplicative goup F of a finite fld is cyclic. Remak: In paticula, if p is a pime then (Z/p) is cyclic. In fact, this

More information

10/04/18. P [P(x)] 1 negl(n).

10/04/18. P [P(x)] 1 negl(n). Mastemath, Sping 208 Into to Lattice lgs & Cypto Lectue 0 0/04/8 Lectues: D. Dadush, L. Ducas Scibe: K. de Boe Intoduction In this lectue, we will teat two main pats. Duing the fist pat we continue the

More information

JENSEN S INEQUALITY FOR DISTRIBUTIONS POSSESSING HIGHER MOMENTS, WITH APPLICATION TO SHARP BOUNDS FOR LAPLACE-STIELTJES TRANSFORMS

JENSEN S INEQUALITY FOR DISTRIBUTIONS POSSESSING HIGHER MOMENTS, WITH APPLICATION TO SHARP BOUNDS FOR LAPLACE-STIELTJES TRANSFORMS J. Austal. Math. Soc. Se. B 40(1998), 80 85 JENSEN S INEQUALITY FO DISTIBUTIONS POSSESSING HIGHE MOMENTS, WITH APPLICATION TO SHAP BOUNDS FO LAPLACE-STIELTJES TANSFOMS B. GULJAŠ 1,C.E.M.PEACE 2 and J.

More information

Analytical time-optimal trajectories for an omni-directional vehicle

Analytical time-optimal trajectories for an omni-directional vehicle Analytical time-optimal tajectoies fo an omni-diectional vehicle Weifu Wang and Devin J. Balkcom Abstact We pesent the fist analytical solution method fo finding a time-optimal tajectoy between any given

More information

6 PROBABILITY GENERATING FUNCTIONS

6 PROBABILITY GENERATING FUNCTIONS 6 PROBABILITY GENERATING FUNCTIONS Cetain deivations pesented in this couse have been somewhat heavy on algeba. Fo example, detemining the expectation of the Binomial distibution (page 5.1 tuned out to

More information

Section 8.2 Polar Coordinates

Section 8.2 Polar Coordinates Section 8. Pola Coodinates 467 Section 8. Pola Coodinates The coodinate system we ae most familia with is called the Catesian coodinate system, a ectangula plane divided into fou quadants by the hoizontal

More information

Physics 2A Chapter 10 - Moment of Inertia Fall 2018

Physics 2A Chapter 10 - Moment of Inertia Fall 2018 Physics Chapte 0 - oment of netia Fall 08 The moment of inetia of a otating object is a measue of its otational inetia in the same way that the mass of an object is a measue of its inetia fo linea motion.

More information

Chapter 3: Theory of Modular Arithmetic 38

Chapter 3: Theory of Modular Arithmetic 38 Chapte 3: Theoy of Modula Aithmetic 38 Section D Chinese Remainde Theoem By the end of this section you will be able to pove the Chinese Remainde Theoem apply this theoem to solve simultaneous linea conguences

More information

Duality between Statical and Kinematical Engineering Systems

Duality between Statical and Kinematical Engineering Systems Pape 00, Civil-Comp Ltd., Stiling, Scotland Poceedings of the Sixth Intenational Confeence on Computational Stuctues Technology, B.H.V. Topping and Z. Bittna (Editos), Civil-Comp Pess, Stiling, Scotland.

More information

7.2. Coulomb s Law. The Electric Force

7.2. Coulomb s Law. The Electric Force Coulomb s aw Recall that chaged objects attact some objects and epel othes at a distance, without making any contact with those objects Electic foce,, o the foce acting between two chaged objects, is somewhat

More information

Quasi-Randomness and the Distribution of Copies of a Fixed Graph

Quasi-Randomness and the Distribution of Copies of a Fixed Graph Quasi-Randomness and the Distibution of Copies of a Fixed Gaph Asaf Shapia Abstact We show that if a gaph G has the popety that all subsets of vetices of size n/4 contain the coect numbe of tiangles one

More information

Multiple Experts with Binary Features

Multiple Experts with Binary Features Multiple Expets with Binay Featues Ye Jin & Lingen Zhang Decembe 9, 2010 1 Intoduction Ou intuition fo the poect comes fom the pape Supevised Leaning fom Multiple Expets: Whom to tust when eveyone lies

More information

To Feel a Force Chapter 7 Static equilibrium - torque and friction

To Feel a Force Chapter 7 Static equilibrium - torque and friction To eel a oce Chapte 7 Chapte 7: Static fiction, toque and static equilibium A. Review of foce vectos Between the eath and a small mass, gavitational foces of equal magnitude and opposite diection act on

More information

A NEW VARIABLE STIFFNESS SPRING USING A PRESTRESSED MECHANISM

A NEW VARIABLE STIFFNESS SPRING USING A PRESTRESSED MECHANISM Poceedings of the ASME 2010 Intenational Design Engineeing Technical Confeences & Computes and Infomation in Engineeing Confeence IDETC/CIE 2010 August 15-18, 2010, Monteal, Quebec, Canada DETC2010-28496

More information

DonnishJournals

DonnishJournals DonnishJounals 041-1189 Donnish Jounal of Educational Reseach and Reviews. Vol 1(1) pp. 01-017 Novembe, 014. http:///dje Copyight 014 Donnish Jounals Oiginal Reseach Pape Vecto Analysis Using MAXIMA Savaş

More information

Deterministic vs Non-deterministic Graph Property Testing

Deterministic vs Non-deterministic Graph Property Testing Deteministic vs Non-deteministic Gaph Popety Testing Lio Gishboline Asaf Shapia Abstact A gaph popety P is said to be testable if one can check whethe a gaph is close o fa fom satisfying P using few andom

More information

Pearson s Chi-Square Test Modifications for Comparison of Unweighted and Weighted Histograms and Two Weighted Histograms

Pearson s Chi-Square Test Modifications for Comparison of Unweighted and Weighted Histograms and Two Weighted Histograms Peason s Chi-Squae Test Modifications fo Compaison of Unweighted and Weighted Histogams and Two Weighted Histogams Univesity of Akueyi, Bogi, v/noduslód, IS-6 Akueyi, Iceland E-mail: nikolai@unak.is Two

More information

QIP Course 10: Quantum Factorization Algorithm (Part 3)

QIP Course 10: Quantum Factorization Algorithm (Part 3) QIP Couse 10: Quantum Factoization Algoithm (Pat 3 Ryutaoh Matsumoto Nagoya Univesity, Japan Send you comments to yutaoh.matsumoto@nagoya-u.jp Septembe 2018 @ Tokyo Tech. Matsumoto (Nagoya U. QIP Couse

More information

A THREE CRITICAL POINTS THEOREM AND ITS APPLICATIONS TO THE ORDINARY DIRICHLET PROBLEM

A THREE CRITICAL POINTS THEOREM AND ITS APPLICATIONS TO THE ORDINARY DIRICHLET PROBLEM A THREE CRITICAL POINTS THEOREM AND ITS APPLICATIONS TO THE ORDINARY DIRICHLET PROBLEM DIEGO AVERNA AND GABRIELE BONANNO Abstact. The aim of this pape is twofold. On one hand we establish a thee citical

More information

FUSE Fusion Utility Sequence Estimator

FUSE Fusion Utility Sequence Estimator FUSE Fusion Utility Sequence Estimato Belu V. Dasaathy Dynetics, Inc. P. O. Box 5500 Huntsville, AL 3584-5500 belu.d@dynetics.com Sean D. Townsend Dynetics, Inc. P. O. Box 5500 Huntsville, AL 3584-5500

More information

FEASIBLE FLOWS IN MULTICOMMODITY GRAPHS. Holly Sue Zullo. B. S., Rensselaer Polytechnic Institute, M. S., University of Colorado at Denver, 1993

FEASIBLE FLOWS IN MULTICOMMODITY GRAPHS. Holly Sue Zullo. B. S., Rensselaer Polytechnic Institute, M. S., University of Colorado at Denver, 1993 FEASIBLE FLOWS IN MULTICOMMODITY GRAPHS by Holly Sue Zullo B. S., Rensselae Polytechnic Institute, 1991 M. S., Univesity of Coloado at Denve, 1993 A thesis submitted to the Faculty of the Gaduate School

More information

Reduced Implicant Tries

Reduced Implicant Tries Reduced Implicant Ties Technical Repot SUNYA-CS-07-01 Novembe, 2007 Neil V. Muay Depatment of Compute Science Univesity at Albany Albany, NY 12222 email: nvm@cs.albany.edu Eik Rosenthal Depatment of Mathematics

More information

Lecture 18: Graph Isomorphisms

Lecture 18: Graph Isomorphisms INFR11102: Computational Complexity 22/11/2018 Lectue: Heng Guo Lectue 18: Gaph Isomophisms 1 An Athu-Melin potocol fo GNI Last time we gave a simple inteactive potocol fo GNI with pivate coins. We will

More information

Lifting Private Information Retrieval from Two to any Number of Messages

Lifting Private Information Retrieval from Two to any Number of Messages Lifting Pivate Infomation Retieval fom Two to any umbe of Messages Rafael G.L. D Oliveia, Salim El Rouayheb ECE, Rutges Univesity, Piscataway, J Emails: d746@scaletmail.utges.edu, salim.elouayheb@utges.edu

More information

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations MATH 415, WEEK 3: Paamete-Dependence and Bifucations 1 A Note on Paamete Dependence We should pause to make a bief note about the ole played in the study of dynamical systems by the system s paametes.

More information

PROBLEM SET #1 SOLUTIONS by Robert A. DiStasio Jr.

PROBLEM SET #1 SOLUTIONS by Robert A. DiStasio Jr. POBLM S # SOLUIONS by obet A. DiStasio J. Q. he Bon-Oppenheime appoximation is the standad way of appoximating the gound state of a molecula system. Wite down the conditions that detemine the tonic and

More information

A generalization of the Bernstein polynomials

A generalization of the Bernstein polynomials A genealization of the Benstein polynomials Halil Ouç and Geoge M Phillips Mathematical Institute, Univesity of St Andews, Noth Haugh, St Andews, Fife KY16 9SS, Scotland Dedicated to Philip J Davis This

More information

(n 1)n(n + 1)(n + 2) + 1 = (n 1)(n + 2)n(n + 1) + 1 = ( (n 2 + n 1) 1 )( (n 2 + n 1) + 1 ) + 1 = (n 2 + n 1) 2.

(n 1)n(n + 1)(n + 2) + 1 = (n 1)(n + 2)n(n + 1) + 1 = ( (n 2 + n 1) 1 )( (n 2 + n 1) + 1 ) + 1 = (n 2 + n 1) 2. Paabola Volume 5, Issue (017) Solutions 151 1540 Q151 Take any fou consecutive whole numbes, multiply them togethe and add 1. Make a conjectue and pove it! The esulting numbe can, fo instance, be expessed

More information

arxiv: v1 [math.co] 2 Feb 2018

arxiv: v1 [math.co] 2 Feb 2018 A VERSION OF THE LOEBL-KOMLÓS-SÓS CONJECTURE FOR SKEWED TREES TEREZA KLIMOŠOVÁ, DIANA PIGUET, AND VÁCLAV ROZHOŇ axiv:1802.00679v1 [math.co] 2 Feb 2018 Abstact. Loebl, Komlós, and Sós conjectued that any

More information

Classical Worm algorithms (WA)

Classical Worm algorithms (WA) Classical Wom algoithms (WA) WA was oiginally intoduced fo quantum statistical models by Pokof ev, Svistunov and Tupitsyn (997), and late genealized to classical models by Pokof ev and Svistunov (200).

More information

On a quantity that is analogous to potential and a theorem that relates to it

On a quantity that is analogous to potential and a theorem that relates to it Su une quantité analogue au potential et su un théoème y elatif C R Acad Sci 7 (87) 34-39 On a quantity that is analogous to potential and a theoem that elates to it By R CLAUSIUS Tanslated by D H Delphenich

More information

2 x 8 2 x 2 SKILLS Determine whether the given value is a solution of the. equation. (a) x 2 (b) x 4. (a) x 2 (b) x 4 (a) x 4 (b) x 8

2 x 8 2 x 2 SKILLS Determine whether the given value is a solution of the. equation. (a) x 2 (b) x 4. (a) x 2 (b) x 4 (a) x 4 (b) x 8 5 CHAPTER Fundamentals When solving equations that involve absolute values, we usually take cases. EXAMPLE An Absolute Value Equation Solve the equation 0 x 5 0 3. SOLUTION By the definition of absolute

More information

Research Article On Alzer and Qiu s Conjecture for Complete Elliptic Integral and Inverse Hyperbolic Tangent Function

Research Article On Alzer and Qiu s Conjecture for Complete Elliptic Integral and Inverse Hyperbolic Tangent Function Abstact and Applied Analysis Volume 011, Aticle ID 697547, 7 pages doi:10.1155/011/697547 Reseach Aticle On Alze and Qiu s Conjectue fo Complete Elliptic Integal and Invese Hypebolic Tangent Function Yu-Ming

More information

I. CONSTRUCTION OF THE GREEN S FUNCTION

I. CONSTRUCTION OF THE GREEN S FUNCTION I. CONSTRUCTION OF THE GREEN S FUNCTION The Helmohltz equation in 4 dimensions is 4 + k G 4 x, x = δ 4 x x. In this equation, G is the Geen s function and 4 efes to the dimensionality. In the vey end,

More information

When two numbers are written as the product of their prime factors, they are in factored form.

When two numbers are written as the product of their prime factors, they are in factored form. 10 1 Study Guide Pages 420 425 Factos Because 3 4 12, we say that 3 and 4 ae factos of 12. In othe wods, factos ae the numbes you multiply to get a poduct. Since 2 6 12, 2 and 6 ae also factos of 12. The

More information

Graphs of Sine and Cosine Functions

Graphs of Sine and Cosine Functions Gaphs of Sine and Cosine Functions In pevious sections, we defined the tigonometic o cicula functions in tems of the movement of a point aound the cicumfeence of a unit cicle, o the angle fomed by the

More information

RADIALLY SYMMETRIC SOLUTIONS TO THE GRAPHIC WILLMORE SURFACE EQUATION

RADIALLY SYMMETRIC SOLUTIONS TO THE GRAPHIC WILLMORE SURFACE EQUATION RADIALLY SYMMETRIC SOLUTIONS TO THE GRAPHIC WILLMORE SURFACE EQUATION JINGYI CHEN AND YUXIANG LI Abstact. We show that a smooth adially symmetic solution u to the gaphic Willmoe suface equation is eithe

More information

Non-Linear Dynamics Homework Solutions Week 2

Non-Linear Dynamics Homework Solutions Week 2 Non-Linea Dynamics Homewok Solutions Week Chis Small Mach, 7 Please email me at smach9@evegeen.edu with any questions o concens eguading these solutions. Fo the ececises fom section., we sketch all qualitatively

More information

The first nontrivial curve in the fučĺk spectrum of the dirichlet laplacian on the ball consists of nonradial eigenvalues

The first nontrivial curve in the fučĺk spectrum of the dirichlet laplacian on the ball consists of nonradial eigenvalues enedikt et al. ounday Value Poblems 2011, 2011:27 RESEARCH Open Access The fist nontivial cuve in the fučĺk spectum of the diichlet laplacian on the ball consists of nonadial eigenvalues Jiřĺ enedikt 1*,

More information

On Computing Optimal (Q, r) Replenishment Policies under Quantity Discounts

On Computing Optimal (Q, r) Replenishment Policies under Quantity Discounts Annals of Opeations Reseach manuscipt No. will be inseted by the edito) On Computing Optimal, ) Replenishment Policies unde uantity Discounts The all - units and incemental discount cases Michael N. Katehakis

More information

Encapsulation theory: the transformation equations of absolute information hiding.

Encapsulation theory: the transformation equations of absolute information hiding. 1 Encapsulation theoy: the tansfomation equations of absolute infomation hiding. Edmund Kiwan * www.edmundkiwan.com Abstact This pape descibes how the potential coupling of a set vaies as the set is tansfomed,

More information