DS Assignment

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Sumi S Dhara

Camlin Page |
Date | 6 I 23

Data Shuetue & algothn Assignnent

what u Data stuchne ' Explain it need

DData Stnuctes the pogrammic way af ting dlata


so that alata ceun be sed ekhiclenty Amost eny ent pis
applicatton wie vaiOs tuees ck cata stnuctne in On
e
a t othen wey.Thu tutona wwil qive you aq a t wnder
to wndaratand
tanding on Data aeewey stnctey nee de cd
10
tae complxit q entnpie lvel apeicatia and need af
algaith and clata shauctua
) Need kor Data shich it As appicatton are qetting conpX
are three eommon pyobmi thot appUca
& data m'chthe
tion fom nowranlays
geachi Consider an inrntory o Iniion C0) (tems
15
i) Data seach an itm,it
Qppcation u to pe
a a gtore TE h
ceath searcb an m in l milion Cl0°) bem eveny im
has to
Seareh As dota eros , sea Ych nill be come
elowina dowh the
sloweY reayhigh
sor speeet : Proces Srr spa ech althagh being
) Pro ces bilion re core
if fhe data qrow to
faly imite el chAer can seahdata
As thowands
) Multipu equests ! sey Sernce, even tne fasE serrer
ona weh
sì mltaneou the
the dota
Pally while searching oblemy ,data shctua com
mentioned
3)To solve the aboe - cranized in acata huctur in such
can be
to ne cue. Data be rquird to be seanched
may not
away that al item seanched almost
instuntty
can be
the euined lata
Camlin Page
Date

Explain eharactisiCA a an Alqanthm


An algont ha shold hav the hollowing charactuts
DaUnomblguo S ir Alqanthm ohould be elear ambiguo
ol) tti steps Cor phasea) and thair input1 loutput, thould be
cleo & mut lead to only ONe meanng
shoulal
inpus
3)outputi An clgaithon olal
hane l cr more welldtined
Outputs shold math thedesid atput
10

4) finiteAs Aloithm mwt trminake t r a fiib nenber


steps.
teaible hith the
feasibi (ity i- Aqoithny must terin available
Tndependent An algithn should toe hae styp- by- step diree
Code
short
Wit a not - on
20
Algoitham complenitay
1uppose Xiu an alqorithm and n iu te ize o inpu data,the
which decice tw etficiencey of X. Tine
2The onapl y c an alaggitan tn) gley7actor
thi
* space actor.
nnnq
th size of input data.

)1he spau reqied by auy an olaorithm


30
th folloinq Two conaponna r a) Aobtthel sumd
spacs rfquined to store cêrtain doto Aized pant tat iu a
data t ran
indepen dehd d the sl24 the pobem foY cales,sthat are
exampl, timple
Carnlinage
Date

an able and comtant


)A
wedroqam S 24,ete
anicbley pat ucainau rquired by ouobus, who ie
emy a o cation 4ccuyuion gBa cis , Spaca,ec

whene

alqortthm ,which depends


hnt Opuxity o an alqoyidhna epreenu the amoun
un qlind ay du algarithm to men to compbion Tae
eqwements can be deined a anmerical function TCn),
whe Th) can be mmecswed ay the numor O stps, pro
Aded each steps CAnt cons taut ime.

4)<plain Asyraptotie wotation in detail


commony
Followaq are the totoia wed asyrmptotie notatiay to
Caleelati thi renning time
" 0Notation compurity h an algorithm
"NNotatien
otation
Big Oh Notation, O
Tue notaticn oln) js the
fmal wy to
bound
an algcnthm'i ninning time: 1t exprar tn uppY
a worst cae tim
compu it,
maswy
cr the Lonaeit a Ount c
th
an
gontnm can possiby take to complete. time
example tiy a kuneten tln)
oCeln)) aln)hen exiAti C>o k no
CaCn) for alAn ho.
2)Omqa Notaton,
otai'on N n) the fommal wy to
bound d an
alaithm unning tie 1oxpreA the tr
meaduney th heit
Camlin Page
Date

Caue time copphxity r t e best amount tim an


algrit
m can possi bly take to coypleta
exanple, er a funtn fn)
n) çln) thene exite c>o no suh that qln)%c.
a) Theta hotation, Ð
The ho tatisn Cn) a the fomel way to exprer both the
Lower bouad & the wppar bound o n algaathmi unning
teme. Tt is rpreyerttod as dllowc i

)EKplaia Aloothm dGh tecbiqu


15

cf them ane shown betw


Tmpuentatin
Desiqn Method

Clas siktaton by Tapleentatian Method.


Reeur'n or Tkratdna
that call itselk rpeakd
u until a base condition is satisled
i)roadua oc Declacate (non-pncedural)

ent aithout hain to fay how to do ikLith pocda l


pnqaing e hare o cpeiy te exact ee to qet
vest,
iü) Sexrial or parallel
30

COngters e Xeeute ani jnaucttn aut a tim. hre ae cael

Panalel adgontha tales adiantages. t comptero ahitee


Q.sS plain Alaonithno ce iqn tichnigs

to Pocest on to dieren
algonthnu a dihibuid o to ditclt
call such olgoithn dibibwed olgoih
machines thenwr

) Peterinutica Non - deleyninleti


oY
Detennittc looithn solenone tue alpo blem witha pre
dterministic algotbm
ened proCUAs cohere a
cse G
Solutioh ot eaheep thrDuqh the
herritics
e)clasikcaton by Desiqh Method
i) Greedy Mthod dicisign
Lo eachadetteyn

u Good at sthat pon itho ut botheria


made that
about the jutture coieqens
Diide Conquen
The s&C stategu scoles a pobum by i
4) Divde Bnealing the pnkalun inh subpobms that a

) Recurtion RecuriEly golng these eub probi


3) Conuni Apprinotely conmbining TheiY aniwere
i9 Linean Progroming
inear
neut A maxinizig CoY me mininizin)somu
tanction
i Reducton Trantorm conquer)
In thiu method swesole a dikhclt poblem by fa
or hch u hae
t into a khowh problem
jorning
sympoti cally aptimdalgonth.
Camlin
Date

Other clasiicatian
Rererch Areo
) lisication bey Comp lixity
itY Randonizo d Algoyitame
i Bocktra ckinq

15

You might also like