{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_042JS10_lec25_sol

# MIT6_042JS10_lec25_sol - Massachusetts Institute of...

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

Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science April 7 Prof. Albert R. Meyer revised April 7, 2010, 888 minutes Solutions to In-Class Problems Week 9, Wed. Problem 1. Recall that for functions f, g on N , f = O ( g ) iff c N n 0 N n n 0 c · g ( n ) ≥ | f ( n ) | . (1) For each pair of functions below, determine whether f = O ( g ) and whether g = O ( f ) . In cases where one function is O() of the other, indicate the smallest nonegative integer , c , and for that small- est c , the smallest corresponding nonegative integer n 0 ensuring that condition ( 1 ) applies. (a) f ( n ) = n 2 , g ( n ) = 3 n . f = O ( g ) YES NO If YES, c = , n 0 = Solution. NO. g = O ( f ) YES NO If YES, c = , n 0 = Solution. YES, with c = 1 , n 0 = 3 , which works because 3 2 = 9 , 3 3 = 9 . · (b) f ( n ) = (3 n 7) / ( n + 4) , g ( n ) = 4 f = O ( g ) YES NO If YES, c = , n 0 = Solution. YES, with c = 1 , n 0 = 0 (because | f ( n ) | < 3 ). g = O ( f ) YES NO If YES, c = , n 0 = Solution. YES, with c = 2 , n 0 = 15 . Since lim n →∞ f ( n ) = 3 , the smallest possible c is 2. For c = 2 , the smallest possible n 0 = 15 which follows from the requirement that 2 f ( n 0 ) 4 . (c) f ( n ) = 1 + ( n sin(

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ 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