1
Homework 5 Solutions
University of Pittsburgh
–
Computer Science
Department
CS441
–
Discrete Structures for Computer Science
Instructor:
Milos Hauskrecht
Problem 1
2.
1). 2
8−1
= 128
2). 7
3)
. 1 + (−1)
8
= 2
4)
. −(−2)
8
= −256
4.
1). a
1
= 1, a
2
= −2, a
3
= 4, a
4
= −8.
2). 3, 3, 3, 3
3). 8, 11, 23, 71
4). 2, 0, 8, 0
6.
a)
. 10, 7, 4, 1,−2,−5,−8,−11,−14,−17
b). 1, 3, 6, 10, 15, 21, 28, 36, 45, 55
c). 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025
d). 1, 1, 1, 2, 2, 2, 2, 3, 3 (there will be 2k + 1 copies of k).
e). 1, 2, 3, 5, 8, 13, 21, 34, 55, 89
f). The largest number whose binary expansion has n bits is (11 . . . 1)
2
, which is
2
n
− 1. So the sequence is 1, 3, 7, 15,
31, 63, 127, 255, 511,1023
g). 1, 2, 2, 4, 8, 11, 33, 37, 148, 153
h). 1, 2, 2, 2, 2, 3, 3, 3, 3, 3
8.
(1). One rule could be that each term is 2 greater than the previous term; the
sequence would be 3, 5, 7, 9, 11, . . ..
(2). Another rule is that the n
th
term is the n
th
prime number; the sequence would
be 3, 5, 7, 11, 13, . . ..
(3). For a third rule, we could choose any number we want for the fourth term and
find a third degree polynomial whose value at n would be the n
th
term; in this
case we need to solve for A,B,C, and D in y =Ax