How to name types of constraints?

114 Views Asked by At

I am writing a paper for school (HS level) and I defined different types of constraints for pragmatic reasons. The descriptions and examples are here:enter image description here

I would like to refer to them by something simple, ideally one word or an understandable abbreviation, further in the text and I would really appreciate some suggestions since I have zero idea how to do this kind of thing. If you found some things that do not make sense in the screenshot, please let me know too!

Thanks

2

There are 2 best solutions below

4
On

What you have are a collection of $relations$. A relation can be thought of as a set of ordered pairs, the left element of each belonging to one set, the right to some (other or possibly the same) set. Let me give you some examples:

Let $P$ be the set of people, and $H$ be the set of houses, and say we have relations $N : (H,H)$ with the semantic meaning "is to the left of" amd $L (P,H)$ with the semantic meaning "lives in." Then the statement

Person A lives in the house to the left of the house occupied by person B

would be written as

$$ L(p_A, h_1) \wedge L(p_A, h_2) \implies N(h_1, h_2) $$ where $\wedge$ means "and".

1
On

Let me give as an example how one would set up "Einstein's riddle" as described at https://udel.edu/~os/riddle.html.

Let $P$ be a set of people: $P = \{ p_b, p_s, p_d, p_n, p_g\}$ where $p_b$ is the Brit and so forth.

Let $H$ be a set of houses: $H = \{ h_r, h_g, h_w, h_y, h_ b\}$ where $h_r$ is the red house and so forth.

Define a relation $PH$ with the semantics that $PH(p_i, h_k)$ means that person $p_i$ lives in house $h_k$. We already have, by statements 1 and 2, a couple of logical starting point facts ("axioms"): $$ \forall ijkm : i \neq j \wedge PH(p_i, h_k) \wedge PH(p_j, h_m) \rightarrow h_k \neq h_m \\ \forall i \exists k : PH(p_i,h_k) $$ $\forall$ means "for all," $\exists$ means "there exists," and $\wedge$ means "and." $\rightarrow$ means "implies" in the logical sense (as opposed to proof-step implication). The first of these is what I would call a uniqueness axiom, and the second a completeness axiom.

And for example, from these two axioms (A1) and (A2) and the "pigeonhole principle" you can deduce (prove) that $$ \\ \forall k \exists i : PH(p_i,h_k) $$ that is, from uniqueness of people-house pairings and the fact that each person lives in a house you can deduce that each house has a person.

Next we add a set of "location" qualities implied by hints 4, 8, 9, 10, 11, 14 and 15, namely $\{ \ell_1, \ell_2, \ell_3, \ell_4,\ell_5\}$ and a relation of one house to another house with the semantics that $HL(h_i, \ell_j)$ means that house $i$ is in position $j$ along the street, where we take $\ell_1$ to be the leftmost position.

At this point we can turn hints 1, 4 and 9 into two "givens" (G4 and G9):

$$ \mbox{G1: } PH(p_b, h_r)$$ $$ \mbox{G4: } (HL(h_g, \ell_1) \wedge HL(h_w, \ell_2)) \vee (HL(h_g, \ell_2) \wedge HL(h_w, \ell_3)) \\ \vee (HL(h_g, \ell_3) \wedge HL(h_w, \ell_4)) \vee (HL(h_g, \ell_4) \wedge HL(h_w, \ell_5)) $$ $\vee$ means "or," of course, and $$\mbox{G9: } \forall h \in H : PH(p_n, h) \leftrightarrow HL(h,\ell_1) $$ $\leftrightarrow$ means that each side implies the other; that the two sides are logically equivalent. You could read this given as "for any house, the Norwegian lives in that house if and only if that house is in location 1."

Next we add a set $A$ of animal pets $A = \{ A_d, A_b, A_c, A_h, A_f\}$ where although none of the hints mention a fish, the ultimate question "who owns the fish" implies that the last pet is a fish. Define a relation $PA$ with the semantics that $PA(p_i,A_j)$ means that person $i$ owns animal $j$. Statement 4 in the problem now supplies a second uniqueness axiom and a second completeness axiom: $$ \forall ijkm : i \neq j \wedge PA(p_i, a_k) \wedge PA(p_j, a_m) \rightarrow a_k \neq a_m \\ \forall i \exists k : PA(p_i,a_k) $$ and again you can deduce completeness of animals $$ \\ \forall k \exists i : PA(p_i,a_k) $$ In terms of the concepts introduced up to now, we can interpret hint 2 as a given: $$\mbox{G2: } PA(p_s, a_d) $$ When you just state a relation like this, your are saying that this particular expression using this relationship is true.

