Lecture 2

# Introduction to Algorithms, Second Edition

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

The University of Texas at Austin Lecture 2 Department of Computer Sciences Professor Vijaya Ramachandran Growth of functions; asymptotic analysis; summations CS357: ALGORITHMS, Spring 2006 Growth of Functions A function f ( n ) is asymptotically nonnegative if f ( n ) is nonnegative for all values sufficiently large values of n (i.e., for all values of n above a certain value). ‘Big-Oh’ . O ( g ( n )) = { f ( n ) : there exist constants c > 0 , n 0 > 0 such that 0 f ( n ) cg ( n ) n n 0 } Note. O ( g ( n )) refers to a set of functions , yet (by convention) we will use the equality symbol (‘=’) when dealing with big-Oh (the same holds for big-Omega and Theta), i.e., we will say f ( n ) = O ( g ( n )) when we should actually say that f ( n ) O ( g ( n )). It is important to keep this distinction in mind. ‘Big-Omega’ . Ω( g ( n )) = { f ( n ) : there exist constants c > 0 , n 0 > 0 such that 0 cg ( n ) f ( n ) n n 0 } ‘Theta’ . Θ( g ( n )) = { f ( n ) : there exist constants c 1 > 0 , c 2 > 0 , n 0 > 0 such that 0 c 1 g ( n ) f ( n ) c 2 g ( n ) n n 0 } Note. f ( n ) = Θ( g ( n )) if and only if f ( n ) = O ( g ( n )) AND

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