Docsity

Homework 1 Solutions on Constructing Proofs | CS 1050, Assignments of Computer Science

Toggle sidebar
bg1
Homework 1 Solutions
1. Take a polynomial p(x) = ax3+bx2+cx +dsuch that p(n) is rational
for every integer n. In particular, this means that:
(a) d=p(0) is rational
(b) (p(1) + p(−1))/2 = b+dis rational; by (a), b= (b+d)−dis
rational, since it’s a difference of two rational numbers
(c) (p(1) −p(−1))/2 = a+cis rational
(d) (p(2) −p(−2))/4 = 4a+cis rational; therefore, by (c), (4a+c)−
(a+c) = 3ais rational and, consequently, ais rational. But then
c= (4a+c)−(4a) is rational too (again, as a difference of two
rationals)
Conversely, if a,b,cand dare rational and nis an integer then an3,bn2,
cn and dare all rational (since they result from multiplying rational
numbers) so their sum is also rational. But the sum is p(n)2
2. Assume the contrary. Then, there exist integers p,qsuch that √6 = p
q.
Without loss of generality we may assume that por qis odd (otherwise,
keep dividing both pand qby 2 until one of them becomes odd). So:
√6 = p
q=⇒6q2=p2.
Thus, pis even (since its square is even), so p= 2afor some integer a
and
6q2= (2a)2=⇒3q2= 2a2.
By the above, qis even (otherwise, 3q2would be odd). We conclude
that both pand qare even, which is a contradiction. 2
3. Assume the contrary, i.e. that √2 + √3 is a rational number. Since a
square of a rational number is also rational, the number r= (√2 +
√3)2= 2 + 3 + 2√6 = 5 + 2√6 is rational, i.e. is of the form p
qwhere
pand qare integers. However, this means that √6 = r−5
2=p−5q
2qis
also a ratio of two integers and therefore is rational. This contradicts
what was proven in Problem 2. 2
4. First, let’s prove that for any a,b > 0, a+b
2≥2
1/a+1/b . Assume this is not
true, i.e. a+b
2<2
1/a+1/b for some a, b > 0. Then (multiply both sides
by 2(1/a + 1/b), which, by the way, is a positive number):
(a+b)(1/a + 1/b)<4 =⇒2 + a/b +b/a < 4 =⇒
1
pf2

Partial preview of the text

Download Homework 1 Solutions on Constructing Proofs | CS 1050 and more Assignments Computer Science in PDF only on Docsity!

Homework 1 Solutions

  1. Take a polynomial p(x) = ax^3 + bx^2 + cx + d such that p(n) is rational for every integer n. In particular, this means that:

(a) d = p(0) is rational (b) (p(1) + p(−1))/2 = b + d is rational; by (a), b = (b + d) − d is rational, since it’s a difference of two rational numbers (c) (p(1) − p(−1))/2 = a + c is rational (d) (p(2) − p(−2))/4 = 4a + c is rational; therefore, by (c), (4a + c) − (a + c) = 3a is rational and, consequently, a is rational. But then c = (4a + c) − (4a) is rational too (again, as a difference of two rationals)

Conversely, if a,b,c and d are rational and n is an integer then an^3 , bn^2 , cn and d are all rational (since they result from multiplying rational numbers) so their sum is also rational. But the sum is p(n) 2

  1. Assume the contrary. Then, there exist integers p, q such that

6 = pq. Without loss of generality we may assume that p or q is odd (otherwise, keep dividing both p and q by 2 until one of them becomes odd). So: √ 6 =

p q

=⇒ 6 q^2 = p^2.

Thus, p is even (since its square is even), so p = 2a for some integer a and 6 q^2 = (2a)^2 =⇒ 3 q^2 = 2a^2. By the above, q is even (otherwise, 3q^2 would be odd). We conclude that both p and q are even, which is a contradiction. 2

  1. Assume the contrary, i.e. that

3 is a rational number. Since a square of a rational number is also rational, the number r = (

3)^2 = 2 + 3 + 2

6 is rational, i.e. is of the form pq where p and q are integers. However, this means that

6 = r− 2 5 = p− 2 q^5 qis also a ratio of two integers and therefore is rational. This contradicts what was proven in Problem 2. 2

  1. First, let’s prove that for any a, b > 0, a+ 2 b≥ (^1) /a+1^2 /b. Assume this is not

true, i.e. a+ 2 b< (^1) /a+1^2 /b for some a, b > 0. Then (multiply both sides by 2(1/a + 1/b), which, by the way, is a positive number):

(a + b)(1/a + 1/b) < 4 =⇒ 2 + a/b + b/a < 4 =⇒

=⇒ a/b + b/a − 2 < 0 =⇒ (

√ a/b −

√ b/a)^2 < 0

This is a contradiction (a square of a real number can’t be negative). Now, we show that if a 6 = b then a+ 2 b> (^1) /a^2 +1/b. Again, assume the contrary. This would mean that there are numbers a, b > 0, a 6 = b such that a+ 2 b≤ (^1) /a^2 +1/b. But then, transforming the formula as before,

(a + b)(1/a + 1/b) ≤ 4 =⇒ 2 + a/b + b/a ≤ 4 =⇒

=⇒ a/b + b/a − 2 ≤ 0 =⇒ (

√ a/b −

√ b/a)^2 ≤ 0.

If the square of a number is nonpositive, that number has to be zero. Hence,

√ a/b−

√ b/a)^2 ≤ 0 =⇒

√ a/b−

√ b/a = 0 =⇒

a/

b =

b/

a =⇒ a = b

2

  1. Consider four cases:

(a) a even and b even. Then, a = 2a′^ and b = 2b′^ for some integers a′ and b′. Thus, (a^2 − b^2 )/2 = ((2a′)^2 − (2b′)^2 )/2 = 2((a′)^2 − (b′)^2 ) is an even integer. (b) a odd and b odd. Then, a = 2a′^ + 1 and b = 2b′^ + 1 for some integers a′^ and b′. Thus, (a^2 −b^2 )/2 = ((2a′^ +1)^2 −(2b′^ +1)^2 )/2 = 2((a′)^2 + a′^ − (b′)^2 − b′) is an even integer. (c) a even b odd. Then, a^2 is even and b^2 is odd and therefore a^2 − b^2 is odd (it’s a difference of an even and an odd number). The assumption does not hold. (d) a odd b even. In this case, a^2 − b^2 is also odd.

2