Next we can introduce drinks $D$ and smokes $S$ as $D = \{ d_t, d_c, d_m, d_b, d_w\}$, and a relation $PD(p_i,d_j)$ with semantic meaning that person $p_i$ drinks dring $d_j$. We get from statement 4 the usual pair of uniqueness and completeness axioms, which I will not write out here. And now we can express hints 3, 5, 8, and 15 as givens: $$\mbox{G3: } PD(p_d, d_t) $$ $$\mbox{G5: } \forall i PH(p_i, h_g) \leftrightarrow PD(p_i,d_c) $$ $$\mbox{G8a: } \forall i \forall j PH(p_i, h_j) \wedge HL(h_j,\ell_3) \rightarrow PD(p_i,d_m) \\ \mbox{G8b: } \forall i PD(p_i,d_m) \rightarrow \exists j : PH(p_i, h_j) \wedge HL(h_j,\ell_3) \\ $$

Notice that you had to break hint 8 into two givens, because an equivalence $\leftrightarrow$ would get the "forall" and "exists" qualifiers wrong. That is, it is not the case that if person $i$ drinks milk, then for every house person $i$ lives in that house and the house is in location 3; it is the case that some house meets that description.

Finally, we can introduce a set of $S$ smokes $S = \{ s_{pm}, s_d, s_{bm}, s_p, s_b \}$ where $s_{pm}$ is Pall Malls and so forth, and a relation $PS(p_i, s_j)$ with semantic meaning that person $i$ smokes smoke $j$. Again from statement 4 we get a pair of uniqueness and completeness axioms for smokes, and now we can express the remaining hints.

But before that, we can introduce additional relationships derived from the basic ones. For example, introduce $PL (p_i, \ell_j)$ with definition $$ PL (p_i, \ell_j) \leftrightarrow \exists k : PH(p_i, h_k) \wedge HL(h_k, \ell_j) $$ and introduce $P^- (p_i, p_j)$ with semantics of "lives on the left of" using definition $$ PP (p_i, p_j) \leftrightarrow (PL(p_i,\ell_1) \wedge PL(p_j,\ell_2)) \vee (PL(p_i,\ell_2) \wedge PL(p_j,\ell_3)) \\\vee (PL(p_i,\ell_3) \wedge PL(p_j,\ell_4)) \vee (PL(p_i,\ell_4) \wedge PL(p_j,\ell_5)) $$ and $P^+ (p_i, p_j)$ with semantics of "lives on the right of" by $$P^+ (p_i, p_j) \leftrightarrow P^- (p_j, p_i)$$ and $PP (p_i, p_j)$ with semantics of "lives next to" using definition $$PP (p_i, p_j)\leftrightarrow P^- (p_i, p_j) \vee P^+ (p_i, p_j) $$

These will be convenient in expressing the remaining hints. $$ \mbox{G6: } \exists i : PS(p_i,s_{pm}) \wedge PA(p_i, a_b) $$ $$ \mbox{G7: } \exists i : PH(p_i,h_y) \wedge PS(p_i, p_d) $$ $$ \mbox{G10: } \forall i,j ( PS(p_i,s_b) \wedge PA(p_j, a_c) ) \rightarrow PP(p_i,p_j) $$ $$ \mbox{G11: } \forall i,j ( PS(p_i,s_d) \wedge PA(p_j, a_h) ) \rightarrow PP(p_i,p_j) $$ $$ \mbox{G12: } PS(p_i,s_d) \leftrightarrow PD(p_j, d_b) $$ $$ \mbox{G13: } PS(p_g,s_p) $$ $$ \mbox{G14: }\exists i : PH(p_i,h_b) \wedge PP(p_i, p_n) $$ $$ \mbox{G15: }\exists i,j : PS(p_i,s_b) \wedge PP(p_i,p_j) \wedge PD(p_j, d_w) $$

OK, now you have 10 basic axioms (of uniqueness and completeness), about 20 derived uniqueness axioms (for example, two different pets live in two different houses), 5 derived completeness axioms (for example, all five types of drink are represented), and the 15 givens. One approach to solving this problem is to combine these in logical ways to grow your collection of proven statements.

The art is to choose combinations that go toward the answer you need, without exploding the number of statements too badly. For convenience you can define other relations, like $AS(a_i,s_j) \leftrightarrow \exists k : PA(P_k,a_i) \wedge PS(p_k,s_j)$. Here is an example ($\lnot$ is a symbol meaning "not"):

$$\mbox{G3: } PD(p_d, d_t) \\ \implies \lnot PD(p_d, d_m) \\ \mbox{G8a: } \forall i \forall j PH(p_i, h_j) \wedge HL(h_j,\ell_3) \rightarrow PD(p_i,d_m) \\ \\ \implies \forall j PH(p_d, h_j) \wedge HL(h_j,\ell_3) \rightarrow PD(p_d,d_m) \\ \implies PL(p_d, \ell_3) \rightarrow PD(p_d,d_m) \\ \therefore \lnot PL(p_d, \ell_3) $$ In words, the Dane does not live in location 3. And we add that to our collection of facts; eventually, you find by exclusion that some combination of properties has exclude four of the five possible pairings, and deduce (by completeness) the remaining possibility. You then use uniqueness to "cross out" a slew of possibilities for other relations, and continue in that way until the answer emerges.