MIT Python Assignments
MIT Python Assignments
Problem Set 1
Due: September 21
There is a student who has emailed exactly two other people in the class,
besides possibly herself.
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.”
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).
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.
(f) (Goldbach Conjecture) Every even natural number n > 2 can be expressed as the
sum of two primes.
(g) (Bertrand’s Postulate) If n > 1, then there is always at least one prime p such that
n < 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.
is valid. (Use the proof in the subsection on Validity in Week 2 Notes as a guide to writing
your own proof here.)
(b) Prove that the converse of (1) is not valid by describing a counter model as in Week
2 Notes.
Problem Set 1 3
L ::= (A ∪ C) × (B ∪ D),
R ::= (A × B) ∪ (C × D).
Then L = R.
(b) Identify the mistake in the following proof of the False Theorem.
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.
Your name:
Submission date:
Collaboration statement: Circle one of the two choices and provide all pertinent info.
Problem Score
1
2
3
4
5
6
Total