10.01.2015 Views

Sets with Cardinality Constraints in Satisfiability Modulo Theories

Sets with Cardinality Constraints in Satisfiability Modulo Theories

Sets with Cardinality Constraints in Satisfiability Modulo Theories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 Philippe Suter, Rob<strong>in</strong> Steiger, and Viktor Kuncak<br />

<strong>in</strong>teger constra<strong>in</strong>ts<br />

k 1 > k 3 reduction of φ 1<br />

∧ k 13 = 0 ∧ k 7 + k 10 > k 7 + k 11 reduction of φ 2<br />

∧ k 4 = k 0 + k 1 = k 6 + k 8 + k 9 + k 12 representations of | B c |<br />

∧ k 5 = k 2 + k 3 = k 7 + k 10 + k 11 + k 13 representations of | B |<br />

A possible satisfy<strong>in</strong>g assignment for the <strong>in</strong>teger variables is k 4 = 2, k 0 = k 1 =<br />

k 2 = k 5 = k 8 = k 9 = k 10 = 1, and k 3 = k 6 = k 7 = k 11 = k 12 = k 13 = 0. From<br />

these values, we can build the assignment to set variables<br />

U 1 = {e 1 , e 2 , e 3 }, A = {e 1 }, B = {e 2 } for φ 1<br />

U 2 = {e 4 , e 5 , e 6 }, B = {e 4 }, C = {e 4 , e 5 }, D = {e 6 } for φ 2<br />

F<strong>in</strong>ally, to build a model for φ 1 ∧φ 2 , we need to construct two bijections f 1 and f 2<br />

such that f 1 (e 4 ) = f 2 (e 2 ) and f 1 [{e 5 , e 6 }] = f 2 [{e 1 , e 3 }]. This is always possible<br />

<strong>in</strong> this decision procedure, because we constra<strong>in</strong> the sizes of the Venn regions of<br />

shared variables to be equal. Intuitively, the freedom <strong>in</strong> the construction for this<br />

example comes from the fact that when we merge the models, the overlapp<strong>in</strong>g<br />

between C or D and A is unconstra<strong>in</strong>ed: we can choose to map either e 5 or e 6 to<br />

the same element as e 1 , <strong>in</strong> which case either C or D will share an element <strong>with</strong><br />

A. So one possible model for φ is A = {e 1 }, B = {e 2 }, C = {e 1 , e 2 }, D = {e 3 }.<br />

(Here we chose the identity function for f 1 .) Note that this model also satisfies<br />

the property of models described <strong>in</strong> Lemma 1, s<strong>in</strong>ce, <strong>in</strong> this <strong>in</strong>terpretation, A ≠ C<br />

and A ≠ D.<br />

3.3 Hypertree Decompositions<br />

In general, and as <strong>in</strong> the previous example, the constra<strong>in</strong>ts φ i <strong>in</strong> Theorem 3 can<br />

conta<strong>in</strong> top-level conjunctions. It is thus <strong>in</strong> pr<strong>in</strong>ciple possible to decompose them<br />

further. In this section, we <strong>in</strong>troduce a hypergraph representation of constra<strong>in</strong>ts<br />

from which it is straightforward to apply the decision procedure presented above<br />

recursively.<br />

Def<strong>in</strong>ition 4 (Hypertree Decomposition). Let φ be a QFBAPA formula and<br />

let V = vars(φ). Let φ 1 , . . . , φ n be top-level conjuncts of φ and V 1 , . . . , V n the sets<br />

of variables appear<strong>in</strong>g <strong>in</strong> them, respectively. We assume <strong>with</strong>out loss of generality<br />

that V i ≠ V j for i ≠ j. (If two constra<strong>in</strong>ts φ i and φ j have the same set of<br />

variables, consider <strong>in</strong>stead the constra<strong>in</strong>t φ i ∧ φ j .) Let V denote {V 1 , . . . , V n }.<br />

Let H = (V , E) be a hypergraph on the set of sets of variables V (so E ⊆ 2 V ).<br />

Let l : E → 2 V be a label<strong>in</strong>g function that associates to each hyperedge a subset of<br />

the set variables of φ (that subset need not be one of V i ). We call H a hypertree<br />

decomposition of φ, if the follow<strong>in</strong>g properties hold:<br />

(H1) ∀V i , V j . V i ∩ V j ≠ ∅ =⇒ ∃E ∈ E . V i ∈ E ∧ V j ∈ E ∧ (V i ∩ V j ) ⊆ l(E)<br />

(H2) ∀E ∈ E, ∀V ∈ V . V ∈ E ⇐⇒ V ∩ l(E) ≠ ∅<br />

(H3) H is acyclic 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!