Massachusetts Institute of Technology
6.042J/18.062J, Spring ’10
: Mathematics for Computer Science
February 5
Prof. Albert R. Meyer
revised March 6, 2010, 848 minutes
Solutions
to
InClass
Problems
Week
1,
Fri.
Problem
1.
Generalize the proof from lecture (reproduced below) that
√
2
is irrational, for example, how about
3
√
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 proof is by contradiction: assume that
√
2
is rational, that is,
n
√
2 =
,
(1)
d
where
n
and
d
are integers. Now consider the smallest such positive integer denomi
nator,
d
. We will prove in a moment that the numerator,
n
, and the denominator,
d
, are
both even. This implies that
n/
2
d/
2
is a fraction equal to
√
2
with a smaller positive integer denominator, a contradiction.
Since the assumption that
√
2
is rational leads to this contradiction, the assumption
must be false. That is,
√
2
is indeed irrational.
This italicized comment on the
implication of the contradiction normally goes without saying, but since this
is the first 6.042 exercise about proof by contradiction, we’ve said it.
To prove that
n
and
d
have 2 as a common factor, we start by squaring both sides of (
1
)
and get
2 =
n
2
/d
2
, so
2
d
2
=
n
2
.
(2)
So 2 is a factor of
n
2
, which is only possible if 2 is in fact a factor of
n
.
This means that
n
= 2
k
for some integer,
k
, so
n
2
=
(2
k
)
2
= 4
k
2
.
(3)
Combining (
2
) and (
3
) gives
2
d
2
= 4
k
2
, so
d
2
= 2
k
2
.
(4)
So 2 is a factor of
d
2
, which again is only possible if 2 is in fact also a factor of
d
, as
claimed.
�
Creative Commons
2010,
Prof. Albert R. Meyer
.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
2
Solutions
to
InClass
Problems
Week
1,
Fri.
n
Solution.
Proof.
We prove that for any
n >
1
,
√
2
is irrational by contradiction.
n
n
Assume that
√
2
is rational. Under this assumption, there exist integers
a
and
b
with
√
2 =
a/b
,
where
b
is the smallest such positive integer denominator. Now we prove that
a
and
b
are both
even, so that
a/
2
b/
2
n
is a fraction equal to
√
2
with a smaller positive integer denominator, a contradiction.
n
√
2
=
a
b
2
=
a
n
b
n
2
b
n
=
a
n
.
The lefthand side of the last equation is even, so
a
n
is even. This implies that
a
is even as well (see
below for justification).
In particular,
a
= 2
c
for some integer
c
. Thus,
2
b
n
=
(2
c
)
n
= 2
n
c
n
,
n
b
n
=
2
n
−
1
c .
Since
n
−
1
>
0
, the righthand side of the last equation is an even number, so
b
n
is even. But this
implies that
b
must be even as well, contradicting the fact that
a/b
is in lowest terms.
�
Now we justify the claim that if
a
n
is even, so is
a
.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 Prof.AlbertR.Meyer
 Computer Science, Prime number, Integer factorization, Fundamental theorem of arithmetic, positive integer denominator

Click to edit the document details