• Aucun résultat trouvé

Uniform Reliability of Self-Join-Free Conjunctive Queries

N/A
N/A
Protected

Academic year: 2022

Partager "Uniform Reliability of Self-Join-Free Conjunctive Queries"

Copied!
57
0
0

Texte intégral

(1)

Uniform Reliability of Self-Join-Free Conjunctive Queries

Antoine Amarilli1, Benny Kimelfeld2 March 11, 2021

1Télécom Paris

2Technion

(2)

Uncertain data and tuple-independent databases (TID)

We consider data in therelational modelon which we haveuncertainty

Simplest uncertainty model:tuple-independent databases(TID) Classes

Class Room Date

Databases 1 101 2021-03-26 80%

Databases 2 101 2021-04-02 70%

Lockdowns Date

2021-03-26 20%

2021-04-02 40%

Semantics:

• Every tuple is annotated with aprobability

• We assume that all tuples areindependent

• A TID concisely represents aprobability distributionover thesubinstances

→ Warning:we only use the TID model to showtheoretical results:)

(3)

Uncertain data and tuple-independent databases (TID)

We consider data in therelational modelon which we haveuncertainty

Simplest uncertainty model:tuple-independent databases(TID) Classes

Class Room Date

Databases 1 101 2021-03-26 80%

Databases 2 101 2021-04-02 70%

Lockdowns Date

2021-03-26 20%

2021-04-02 40%

Semantics:

• Every tuple is annotated with aprobability

• We assume that all tuples areindependent

• A TID concisely represents aprobability distributionover thesubinstances

→ Warning:we only use the TID model to showtheoretical results:)

(4)

Uncertain data and tuple-independent databases (TID)

We consider data in therelational modelon which we haveuncertainty

Simplest uncertainty model:tuple-independent databases(TID) Classes

Class Room Date

Databases 1 101 2021-03-26 80%

Databases 2 101 2021-04-02 70%

Lockdowns Date

2021-03-26 20%

2021-04-02 40%

Semantics:

• Every tuple is annotated with aprobability

• We assume that all tuples areindependent

• A TID concisely represents aprobability distributionover thesubinstances

→ Warning:we only use the TID model to showtheoretical results:)

(5)

Probabilistic query evaluation (PQE)

We considerconjunctive queries(CQs), which we assume to beBoolean

Q:∃c r dClasses(c,r,d)Lockdowns(d)

SemanticsofQon a TID: compute theprobabilitythatQis true

Formally, problemPQE(Q)for a fixed CQQ:

Input: a TIDI

Output:the total probability of the subinstances ofIwhereQis true

We can always solvePQE(Q)by looking at all subinstances (exponential)

→ When can we achieve a better complexity?

(6)

Probabilistic query evaluation (PQE)

We considerconjunctive queries(CQs), which we assume to beBoolean

Q:∃c r dClasses(c,r,d)Lockdowns(d)

SemanticsofQon a TID: compute theprobabilitythatQis true

Formally, problemPQE(Q)for a fixed CQQ:

Input: a TIDI

Output:the total probability of the subinstances ofIwhereQis true

We can always solvePQE(Q)by looking at all subinstances (exponential)

→ When can we achieve a better complexity?

(7)

Probabilistic query evaluation (PQE)

We considerconjunctive queries(CQs), which we assume to beBoolean

Q:∃c r dClasses(c,r,d)Lockdowns(d)

SemanticsofQon a TID: compute theprobabilitythatQis true

Formally, problemPQE(Q)for a fixed CQQ:

Input: a TIDI

Output:the total probability of the subinstances ofIwhereQis true

We can always solvePQE(Q)by looking at all subinstances (exponential)

→ When can we achieve a better complexity?

(8)

Probabilistic query evaluation (PQE)

We considerconjunctive queries(CQs), which we assume to beBoolean

Q:∃c r dClasses(c,r,d)Lockdowns(d)

SemanticsofQon a TID: compute theprobabilitythatQis true

Formally, problemPQE(Q)for a fixed CQQ:

Input: a TIDI

Output:the total probability of the subinstances ofIwhereQis true

We can always solvePQE(Q)by looking at all subinstances (exponential)

→ When can we achieve a better complexity?

(9)

Probabilistic query evaluation (PQE)

We considerconjunctive queries(CQs), which we assume to beBoolean

Q:∃c r dClasses(c,r,d)Lockdowns(d)

SemanticsofQon a TID: compute theprobabilitythatQis true

Formally, problemPQE(Q)for a fixed CQQ:

Input: a TIDI

Output:the total probability of the subinstances ofIwhereQis true

We can always solvePQE(Q)by looking at all subinstances (exponential)

→ When can we achieve a better complexity?

(10)

Existing results

Complexity of PQE shown in [Dalvi and Suciu, 2007] forself-join-free CQs(SJFCQs)

• A CQ isself-join-freeif no relation symbol is repeated

Later extended tounions of conjunctive queries[Dalvi and Suciu, 2012]

In this work we stick to the result on SJFCQs: Theorem [Dalvi and Suciu, 2007]

LetQbe a SJFCQ. Then:

EitherQishierarchicalandPQE(Q)is inPTIME

OrQisnot hierarchicalandPQE(Q)is#P-hard What is this class ofhierarchical CQs?

(11)

Existing results

Complexity of PQE shown in [Dalvi and Suciu, 2007] forself-join-free CQs(SJFCQs)

• A CQ isself-join-freeif no relation symbol is repeated

Later extended tounions of conjunctive queries[Dalvi and Suciu, 2012]

In this work we stick to the result on SJFCQs:

Theorem [Dalvi and Suciu, 2007]

LetQbe a SJFCQ. Then:

EitherQishierarchicalandPQE(Q)is inPTIME

OrQisnot hierarchicalandPQE(Q)is#P-hard

What is this class ofhierarchical CQs?

(12)

Existing results

Complexity of PQE shown in [Dalvi and Suciu, 2007] forself-join-free CQs(SJFCQs)

• A CQ isself-join-freeif no relation symbol is repeated

Later extended tounions of conjunctive queries[Dalvi and Suciu, 2012]

In this work we stick to the result on SJFCQs:

Theorem [Dalvi and Suciu, 2007]

LetQbe a SJFCQ. Then:

EitherQishierarchicalandPQE(Q)is inPTIME

OrQisnot hierarchicalandPQE(Q)is#P-hard What is this class ofhierarchical CQs?

(13)

Hierarchical CQs

For a CQQ, writeatoms(x)for the set of atoms wherexappears

A CQ ishierarchicalif for every variablesxandy

• Eitheratoms(x)andatoms(y)aredisjoint

• Or one isincludedin the other

A CQ isnon-hierarchicalif there are two variablesxandysuch that

• Some atom containsbothxandy

• Some atom containsxbut noty

• Some atom containsybut notx

Simplest example: theR-S-Tquery:Q1 :∃x y R(x),S(x,y),T(y)

Intuitionfor arity-2 queries: the hierarchical CQs areunions of star-shaped patterns Exercise: Is our example CQ hierarchical?∃c r dClasses(c,r,d)∧Lockdowns(d)...Yes!

(14)

Hierarchical CQs

For a CQQ, writeatoms(x)for the set of atoms wherexappears

A CQ ishierarchicalif for every variablesxandy

• Eitheratoms(x)andatoms(y)aredisjoint

• Or one isincludedin the other

A CQ isnon-hierarchicalif there are two variablesxandysuch that

• Some atom containsbothxandy

• Some atom containsxbut noty

• Some atom containsybut notx

Simplest example: theR-S-Tquery:Q1 :∃x y R(x),S(x,y),T(y)

Intuitionfor arity-2 queries: the hierarchical CQs areunions of star-shaped patterns Exercise: Is our example CQ hierarchical?∃c r dClasses(c,r,d)∧Lockdowns(d)...Yes!

(15)

Hierarchical CQs

For a CQQ, writeatoms(x)for the set of atoms wherexappears

A CQ ishierarchicalif for every variablesxandy

• Eitheratoms(x)andatoms(y)aredisjoint

• Or one isincludedin the other

A CQ isnon-hierarchicalif there are two variablesxandysuch that

• Some atom containsbothxandy

• Some atom containsxbut noty

• Some atom containsybut notx

Simplest example: theR-S-Tquery:Q1 :∃x y R(x),S(x,y),T(y)

Intuitionfor arity-2 queries: the hierarchical CQs areunions of star-shaped patterns

