S We dseaceed how to determine 4he werre
cere vun-time fer arn algonthen by anehziny
he psedo-code. We saw thet we can expert
4o be able to determine the running time
upto a Gnetont factor
fats lesson We weemess introduce a notation which
meas te determing running time witheut kee pm frele
enstant factorr, which we call the asgptetic Netetin,
mptotic notation captures haw the running Lime
Sre algevithm grows with the site of Awe mpat.
Goteduce the rokatieny aSymyptet ce. nefaton
general functions net uct runtimes:
T they can be Airedly applied qe veantimes, -
ae allele eae
Pecitive Functtens mean w functions Where Values
are Pperitive real numbers—
We will also astame thet the function arguments
ere natural numbers
= So FSunctons we consider ore $2 IN —oiR
ne functions we are interested Am will) asaally be
Koning Hme of memory Gmsampten whidy
ssfies hese Ye puirements >
~ ae hee
DeAortion (Big oh )- Let F and a be
Wo eSitive functions. We Of} att
VF grows asympteticnly ne fackey tHyan 3
md wribe fe Ore) > iF Aheve extets oo
prstants C FO and No Such thet Tor
nye 5 We have that FHS SCs jd
ve Gores
ek. underttard
ais defnitts¥. Lt ignores the values of $ ankq ‘
for small Wo and
chore
It also igneree Constant fa
fenr< An
shat is fer example w£
then we write
$e OLA) witheak the Cons
A.
ETE fos) 16 the ranning Hme of
Be alaorithm, for input Size Nn, he
jhe is Asually the most Tpertent
Information one needs About
algorithms Performance
5s
Pe can ea describe the Sg definrhe,
of ‘hig oh as Fellows. f
— Fcnd
—le and
-
__ _— 7 9Cn) HN nze. Bak cheese L=/0
any lacger value) in the definition
wie, see that Ff ts OC9d.
ef courge gis OCF) ac well bat Ahic is
ot always true for +we oa} Ar bihens
Functens f= and g.
Nelaton 5
Th ic standard pace te with p29)
Mather than fe OG).
This canventten let uc think os Rllowo
[oo 8 + LOO N™ Ln7~ny + JOON +ADO-
‘ Ao eee
= leon ’r+gooh OG) + Boon +400.
ee
pcs
= * +
= leon: aes O(,3) +300n4 WOO
OM) + OCH) + OG?) + OC)
s* Constants dowt Matter I!
= Or?) 2 Lower order terme dent} meter JI
Inithe examples We did in Lester VI
We tan Lay Linear Search with running dme
Wor & OC) t : :
and binary Cearch wth running Rn)
Tatny€ Ofhegnr)
a)