CSC375 Homework4 George Corser 2009-02-01

CSC375 Homework4 George Corser 2009-02-01 - CSC 375...

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

View Full Document Right Arrow Icon
CSC 375 Homework4 George Corser 2009 February 2 Note: For this homework, all constants (c, k) are positive and n is always a positive integer. 3.4 The table below shows the increase in problem size that can be run in a fixed period of time on a computer that is 64 times faster. Problem T(n) n n’ Change n’/n 3.4(a) 3x2 n 10 16 n΄=n+6 none 3.4(b) n 2 10 80 n΄=8n 8.00 3.4(c) n 10 640 n΄=64n 64.00 3.4(a) T(n’) ÷ (computer speedup) = T(n) (3x2 n’ ) ÷ 64 = 3x2 n (2 n’ ) ÷ 64 = 2 n (2 n’ ) = 64x2 n log(2 n’ ) = log(64 x2 n ) n’ = log(64)+n n’ = n + 6 We could process 6 more inputs in T seconds 3.4(b) T(n’) ÷ (computer speedup) = T(n) (n’) 2 ÷ 64 = n 2 (n’) 2 = 64n 2 n’ = 64 n n’ = 8n We could process 8 times more inputs in T seconds 3.4(b) T(n’) ÷ (computer speedup) = T(n) (n’) ÷ 64 = n n’ = 64n We could process 64 times more inputs in T seconds 3.8 3.8(a) c 1 n In the average case T(n) = (c 1 n)/2. For all positive values of n, (c 1 n)/2 ≤ c 1 n, so by the definition, T(n) is in O(n) for n 0 = 1 and c = c 1 .
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