Exercise: Is our example CQ hierarchical?∃c r dClasses(c,r,d)∧Lockdowns(d)...Yes!

(16)

Hierarchical CQs

For a CQQ, writeatoms(x)for the set of atoms wherexappears

A CQ ishierarchicalif for every variablesxandy

• Eitheratoms(x)andatoms(y)aredisjoint

• Or one isincludedin the other

A CQ isnon-hierarchicalif there are two variablesxandysuch that

• Some atom containsbothxandy

• Some atom containsxbut noty

• Some atom containsybut notx

Simplest example: theR-S-Tquery:Q1 :∃x y R(x),S(x,y),T(y)

Intuitionfor arity-2 queries: the hierarchical CQs areunions of star-shaped patterns Exercise: Is our example CQ hierarchical?∃c r dClasses(c,r,d)∧Lockdowns(d)

...Yes!

(17)

Hierarchical CQs

For a CQQ, writeatoms(x)for the set of atoms wherexappears

A CQ ishierarchicalif for every variablesxandy

• Eitheratoms(x)andatoms(y)aredisjoint

• Or one isincludedin the other

A CQ isnon-hierarchicalif there are two variablesxandysuch that

• Some atom containsbothxandy

• Some atom containsxbut noty

• Some atom containsybut notx

Simplest example: theR-S-Tquery:Q1 :∃x y R(x),S(x,y),T(y)

Intuitionfor arity-2 queries: the hierarchical CQs areunions of star-shaped patterns Exercise: Is our example CQ hierarchical?∃c r dClasses(c,r,d)∧Lockdowns(d)... Yes!

(18)

Uniform reliability

We study theuniform reliability(UR) problem, a simpler variant of PQE:

• Wefixa CQQ, and consider the problemUR(Q):

Input: a database instanceIwithout probabilities

Output:how manysubinstancesofIsatisfyQ

Remark:URisPQEbut where all facts haveprobability 1/2

(up to amultiplicative factorof2NforNthe number of facts of the TID)

Our goal:What is the complexity of UR?

(19)

Uniform reliability

We study theuniform reliability(UR) problem, a simpler variant of PQE:

• Wefixa CQQ, and consider the problemUR(Q):

Input: a database instanceIwithout probabilities

Output:how manysubinstancesofIsatisfyQ

Remark:URisPQEbut where all facts haveprobability 1/2

(up to amultiplicative factorof2NforNthe number of facts of the TID)

Our goal:What is the complexity of UR?

(20)

Uniform reliability

We study theuniform reliability(UR) problem, a simpler variant of PQE:

• Wefixa CQQ, and consider the problemUR(Q):

Input: a database instanceIwithout probabilities

Output:how manysubinstancesofIsatisfyQ

Remark:URisPQEbut where all facts haveprobability 1/2

(up to amultiplicative factorof2NforNthe number of facts of the TID)

Our goal:What is the complexity of UR?

(21)

Our results

We only study the problem onSJFCQs(see future work)

Forhierarchical SJFCQs, UR is tractable because PQE is tractable

Fornon-hierarchical SJFCQs, the complexity of UR isunknown

• Thehardness proofof PQE (see later) crucially uses probabilities1/2and1 We settle the complexity of UR for SJFCQs by showing:

Theorem

LetQbe a non-hierarchical SJFCQ. ThenUR(Q)is#P-hard. Rest of the talk: proof sketch of this result

(22)

Our results

We only study the problem onSJFCQs(see future work)

Forhierarchical SJFCQs, UR is tractable because PQE is tractable

Fornon-hierarchical SJFCQs, the complexity of UR isunknown

• Thehardness proofof PQE (see later) crucially uses probabilities1/2and1 We settle the complexity of UR for SJFCQs by showing:

Theorem

LetQbe a non-hierarchical SJFCQ. ThenUR(Q)is#P-hard. Rest of the talk: proof sketch of this result

(23)

Our results

We only study the problem onSJFCQs(see future work)

Forhierarchical SJFCQs, UR is tractable because PQE is tractable

Fornon-hierarchical SJFCQs, the complexity of UR is unknown

• Thehardness proofof PQE (see later) crucially uses probabilities1/2and1

We settle the complexity of UR for SJFCQs by showing: Theorem

