0% found this document useful (0 votes)
152 views5 pages

Ps 1 Sol

P is the assertion that z is even. R is the assertion that w, x, and y are all even. The problem is proved by considering four cases: 1) If w, x, and y are all odd, then P and R are both false. 2) If one of w, x, y is even, then P and R cannot both be true or false. 3) If two of w, x, y are even, then P and R are both false. 4) If w, x, and y are all even, then P and R are both true. Therefore, P if and only if R.

Uploaded by

Robert Edwards
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
152 views5 pages

Ps 1 Sol

P is the assertion that z is even. R is the assertion that w, x, and y are all even. The problem is proved by considering four cases: 1) If w, x, and y are all odd, then P and R are both false. 2) If one of w, x, y is even, then P and R cannot both be true or false. 3) If two of w, x, y are even, then P and R are both false. 4) If w, x, and y are all even, then P and R are both true. Therefore, P if and only if R.

Uploaded by

Robert Edwards
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Massachusetts Institute of Technology

6.042J/18.062J, Spring ’18: Mathematics for Computer Science February 16


Dr. Zachary Abel revised Saturday 10th February, 2018, 02:26

Solutions to Problem Set 1

Reading:

 Chapter 1. What is a Proof?

 Chapter 3. Logical Formulas through 3.5

These assigned readings do not include the Problem sections. (Many of the problems in the text will appear
as class or homework problems.)
Reminder:

 Instructions for PSet submission are on the class Stellar page. Remember that each problem should
prefaced with a collaboration statement.

 The class has a Piazza forum. With Piazza you may post questions—both administrative and content
related—to the entire class or to just the staff. You are likely to get faster response through Piazza
than from direct email to staff.
You should post a question or comment to Piazza at least once by the end of the second week of the
class; after that Piazza use is optional.

Problem 1.
Here is a generalization of Problem 1.16 that you may not have thought of:

Lemma. Let the coefficients of the polynomial

a0 C a1 x C a2 x 2 C    C am 1x
m 1
C xm

be integers. Then any real root of the polynomial is either integral or irrational.
p
m
(a) Explain why the Lemma immediately implies that k is irrational whenever k is not an mth power of
some integer.

Solution. Saying that an integer k is not the mth power of an integer, is equivalent to saying that the equation
x m D k has no integer solutions. Another way to say this is that the polynomial
p x m k has no integer root.
m m
The Lemma therefore implies that any root of x k is irrational. But k is, by definition, a root of this
polynomial, so it is irrational. 

(b) Carefully prove the Lemma.


You may find it helpful to appeal to:
Fact. If a prime p is a factor of some power of an integer, then it is a factor of that integer.
You may assume this Fact without writing down its proof, but see if you can explain why it is true.

2017, Albert R Meyer. This work is available under the terms of the Creative Commons Attribution-ShareAlike 3.0
license.
2 Solutions to Problem Set 1

Solution. Proof. Let r be a real root of the polynomial, so that

a0 C a1 r C a2 r 2 C    C am 1r
m 1
C r m D 0:

There are three cases: either r is an integer, or r is irrational, or r D s=t for integers s and t which have
no common factors and such that t > 1. We want to eliminate the last case, so assume for the sake of
contradiction that it held for some r.
Substituting s=t for r and multiplying both sides of the above equation by t m yields:

a0 t m C a1 st m 1
C a2 s 2 t m 2
C    C am 1s
m 1
t C s m D 0; (1)
m m 1 2 m 2 m 1 m
a0 t C a1 st C a2 s t C  C s tD s : (2)

Now since t > 1, it must have a prime factor p. The prime p therefore divides each term of the left-hand
side of equation (2), so p also divides the right-hand side s m . This means that p divides s m , so by the Fact
above, p is also a factor of s. So p is a common factor of s and t, contradicting the fact that s and t have no
common factors. 
The Fact above about primes dividing powers is a simple consequence of the Fundamental Theorem of
Arithmetic which says that every integer > 1 factors into a product of primes that is unique except for the
order in which the primes are multiplied.
For example, here are some ways to express 140 as a product of primes:

140 D 2  2  5  7 D 2  5  7  2 D 7  5  2  2 D    :

By the Fundamental Theorem, every such product will have exactly two occurrences of 2 and one each of 5
and 7. Next, we can get a product of primes equal to, say, the third power of 140 by taking a product that
equals 140 and repeating it three times. For example,

.140/3 D 2  2  5  7  2  2  7  5  2  2  7  5:

The Fundamental Theorem now says that every prime product equal to the third power of 60 must have the
same primes as this repeated product, namely, six occurrences of 2 and three occurrences each of 5 and 7.
In particular, the only primes that are factors of .140/3 are the primes 2, 5 and 7 that are factors of 140. This
reasoning applies equally well with any other integer greater than 1 in place of 140 and any power greater
than 0 in place of 3, proving that if p is a prime factor of s m , then p must have been a factor of s.
The Fundamental Theorem of Arithmetic is also know as the Unique Prime Factorization Theorem. It is
one of those familiar mathematical facts that is not really obvious; a proof worked out in Section 9.4. 

Problem 2. (a) Suppose that


a C b C c D d;
where a; b; c; d are nonnegative integers.
Let P be the assertion that d is even. Let W be the assertion that exactly one among a; b; c are even, and
let T be the assertion that all three are even.
Prove by cases that
P IFF ŒW OR T :

