Going Back to Basics - Translate the Following Statements

54 Views Asked by At

We will define some predicates and sets...

  • $P$ := set of all people,

  • $C$ := set of all countries,

  • $BornIn(p, c)$ := $p$ was born in $c$, where $p \in P$ and $c \in C$.

  • $Friendly(p)$ := $p$ is friendly, where $p \in P$

Translate the sentences into predicate logic:

A) "Every person who is friendly was born in the same country."

B) "Every person is born in exactly one country".

C) "Every country contains exactly two different people".

Note: You cannot create your own sets nor can you use $\exists !$ (exists exactly one) and no shortcuts!

Attempt:

A) $\exists c \in C, \forall p \in P, Friendly(p) \Rightarrow BornIn(p, c)$

B) $\forall p \in P, \exists c \in C, [BornIn(p, c) \land \lnot [\exists c' \in C, (BornIn(p, c') \land c' \not = c)]] $

C) $\forall c \in C, \exists p_1, p_2 \in P, p_1 \not = p_2 $ $\land$ $ BornIn(p_1, c)$ $\land$ $BornIn(p_2, c)$ $\land [\forall p_3 \in P, BornIn(p_3, c) \Rightarrow p_3 = p_1 \lor p_3 = p_2]$

1

There are 1 best solutions below

0
On BEST ANSWER

They all look good to me!

You can do B and C a little more efficiently using biconditionals:

B: $\forall p \in P \ \exists c \in C \ \forall c' \in C (BornIn(p,c') \leftrightarrow c'=c)$

C: $\forall c \in C \ \exists p_1, p_2 \in P \ (p_1 \neq p_2 \land \forall p_3 \in P (BornIn(p_3,c) \leftrightarrow (p_3 = p_1 \lor p_3 = p_2)))$