LetQbe a non-hierarchical SJFCQ. ThenUR(Q)is#P-hard. Rest of the talk: proof sketch of this result

(24)

Our results

We only study the problem onSJFCQs(see future work)

Forhierarchical SJFCQs, UR is tractable because PQE is tractable

Fornon-hierarchical SJFCQs, the complexity of UR is unknown

• Thehardness proofof PQE (see later) crucially uses probabilities1/2and1 We settle the complexity of UR for SJFCQs by showing:

Theorem

LetQbe a non-hierarchical SJFCQ. ThenUR(Q)is#P-hard.

Rest of the talk: proof sketch of this result

(25)

Our results

We only study the problem onSJFCQs(see future work)

Forhierarchical SJFCQs, UR is tractable because PQE is tractable

Fornon-hierarchical SJFCQs, the complexity of UR is unknown

• Thehardness proofof PQE (see later) crucially uses probabilities1/2and1 We settle the complexity of UR for SJFCQs by showing:

Theorem

LetQbe a non-hierarchical SJFCQ. ThenUR(Q)is#P-hard.

Rest of the talk: proof sketch of this result

(26)

Reducing toR-S-T-type queries

AnR-S-T-type queryis a non-hierarchical SJFCQ of the form:

R1(x), . . . ,Rr(x),S1(x,y), . . . ,Ss(x,y),T1(y), . . . ,Tt(y) for some integersr,s,t>0

Lemma:for any non-hierarchical SJFCQQ, there is anR-S-T-type queryQ0 such that UR(Q0)reduces toUR(Q)

atoms(x) atoms(x)∩atoms(y) atoms(y)

r s t

So it suffices to show thatUR(Q0)is#P-hardfor theR-S-T-type queriesQ0

In this talk:we focus for simplicity onQ1 :∃x y R(x),S(x,y),T(y)

(27)

Reducing toR-S-T-type queries

AnR-S-T-type queryis a non-hierarchical SJFCQ of the form:

R1(x), . . . ,Rr(x),S1(x,y), . . . ,Ss(x,y),T1(y), . . . ,Tt(y) for some integersr,s,t>0

Lemma:for any non-hierarchical SJFCQQ, there is anR-S-T-type queryQ0 such that UR(Q0)reduces toUR(Q)

atoms(x) atoms(x)∩atoms(y) atoms(y)

r s t

So it suffices to show thatUR(Q0)is#P-hardfor theR-S-T-type queriesQ0

In this talk:we focus for simplicity onQ1 :∃x y R(x),S(x,y),T(y)

(28)

Reducing toR-S-T-type queries

AnR-S-T-type queryis a non-hierarchical SJFCQ of the form:

R1(x), . . . ,Rr(x),S1(x,y), . . . ,Ss(x,y),T1(y), . . . ,Tt(y) for some integersr,s,t>0

Lemma:for any non-hierarchical SJFCQQ, there is anR-S-T-type queryQ0 such that UR(Q0)reduces toUR(Q)

atoms(x) atoms(x)∩atoms(y) atoms(y)

r s t

So it suffices to show thatUR(Q0)is#P-hardfor theR-S-T-type queriesQ0

In this talk:we focus for simplicity onQ1 :∃x y R(x),S(x,y),T(y)

(29)

Reducing toR-S-T-type queries

AnR-S-T-type queryis a non-hierarchical SJFCQ of the form:

R1(x), . . . ,Rr(x),S1(x,y), . . . ,Ss(x,y),T1(y), . . . ,Tt(y) for some integersr,s,t>0

Lemma:for any non-hierarchical SJFCQQ, there is anR-S-T-type queryQ0 such that UR(Q0)reduces toUR(Q)

atoms(x) atoms(x)∩atoms(y) atoms(y)

r s t

So it suffices to show thatUR(Q0)is#P-hardfor theR-S-T-type queriesQ0

In this talk:we focus for simplicity onQ1 :∃x y R(x),S(x,y),T(y)

(30)

Hard problem: counting independent sets of bipartite graphs u1

u2 u3

v1

v2

Independent setof a bipartite graph: subset of its vertices that contains no edge

Example:{u2,v1}

It is#P-hard, given a bipartite graph, to count its independent sets This easily shows the#P-hardnessof PQE (but not UR!) forQ1:∃x yR(x),S(x,y),T(y):

