Result statement
We consider queriesclosed under homomorphisms:
•
GeneralizesCQsandUCQs,Datalog,Regular path queries...• Example:WorksAt/MemberOf+
•
Equivalent phrasing:infiniteunion of CQs• Example:WA/MO,WA/MO/MO,WA/MO/MO/MO, ... Theorem
•
Some queries closed under homomorphisms areUCQs: the previous dichotomy applies, PQE isPTIMEor#P-hard•
Forall other queries closed under homomorphisms, PQE is#P-hard•
The queryWA/MO+ isequivalenttoWA/MOwhich is asafe UCQ•
The queryWA/MO+/INisnot equivalent to a UCQ so PQE is#P-hardResult statement
We consider queriesclosed under homomorphisms:
•
GeneralizesCQsandUCQs,Datalog,Regular path queries...• Example:WorksAt/MemberOf+
•
Equivalent phrasing:infiniteunion of CQs• Example:WA/MO,WA/MO/MO,WA/MO/MO/MO, ... Theorem
•
Some queries closed under homomorphisms areUCQs: the previous dichotomy applies, PQE isPTIMEor#P-hard•
Forall other queries closed under homomorphisms, PQE is#P-hard•
The queryWA/MO+ isequivalenttoWA/MOwhich is asafe UCQ•
The queryWA/MO+/INisnot equivalent to a UCQ so PQE is#P-hardResult statement
We consider queriesclosed under homomorphisms:
•
GeneralizesCQsandUCQs,Datalog,Regular path queries...• Example:WorksAt/MemberOf+
•
Equivalent phrasing:infiniteunion of CQs• Example:WA/MO,WA/MO/MO,WA/MO/MO/MO, ...
Theorem
•
Some queries closed under homomorphisms areUCQs: the previous dichotomy applies, PQE isPTIMEor#P-hard•
Forall other queries closed under homomorphisms, PQE is#P-hard•
The queryWA/MO+ isequivalenttoWA/MOwhich is asafe UCQ•
The queryWA/MO+/INisnot equivalent to a UCQ so PQE is#P-hardResult statement
We consider queriesclosed under homomorphisms:
•
GeneralizesCQsandUCQs,Datalog,Regular path queries...• Example:WorksAt/MemberOf+
•
Equivalent phrasing:infiniteunion of CQs• Example:WA/MO,WA/MO/MO,WA/MO/MO/MO, ...
Theorem
•
Some queries closed under homomorphisms areUCQs:the previous dichotomy applies, PQE isPTIMEor#P-hard
•
Forall other queries closed under homomorphisms, PQE is#P-hard•
The queryWA/MO+ isequivalenttoWA/MOwhich is asafe UCQ•
The queryWA/MO+/INisnot equivalent to a UCQ so PQE is#P-hardResult statement
We consider queriesclosed under homomorphisms:
•
GeneralizesCQsandUCQs,Datalog,Regular path queries...• Example:WorksAt/MemberOf+
•
Equivalent phrasing:infiniteunion of CQs• Example:WA/MO,WA/MO/MO,WA/MO/MO/MO, ...
Theorem
•
Some queries closed under homomorphisms areUCQs:the previous dichotomy applies, PQE isPTIMEor#P-hard
•
Forall other queries closed under homomorphisms, PQE is#P-hard•
The queryWA/MO+isequivalenttoWA/MOwhich is asafe UCQ•
The queryWA/MO+/INisnot equivalent to a UCQ so PQE is#P-hardResult statement
We consider queriesclosed under homomorphisms:
•
GeneralizesCQsandUCQs,Datalog,Regular path queries...• Example:WorksAt/MemberOf+
•
Equivalent phrasing:infiniteunion of CQs• Example:WA/MO,WA/MO/MO,WA/MO/MO/MO, ...
Theorem
•
Some queries closed under homomorphisms areUCQs:the previous dichotomy applies, PQE isPTIMEor#P-hard
•
Forall other queries closed under homomorphisms, PQE is#P-hard•
The queryWA/MO+isequivalenttoWA/MOwhich is asafe UCQProof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but •
•
•
•
•
• violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
to
•
to
•
• to •
•
•
•
•
• IfQis still true then the model is “explained” by aunion of stars
Proof idea: finding hard patterns
•
Fix the queryQand find atight pattern, i.e,. a graph such that:•
• •
• satisfiesQ
but • violatesQ
•
If the query isunbounded, we can find atight pattern• Unbounded queries havearbitrarily largeminimal models
• Take one such model anddisconnect edgesas much as possible
• Unbounded queries havearbitrarily largeminimal models
•
• IfQis still true then the model is “explained” by aunion of stars10/17
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ
We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path x y z w
iff the corresponding world at therightsatisfiesQ... ... except we needmorefrom the hard pattern!
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ
We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path x y z w
iff the corresponding world at therightsatisfiesQ... ... except we needmorefrom the hard pattern!
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ
We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path y
... except we needmorefrom the hard pattern!
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ
We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path x y z w
iff the corresponding world at therightsatisfiesQ...
... except we needmorefrom the hard pattern!
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ
We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path y
... except we needmorefrom the hard pattern!
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ
We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path x y z w
iff the corresponding world at therightsatisfiesQ...
... except we needmorefrom the hard pattern! 11/17
Using hard patterns for #P-hardness
•
• •
• satisfiesQ
but • violatesQ
AND • violatesQ We can reduce from #PP2DNF like before:
a01
is coded as
•
Idea:possible worlds at thelefthave a path x y z w
From tight patterns to iterable patterns
When we cannot find a tight pattern, we can find aniterable pattern:
•
• • • •
•
n
satisfiesQfor alln∈N
but •
•
•
•
•
• violatesQ
Idea:use iterable patterns to reduce from the#P-hardproblem source-to-target connectivity:
•
Given a TID with asourceandsink, what is theprobabilitythat the sink isreachablefrom the sink?Technically challenging to get acorrectreduction!
From tight patterns to iterable patterns
When we cannot find a tight pattern, we can find aniterable pattern:
•
• • • •
•
n
satisfiesQfor alln∈N
but •
•
•
•
•
• violatesQ
Idea:use iterable patterns to reduce from the#P-hardproblem source-to-target connectivity:
•
Given a TID with asourceandsink, what is theprobabilitythat the sink isreachablefrom the sink?Technically challenging to get acorrectreduction!
From tight patterns to iterable patterns
When we cannot find a tight pattern, we can find aniterable pattern:
•
• • • •
•
n
satisfiesQfor alln∈N
but •
•
•
•
•
• violatesQ
Idea:use iterable patterns to reduce from the#P-hardproblem source-to-target connectivity:
•
Given a TID with asourceandsink, what is theprobabilitythat the sink isreachablefrom the sink?Technically challenging to get acorrectreduction!
From tight patterns to iterable patterns
When we cannot find a tight pattern, we can find aniterable pattern:
•
• • • •
•
n
satisfiesQfor alln∈N
but •
•
•
•
•
• violatesQ
Idea:use iterable patterns to reduce from the#P-hardproblem source-to-target connectivity:
•
Given a TID with asourceandsink, what is theprobabilitythat the sink isreachablefrom the sink?Technically challenging to get acorrectreduction!
From tight patterns to iterable patterns
When we cannot find a tight pattern, we can find aniterable pattern:
•
• • • •
•
n
satisfiesQfor alln∈N
but •
•
•
•
•
• violatesQ
Idea:use iterable patterns to reduce from the#P-hardproblem source-to-target connectivity:
•
Given a TID with asourceandsink, what is theprobabilitythat the sink isreachablefrom the sink?Technically challenging to get acorrectreduction!