• Aucun résultat trouvé

Hardness for unweighted PQE

Problem statement

We restrict back toCQs

We imposeself-join-freeness: every edge color is different

x y z w x y

z w

Existing dichotomy:

• IfQonly consists ofstars, then it is safe andPQE(Q)is inPTIME

• In all other cases,PQE(Q)is#P-hard

But what if all facts of the TIDs hadprobability 1/2?

→ Equivalently: given a graphG, how manysubgraphssatisfyQ

We call this problemMC(Q): model countingforQ Theorem

For anyself-join-free CQQ, ifQis unsafe thenMC(Q)is#P-hard.

Problem statement

We restrict back toCQs

We imposeself-join-freeness: every edge color is different

x y z w x y

z w

Existing dichotomy:

• IfQonly consists ofstars, then it is safe andPQE(Q)is inPTIME

• In all other cases,PQE(Q)is#P-hard

But what if all facts of the TIDs hadprobability 1/2?

→ Equivalently: given a graphG, how manysubgraphssatisfyQ

We call this problemMC(Q): model countingforQ Theorem

For anyself-join-free CQQ, ifQis unsafe thenMC(Q)is#P-hard.

Problem statement

We restrict back toCQs

We imposeself-join-freeness: every edge color is different

x y z w x y

z w

Existing dichotomy:

• IfQonly consists ofstars, then it is safe andPQE(Q)is inPTIME

• In all other cases,PQE(Q)is#P-hard

But what if all facts of the TIDs hadprobability 1/2?

→ Equivalently: given a graphG, how manysubgraphssatisfyQ

We call this problemMC(Q): model countingforQ Theorem

For anyself-join-free CQQ, ifQis unsafe thenMC(Q)is#P-hard.

Problem statement

We restrict back toCQs

We imposeself-join-freeness: every edge color is different

x y z w x y

z w

Existing dichotomy:

• IfQonly consists ofstars, then it is safe andPQE(Q)is inPTIME

• In all other cases,PQE(Q)is#P-hard

But what if all facts of the TIDs hadprobability 1/2?

→ Equivalently: given a graphG, how manysubgraphssatisfyQ

We call this problemMC(Q): model countingforQ

Theorem

For anyself-join-free CQQ, ifQis unsafe thenMC(Q)is#P-hard.

Problem statement

We restrict back toCQs

We imposeself-join-freeness: every edge color is different

x y z w x y

z w

Existing dichotomy:

• IfQonly consists ofstars, then it is safe andPQE(Q)is inPTIME

• In all other cases,PQE(Q)is#P-hard

But what if all facts of the TIDs hadprobability 1/2?

→ Equivalently: given a graphG, how manysubgraphssatisfyQ

We call this problemMC(Q): model countingforQ Theorem

For anyself-join-free CQQ, ifQis unsafe thenMC(Q)is#P-hard.

First step: Restricting to a simpler query

For any unsafe query, we can reduce fromsimpler queries, essentially:

x y z w

→We must show thatMC(Q)is #P-hard forthis query

Can we use ourearlier reductionfor #P-hardness of PQE?

a01

a02

a03

a1

a2

a3

1/2 1/2 1/2

b1

b2

b01

b02 1/2

1/2 1

1 1

1

1

→Problem: this reduction crucially usesprobability 1

First step: Restricting to a simpler query

For any unsafe query, we can reduce fromsimpler queries, essentially:

x y z w

→We must show thatMC(Q)is #P-hard forthis query Can we use ourearlier reductionfor #P-hardness of PQE?

a01

a02

a03

a1

a2

a3

1/2 1/2 1/2

b1

b2

b01

b02 1/2

1/2 1

1 1

1

1

→Problem: this reduction crucially usesprobability 1

First step: Restricting to a simpler query

For any unsafe query, we can reduce fromsimpler queries, essentially:

x y z w

→We must show thatMC(Q)is #P-hard forthis query Can we use ourearlier reductionfor #P-hardness of PQE?

a01

a02

a03

a1

a2

a3

1/2 1/2 1/2

b1

b2

b01

b02 1/2

1/2 1

1 1

1

1

Getting to an equation system We want to reduce fromPQE(Q), on some graphGwith probabilities

a01

Task: count the numberXofred-blue edge subsetsthatviolateQ

Split thesubsetson someparametere.g., the number of nodes

X=X1, . . . ,Xk

Create unweighted copies ofGmodified with somegadgets e.g., replace each edge by multiple copies of a path

CreatedG1, . . . ,Gk

Getting to an equation system We want to reduce fromPQE(Q), on some graphGwith probabilities

a01

Task: count the numberXofred-blue edge subsetsthatviolateQ

Split thesubsetson someparametere.g., the number of nodes

X=X1, . . . ,Xk

Create unweighted copies ofGmodified with somegadgets e.g., replace each edge by multiple copies of a path

CreatedG1, . . . ,Gk

Getting to an equation system We want to reduce fromPQE(Q), on some graphGwith probabilities

a01

Task: count the numberXofred-blue edge subsetsthatviolateQ

Split thesubsetson someparametere.g., the number of nodes

X=X1, . . . ,Xk

Create unweighted copies ofGmodified with somegadgets e.g., replace each edge by multiple copies of a path

CreatedG1, . . . ,Gk

Getting to an equation system We want to reduce fromPQE(Q), on some graphGwith probabilities

a01

Task: count the numberXofred-blue edge subsetsthatviolateQ

Split thesubsetson someparametere.g., the number of nodes

X=X1, . . . ,Xk

Create unweighted copies ofGmodified with somegadgets e.g., replace each edge by multiple copies of a path

CreatedG1, . . . ,Gk

Using the equation system

We have obtained the system:

→ If the matrix isinvertible, then we have succeeded

We can choose gadgets and parameters to get aVandermonde matrix, and show invertibility via severalarithmetical tricks

Using the equation system

We have obtained the system:

→ If the matrix isinvertible, then we have succeeded

We can choose gadgets and parameters to get aVandermonde matrix, and show invertibility via severalarithmetical tricks

Using the equation system

We have obtained the system:

→ If the matrix isinvertible, then we have succeeded

We can choose gadgets and parameters to get aVandermonde matrix, and show invertibility via severalarithmetical tricks

Using the equation system

We have obtained the system:

→ If the matrix isinvertible, then we have succeeded

We can choose gadgets and parameters to get aVandermonde matrix, and show invertibility via severalarithmetical tricks

Using the equation system

We have obtained the system:

→ If the matrix isinvertible, then we have succeeded

We can choose gadgets and parameters to get aVandermonde matrix, and show invertibility via severalarithmetical tricks

Documents relatifs