R(u1): 1/2 R(u2): 1/2 R(u3): 1/2

T(v1): 1/2

T(v2): 1/2 S: 1

S: 1 S: 1

S: 1 S: 1

We will show how to reduce from counting independent sets toUR(Q1)

(31)

Hard problem: counting independent sets of bipartite graphs u1

u2 u3

v1

v2

Independent setof a bipartite graph: subset of its vertices that contains no edge

Example:{u2,v1}

It is#P-hard, given a bipartite graph, to count its independent sets

This easily shows the#P-hardnessof PQE (but not UR!) forQ1:∃x yR(x),S(x,y),T(y): R(u1): 1/2

R(u2): 1/2 R(u3): 1/2

T(v1): 1/2

T(v2): 1/2 S: 1

S: 1 S: 1

S: 1 S: 1

We will show how to reduce from counting independent sets toUR(Q1)

(32)

Hard problem: counting independent sets of bipartite graphs u1

u2 u3

v1

v2

Independent setof a bipartite graph: subset of its vertices that contains no edge

Example:{u2,v1}

It is#P-hard, given a bipartite graph, to count its independent sets This easily shows the#P-hardnessof PQE (but not UR!) forQ1:∃x yR(x),S(x,y),T(y):

R(u1): 1/2 R(u2): 1/2 R(u3): 1/2

T(v1): 1/2

T(v2): 1/2 S: 1

S: 1 S: 1

S: 1 S: 1

We will show how to reduce from counting independent sets toUR(Q1)

(33)

Hard problem: counting independent sets of bipartite graphs u1

u2 u3

v1

v2

Independent setof a bipartite graph: subset of its vertices that contains no edge

Example:{u2,v1}

It is#P-hard, given a bipartite graph, to count its independent sets This easily shows the#P-hardnessof PQE (but not UR!) forQ1:∃x yR(x),S(x,y),T(y):

R(u1): 1/2 R(u2): 1/2 R(u3): 1/2

T(v1): 1/2

T(v2): 1/2 S: 1

S: 1 S: 1

S: 1 S: 1

We will show how to reduce from counting independent sets toUR(Q1)

(34)

Idea: parameterizing the count

u1

u2

u3

v1

v2

For a bipartite graph(U,V,E)and a subsetWUV of vertices, we write:

c(W)the number of edgescontainedinW

Here,c(W) =1

d(W)(resp.,d0(W)) the number of edges having exactly their left (resp., right) endpoint inW

Here,d(W) =2andd0(W) =1

e(W)the number of edgesexcluded fromW

Here,e(W) =1

Hard problem:counting independent setsX=|{W⊆UV |c(W) =0}|

Harder problem:computing all the values: Xc,d,d0,e =

{W ⊆UV |c(W) =candd(W) =dandd0(W) =d0 ande(W) =e}

(35)

Idea: parameterizing the count

u1

u2

u3

v1

v2

For a bipartite graph(U,V,E)and a subsetWUV of vertices, we write:

c(W)the number of edgescontainedinW

Here,c(W) =1

d(W)(resp.,d0(W)) the number of edges having exactly their left (resp., right) endpoint inW

Here,d(W) =2andd0(W) =1

e(W)the number of edgesexcluded fromW

Here,e(W) =1

Hard problem:counting independent setsX=|{W⊆UV |c(W) =0}|

Harder problem:computing all the values: Xc,d,d0,e =

{W ⊆UV |c(W) =candd(W) =dandd0(W) =d0 ande(W) =e}

(36)

Idea: parameterizing the count

u1

u2

u3

v1

v2

For a bipartite graph(U,V,E)and a subsetWUV of vertices, we write:

c(W)the number of edgescontainedinW

Here,c(W) =1

d(W)(resp.,d0(W)) the number of edges having exactly their left (resp., right) endpoint inW

Here,d(W) =2andd0(W) =1

e(W)the number of edgesexcluded fromW

Here,e(W) =1

Hard problem:counting independent setsX=|{W⊆UV |c(W) =0}|

Harder problem:computing all the values: Xc,d,d0,e =

{W ⊆UV |c(W) =candd(W) =dandd0(W) =d0 ande(W) =e}

(37)

Idea: parameterizing the count

u1

u2

u3

v1

v2

