CS
hw5-Sols

# hw5-Sols - Homework 5 Solutions University of Pittsburgh...

• Notes
• 3

This preview shows pages 1–2. Sign up to view the full content.

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

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Spring '08
• Lee,H
• Computer Science, Natural number, Prime number, Countable set, nth term

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern