0 ratings 0% found this document useful (0 votes) 18 views 16 pages DAA Unit 3
The document discusses dynamic programming (DP) as a method for solving optimization and sequencing problems by breaking them down into subproblems. It outlines two approaches to DP: the top-down approach using memoization and the bottom-up approach using tabulation. Additionally, it highlights various applications of DP, including the optimal binary search tree and reliability problems.
AI-enhanced title and description
Copyright
© All Rights Reserved
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
Go to previous items Go to next items
Save DAA unit 3 For Later
Dunant Crogrameteq (DP)
Bynemte. Programming 4clves the problem by
Combing -the Acetfors af sob problems.
Dynamfe programming fennel Used as optfnntization
and Sequence prebleme.
+ dk solves the problems and. darfde flo sole prololems.
ound FH WAL get the sdclows of the Sole problem and
all the aclotions ane combined +o duyncumia. problem,
%& Dynamic programming Re ddided ttt +20 parts to
Sdue the problems
D Top-Down Approach ( Memdfgattn technique mepea
2) Bottom-up Approach (Fibleautiationlechntuse/
: tabulan me-thed )
x dn duramde_ programing we equive Mba eae
complextly ‘and ea Hime. Complexity dia 4
Appltcakion of DP: she ditded tts 5 types
) OBST (are ee Search Tree)
2» Ay Kroipeact ; '
Sage | eh ‘| |
a) AUL pate Shartest path
5) Roolct-ty problemPonteger f DP
) Eon sho Urclerstand
2) Ear to de tug
3) ‘dk Solves 4h sub problema chonover required
@) Soke the gion profals and. welsh’ wieg Koapsad
tdhone N= and m=k
= max=@ Xy=4 Feame direct se foclae( 43),
Pf wrelude subtract H'S profit
S—6= 2 YXy=0 (2 ot come diced; Hcome thom aoe il
Xys 4 ( Ltone divek m x, 46 fede)2-2=0
> (O\came thom abore abject 136 exclacla (a)
%\ =o
«x, kD v\
y Wie trebde se sobhact tk profit
}
|
|
| or
|
| NemBSan tion teehntgue
de | This Fechntque comstet the concept of sek hed |
| # fren Set ard kdbgct wll occupy memBuy space
=} (eo, 0)4
So> Joey
8, > $ (0/6) (1294
se § Gaye
ue} (ose eG sy yaa
SP*§ (51) (66) (HD (8-51
Se >} (0,0 Gir) 2,3) 355 (S149 (6-6) 25}
4b Golde US chjat
=} 65) (4.9 (8:8) (YA) (tapi) (ey
See J) (9 (29) (514) (66) (18) (3/3) Wa)
(2,2) SEG) Xorg
Sy € (&, 2) xyes] S2F CD X70
Mal (@-6 ,¢-5) ier s 9)
(0, 0)
(213) Si #(0,0) Xa=06
XX Xs ky
we er i“Wowellira Salerrman Roblom
zy to to
ja ey oO
37 6. 1B
s
s] es ¢
Grote Face Wee as
4420-24
mi tor 15 226
28 |
to |
12
ic |
(0429235
16425240
Yo 4 2B US5
q@i') = &
43.1) > 6
Aiea, 1) = 03
Bi(2> $42)! = 3( Bw + Cad) = 20
4( 4, 434) = Is
q(2,iu4) = ls
q (4; $24) = 13
q( > 13) = 5
| 9(3,32)=&
(2.3) + (@,t)+ (4)
9 (2¢ 53,49) = a
3 (C2 (4394 (3,0)
4 (3/$2,.u9) = 26
F(a, §2 sh )e= 23 :
4 (112) +9( 2,53, 43)
9 (1, 42,3/43) = mh 4 (1/3) 49( 2 12/43)
§ (U4) 45 (4192-34)
75
oo
grrr preven am
—Av fats shite path (Floyd ooshatlls Aigaritt..)
ae 3 4
2
Cn eo
en tee oe Ro
Zico IO ||
WIRE DE ep eS ear VOD: ~ <6)
Oo 2 @® 4
ee gl con Cea)
Ona
Ge coeno
Ae gunedlel makise
A(z) 2 MMT ANCA), HEI) + (1,3)
zmnG 2, & +004
eo :
ANG,u) = mf {AP (a,u), ANZ) A(t uy}
sem 84h 5 6
A! (3,2) =m Sat (2), AC Ata}
> mtn 5 O, 5424
2
A’ (3-4) 2 min ‘ ACS 4) p ACB N+ A°(tee)}
zmmh 1, 549)
24) AN (Mee) = Oh Jae (erry , neta) + arC try
| ~ nh f of j peat
a
fat (Uiad> mtr h Ag(He>), AtCeets AC 34
roam OO, 240 f
2 6
4 Now conzden At
(ey GB
AX 2 g O° 2 6
| 5 A
| 24 an
Ar(13) = mmf al(ts) > A’ (12) +A'(2, 353
a mmf oo, 242)
ate ote
AX(tetu)e min § at(yu) , al (rade at(z,uyy
ami Ft, 24154
sate ;
AX(3, 1) > mh Atay), AY(32)4A(G1)}
aemt 5, 3484
=
AX (31M) 2 mrs | ANC4Y , AN(3,2) N24}
Pe ncaa i asyy
4(url) > main | at (uct) 5 Ar(urr) A200} |
emt {oy ute
+9 7
AC 4s) 2 MmPA' (Ue), Allu 2) +A'Or3))
> mmnt so! , utr}
ze
Ore is
a nO
a
5 + © 4
Deca cn aro
A> (1,2) 2 minh (1,2) rx) 4a(3,.9}
ammfo, urs 4
> 2
A?(1) 4) = mim Lar (ua) , A*(153)4 A*(3,4) 4
Arty +) ue)
25)
A> (21) > mem AEC), AMC 2,5) 4AH(3 IDE
emi) 2454
2+
A> 2, 4) > MLA CHW? ATR DER (Zt
amir} 5, 244}
2 3%_
]
A>(4rty = trl aecasiy, AXCG)3) €N(5, 450}
amh Foo, Ga 5 |
= 2
APC Ur) = mar J ACH 2), ALOU) AN(3, 2h
re PMA Ce haat
Grn 1G ep, cs
we
eorw
AX(1,2) > mfr Jar(tir) , A174) 4 Au, 294
amhjo 2, 54)
>.
AS(U3) 2 mate LARC) -APCUW) 4 Ao (4,3)4
2mm} 4, 5464
aatay cgi boy
AK (211 = meh arCan) 9 Ara wt (4,0
smd gy) 3-H af
2a) t ’
AX (2,3) 2 matey 1 APC) F APC 2) FAM 43}
samme 12, 3+64
°
zo| ie
!
\|
|
i
8. Kava te glen ble wing UL, cal ys
AN(>;)) > mets} (a1), Ast ACID
sent 6, dro}
~ 3h
AN([3,2) s math VA3(3,2) » B30) +A?(4 2)
~ tnd f eta 1444 Xx
2 § :
Relkabsitity Roblena!
— Reltabstity means getting 10- Of pra aceddeg
to He a Problem
—> By default thew UK be ome relzability povible
frthe qhen gcluctton
— he Yeliokslily prblem car be done by wing et
wethod which Fe Known a rewBizadion.
—> te relzolntity valve should | be: sae A? fo the
Sek valve
—> the reliabibsty problen const elialotlattes and coat
far velrabiltties ond we have to {fel He probable
Sites velfabrlety protlens comlst, the dolat cot
Value & ta. gien prdelens 32 lane to fine
remabatg dot to Sdve +o provlem
ound a dogl cok FS 5 ‘ |
a1 oO Uy
) D 30 oA
OD, (S$ o8
(Pi Ba eS
|
4d} Quien tot Tatet cat (c) = 108
S cee Cece,
= 30415 +20 =uS
1 | Rematwtrg cent (Rcd = C ear
x lop — 65 — LO
[I
Dy
Ro _ uO. 2 4
| “A pe BiiesCy yy Pr
ee Re Ko a D, 30 0-4 42
Ge tS ~ 7
a Cie loa Cee a
2 0.5 2
Re , uO _ Owes >
t = = = 2)Ss: (0.9 , 30) (0.47, |
5)
Ge |) Eten? Sto) teem 2°
t-(-9-8)] 1-(1-0.89%
=f 19.96u, 60) (027524, 16
1-(0-2)"] {ony * Ye stree) ( )
(= 0-04 te ae!
0-008 sP> J (0.893 ,95), (0% mS)
20-46 20-992
ao. 1)
wd 5 (0.32, 45) » (0-245); (o-B4t, £6), (0-893,73)
2 a
S. = J (6-92,45) (0-86.60) (0-893,35)f
3,5 } (0-36, 65) (me) (o-4465,95) 4 4
(= (exp iors ee
es 2 (= (10'5)2 2 |
(—(t=6.5) ( a ae
oe (le (0-5) .
(= 0125 : , $37
= 0-95 2 OAT bit
&> § (0-54, 85) ((0-648,, too) (o.d mmjelo,oj+ cL’ al, e[o, *(e
efo, ay+e[3/251 + (0)
= rath S to, lo, 8h +12
“. 4 to
2 20
efits mm che] (24d, e[! »2]+e[3, q
efi, sjsefer4]} tony
- ra aay toy
= 5+"
= 16
ce [oud = vate} ele, ofaiuy, lage etal
eferjecls,4], e[o, a} c(ta]
+ (OY) :
> mtr J 16, 16,11, 204 + 15
2 U+tS f
we got Mijett cod vol = 2.
lo, 207 20, «6