For a bipartite graph(U,V,E)and a subsetWUV of vertices, we write:

c(W)the number of edgescontainedinW

Here,c(W) =1

d(W)(resp.,d0(W)) the number of edges having exactly their left (resp., right) endpoint inW

Here,d(W) =2andd0(W) =1

e(W)the number of edgesexcluded fromW

Here,e(W) =1

Hard problem:counting independent setsX=|{W⊆UV |c(W) =0}|

Harder problem:computing all the values: Xc,d,d0,e =

{W ⊆UV |c(W) =candd(W) =dandd0(W) =d0 ande(W) =e}

(38)

Idea: parameterizing the count

u1

u2

u3

v1

v2

For a bipartite graph(U,V,E)and a subsetWUV of vertices, we write:

c(W)the number of edgescontainedinW

Here,c(W) =1

d(W)(resp.,d0(W)) the number of edges having exactly their left (resp., right) endpoint inW

Here,d(W) =2andd0(W) =1

e(W)the number of edgesexcluded fromW

Here,e(W) =1

Hard problem:counting independent setsX=|{W⊆UV |c(W) =0}|

Harder problem:computing all the values: Xc,d,d0,e =

{W ⊆UV |c(W) =candd(W) =dandd0(W) =d0 ande(W) =e}

(39)

Idea: parameterizing the count

u1

u2

u3

v1

v2

For a bipartite graph(U,V,E)and a subsetWUV of vertices, we write:

c(W)the number of edgescontainedinW

Here,c(W) =1

d(W)(resp.,d0(W)) the number of edges having exactly their left (resp., right) endpoint inW

Here,d(W) =2andd0(W) =1

e(W)the number of edgesexcluded fromW

Here,e(W) =1

Hard problem:counting independent setsX=|{W⊆UV |c(W) =0}|

Harder problem:computing all the values:

Xc,d,d0,e =

{W ⊆UV |c(W) =candd(W) =dandd0(W) =d0 ande(W) =e}

(40)

Idea: coding to several copies

We want to design areduction:

• We reducefrom(we want): given a bipartite graphG, compute theXc,d,d0,e

• We reduceto(we have): given a database instanceD, computeUR(Q1)

Idea:codeGto afamilyof instancesDpindexedbyp>0

Fix aboxBp(a,b)for indexp>0: an instance with two distinguished elements(a,b)

CodeGfor indexp>0to an instance by:

• putting anR-fact on eachU-vertex and aT-fact on eachV-vertex

• coding every edge(u,v)by acopy of the boxBp(u,v) u1

u2

u3

v1

v2

R(u1) R(u2) R(u3)

T(v1)

T(v2) Bp

Bp Bp

Bp

Bp

(41)

Idea: coding to several copies

We want to design areduction:

• We reducefrom(we want): given a bipartite graphG, compute theXc,d,d0,e

• We reduceto(we have): given a database instanceD, computeUR(Q1)

Idea:codeGto afamilyof instancesDpindexedbyp>0

Fix aboxBp(a,b)for indexp>0: an instance with two distinguished elements(a,b)

CodeGfor indexp>0to an instance by:

• putting anR-fact on eachU-vertex and aT-fact on eachV-vertex

• coding every edge(u,v)by acopy of the boxBp(u,v) u1

u2

u3

v1

v2

R(u1) R(u2) R(u3)

T(v1)

T(v2) Bp

Bp Bp

Bp

Bp

(42)

Idea: coding to several copies

We want to design areduction:

• We reducefrom(we want): given a bipartite graphG, compute theXc,d,d0,e

• We reduceto(we have): given a database instanceD, computeUR(Q1)

Idea:codeGto afamilyof instancesDpindexedbyp>0

Fix aboxBp(a,b)for indexp>0: an instance with two distinguished elements(a,b)

CodeGfor indexp>0to an instance by:

• putting anR-fact on eachU-vertex and aT-fact on eachV-vertex

• coding every edge(u,v)by acopy of the boxBp(u,v) u1

u2

u3

v1

v2

R(u1) R(u2) R(u3)

T(v1)

T(v2) Bp

Bp Bp

Bp

Bp

(43)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp Bp

We have:

Np= X

W⊆V

NWp

= X

W⊆V

γpc(W)δd(W)pp0)d0(W)ηpe(W) = X

