You are on page 1of 1

Quiz 4: Solutions

Problem 1. Determine whether each of these functions from Z to


Z is one-to-one.
(a) f (n) = n −1; (b) f (n) = n2 +1; (c) f (n) = n3 ; (d) f (n) = dn/2e.
Solution. (a) f is one-to-one because f is increasing; (b) f is not
one-to-one, e.g., f (1) = f (−1) = 2; (c) f is one-to-one because f is
increasing; (d) f is not one-to-one, e.g., f (1) = f (2) = 1.
Problem 2. Find the value of each of these sums.
8
(1 + (−1)j )
P
(a)
j=0
8
(2j − 2j )
P
(b)
j=0
8
(2 · 3j + 3 · 2j )
P
(c)
j=0
8
(2j+1 − 2j )
P
(d)
j=0

Hint: You may use the formula for the sum of a geometric progres-
sion: n
X
j 1 − q n+1
q = , q=6 0, 6= 1.
j=0
1−q
8 4 4
(1 + (−1)j ) = (1 + (−1)2k ) =
P P P
Solution. (a) 2 = 2 · 5 = 10,
j=0 k=0 k=0
j
where we used the identity 1 + (−1) = 0 for odd j.
8 8
(2j − 2j ) =
P P
(b) 0 = 0.
j=0 j=0
8
1−39 1−29
(2 · 3j + 3 · 2j ) = 2 · = 39 − 1 + 3 · (29 − 1) =
P
(c) 1−3
+3· 1−2
j=0
39 + 3 · 29 − 4 = 21215.
8 8 8
1−29
(2j+1 − 2j ) = (2 · 2j − 2j ) = 2j = = 29 − 1 = 511.
P P P
(d) 1−2
j=0 j=0 j=0

You might also like