¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 Problem Set 1 Problem 1
A real number r is called sensible if there exist positive integers a and b such
that a/b=r. For example, setting a=2 and b=1 shows that 2 is sensible. Prove that 32 is not sensible. (Consider only positive real roots in this problem).
We use proof by contradiction. Suppose that 32=ba where a and b are two positive integers.
We cube both sides to get 2=b3a3.
We divide both sides to get 2b3=a3. This implies a is an even integer. If a3 is an even integer, that means that a is an even integer as well.
We can rewrite a as a=2n for some unknown integer n. Therefore,
(2n)3=2b3
8n3=2b3
4n3=b3
We see that b is also even (its a multiple of 4). Since a and b are both even, they are not coprime numbers, which is a contradiction.
Since we have a contradiction, we must assume that 32 is irrational. ■
¶ Problem 1 (From In-Class Problems MIT OCW 6.042J Spring '15)
The Pythagorean Theorem says that if a and b are the lengths of the sides of a right triangle, and c is the length of its hypotenuse, then
a2+b2=c2
In this problem we'll examine a particularly simple “proof without words” of the theorem.
Suppose you are given four different colored copies of a right triangle with sides of lengths a, b and c, along with a suitably sized square, shown below.
(a) You will first arrange the square and four triangles so they form a cxc square. From this arrangement you will see that the square is (b−a)x(b−a)
(b) You will then arrange the same shapes so they form two squares, one axa and the other bxb.
You know that he area of an sxs square is s2. Appealing to the principle that area is preserved by rearranging, we can conclude that a2+b2=c2 as claimed.
One concern is that there might be something special about the shape of these particular triangles and squares that makes the rearranging possible - for exmaple, suppose a=b. (c) How would you respond to this concern? (d) Another concern is that a number of facts about right triangles, squares and lines are being implicitly assumed in justifying the rearrangements into squares. Enumerate some of these assumed facts.
Triangles rearranged to form bxb square and a cxc square.
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 Problem Set 1 Problem 2
Translate the following sentence into a predicate formula:
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.”
The above is translated to: "There exists students x, y, and z where x send an email to y AND x sent an email to z AND x is not the same as y AND x is not the same as z and y is not the same as z AND for all students s, x sent an email to a student s where the student s is x OR the student s is y OR the student s is z.
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 Problem Set 1 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 predicates 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)
(a) n is the sum of three perfect squares.
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
Then the predicate x>y could be expressed
∃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. (c)n is a prime number. (d)n is a product of two distinct primes. (e) There is no largest prime number. (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.
¶ Solution (My own answers probably wrong regarding valid quantifier syntax, loop back to this)
a) ∃m=(m⋅m=d)∧(d+d+d=n)
b) A unique property of one is that multiplying one by itself is idempotent. Adding one to itself is not. Also, squaring one equals itself. Any number greater than one, when we square it, will be greater than the value we squared.
∃x.(x=0)∧(xx−x=0)
BookAnswer: We define x=1 as ∀y.xy=y and then express x>1 as ∃y.(y=1)∧(x>y)
c) If a number n is prime, it is greater than 0 and there are no numbers y and z that add to it.
BookAnswer:¬(∃p. IS-PRIME (p)∧(∀q. IS-PRIME (q)⟶p≥q))
"There does not exist a prime number p and for all numbers q, if q is prime then p is greater than q."
f) (Goldbach Conjecture) Every even natural number n>2 can be expressed as the sum of two primes.
Define a proposition Is-Two(n) using the fact that two is the only number that Is-Prime and Is-Even (we can use this proposition since its in the question description)
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 Problem Set 1 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 Russel's paradox and consider {x∈A∣x∈/f(x)} where f is such a surjection.
Suppose there was a surjective function f that maps a set A to its powerset P(A).
Let W be the set of x in A that are not in the image of f.
So by definition we get the following biconditional for all x in A.. if x is in W that means that x isn't in the image of f and if x isn't in the image of f that means its in W.
We know that every element of W is in A by the definition of the subset of a set.
This means that W is also a member of P(A) by the definition of a powerset (the powerset contains all subsets of its set, W is a subset of A so obviously it will be in the powerset as well).
Since f is a surjection from A to P(A), there exists some a in A whose image is W.
So by our earlier biconditional we can replace W with f(a) and get
(x∈f(a))⟷(x∈/f(x))
Substituting a for x yields a contradiction, proving there cannot be such an f.
Proof:
Proof 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))(1)
for all x∈A. But W⊆A by definition and hence is a member of P(A). This means that W=f(a) for some a∈A, since f is a surjection to P(A). So we have from (1)
(x∈f(a))⟷(x∈/f(x))(2)
for all x∈A. Substituting a for x in (2) yields a contradiction, proving there cannot be such an f.
■
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 Problem Set 1 Problem 5
(a) Prove that
∃z.[P(z)∧Q(z)]⟶[∃x.P(x)∧∃y.Q(y)](1)
is valid. (b) Prove that the converse of (1) is not valid by describing a counter model as in Week 2 Notes.
That is, P(z)∧Q(z) holds for some element z of the domain. Let c be this element, that is, we have P(c)∧Q(c).
In particular, P(c) holds by itself. So we conclude (By Existential Generalization) ∃xP(x). We conclude ∃yQ(y) similarly. Hence,
∃x.P(x)∧∃y.Q(y)(3)
holds. This shows that (3) holds in any interpretation in which (2) holds. Therefore, (2) implies (3) in all interpretations, that (1) is valid. ■ (b)
We describe a counter model in which (3) is true and (2) is false.
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 (3) 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, (2) is not true.
The proposition states that if there exists some z for which P(z) and Q(z) are true then there exists some x for which P(x) is true and there exists some y for which Q(y) is true.
Let D be the domain for the variables and P0, and Q0 be some unary predicates on D.
We need to show that if ∃z.[P(z)∧Q(z)] holds, then so does [∃x.P(x)∧∃y.Q(y)].
So suppose ∃z.[P(z)∧Q(z)]. So some element z0∈D has the property that P0(z)∧Q0(z) is true.
Suppose [∃x.P(x)∧∃y.Q(y)]. There exists some x0∈D that has the property P0(x) is true and there exists some y0∈D that Q0(y) is true.
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 Problem Set 1 Problem 6
(a) Give an exmaple where the following result fails: False Theorem: For sets A, B, C, and D, let
LR:=(A∪C)×(B∪D):=(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, its sufficient to prove that (x,y)∈L⟷(x,y)∈R for all x,y.
The proof will be a chain of iff implications. (ignore crappy alignment)
(x,y)∈Liff x∈A∪C and y∈B∪Diff,
either x∈A or x∈C, and either y∈B or y∈Diff, (x∈A and y∈B) or else (x∈C and y∈D)iff (x,y)∈A×B, or (x,y)∈C×Diff (x,y)∈(A×B)∪(C×D)=R
Scratch: A∪C={x∈U∣x∈A∨x∈C}=U1 B∪D={x∈U∣x∈B∨x∈D}=U2 A×B={(a,b)∣a∈A∧b∈B}=CP1 C×D={(c,d)∣c∈C∧d∈D}=CP2 L and R are sets of ordered pairs.
L is the cartesian product of the unions of sets A and C and B and D.
L::={x∈U∣x∈A∨x∈C}×{x∈U∣x∈B∨x∈D}
or
L::=U1×U2={(u1,u2)∣u1∈U1∧u2∈U2}
R is the union of the cartesian product of A and B and the cartesian product of C and D.
R::={(a,b)∣a∈A∧b∈B}∪{(c,d)∣c∈C∧d∈D}
or
R::=CP1∪CP2={x∈U∣x∈CP1∨x∈CP2}
Example where it fails:
set a: a, b, c, d
set b: d, e, f
set c: 1, 2, 3
set d: 4, 5, 6
u1 = {a,b,c,d} ∪ {1,2,3} = {a,b,c,d,1,2,3}.
u2 = b u d {d,e,f} ∪ {4,5,6} = {d,e,f,4,5,6}.
l = u1 x u2 = {{a,d},{a,e},{a,f},{a,4},{a,5},{a,6},{b,d},{b,e},{b,f},{b,4},{b,5},{b,6},{c,d},{c,e},{c,f},{c,4},{c,5},{c,6},{d,d},{d,e},{d,f},{d,4},{d,5},{d,6},{1,d},{1,e},{1,f},{1,4},{1,5},{1,6},{2,d},{2,e},{2,f},{2,4},{2,5},{2,6},{3,d},{3,e},{3,f},{3,4},{3,5},{3,6}}
r = cp1 u cp2 {{a,d},{a, e},{a, f},{ b,d},{ b, e},{ b, f},{ c,d},{ c, e},{ c, f},{ d,d},{ d, e},{ d, f}, {1,4},{1, 5},{1, 6},{ 2,4},{ 2, 5},{ 2, 6},{ 3,4},{ 3, 5},{ 3, 6}} a: If A = D = ∅ and B and C are both nonempty, then L=C×B=∅, but R=∅.
b: It does not necessarily follow that (x,y)∈(A×B)∪(C×D). (x,y) may be in A×D or B×C instead.
d: Proof: (ignore crappy alignment) (x,y)∈Liff x∈A∪C and y∈B∪Diff,
either x∈A or x∈C, and either y∈B or y∈Dwhich will be true when, (x∈A and y∈B) or else (x∈C and y∈D)iff (x,y)∈A×B, or (x,y)∈C×Diff (x,y)∈(A×B)∪(C×D)=R
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 In-Class Problems Week 1 Problem 1
Identify exactly where the bugs are in each of the following bogus proofs. (a)1/8>1/4
Bogus Proof
The proof doesn't prove that the Arithmetic-Geometric Mean Inequality claim. It just proves (a+b)/2≥ab⟶(a−b)2≥0 which is not very interesting since we already know the square of any nonnegative number is nonnegative.
The big problem here with the bogus proof as it is written, is that it reasons backwards, beginning with the proposition in question and reasoning to a true conclusion.
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2005 In-Class Problems Week 3 Problem 1
Generalize the proof that 2 is irrational to extend to, for example, cube roots of 2. Remember that an irrational number is a number that cannot be expressed as a ratio of two integers.
Theorem:2 is an irrational number. Proof: The prof is by contradiction. Assume for purpose of contradiction that 2 is rational.
Then we can write 2=m/n where m and n are integers and the fraction is in lowest terms. Squaring both sides gives 2=m2/n2, so 2n2=m2. This implies that m2 is even, and hence that m is even; that is, m is a multiple of 2. That means m2 is actually a multiple of 4, say m2=4k.
Now we have 2n2=m2=4k, so n2=2k. So n2 is even, and hence n is even. But since m and n are both even, the fraction m/n is not in lowest terms, a contradiction. ■.
We prove by contradiction that for any n≥1, n2 is irrational.
Assume for the prupose of contradiction that n2 is rational.
Then we can write n2=a/b where a and b are integers and the fraction is in lowest terms.
Raising both sides by n gives
2=an/bn
so 2an=bn. This implies that bn is even, and hence b is even and also a multiple of 2.But that means bn is actually a multiple of 4, say bn=4k.
Now we have 2an=bn=4k, so an=2k. So an is even, and hence a is even. But since a and b are both even, the fraction a/b is not in lowest terms, a contradiction.
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2015 Problem Set 1 Problem 1
P(n)::=n≤3n/3C::={non-negative integers for which P(n) is false}
Let c be the least element ∈C. n3≤3n
We know that the theorem is false for n=c but true for all nonnegative integers n<c. We can verify directly that n3≤3n for n∈{0,1,2,3}, so we must have c≥4.
P(c−1) must be true...
P(c−1)::=(c−1)3≤3c−1::=3(c−1)3≤3c
P(c) must be false. its the smallest c∈C for which the proposition is false.
P(c)::=c3≤3c
¶ MIT OCW 6.042J Mathematics for Computer Science Fall 2015 Problem Set 1 Problem 3
a: Verify by truth table that
¶ Discrete Math Workbook 3rd Edition Section 3.2 Question 6
Proof:
Proof by contradiction. Assume 3 is rational, so there exists a/b where 3=a/b.
Square both sides 3=(a/b)2 3=(a2/b2) 3b2=a2
It is obvious that a2 must be a multiple of 3, so must a as well. So for some k, a=3k. Plug into our above equation..
3b2=(3k)2
3b2=9k2
b2=3k2
Both a and b are divisible by 3, so they are not coprime integers and they must not be in most reduced form, which is a contradiction. Therefore 3 must be irrational.
¶ Discrete Math Workbook 3rd Edition Section 3.2 Question 2
For each of the statements below, say what method of proof you should use to prove them. Then say how the proof starts and how it ends. Bonus points for filling in the middle.
There are no integers x and y such that x is a prime greater than 5 and x=6y+3.
For all integers n, if n is a multiple of 3, then n can be written as the sum of consecutive integers.
For all integers a and b, if a2+b2 is odd, then a or b is odd.
Proof by contradiction. Assume there are integers x and y where x is a prime greater than 5 and x=6y+3. This implies x is a divisible by 3, since y is an integer that is multiplied by a multiple of 3 and has 3 added to it. Since x is divisible by a number besides 1 and itself, this is a contradiction to our initial assumption. Therefore x and y do not exist. ■
Direct Proof. Assume n is a multiple of 3 and there are some consecutive integers x, x+1, and x+2 that sum to n. So we have
n=x+x+1+x+2=3x+3=3(x+1)
n=3(x+1)
We see that n is equal to the sum of three consecutive integers. That sum can be represented as an integer x+1 which itself is a multiple of 3, so n must be a multiple of 3. ■
3. Proof by contrapositive. If a and b are even, then a2+b2 is even. There are some numbers x and y such that 2x=a and 2y=b. So we get
a2+b2=(2x)2+(2y)2=4x2+4y2=4(x2+y2)
Since x2+y2 is an integer, that is a multiple of 4, so it is even. Therefore, a2+b2 is even.
¶ Discrete Math Workbook 3rd Edition Section 3.2 Question 3
Consider the statement: for all integers n, if n is even then 8n is even.
a. Prove the statement. What sort of proof are you using?
b. Is the converse true? Prove or disprove.
a. Using a direct proof, assume n is even. So there exists some integer k that 2k=n. We get 8(2k)=2(8k), therefore 8n is even.
b. The converse of this statement is false. It fails when n=1, or n=3.
¶ Discrete Math Workbook 3rd Edition Section 3.2 Question 4
The game TENZI comes with 40 six-sided dice (each numbered 1 to 6). Suppose you roll all 40 dice.
a. Prove that there will be at least seven dice that land on the same number.
b. How many dice would you have to roll before you were guaranteed that some four of them would all match or all be different? Prove your answer.
a. Proof by contradiction. Suppose we roll 406 sided dice, no more than 6 dice will land on the same number. That means that we have rolled, at the most, 36 dice. This is a contradiction, proving our claim that there will be at least 7 dice with the same result. ■
b. Proof by contradiction. Suppose you roll 10 dice, but that there are no more than 4 rolls that match or are all different. That means at most, there are 3 of any given value. If we had just 3 different values, that would be only 9 dice, so there must be 4 different values, giving 4 dice that are all different. ■
¶ Discrete Math Workbook 3rd Edition Section 3.2 Question 7
Consider the statement: for all integers a and b , if a is even and b is a multiple of 3, then ab is a multiple of 6. a) Prove the statement. What sort of proof are you using? b) State the converse. Is it true? Prove or disprove.
a) Direct Proof. a=2x for some integer x. b=3y for some integer y. From that we get
ab=(2x)(3y)=6(xy)
x and y are an integer that is a multiple of 6. ■ b) The converse is, "If ab is a multiple of 6, then a is even and b is a multiple of 3". The converse is false. Consider the case a=1 and b=6. ab=6 which is a multiple of 6 and b is a multiple of 3, but a is odd.
¶ How to Prove it A Structured Approach: Second Edition Section 3.1 Question 6
Suppose a and b are real numbers. Prove that if 0<a<b then 1/b<1/a.
Line 1: def of complement
Line 2: Definition of set difference
Line 3: Rewrite to logical equivalence
Line 4: Definition of union
Line 5: DeMorgans Law
Line 6: Rewrite to logical equivalence
Line 7: (x∈U)=(x∈U)∧(x∈U)
Line 8: regroup
Line 9: Definition of intersection
Line 10: Definition of set difference
Line 11: Definition of compliment