Solution. Case 1: (None of a; b; c are even). Since neither W nor T is true in this case, the right hand
side of the IFF is false. But the sum of an odd number of odd numbers—that is the product of two odd
Solutions to Problem Set 1 3

numbers—is odd, so the sum d is odd. So P is also false. Since both the left and right hand sides of the IFF
are false, the IFF assertion itself is true.

Case 2: (Exactly one among a; b; c is even). Now W is true, which means that the right hand side of the IFF
is true. But the sum of an even number of odd numbers is even, and the sum of even numbers is also even,
and this means the sum d is even. So P is also true. Since both the left and right hand sides of the IFF are
true, the IFF assertion itself is true.

Case 3: (Exactly two among a; b; c are even). Since neither W nor T is true in this case, the right hand side
of the IFF is false. The sum of the two even numbers is even, and the sum of an even and an odd number is
odd, so the sum d is odd. So P is also false. Since both the left and right hand sides of the IFF are false, the
IFF assertion itself is true.

Case 4: (All three of a; b; c are even). Now T is true, which means that the right hand side of the IFF is true.
Also, a sum of even numbers is even, so d is even. That is, P is also true. Since both the left and right hand
sides of the IFF are true, the IFF assertion itself is true. 

(b) Now suppose that


w2 C x2 C y 2 D z2;
where w; x; y; z are nonnegative integers. Let P be the assertion that z is even, and let R be the assertion
that all three of w; x; y are even. Prove by cases that
P IFF R:
Hint: An odd number equals 2m C 1 for some integer m, so its square equals 4.m2 C m/ C 1.

Solution. The cases will be the same as in part (a), using the squares of w; x; y; z for a; b; c; d . That is, let
a D w 2 , b D x 2 , c D y 2 , and d D z 2 . Note that a number n is even iff n2 is even. Therefore, we can
directly use what we proved in part (a) to see that:

Case 1: if w; x; y are all odd ) a; b; c are all odd ) d is odd ) z is odd. P and R are both False so the
IFF assertion is True.

Case 3: if two of w; x; y are even ) two of a; b; c are even ) d is odd ) z is odd. P and R are both
False so the IFF assertion is True.

Case 4: if w; x; y are all even ) a; b; c are all even ) d is even ) z is even. P and R are both True so
the IFF assertion is True.

Case 2: if one of w; x; y is even ) one of the a; b; c is even ) d is even ) z is even. In this case, let’s
assume without loss of generality that a and b are odd and c is even. This means that w and x are odd and
y is even. Then let w D 2m C 1, x D 2n C 1, and y D 2p for some nonnegative integers m; n; p. Then,
z 2 D .2m C 1/2 C .2n C 1/2 C .2p/2
Using the hint and rearranging this equation, we get
z 2 D 4.m2 C m C n2 C n C p 2 / C 2
But the square of any even number must be a multiple of 4. Since z 2 leaves a remainder of 2 on division
by 4, it is not a multiple of 4, so this is a contradiction. Therefore, no such z can exist. That is, there exist
no integers w; x; y such that one is even, two are odd, and w 2 C x 2 C y 2 is a square. So if IFF assertion is
vacuously true.

We have showed that in all cases, P IFF R. 


4 Solutions to Problem Set 1

Problem 3.
Sloppy Sam is trying to prove a certain proposition P . He defines two related propositions Q and R, and
then proceeds to prove three implications:

P IMPLIES Q; Q IMPLIES R; R IMPLIES P:

He then reasons as follows:

If Q is true, then since I proved .Q IMPLIES R/, I can conclude that R is true. Now, since I
proved .R IMPLIES P /, I can conclude that P is true. Similarly, if R is true, then P is true and
so Q is true. Likewise, if P is true, then so are Q and R. So any way you look at it, all three of
P; Q and R are true.

(a) Exhibit truth tables for

.P IMPLIES Q/ AND .Q IMPLIES R/ AND .R IMPLIES P / (*)

and for
P AND Q AND R: (**)
Use these tables to find a truth assignment for P; Q; R so that (*) is T and (**) is F.

Solution.
P Q R ..P IMPLIES Q/ AND .Q IMPLIES R// AND .R IMPLIES P /
T T T T T T T T
T T F T F F F T
T F T F F T F T
T F F F F T F T
F T T T T T F F
F T F T F F F T
F F T T T T F F
F F F T T T T T

P Q R .P AND Q/ AND R
T T T T T
T T F T F
T F T F F
T F F F F
F T T F F
F T F F F
F F T F F
F F F F F
So (*) is T and (**) is F when all three of P; Q; R are F.


(b) You show these truth tables to Sloppy Sam and he says “OK, I’m wrong that P; Q and R all have to
be true, but I still don’t see the mistake in my reasoning. Can you help me understand my mistake?” How
would you explain to Sammy where the flaw lies in his reasoning?
Solutions to Problem Set 1 5

Solution. The “any way you look at it” is not a sound way of reasoning. It really means that in all the
cases that Sammy could think of, P; Q and R all came out to have truth-value T. But each of Sammy’s
cases started with the assumption that one of P; Q or R had the value T. Sammy forgot to consider the case
when none of P; Q or R take the value T. The truth table shows that when none of P; Q or R are T, all
the implications take the value T. So Sammy neglected to consider this one case where his conclusion was
mistaken. 

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy