We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
ioe Tne conplelty + Qesedbe olifferent omy ptofle notasior
pe
gue seo Fo _repreent ae Hore completes with ‘guitar Exam ply
Ye valid algarither faxed o finite amount of Hine sr executor
pra Hot required Re algorithn fo golue giver probe on ts
cabhd Time Compte (He eabgorith. Le He very abe ful
_ Meapur_ tn _akgorithey anoiyds
“petigtne He neuded for st _conpbitin of 2” afjorthet 72 esti
Pete _comepttaity , Wenerdl 40 conslelon Ae Cos-o Cach-fundeme
a —_tngrructton, and fe numben ef Hex Pe instruction fs executed -
| Aiyrp totic Notatlows- Theseane te Mathemical tools used tO
fhe pesfortance of Ofgerithy by understand!
how) shor efficiency. changes aS yr inp duze grows.
}
5 Ree notation idea concise oy to capven IN gehaviown
ay to Capron Ki febow
an algorit's Hme or Space com plexity as PAL input size
[——aypenns ri
5 Rater tion comparing obgorttet rectly aayrpene snaigs
focus on _seeteatinding, ‘Re vetatue “Sword” Yors
—___“atgoitets corpses
ee fe comparison Qf abgorithe’s efficiency, by
;} —_aabstrasting Gabry Machine Speetf!e conatants ancl
Ty SistersPRACTICAL
NOTE BOOK
pate
fs co detalts 1 focusing InAread on —flndarienta trends.
4 asgi pe frags alle.ds for tt cantpartsen Qf akggrihens Spat
gaat ime, Complon Hes Jy exanning Pein porfomtanch chencctous
ute inpuck size vonle Ee
(uh Big 0-85 OME
by fy wing. asyeptoHe notations _
ede ont ors
cand Bie, Tea Detan Catejorize obyorithy bs
cape bestrense ore everat whe Hm or sper cond plecthes ,
podaung_ valuable 104i into fier “efficiency -
1 aayeiprorte _aotetioms~ eee S|
Fu ou no0nly fr
Ree —— * 2 i —
| Bip B nhton (ones) ents 1M fein fom abe
J anol. belowd.. ince frre presents
Fhe tipper andl toder found of ‘sunning time of on aggorithe
jL-ts used soy Lanalyzing iM Cweragd @4e _Coniptexity a
On clgorithet « i ws
et $00 | be 2006) 1, 0hW 4 Veeieal ol Oa) ae
—— _Si@in, Aa (nlr2o_+ fog enr) 4 belongs to _6.C0)
eee SU Cnt en pe na eC Jeg corr"} belongs te 8Cn*)
zl “ig.0_naations (0 netatin) 2= [Peepeaseus M_uppen beer [|
a : ef MH munnlay Tied of 4
Agorithea a Theujove, ih give Je worst Grae coniplexity
gf 40, algorithm -
XS aeld jan, toy C2002), ("4 $ belongs to O(4)
we i
usaly. Cax3), (nfioo + dog) % belon ys to o(n)
v £ tatan) (nt), Cnt+dogens ) 3 belongs to 0(a*)
Ly omega Notation s— _[Hrepresens HM Lowen found af running
a gf an algorsth mt - Tides i+ provides +4 best
car & _ complexity 2 an olgorith Pan pig oe
cnzen), Cant), Catesegens) 9 belings #9 BLU)
—D Qlala), (2n+3)_, Colioo+ tog (a) ) 4 belongs te A(9)
__v_§ 100, toy C2000), i 4 % belongs_to 24)
I
i
| ex-
| ek
I
us Sodue 1M -faltousigg by using jab Sequencs. pith eacliines _
ey Geen a ae to, 531) and (d--de) = Gls 3
Ars— a i i a
Sip-T We woth arragge fra aecrange profits Pi _in descending eden
along vith Correa pondliay dean
eI t
Profit 20 15 Ca shiaioa
| Wy t, Po Pa (fc Ps
Ocadsine Ds | @ B
Skp-T — Creeder an _s0tey JF Ca ushih shoves se 700s “Tattlaty
49 wit be
ee 2 i) a §
o ° ° ° OQuendia or dor
w2 Hou) Howe Sorte doris M follow
a, $7, 4H (12,
oth a neat allegra representing eae
a a
. a
PRESS
S70 Noy TA
Sc, °K
J
)
In
33, ;
mh
e s7[ 3] [afss] (2 [ress]
VS SO SEN
IS] eal ed lea) Nel Bs)
eee Gobet -
Wii fl wy Gb & Ge fe) a &
Wee \W
[44] upl sty fa [56 22 [33 [76 65,34
\ Wa
| 12 | My ys] sé | say. J3 33 [65/76 fayom casec — smO=M ink SOC3X 45IN3K- SOL Jae sin 8
i c pen
SecO — cas
ORAM
PRACTICAL
NOTE BOOK
ar
ep a i* gob_in avray TCT at index derotel by iS cleadune|
Pst job ts Px, ate ie
Sa ne SSF ae eee e
AY
_— Heme tnsere Phin array, TOI os ah dex.
an]
Next Job ts P2 uskose deadune Is 2. but JL2Z ts alread
Sccupte dl + Ue wit Aeonch for enpty tocation < J [2] -
Tre TL fs eripy + Trou p2_at TC1].
Next deb ts Pg ustese deadltne ts 4- Qutas Tra]
Is already | occupied discard ths job +
Nee Job Is >Py with deadbine 3. Toent Pa at US]
—Stp-r Nex Job ts PS with deadline 3, buck ac thew ts expiry. |
a Jot at <= JCS] , wit alscand Ms fos-NO
Explain Prim's Afgarhthe with cpproprtott example '
WHEE (
se Now Choose Fhe edge CA + Hou, we cannot color
AL edge CE 94 tb euould Cireake a_cyck to #
Grph, So theese Hu edge CA andl adel Gi
Botte. graph _pyodluctal _M._Siep S ty Minimuer panei
tree of gid graph. Te cash MST ts pen befor’
D1 Gacy Nt c= TN SO
b| _Kwvusial’s _fifgoritie. é=_Hris ates algerither wed In
graph theo fo frrak ee Minimum
ae Te (MST) gy a connecitd]_, undirected graph
fe AST Is a cubsed of edges that connects all TAL vertices
without any yolus and with th AudlmuM pocuble fotal
edge Udtight Krusteal’s “abgerithn 1S Greedy, Meaning iF
buts pre MST bg abuoys Cheasing TAL atct- Shortesr e
phot ofoesn’t frm o Oyclee eo
SK of Kruagal's Adgoritnns—
sli Sort of 24ges: Begin ms Aortigg alt We edge tn Huave “Repeat untie MST ts complete :
fhina non decresing order of ther Welgik”
i qpuiauiz Subsets 8
aM
— Create a seb fr each vowtn se graph
Trig ts usually cone ustag ¢ Ms jor
cr UNION ~find olaia Sfructuut , whi
nelps t_Managieg and Neng dels epplelertly,
cer union C osu)
iy Jtvaie oven Sorted edges 3 Trawere te _Sorte al edge Mist)
cand for each edge dervrrdan
padding It te He growing spanning Hel toorlal
prt a cyekt - Als is done by checking if the TH90
yentias of ft edge beteng 70 life
do, incuele MS eye |
SESAME DT
A HST end union AL 6S
se. hon Venting = [peg boing to Psat
gee , Meluctieg THS |e would fore a cyt , So
ims alte carded -
Continut "the procws
ieee untid fru ow V~t |
efots Ine MIT, whou Y fs fer nmeber gf
vedanta Te graphs
Explaln pu Kaapsacis._prebtert » Find areptimal goin +0 ti a
Knapoacre Innianch NET, M=LS Geel Clea (A — — ad)
(to 51 5,7) 6,(8,3) ond (Wr — 1) = 06 235,79, HDPRACTICAL
Exe a
NOTE BOOK il
is
tn knapsack problem , fou need to pack a set of Hems ,
von given, uluis ancl Sizes Couch as welts or vobnes)
phe fotat size
tan e1
ye Ce with MakiMum Capaclty 6 tf
of fe Tks @xowtela Mc capacity, You can't pacs them
ane me, the prevent ie fo choose a Aubserof Tens,
of daxinum fotel volut Rat WIN ft tn fre contlne-
Optinat_sobutton fhak: gives “Ne nue profit
Sept “To find prapie]wmagis eto a
Beh type BSs oem! —
pel, = 5/2 = 167 pee = laf = 41S
jw = sls = 3 Py fio = 31 = 3 _
puja = Wh = il
Sept (Aeacge ns profs] lot vasio 19 non Jnowastng
ow valuts )» Groce The Abghest fit] ely
as great profiel sy
ts 6 * Tor ts poles So 4st valuihs S-
econd i elata eyeeea wetio fg 5. Trat fS
Sin) Bal abe (8 so Simihetly -coLoulate
“such » valuis 0nd arianse the fn men Jnowtastng
_ orden - : =
Order = (S14 Bh 2) a