c,d,d0,e

Xc,d,d0,e×γcpδpdp0)d0ηpe

whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1 when fixingR-facts onaand/orT-facts onb

(44)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp

Bp

We have:

Np= X

W⊆V

NWp

= X

W⊆V

γpc(W)δd(W)pp0)d0(W)ηpe(W) = X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηpe

whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1 when fixingR-facts onaand/orT-facts onb

(45)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp

Bp

We have:

Np= X

W⊆V

NWp

= X

W⊆V

γpc(W)δd(W)pp0)d0(W)ηpe(W) = X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηpe

whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1 when fixingR-facts onaand/orT-facts onb

(46)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp

Bp

We have:

Np= X

W⊆V

NWp

= X

W⊆V

γpc(W)δd(W)pp0)d0(W)ηpe(W) = X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηpe

whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1 when fixingR-facts onaand/orT-facts onb

(47)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp

Bp

We have:

Np= X

W⊆V

NWp

= X

W⊆V

γpc(W)δd(W)pp0)d0(W)ηpe(W) = X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηpe

whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1

when fixingR-facts onaand/orT-facts onb 12/14

(48)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp

Bp

We have:

Np= X

W⊆V

NWp = X

W⊆V

γpc(W)δd(W)p0p)d0(W)ηpe(W)

= X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηpe

whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1

when fixingR-facts onaand/orT-facts onb 12/14

(49)

Getting an equation system

Take the coding ofGfor indexp, and compute the numberNpof subinstancesviolatingQ1 R(u1)

R(u2) R(u3)

T(v1)

T(v2) Bp

Bp

Bp Bp

Bp

We have:

Np= X

W⊆V

NWp = X

W⊆V

γpc(W)δd(W)p0p)d0(W)ηpe(W) = X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηpe whereNWp is the number of subinstances violatingQ1when fixing theR-facts and T-facts to be precisely onW

NowNWp only depends on:

• The numbersc(W),d(W),d0(W),e(W)of edgescontained,dangling, orexcludedfromW

• The numbersγp,δp,δ0p,ηpof subinstances of the boxBpthat violateQ1

when fixingR-facts onaand/orT-facts onb 12/14

(50)

Equation system and conclusion

We have shown the equation:

Np= X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηep

where:

TheXc,d,d0,eare what wewant(to count independent sets)

TheNpare what wehave(by solvingUR(Q1))

Theγpcδpdp0)d0ηpearecoefficientsof a matrixMdepending on our choice of boxBp

In other words we have:

~N=M~X

We can design a box whereMisinvertible, so we can recover~Xfrom~N, showing hardness

(51)

Equation system and conclusion

We have shown the equation:

Np= X

c,d,d0,e

Xc,d,d0,e×γpcδpdp0)d0ηep

where:

TheXc,d,d0,eare what wewant(to count independent sets)

TheNpare what wehave(by solvingUR(Q1))

Theγpcδpdp0)d0ηpearecoefficientsof a matrixMdepending on our choice of boxBp

In other words we have:

~N=M~X

We can design a box whereMisinvertible, so we can recover~Xfrom~N, showing hardness

Références

Documents relatifs

However, while for acyclic and bounded hypertreewidth queries we have shown a number of examples of interesting approximations, for queries of bounded treewidth the study had

For instance, the #P- completeness of the combined complexity of the counting problem of ACQs al- lows us an easy #P-completeness proof for the counting problem of unions of ACQs

After finding mappings from the subgoals in the query to view, a major part of a rewriting process is spent in performing the cartesian products of a set of large buckets that

The automaton itself is closely related to the reasoning algorithm given in [8], but the representation of entailments via nondeterministic finite automata (NFA) will be essential

While the complexity of DLs has been studied extensively, data complexity in expressive DLs has been characterized only for answering atomic queries, and was still open for

One of the obstacles for showing hardness (which is required for the cases (3) and (5)) is that the set of all triple patterns occurring in the query has to be acyclic and of

In this paper, we consider a 3-shock wave, because a 1-shock wave can be handled by the same method.. For general hyperbolic system with relaxation, the existence of the shock

We have discussed that though the complexity of theory queries is unknown, the fact that we simulate every theory query individually allows us to assume that the required effort is