Fnper i timhject L-ode: 405?2,'Arralysis of A.lgorithm
Cu rur ?,,r, Sf ry *
?
!
,t..-t
€.
Cncfre*t83o2/' tl-er 1'L-
v/
tr?-1? Cc"- Jchrrn{)- {/'qf
'/
<
:.
t-'otal &I*rkE: t$0
lTiure: 3 EI*r:rs)
rl:
lli.ii: (1,) {.Jr-r*stion hii;. 1 is c*rnpulstiry
{2)Atternptanythreefromthe"r,e,maining.questions.,.
.j'
'
Atternpt any four .,.';i'
1
I
'
,'':
,'''
t.',''
.
..-:-,
,j
,,",,,;:".' .....,,i'
,"':
'
..-",i..
,,ql .t
;,,'
(A)Describe ther.dlationshiplialong P, NF*, Np-had"; NP-corryplete?
5'.;':,'
,'
(B) What is the d.ifference betrryeenGvide and..oonquer {F$roach and'dynamig,.
,,
5
programrning?
5
iC) Hxplain Mrrltrstage graph with exanrple.
(D)tr\lrir-e an ebsu.ar:t algorithrn for greeciy'design methoci"
\-,
5
{E} ivhat is Aivmprr',tic analysis an;l defrne big Gh, krigOrnega and,Theia ncrtation?
..
)
'
of'Quick
2. {A)
\. ., Sort'the following numbefi using Quick Sort. Also, derive the time'complexity
.:
4Bj Wt ut is Knurh Mgrris Pratt$ethod ofP"iittera Mdb.&ing? Gi11e Exampksl
+
.:.,.
,.id
,t',
..1i
..,1'
. ,.,,t
..,...
'i
^,1,
..."i
:....
=-.."
r,"llt
--l
..
j 1o
.
:
5ott.,50,31,71:,38, 7V,Bl,l?,33.
ls
,o$"
10
10
:ni".
.'- "
:..,1
.r.,3. (e) S,-glve the fcllowing instance of Jgb sequencing with deadlines prqBlem n=7, profits (p1,
.-'i p2#3, p4, p5;'p6, p7)'* (3, 5, 20oIT8, 1, 6, 3d)and deadlines (d1,'d2, d3, d4, d5, d5, d7):
i0
{i, 3,4. 3,2, tr,2). Sched.r:le thej,obs irt such way $o as to get rnaximum profit.
(B) vVriie ald expiair sum o,f,subset algcrithrn fbr u : 5, W = i2, 7, 8, 9, i5) 1\{ = 17
ic
(A) F-inrl L.ongest Cornrncn SubSequence firr fbllowing strings
i0
f
.+"
.;....,
X: rcbaed
y:ahcabe -.
.,i'
- -"
.,
.
(BJiwrite an algorithm to flnd the iuinimuq4tnd maxim",:rn vaiue usin$ divide ancl *orxluet
coluplexity.-": r'
"Hnd also deitve its
:;
i'l'=
+i:':'
';','
'
'r
:"':"'
.\
\.
10
.
I
...::"
"
''1"
,t'
l.j.
Page 3. of 2
r3
.,:,
-,:'
5D838 I B5BF7 9A2498984293ED98 I 364s
,,.,,
Faper/SubjectCoele:40522/AnalyslsofAtgorithm...:j.;i.1,.
..,,i
'
. ,rr.:"
.:,-l
.
-..it,
,,.n;:
)
,]._;,t
(A) Find a minimurn cost path from 3'te 2
programming"
'':':'
"'
..r
''
3
{I
s
t
tuI
l.i,
I
--ia;---------r*:-
..i:..
..:
Page 2 of 2
,-.'28902
'-'l
'"i
sD8 3 Fl I II6BF' 1 9A249B9Y,4293 EDgB 1 3 645
''\'i::
''
,,,t.',
.
ii'i
:J's'
,{..
rs
lt_ j
'
;.
;=
r;-'t ':,i; -#"' .+,
,'.1