Tractable Lineages on Treelike Instances:
Limits and Extensions
Antoine Amarilli1, Pierre Bourhis2, Pierre Senellart1,3 June 29th, 2016
1T ´el ´ecom ParisTech
2CNRS CRIStAL
3National University of Singapore
Tuple independent databases (TID)
• Probabilistic databases:modeluncertaintyabout data
• Simplest model:tuple independent databases(TID)
• Arelational databaseI
• Aprobability valuationπmapping each fact ofIto[0,1]
• Semanticsof a TID(I, π): aprobability distributiononI0⊆I:
• Each factF∈Iis eitherpresentorabsentwith probabilityπ(F)
• Assumeindependenceacross facts
Example: TID
S
a a 1
b v .5 b w .2
This TID(I, π)represents the followingprobability distribution: .5×.2
S a a b v b w
.5×(1−.2) S
a a
b v
(1−.5)×.2 S
a a
b w
(1−.5)×(1−.2) S
a a
Example: TID
S
a a 1
b v .5 b w .2
This TID(I, π)represents the followingprobability distribution:
.5×.2 S a a b v b w
.5×(1−.2) S
a a
b v
(1−.5)×.2 S
a a
b w
(1−.5)×(1−.2) S
a a
Example: TID
S
a a 1
b v .5 b w .2
This TID(I, π)represents the followingprobability distribution:
.5×.2 S a a b v b w
.5×(1−.2) S
a a
b v
(1−.5)×.2 S
a a
b w
(1−.5)×(1−.2) S
a a
Example: TID
S
a a 1
b v .5 b w .2
This TID(I, π)represents the followingprobability distribution:
.5×.2 S a a b v b w
.5×(1−.2) S
a a
b v
(1−.5)×.2 S
a a
b w
(1−.5)×(1−.2) S
a a
Example: TID
S
a a 1
b v .5 b w .2
This TID(I, π)represents the followingprobability distribution:
.5×.2 S a a b v b w
.5×(1−.2) S
a a
b v
(1−.5)×.2 S
a a
b w
(1−.5)×(1−.2) S
a a
Example: TID
S
a a 1
b v .5 b w .2
This TID(I, π)represents the followingprobability distribution:
.5×.2 S a a b v b w
.5×(1−.2) S
a a
b v
(1−.5)×.2 S
a a
b w
(1−.5)×(1−.2) S
a a
Probabilistic query evaluation (PQE)
Let us fix:
• Relational signatureσ
• ClassI ofrelational instancesonσ (e.g., acyclic, treelike)
• ClassQofBoolean queries(e.g., CQs, acyclic CQs)
Probabilistic query evaluation(PQE) problem forQandI:
• Fix aqueryq∈ Q
• Read aninstanceI∈ I and aprobability valuationπ
• Compute theprobabilitythat(I, π)satisfiesq
• Data complexity:measured as a function of(I, π)
Probabilistic query evaluation (PQE)
Let us fix:
• Relational signatureσ
• ClassI ofrelational instancesonσ (e.g., acyclic, treelike)
• ClassQofBoolean queries(e.g., CQs, acyclic CQs)
Probabilistic query evaluation(PQE) problem forQandI:
• Fix aqueryq∈ Q
• Read aninstanceI∈ I and aprobability valuationπ
• Compute theprobabilitythat(I, π)satisfiesq
• Data complexity:measured as a function of(I, π)
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃xyR(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃xyR(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:
.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×
(1−(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−
(1−.5×.3)×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)
×(1−.2×.7)) =.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7))
=.1076
Example: PQE
Signatureσ, classQofconjunctive queries, classI ofall instances.
q:∃x y R(x)∧S(x,y)∧T(y)
R a 1 b .4 c .6
S
a a 1
b v .5 b w .2
T v .3 w .7 b 1
• The query is true iffR(b)is here and one of:
• S(b,v)andT(v)are here
• S(b,w)andT(w)are here
→ Probability:.4×(1−(1−.5×.3)×(1−.2×.7)) =.1076
Complexity of probabilistic query evaluation (PQE)
Question:what is thecomplexityof PQE
depending on the classQofqueriesand classI ofinstances?
• Existingdichotomy resultonQ[Dalvi and Suciu, 2012]
• Qare unions of CQs,Iis all instances
• There is a classS ⊆ Qofsafe queries
→ PQE isPTIMEfor anyq∈ Son all instances
→ PQE is#P-hardfor anyq∈ Q\Son all instances
• q:∃x y R(x)∧S(x,y)∧T(y)isunsafe!
Complexity of probabilistic query evaluation (PQE)
Question:what is thecomplexityof PQE
depending on the classQofqueriesand classI ofinstances?
• Existingdichotomy resultonQ[Dalvi and Suciu, 2012]
• Qare unions of CQs,Iis all instances
• There is a classS ⊆ Qofsafe queries
→ PQE isPTIMEfor anyq∈ Son all instances
→ PQE is#P-hardfor anyq∈ Q\Son all instances
• q:∃x y R(x)∧S(x,y)∧T(y)isunsafe!
Complexity of probabilistic query evaluation (PQE)
Question:what is thecomplexityof PQE
depending on the classQofqueriesand classI ofinstances?
• Existingdichotomy resultonQ[Dalvi and Suciu, 2012]
• Qare unions of CQs,Iis all instances
• There is a classS ⊆ Qofsafe queries
→ PQE isPTIMEfor anyq∈ Son all instances
→ PQE is#P-hardfor anyq∈ Q\Son all instances
• q:∃x y R(x)∧S(x,y)∧T(y)isunsafe!
Complexity of probabilistic query evaluation (PQE)
Question:what is thecomplexityof PQE
depending on the classQofqueriesand classI ofinstances?
• Existingdichotomy resultonQ[Dalvi and Suciu, 2012]
• Qare unions of CQs,Iis all instances
• There is a classS ⊆ Qofsafe queries
→ PQE isPTIMEfor anyq∈ Son all instances
→ PQE is#P-hardfor anyq∈ Q\Son all instances
• q:∃x y R(x)∧S(x,y)∧T(y)isunsafe!
Complexity of probabilistic query evaluation (PQE)
Question:what is thecomplexityof PQE
depending on the classQofqueriesand classI ofinstances?
• Existingdichotomy resultonQ[Dalvi and Suciu, 2012]
• Qare unions of CQs,Iis all instances
• There is a classS ⊆ Qofsafe queries
→ PQE isPTIMEfor anyq∈ Son all instances
→ PQE is#P-hardfor anyq∈ Q\Son all instances
• q:∃x y R(x)∧S(x,y)∧T(y)isunsafe!
Instance-based dichotomy
→ We show adichotomy resultonIinstead:
• Qare Boolean monadic second-order queries (includes all UCQs)
→ PQE is inlinear timeforQon anybounded-treewidthclassI up to arithmetic costs [Same authors, ICALP’15]
→ This talk:PQE isintractableforQ
on anyunbounded-treewidthclassI (under some assumptions)
→ Treewidthmeasures how much data is close to atree
• Treeshave treewidth1
• Cycleshave treewidth2
• k-cliquesand(k−1)-gridshave treewidthk−1
Instance-based dichotomy
→ We show adichotomy resultonIinstead:
• Qare Boolean monadic second-order queries (includes all UCQs)
→ PQE is inlinear timeforQon anybounded-treewidthclassI up to arithmetic costs [Same authors, ICALP’15]
→ This talk:PQE isintractableforQ
on anyunbounded-treewidthclassI (under some assumptions)
→ Treewidthmeasures how much data is close to atree
• Treeshave treewidth1
• Cycleshave treewidth2
• k-cliquesand(k−1)-gridshave treewidthk−1
Instance-based dichotomy
→ We show adichotomy resultonIinstead:
• Qare Boolean monadic second-order queries (includes all UCQs)
→ PQE is inlinear timeforQon anybounded-treewidthclassI up to arithmetic costs [Same authors, ICALP’15]
→ This talk:PQE isintractableforQ
on anyunbounded-treewidthclassI (under some assumptions)
→ Treewidthmeasures how much data is close to atree
• Treeshave treewidth1
• Cycleshave treewidth2
• k-cliquesand(k−1)-gridshave treewidthk−1
Instance-based dichotomy
→ We show adichotomy resultonIinstead:
• Qare Boolean monadic second-order queries (includes all UCQs)
→ PQE is inlinear timeforQon anybounded-treewidthclassI up to arithmetic costs [Same authors, ICALP’15]
→ This talk:PQE isintractableforQ
on anyunbounded-treewidthclassI (under some assumptions)
→ Treewidthmeasures how much data is close to atree
• Treeshave treewidth1
• Cycleshave treewidth2
• k-cliquesand(k−1)-gridshave treewidthk−1
Main result: hardness of PQE
Theorem
For any arity-2 signatureσ, there is afirst-orderqueryqsuch that for any constructibleunbounded-treewidthclassI,
the PQE problem forQ={q}andIis#P-hardunder RP reductions
• Arity-2: Relations have arity≤2(and one has arity2), i.e.,graphs
• Unbounded-treewidth: for allk∈N, there isIk ∈ I of treewidth≥k
• Constructible: givenk, we cancomputesuch an instanceIkin PTIME
• #P-hard under RP reductions: reduce in PTIME with high probability from the problem of counting accepting paths of a PTIME machine
Table of contents
Introduction
Proof sketch
Extensions Conclusion
Idea: Topological minors
• Gis atopological minorofHif:
G H
Idea: Topological minors
• Gis atopological minorofHif:
G H
Idea: Topological minors
• Gis atopological minorofHif:
3 1
2
4 3 4
2 1
maps vertices to vertices maps edges to vertex-disjoint paths
Embedding:
G H
Topological minor extraction results
Theorem [Robertson and Seymour, 1986]
For any planar graphGof degree≤3,
for any graphHofsufficiently high treewidth, Gis a topological minor ofH.
More recently:
Theorem [Chekuri and Chuzhoy, 2014] There is a certain constant c∈Nsuch that
for any planar graphGof degree≤3and graphHoftreewidth≥ |G|c, we can embedGas atopological minorofHin PTIME with high proba
Topological minor extraction results
Theorem [Robertson and Seymour, 1986]
For any planar graphGof degree≤3,
for any graphHofsufficiently high treewidth, Gis a topological minor ofH.
More recently:
Theorem [Chekuri and Chuzhoy, 2014]
There is a certain constant c∈Nsuch that
for any planar graphGof degree≤3and graphHoftreewidth≥ |G|c, we can embedGas atopological minorofHin PTIME with high proba
Proof sketch
• Choose aproblemfrom which to reduce:
• Must be#P-hardon planar degree-3 graphs
• Must be encodable to anFO queryq
→ We use the problem of countinggraph matchings
• Given aninput graphG, computek··=|G|c
• Compute in PTIME aninstanceIk ofI of treewidth≥k
• Compute in randomized PTIME anembeddingofGinIk
• Construct aprobability valuationπofIk such that:
• Unneccessary edges ofIkare removed
• PQE forqgives the answerto the hard problem
→ Easy for MSO buttrickierfor FO
Proof sketch
• Choose aproblemfrom which to reduce:
• Must be#P-hardon planar degree-3 graphs
• Must be encodable to anFO queryq
→ We use the problem of countinggraph matchings
• Given aninput graphG, computek··=|G|c
• Compute in PTIME aninstanceIk ofI of treewidth≥k
• Compute in randomized PTIME anembeddingofGinIk
• Construct aprobability valuationπofIk such that:
• Unneccessary edges ofIkare removed
• PQE forqgives the answerto the hard problem
→ Easy for MSO buttrickierfor FO
Proof sketch
• Choose aproblemfrom which to reduce:
• Must be#P-hardon planar degree-3 graphs
• Must be encodable to anFO queryq
→ We use the problem of countinggraph matchings
• Given aninput graphG, computek··=|G|c
• Compute in PTIME aninstanceIk ofI of treewidth≥k
• Compute in randomized PTIME anembeddingofGinIk
• Construct aprobability valuationπofIk such that:
• Unneccessary edges ofIkare removed
• PQE forqgives the answerto the hard problem
→ Easy for MSO buttrickierfor FO
Proof sketch
• Choose aproblemfrom which to reduce:
• Must be#P-hardon planar degree-3 graphs
• Must be encodable to anFO queryq
→ We use the problem of countinggraph matchings
• Given aninput graphG, computek··=|G|c
• Compute in PTIME aninstanceIk ofI of treewidth≥k
• Compute in randomized PTIME anembeddingofGinIk
• Construct aprobability valuationπofIk such that:
• Unneccessary edges ofIkare removed
• PQE forqgives the answerto the hard problem
→ Easy for MSO buttrickierfor FO
Proof sketch
• Choose aproblemfrom which to reduce:
• Must be#P-hardon planar degree-3 graphs
• Must be encodable to anFO queryq
→ We use the problem of countinggraph matchings
• Given aninput graphG, computek··=|G|c
• Compute in PTIME aninstanceIk ofI of treewidth≥k
• Compute in randomized PTIME anembeddingofGinIk
• Construct aprobability valuationπofIk such that:
• Unneccessary edges ofIkare removed
• PQE forqgives the answerto the hard problem
→ Easy for MSO buttrickierfor FO
Table of contents
Introduction Proof sketch Extensions
Conclusion
Non-probabilistic evaluation
Apply [Chekuri and Chuzhoy, 2014] to method of [Ganian et al., 2014]
for MSOnon-probabilisticquery evaluation (QE):
Theorem
For any arity-2 signatureσ and levelΣPi of the polynomial hierarchy, there is aMSOqueryqi such that,
for any constructible,subinstance-closed,unbounded-twclassI, the QE problem forQ={qi}andI isΣPi-hardunder RP reductions
Variant:we also show a result like in [Ganian et al., 2014], with:
• weakerconstructibilityrequirement onI:
→ I isdensely unbounded poly-logarithmically
• strongercomplexity hypothesis:
→ PH does not admit2o(n)-sized circuits
Non-probabilistic evaluation
Apply [Chekuri and Chuzhoy, 2014] to method of [Ganian et al., 2014]
for MSOnon-probabilisticquery evaluation (QE):
Theorem
For any arity-2 signatureσ and levelΣPi of the polynomial hierarchy, there is aMSOqueryqi such that,
for any constructible,subinstance-closed,unbounded-twclassI, the QE problem forQ={qi}andI isΣPi-hardunder RP reductions Variant:we also show a result like in [Ganian et al., 2014], with:
• weakerconstructibilityrequirement onI:
→ I isdensely unbounded poly-logarithmically
• strongercomplexity hypothesis:
→ PH does not admit2o(n)-sized circuits
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃x y R(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
0
1
0 1
1
0
1 0
1
0 1
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃x y R(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
0
1
0 1
1
0
1 0
1
0 1
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃xy R(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
. . .
0
1
0 1
1
0
1 0
1
0 1
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃xyR(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
s2?
0
1
. . . . . .
0 1
1
0
1 0
1
0 1
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃xyR(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
s2?
0
1
t1? . . .
0 1
1
0
1
0
1
0 1
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃xyR(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
s2?
0
1
t1? s3?
0 1
1
0
1
. . .
0
1
0 1
Lower bound on OBDD representations OBDDfor a queryqon instanceI:
ordered decision diagram on the facts ofIto decide whetherqholds
q:∃xyR(x)∧S(x,y)∧T(y)
R a r1
b r2
c r3
S a a s1
b v s2
b w s3
T v t1
w t2
b t3
r2?
0
s2?
0
1
t1? s3?
0 1
1
0
1
t2?
0
1
0 1
Lower bound on OBDD representations (result)
• If we find anOBDDofqonIin PTIME, thenPQEofqonIalso is
→ Showinexistence of poly-size OBDDs(rather thanPQE hardness)
Theorem
For any arity-2 signatureσ, there is aUCQ with inequalities qs.t. for anyIof treewidthdensely unbounded poly-logarithmically, qhasno OBDDs of polynomial sizeon instances ofI
→ Meta-dichotomyon the connected UCQ6=for which this holds
Lower bound on OBDD representations (result)
• If we find anOBDDofqonIin PTIME, thenPQEofqonIalso is
→ Showinexistence of poly-size OBDDs(rather thanPQE hardness) Theorem
For any arity-2 signatureσ, there is aUCQ with inequalities qs.t.
for anyIof treewidthdensely unbounded poly-logarithmically, qhasno OBDDs of polynomial sizeon instances ofI
→ Meta-dichotomyon the connected UCQ6=for which this holds
Lower bound on OBDD representations (result)
• If we find anOBDDofqonIin PTIME, thenPQEofqonIalso is
→ Showinexistence of poly-size OBDDs(rather thanPQE hardness) Theorem
For any arity-2 signatureσ, there is aUCQ with inequalities qs.t.
for anyIof treewidthdensely unbounded poly-logarithmically, qhasno OBDDs of polynomial sizeon instances ofI
→ Meta-dichotomyon the connected UCQ6=for which this holds
Also in paper
• Hardness results for MSOmatch counting:
→ Count how many subsetsXare such thatIsatisfiesq(X)
• Connect thetractability resultof MSO on treelike TID to the study oftractable lineages:
→ d-DNNFs, OBDDs, formulae, etc.
• Connect the same result totractability of safe queries:
• Inversion-freequeries: subclass of safe queries, tractable OBDDs
→ We can alwaysrewritetheir input instances totreelike instances in alineage-preservingway (hence, probability-preserving)
Table of contents
Introduction Proof sketch Extensions Conclusion
Summary of our dichotomy
Upper. PQE forMSOontreelike instances
haslineardata complexity up to arithmetic costs
Lower. PQE forFOonanyconstructible, arity-2, unbounded-tw instance family is#P-hardunder RP reductions
→ Bounded treewidth isthe right notionfor tractability of PQE
Summary of our dichotomy
Upper. PQE forMSOontreelike instances
haslineardata complexity up to arithmetic costs Lower. PQE forFOonanyconstructible, arity-2, unbounded-tw
instance family is#P-hardunder RP reductions
→ Bounded treewidth isthe right notionfor tractability of PQE
Summary of our dichotomy
Upper. PQE forMSOontreelike instances
haslineardata complexity up to arithmetic costs Lower. PQE forFOonanyconstructible, arity-2, unbounded-tw
instance family is#P-hardunder RP reductions
→ Bounded treewidth isthe right notionfor tractability of PQE
Future work
• Can we show #P-hardness underusual P reductions?
→ Depends on [Chekuri and Chuzhoy, 2014]
• Can we extend the result toarbitrary aritysignatures?
• Can we extend the result to weakerquery languageslikeUCQ6=? Conjecture
PQE is hard on any constructible unbounded-tw family for: q: (E(x,y)∨E(y,x))∧(E(y,z)∨E(z,y))∧x6=z
→ This query is alerady hard in terms ofOBDDs
Thanks for your attention!
Future work
• Can we show #P-hardness underusual P reductions?
→ Depends on [Chekuri and Chuzhoy, 2014]
• Can we extend the result toarbitrary aritysignatures?
• Can we extend the result to weakerquery languageslikeUCQ6=? Conjecture
PQE is hard on any constructible unbounded-tw family for: q: (E(x,y)∨E(y,x))∧(E(y,z)∨E(z,y))∧x6=z
→ This query is alerady hard in terms ofOBDDs
Thanks for your attention!
Future work
• Can we show #P-hardness underusual P reductions?
→ Depends on [Chekuri and Chuzhoy, 2014]
• Can we extend the result toarbitrary aritysignatures?
• Can we extend the result to weakerquery languageslikeUCQ6=? Conjecture
PQE is hard on any constructible unbounded-tw family for:
q: (E(x,y)∨E(y,x))∧(E(y,z)∨E(z,y))∧x6=z
→ This query is alerady hard in terms ofOBDDs
Thanks for your attention!
Future work
• Can we show #P-hardness underusual P reductions?
→ Depends on [Chekuri and Chuzhoy, 2014]
• Can we extend the result toarbitrary aritysignatures?
• Can we extend the result to weakerquery languageslikeUCQ6=? Conjecture
PQE is hard on any constructible unbounded-tw family for:
q: (E(x,y)∨E(y,x))∧(E(y,z)∨E(z,y))∧x6=z
→ This query is alerady hard in terms ofOBDDs
Thanks for your attention!
References I
Amarilli, A., Bourhis, P., and Senellart, P. (2015).
Provenance circuits for trees and treelike instances.
InProc. ICALP, LNCS, pages 56–68.
Chaudhuri, S. and Vardi, M. Y. (1992).
On the equivalence of recursive and nonrecursive Datalog programs.
InPODS.
Chekuri, C. and Chuzhoy, J. (2014).
Polynomial bounds for the grid-minor theorem.
InSTOC.
References II
Dalvi, N. and Suciu, D. (2012).
The dichotomy of probabilistic inference for unions of conjunctive queries.
JACM, 59(6):30.
Ganian, R., Hlinˇen`y, P., Langer, A., Obdrˇz´alek, J., Rossmanith, P., and Sikdar, S. (2014).
Lower bounds on the complexity of MSO1 model-checking.
JCSS, 1(80).
Robertson, N. and Seymour, P. D. (1986).
Graph minors. V. Excluding a planar graph.
J. Comb. Theory, Ser. B, 41(1).
Encoding treelike instances [Chaudhuri and Vardi, 1992]
Instance:
N a b b c c d d e e f
S a c b e
Gaifman graph: a
b
c d
e f
Tree decomp.:
a b c b c e c d e e f
Tree encoding:
N(a1,a2) N(a2,a3) S(a1,a3) S(a2,a4) N(a3,a1) N(a1,a4)
N(a4,a1)
Encoding treelike instances [Chaudhuri and Vardi, 1992]
Instance:
N a b b c c d d e e f
S a c b e
Gaifman graph:
a
b
c d
e f
Tree decomp.:
a b c b c e c d e e f
Tree encoding:
N(a1,a2) N(a2,a3) S(a1,a3) S(a2,a4) N(a3,a1) N(a1,a4)
N(a4,a1)
Encoding treelike instances [Chaudhuri and Vardi, 1992]
Instance:
N a b b c c d d e e f
S a c b e
Gaifman graph:
a
b
c d
e f
Tree decomp.:
a b c b c e c d e e f
Tree encoding:
N(a1,a2) N(a2,a3) S(a1,a3) S(a2,a4) N(a3,a1) N(a1,a4)
N(a4,a1)
Encoding treelike instances [Chaudhuri and Vardi, 1992]
Instance:
N a b b c c d d e e f
S a c b e
Gaifman graph:
a
b
c d
e f
Tree decomp.:
a b c b c e c d e e f
Tree encoding:
N(a1,a2) N(a2,a3) S(a1,a3) S(a2,a4) N(a3,a1) N(a1,a4)
N(a4,a1)
Defining the query
G Ik
1 2 ⇒ 1 2
• In the embedding, edges ofGcan becomelong pathsinIk
• qmust answer the hard problem onGdespite subdivisions
→ Easy in MSO but tricky inFO!
→ Ourqrestricts to asubset of the worldsof known weight and gives the right answerup to renormalization
Defining the query
G Ik
1 2 ⇒ 1 2
• In the embedding, edges ofGcan becomelong pathsinIk
• qmust answer the hard problem onGdespite subdivisions
→ Easy in MSO but tricky inFO!
→ Ourqrestricts to asubset of the worldsof known weight and gives the right answerup to renormalization