Solutions To Problem Set 1
Solutions To Problem Set 1
√
Since 3 4 is rational, we can write it as a fraction x/y in lowestterms, where x is an integer
and y is a positive integer. Therefore, we have:
√
3
4 = x/y
4 = x3 /y 3
4y 3 = x3
In the last equation, the left side is even, and so the right side must be even. Since x3 is
even, x itself must be even. This implies that the right side is actually divisible by 8, and
so the left side must also be divisible by 8. Therefore, y 3 is even, and so y itself must be
even.
The fact that both√x and y are even contradicts the fact that x/y is a fraction in lowest
terms. Therefore, 3 2 is not sensible. �
There is a student who has emailed exactly two other people in the class,
besides possibly herself.
Copyright © 2005, Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld.
Solutions to Problem Set 1 2
The domain of discourse should be the set of students in the class; in addition, the only
predicates that you may use are equality and E(x, y), meaning that “x has sent email to
y.”
Solution. A good way to begin tackling this problem is by trying to translate parts of the
sentance. Begin by trying to assert that student x has emailed students y and z:
Now we want to say that y and z not the same student, and neither of them is x either:
� y∧x=
x= � z∧y =
� z,
� (x = y).
where x �= y abbreviates =
Now, we must think of a way to say that the only people x might have emailed are x, y
and z:
∀s, E(x, s) −→ s = x ∨ s = y ∨ s = z.
Finally, we can say there is some student who emailed exactly two other two students by
existentially quantifying x, y and z. So the complete translation is
Problem 3. Express each of the following predicates and propositions in formal logic
notation. The domain of discourse is the nonnegative integers, N.
In addition to the propositional operators, variables and quantifiers, you may define pred
icates using addition, multiplication, and equality symbols, but no constants (like 0, 1, . . . ).
For example, the proposition “n is an even number” could be written
∃m. (m + m = n).
Solution.
∃x∃y∃z. (x · x + y · y + z · z = n)
�
Solutions to Problem Set 1 3
Since the constant 0 is not allowed to appear explicitly, the predicate “x = 0” can’t be
written directly, but note that it could be expressed in a simple way as:
x + x = x.
∃w. (y + w = x) ∧ (w =
� 0).
Note that we’ve used “w =� 0” in this formula, even though it’s technically not allowed.
But since “w �= 0” is equivalent to the allowed formula “¬(w + w = w),” we can use
“w �= 0” with the understanding that it abbreviates the real thing. And now that we’ve
shown how to express “x > y”, it’s ok to use it too.
(b) x > 1.
Solution.
Solution.
∃x∃y. ¬(x = y) ∧ (n = x · y) ∧ IS PRIME(x) ∧ IS PRIME(y).
�
�
Solutions to Problem Set 1 4
(f) (Goldbach Conjecture) Every even natural number n > 2 can be expressed as the
sum of two primes.
Solution. We can define n > 2 with the formula ∃y. (y = 1) ∧ (x > y + y). Likewise,
n = 2k can be expressed as n = k + k. Then we can express the Conjecture with:
∀n. ((n > 2 ∧ ∃k . n = 2k) −→ ∃p∃q . IS PRIME(p) ∧ IS PRIME(q) ∧ (n = p + q)))
�
(g) (Bertrand’s Postulate) If n > 1, then there is always at least one prime p such that
n < p < 2n.
Solution.
∀n. ((n > 1) −→ (∃p. IS PRIME (p) ∧ (n < p) ∧ (p < 2n)))
�
Problem 4. If a set, A, is finite, then |A| < 2|A| = |P (A)|, and so there is no surjection from
set A to its powerset. Show that this is still true if A is infinite. Hint: Remember Russell’s
paradox and consider {x ∈ A | x ∈ / f (x)} where f is such a surjection.
Solution. We prove there is no surjection by contradiction: suppose there was a surjection
f : A → P (A) for some set A. Let W ::= {x ∈ A | x ∈
/ f (x)}. So by definition,
(x ∈ W ) ←→ (x ∈
/ f (x)) (4)
for all x ∈ A. But W ⊆ A by definition and hence is a member of P (A). This means
W = f (a) for some a ∈ A, since f is a surjection to P (A). So we have from (4), that
(x ∈ f (a)) ←→ (x ∈
/ f (x)) (5)
for all x ∈ A. Substituting a for x in (5) yields a contradiction, proving that there cannot
be such an f . �
holds.
This shows that (8) holds in any interpretation in which (7) holds. Therefore, (7) im
plies (8) in all interpretations, that is, (6) is valid.
�
(b) Prove that the converse of (6) is not valid by describing a counter model as in Week
2 Notes.
Solution. Proof. We describe a counter model in which, (8) is true and (7) is false. Namely,
let the domain, D, be {π, e}, P (x) mean “x = π,” and Q(y) mean “y = e.” Then, ∃x. P (x)
is true (let x be π) and likewise ∃y. Q(y) is true (let y be e), so (8) holds.
On the other hand, Q(π) is not true, so P (π) ∧ Q(π) is not true. Likewise P (e) ∧ Q(e) is not
true. Since these are the only elements of D, it is not true that there is an element, z, of D,
such that P (z) ∧ Q(z), That is, (7) is not true.
�
L ::= (A ∪ C) × (B ∪ D),
R ::= (A × B) ∪ (C × D).
Then L = R.
Solution. If A = D = ∅ and B and C are both nonempty, then L = C × B =
� ∅, but R = ∅.
�
(b) Identify the mistake in the following proof of the False Theorem.
Solutions to Problem Set 1 6
Bogus proof. Since L and R are both sets of pairs, it’s sufficient to prove that (x, y) ∈ L ←→
(x, y) ∈ R for all x, y.
The proof will be a chain of iff implications:
(x, y) ∈ L iff
x ∈ A ∪ C and y ∈ B ∪ D, iff
(x, y) ∈ (A × B) ∪ (C × D) = R.
Solution. Replacing the third “iff” by “which will be true when,” yields a correct proof
that (x, y) ∈ L will be true when (x, y) ∈ R, which implies that R ⊆ L. �