Name:
Math 270: Exam 1
October 11, 2016
Make sure to show all your work as clearly as possible. This includes proving your
answers!
Question Points Score
1
25
2
25
3
15
4
15
5
10
6
15
7
15
Total:
120
1. Short answer questions. You don’t have to justify any of your answers.
(a) (5 points) How many elements are in the set S = {1, {1, 2}, 3, {3}, 1}?
Solution: There are 4: 1, {1, 2}, 3, and {3}.
(b) (5 points) True or false: if S is as above, is {2} ∈ S?
Solution: False: 2 ∈ S, but not {2}.
(c) (5 points) True or false: if S is as above, is {1} ⊂ S?
Solution: True: 1 ∈ S so {1} ⊂ S.
(d) (5 points) Compute 283 div 10.
Solution: 283 = 28 · 10 + 3, so 283 div 10 = 28.
(e) (5 points) Compute 618 mod 5.
Solution: 618 = 615 + 3 = 5q + 3 for some q (since 615 is divisible by
5), so 618 mod 5 = 3.
2. Short answer questions.
(a) (5 points) State the Quotient-Remainder Theorem.
Solution: Given n, d ∈ Z with d ≥ 1, ∃ unique q, r ∈ Z such that
n = dq + r and 0 ≤ r < d.
(b) (5 points) State the definition of a prime number.
Solution: We have n ∈ Z, n ≥ 2 is prime if ∀a, b ∈ Z+ , if n = ab, then
either a or b is 1.
(c) (5 points) Write the contrapositive of “If x ∈ S, then x is even.”
Solution: If x is odd, then x ∈
/ S.
(d) (5 points) Write the negation of “If Hulk get angry, then Hulk smash.”
Solution: Hulk get angry and Hulk not smash.
Page 2
(e) (5 points) Write “The square of an even number is rational” in formal language.
Solution: ∀x ∈ Z if x is even, then x2 is rational.
3. (15 points) Use a truth table to show that
[∼ (p → q) ∧ (∼ p ∨ r)] ∧ (q∨ ∼ r)
is a contradiction.
Solution: Let S be the entire statement.
p
T
T
T
T
F
F
F
F
q
T
T
F
F
T
T
F
F
r p → q ∼ (p → q) ∼ p ∨ r q∨ ∼ r
T
T
F
T
T
F
T
F
F
T
T
F
T
T
F
F
F
T
F
T
T
T
F
T
T
F
T
F
T
T
T
T
F
T
F
F
T
F
T
T
S
F
F
F
F
F
F
F
F
The last column is always false, so S is a contradiction.
4. (15 points) Prove that if x and y are rational numbers, then
number.
x−y
3
is a rational
Solution: Suppose x and y are rational numbers. Then by the definition of
rational number, ∃a, b, c, d ∈ Z with b 6= 0 and d 6= 0 such that
x=
a
c
and y = .
b
d
Then
− dc
3
1
a c
= ·
−
3
b d
1 ad − bc
= ·
3
bd
ad − bc
=
.
3bd
x−y
=
3
a
b
Page 3
Since 3, a, b, c, d are integers, ad − bc and 3bd are integers. Since 3, b, d 6= 0,
is rational.
by the Zero Product Property, 3bd 6= 0. Therefore x−y
3
5. (10 points) Prove or disprove: ∀d, n ∈ Z+ , if d | n2 and d ≤ n, then d | n.
Solution: This is false: take n = 6 and d = 4. Then n2 = 36 = 9 · 4, so
4 | n2 . But 4 - 6.
6. (15 points) Prove that the sum of any two consecutive integers is odd.
Solution: Let our numbers be n and n + 1. We can do this by cases, or we
can just observe that n + (n + 1) = 2n + 1, which, since n ∈ Z, is odd by
definition of odd.
n
n+1
7. (15 points) Prove that for any odd integer n,
=
.
2
2
Solution: Since n is odd, by definition of odd ∃k ∈ Z such that n = 2k + 1.
Now
2k + 1
n
=
2
2
1
=k+ .
2
We have 0 <
1
2
≤ 1. Adding k throughout, we get
k<k+
1
≤ k + 1.
2
Substituting, we get
n
k<
≤ k + 1.
2
Since k ∈ Z, k + 1 ∈ Z as well. By definition of ceiling, we have d n2 e = k + 1.
But
n+1
2k + 2
=
2
2
= k + 1.
Therefore d n2 e =
n+1
.
2
Page 4
© Copyright 2026 Paperzz