Docsity

Asymptotic notation in Data Structures, Lecture notes of Data Structures and Algorithms

Partial preview of the text

Download Asymptotic notation in Data Structures and more Lecture notes Data Structures and Algorithms in PDF only on Docsity!

Asymptotic Notation

Dinesh Paulraj MCA.,M.Phil.,

  • Asymptotic analysis refers to computing the running time of any operation in mathematical units of computation.
  • Using asymptotic analysis, we can very well conclude the best case, average case, and worst case scenario of an algorithm.
  • Asymptotic analysis is input bound i.e., if there's no input to the algorithm, it is concluded to work in a constant time. For example, the running time of one operation is computed as f(n) and may be for another operation it is computed as g(n^2 ).

DEFINITION:

Big Oh Notation Ο

  • The notation Ο(n) is the formal way to express the upper n) is the formal way to express the upper bound of an algorithm's running time.
  • It measures the worst case time complexity or the longest amount of time an algorithm can possibly take to complete. Ο( f (n)) = { )) = { = { g (n)) = { : there exists c > 0 and n 0 such that f (n)) = { ≤ c. g (n)) = { for all n > n 0. }

Omega Notation, Ω

  • The notation Ω(n) is the formal way to express the upper n) is the formal way to express the lower bound of an algorithm's running time. It measures the best case time complexity or the best amount of time an algorithm can possibly take to complete. Ω( f (n)) = { )) = { ≥ { g (n)) = { : there exists c > 0 and n 0 such that g (n)) = { ≤ c. f (n)) = { for all n > n 0. }

THANK YOU