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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern