Do all logic problems have one solution?

106 Views Asked by At

Analyze the logical forms of the following statements:

x and y are natural numbers, and exactly one of them is prime.

Below are the two answers that I got. The first one is the one the author provides to me in his book. The second one is the answer that I got.

N(x) ∧ N(y) ∧ [(P(x)∧¬P(y)) ∨ (P(y)∧¬P(x))], where N(x)

means “x is a natural number” and P(x) means “x is prime.”

N(x) ^ N(y) ^ (P(x) v P(y)),

where N(x) and N(y) means x are natural numbers and P(x) or P(y) means x or y are a prime number.

The issue that I have is that in his answer he states that x is a natural number and p(x) is a prime number but in no way does he ever mention anything about p(y) like I do.

Notice the bold statements in each.

2

There are 2 best solutions below

3
On BEST ANSWER

The difference between your answer and what "he" says is that he claims exactly one is prime and in yours both can be primes.

1
On

I have two issues with my problem. The first one is that if I wanted to indicate $p(x)$ or $p(y)$ but not both, then I would use the nand operator $\uparrow$. Right now what my answer is saying is the following: $p(x)$ or $p(y)$ or both are prime.

Yes.   You need to exclude the case where both are prime.   That requires an xor connective, $\oplus\;$.

$$\begin{align} P(x)\oplus P(y) \;& \equiv\; \big(P(x)\vee P(y)\big)\wedge \big(P(x)\uparrow P(y)\big) \\[1ex] & \equiv\; \big(P(x)\vee P(y)\big)\wedge\neg\big(P(x)\wedge P(y)\big) \\[1ex] & \equiv\; \big(P(x)\wedge \neg P(y)\big)\vee \big(\neg P(x)\wedge P(y)\big) \end{align}$$

The second issue that I have is that in his answer he states that $N(x)$ is a natural number and $P(x)$ is a prime number but in no way does he ever mention anything about $P(y)$ like I do.

It's not required.   Once $P(x)$ is defined to mean "$x$ is prime", then defining $P(y)$ to mean "$y$ is prime" is redundant.   What else would it mean?

The $x$ in the definition of predicate $P$ is a 'dummy variable', and can be alpha-replaced with any entity.   Once $P$ is so defined then $P(z)$ must not mean anything other than "$z$ is prime".