130 likes | 156 Views
it contains all the explanation about asymptotic notation.
E N D
ASYMPTOTIC NOTATION NAME EN.NO Jigar Rabadiya 160410116111 Rajat Singh 160410116113 Shreyas Patel 160410116102 Rahul Patel 160410116100 SUB : ADA DIVISION : IT-2 SVIT , VASAD
What is AsymptoticNotations? • Asymptotic Notations are languages that allow us to analyse an algorithm’s running time by identifying its behaviour as the input size for the algorithm increases. This is also known as an algorithm’s growth rate. • Asymptotic running time of an algorithm is defined in terms of functions. • Asymptotic notation is useful to describe the running time of an algorithm. • It ignores small constant and small inputs • Estimate upper bound and lower bound on growth rate of time complexity function • It describes running time of algorithm as n grows to infinity.
Asymptotic Notation • AsymptoticNotations ,O,,o, • Weusetomean“orderexactly”, • Otomean“orderatmost”, • tomean“orderatleast”, • otomean“tightupperbound”, • tomean“tightlowerbound • Defineasetoffunctions:whichisinpracticeused tocomparetwofunctionsizes.
Big-ohNotation(O) • If f,g:NR+,thenwecandefineBig- Oas • For a given function gn 0, denoted by gnthe set of functions, • gnf n: there exist positive constants c and no such that 0 f ncgn , for all n no • f ngn means function gnis an asymptotically upper bound for f n. • We may write f(n)=O(g(n))OR f(n) O(g(n)) Intuitively: • Set of all functions whose rate of growth is the same as or lower than that of g(n).
Big-ohNotation(O) f(n) O(g(n)) c >0,n00 andnn0, 0 f(n) c.g(n) g(n)isanasymptoticupperboundforf(n).
Big-OmegaNotation() • Iff,g:NR+,thenwecandefineBig-Omegaas • For a given function gndenote by gnthe set of functions, • gnf n: there exist positive constants c and no such that 0cgnf nfor all n no • f ngn, means that function gnis an asymptotically lower bound forf n. • We may write f(n)=(g(n))ORf(n)(g(n)) Intuitively: Set of all functions whose rate of growth is the same as or higher than that of g(n).
Big-OmegaNotation() f(n) (g(n)) c >0,n00,n n0, f(n) cg(n) 0 g(n)isan asymptoticallylowerboundforf(n).
ThetaNotation() • Iff,g:NR+,thenwecandefineBig-Thetaas • For a given function gndenoted by gnthe set of functions, gnf n: there exist positive constants c1 , c2 and no such that 0 c1 gnf nc2 gnfor all n no • f ngnmeans function f nis equal to gnto within a constant factor, andgnis an asymptotically tight bound for f n. • We may write f(n)=(g(n))ORf(n)(g(n)) Intuitively: Set of all functions that have same rate of growth as g(n).
ThetaNotation() f(n) (g(n)) c1>0, c2>0,n00, n n0, 0c1.g(n) f(n) c2.g(n) We saythatg(n)isanasymptoticallytightboundforf(n).
Little oh Notation(ο) • Let f(n) and g(n) be functions that map positive integers to positive real numbers. We say that f(n) is ο(g(n)) or f(n) ο(g(n)). if for any real constant c > 0, then f(n) >cg(n) . • o() [little oh] means loose upper-bound of f(n). • We may write if for any real constant c > 0, then f(n) >cg(n) means f(n) = o(g(n)). • lim f(n)/g(n) = 0n→∞
Little OmegaNotation(ω) • Let f(n) and g(n) be functions that map positive integers to positive real numbers. We say that f(n) is ω(g(n)) or f(n) ∈ ω(g(n)) if for any real constant c > 0, and for all n ≥ n0 then we can say that f(n) > cg(n) ≥ 0. • f(n) has a higher growth rate than g(n) so main difference between Big Omega (Ω) and little omega (ω) lies in their definitions.
Little OmegaNotation(ω) • We use ω notation to denote a lose lower bound that is not asymptotically tight.and, f(n) ∈ ω(g(n)) if and only if g(n) ∈ ο((f(n)). • We may write if f(n) ∈ ω(g(n)) then, lim f(n)/g(n) = ∞ n→∞