Homework 1
Homework 1
Problem 1
(a) If n ∈ N and n2 + (n + 1)2 = (n + 2)2 , then n = 3.
Theorem: (n ∈ N) ∧ (n2 + (n + 2)2 ) =⇒ n = 3
Proof:
n2 + (n + 1)2 = (n + 2)2
=⇒ n2 + (n + 1)(n + 1) algebra
=⇒ n2 + n2 + n + n + 1 = n2 + 2n + 2n + 4 algebra
2 2
=⇒ 2n + 2n + 1 = n + 4n + 4 algebra
2 2
=⇒ 2n − n + 2n − 4n + 1 − 4 = 0 algebra
=⇒ n2 + (−2n) + (−3) = 0 algebra
Because N ⊂ C, n ⊂ C, which means that the quadratic formula provided by Clive can be used.
p p
−(−2) + (−2)2 − 4(−1)(−3) −(−2) − (−2)2 − 4(−1)(−3)
=⇒ (n = ) ∨ (n = ) substition
2(1) 2(1)
√ √
2 + 16 2 − 16
=⇒ (n = ) ∨ (n = ) arithmetic
2 2
2+4 2−4
=⇒ (n = ) ∨ (n = ) evaluating
2 2
=⇒ (n = 3) ∨ (n = 1) evaluating
Checking n = 3 as a solution
Problem Sheet 1 21-128 Concepts
Problem 2
p q r p =⇒ q p =⇒ r (p =⇒ q) ∨ (p =⇒ r) q ∨ r p =⇒ (q ∨ r)
T T T T T T T T
T T F T F T T T
T F T F T T T T
T F F F F F F F
F T T T T T T T
F T F T T T T T
F F T T T T T T
F F F T T T F T
The two truth tables for (p =⇒ q) ∨ (p =⇒ r) and p =⇒ (q ∨ r) are equivalent
=> [(p =⇒ q) ∨ (p =⇒ r)] ≡ [p =⇒ (q ∨ r)]
(b) Show that ∀xP (x) ∨ ∀xQ(x) and ∀x(P (x) ∨ Q(x)) are not logically equivalent.
[∀xP (x) ∨ ∀xQ(x)] 6≡ [∀x(P (x) ∨ Q(x))]
AFSOC [∀xP (x) ∨ ∀xQ(x)] ≡ [∀x(P (x) ∨ Q(x))]
Let Q(x) = ¬P (x)
Theorem 2 Let a, b ∈ Z. We say b divides a if a = qb for some integer q. Other ways of saying
that b divides a are: b is a divisor of a, b is a factor of a, or a is a multiple of b.
We prove lemma 4.b.1 with the counterexample x=3, 3 is odd, since 3 = 2(1) + 1. The division
theorem shows that 3 is not evenly divisible by 2 and is thus odd. (Clive proves this in Proposition
1.1.42)
We prove lemma 4.b.2 with the counterexample x = 2, 2 is even, since 2 = (2)+0. We use the division
theorem again, since the remainder is zero then 2 divides 2 and is thus even.
Problem 3
Let p(x, y) be the predicate ‘x + y is even’, where x and y range over the integers.
Case 2: x is odd ⇐⇒ x = 2k + 1 k ∈ Z
Let y = 1, y ∈ Z
y = 1 =⇒ 2k + 1 + y = 2k + 1 + 1 = 2k + 2
=> x + y = 2(k + 1)
x + y is even since 2(k + 1) is divisible by 2
All possible cases for integers (being either even or odd) have been covered, and both cases can prove
the predicate.
Case 1: x is even ⇐⇒ x = 2k k ∈ Z
Let y = 1, y ∈ Z
y = 0 =⇒ 2k + y = 2k + 1
=⇒ x + y = 2k + 1 =⇒ x + y is odd by the remainder theorem (the remainder is not 0 =⇒ 2k + 1
is odd)
Case 2: x is odd ⇐⇒ x = 2k + 1 k ∈ Z
Let y = 0, y ∈ Z
y = 0 =⇒ 2k + 1 + 0 = 2k + 1
=> x + y = 2k + 1
=⇒ x + y = 2k + 1 =⇒ x + y is odd by the remainder theorem (the remainder is not 0 =⇒ 2k + 1
is odd)
All possible cases for integers (being either even or odd) have been covered, and both cases can prove
the (negated) predicate. Since we proved the negation, the original statement is false.
Problem 4
Problem 5
Determine all real numbers C such that there exist real numbers A and B with
[ A + B = 8 and (Ax + 2)(Bx + 7) = 15x2 + Cx + 14 for all positive integers x ].
A = (8 − B) by algebra
=⇒ (8 − B)B = 15 by substitution into eq 1
2
=⇒ 8B − B = 15 by distribution
=⇒ 8B − B 2 − 15 = 15 − 15 by algebra
2
=⇒ 8B − B − 15 = 0 by algebra
=⇒ (−B + 3)(B − 5) = 0 by factoring
=⇒ (B = 3) ∨ (B = 5) to satisfy previous equation equalling 0
C = 7A + 2B eq 2
=⇒ (C = 7(3) + 2(5) = 31) ∨ (C = 7(5) + 2(3) = 41 substituting A,B values in
Problem 6
Let n and b > 1 be positive integers. Determine, with proof, the number of digits of the base b represen-
tation of n in terms of b and n.
Definition 1 Let b > 1. The base-b expansion of a natural number n is the string dr dr−1 . . . d0
such that
• n = dr · br + dr−1 · br−1 + · · · + d0 · b0 ;
By the definition, the digits of n are bounded by the powers of the base. For example, 123(10) is bounded
103 ≤ 123(10) < 104 .
=⇒ br−1 ≤ n < br
=⇒ logb (br−1 ) ≤ logb (n) < logb (br ) by algebra
=⇒ r − 1 ≤ logb (n) < r by log definition
=⇒ r is logb (n) + 1 or r is between logb (n) + 1 and logb (n) + 2
=⇒ r = floor(logb (n)) + 1
Problem Sheet 1 21-128 Concepts
Problem 7
xz, wy, yz are all integers by closure of integers under multiplication and addition
=⇒ a is rational, since it can be represented as a ratio of integers
Contradiction! a is rational contradicts a is irrational from our assumption.
=⇒ (∀a ∈ R \ Q) ∧ (∀r ∈ R) a + r ∈ R \ Q
0 = 01 0, 1 ∈ Z =⇒ 0 ∈ Q
This counterexample thus disproves (∀a, b ∈ Q) a + b ∈ R \ Q
Problem Sheet 1 21-128 Concepts
Lemma 7.a.1 :
√
AFSOC − 2 is rational
√ a
=⇒ − 2 = a, b ∈ Z by definition of rationals
b
√ a −a
=⇒ − 2(−1) = (−1) = algebra
b b
√ −a
=⇒ 2 = algebra
b
√
Contradiction! 2 is irrational (we assume this from Clive), and so it can’t be represented as a ratio
of two √
integers.
=⇒ − 2 ∈ R \ Q
√
√ 2
Assume A = 2 √
If A is irrational, then ab could be irrational if a = b √
= 2
√ √ √ 2 √ √ √2 √2 √ 2
If A is rational, then A 2 is rational since A 2 = ( 2 ) 2 = 2 ) = 2 = 2 by exponentiation
rules
2 is rational since 2 = 12 1, 2 ∈ Z and 1 > 0
2 ∈ Q =⇒ ab can be rational