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

lOMoARcPSD|41272507

Mod 3 - Its lecture notes

Algorithm Analysis and Design (APJ Abdul Kalam Technological University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)
Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)
CosLde, a aeay ub uaues 1t,1%8, 42,
9, 13, B,12si
P=o
44|129|G12| =0+1
2
3
1 9
1+|3|12 9 11 G| 2
4
e|2] =4-3
(a
|44 3 |12
L<d 3 1214 26 a11
121+
lOMoARcPSD|41272507
Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)
pte STRASseN'S MATRIY MuLTIPLICA TION
constat ALGORIT4IM
) A=1 93 2 3
4 S6 |B4sG
(3+2K6+3x9
1x+2x4 +3x4
AB = A
728xSxg 73 +8x6+9x4
1KI+ 3x4+x?
3t12 t2)
AB =
4+ 2ott2,3-t 2St48 (2t3ot
2% 42
816
102 26(S|
fen)&
B =
X142x4 1X2 t2xs
AB =
4X2 tSXS
2+ 0
[a+ 8
AB = 24
4 +2O 8t25 ABg4 33
lOMoARcPSD|41272507
lOMoARcPSD|41272507

TCn)= 23
2

hen
2,f(n)=n onb a=8
constant 8Ome
+Fn) (n/b) )aT
he beuz heorm
Master ¿ng gowe eaaboue The
" ? t(m/)2 8T T(n)
=
n2pCn) b-2,
mt'plcaton matà
bcuz
selue e?
eq? aboue The time the do, pspees
maste's
heoes maste's slng
Each
become
tbequatcon
;
nmatenes mltplcatcop
f +4f÷t Fce
dhe .fo, thatOppieach aqtb
only sequie
ARjgntaeces
Recuesue
SAassen
's bufn
2

isie
TIn) dene
ABC= 30,

nstant ome matales.


and eachA dde ue ,ast
Case k nto B

haf Aesume Matir


Cal AoaputeAB,

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


29
matines
sab each..mataa
Ppote ices S,Sg..Sh
step ps
and
Combinacons aeselfant 88ated caleulateon. Jhsyfep and A
the
ated B
en nto
o
C
62: A
=
S4 e=
B CH C=
AB
8-2
=||
B-
= Then,the
ResuHant
matei P PySa BI+S|o B2 S S4 S4
B2
=

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


= =
P3 Ps =Sq = = B1
-A2A2 -B
B2 B
t t -
PPt- x x 2SgBu
Slo An,= Ca2 C
lOMoARcPSD|41272507

A2
t
Pe Sg S
- Ar2 C22 , S ==Au
Ay A22 C2 Bo1 G =An
B. X AztAp2 A
t + t D
Ate Bat = C; BgA22. A12 t Aj2
Pat
S Bg Br Pa Ait-Az1Sg
= S
= Pe - = S BaBz
f B2B
Ar Sg% = Bit
tA2r+
P2t B| B2
Az2
Sh=5|| S S4=
hen Sq=
=-6x(4 -2x8 = =
= Ap
S A 2|| - Bo,
X - -
Ag2 B)

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


S6 -
Aar
S& S5=
q0+84
2+6 a
lOMoARcPSD|41272507

So
An
= B,
t t
B + A2
+ Bog
BI2
18
12 14
Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)
amount
P2
Item
= woamount 30
(O
8=+1 4
10etasn soltonCot
qo
80
20
to
otee
es along iete sape
Consdee 5 }eo he Krapsack aceordlng
I It
ohose
a0,LOO,90) hen choose tte fem I
=5,10 , 20, 30,4of: V= )30,teo is 5
uakt & 20 Lo-25J=
NecOe
konapsack
Hhe te I ohose
chOSe hoose
35 Bo, e
wsec9at
nty.
Item
5
6
H
The mmarimum
Iz 30+ toOt 14o 240
to.o| 5
30 Is
(GO
4
clero m=3, =204
knapick
and P=j25, 24,2o
lOMoARcPSD|41272507
aees
lOMoARcPSD|41272507

daee. have
he dhee. a 2veteces al
contan hat ubyeapk dst
Aeadd to cher
e
Spanning Cost Minigu
faee
dhat
ool2=2 282//
24 IS 5+9 paaft
= Max

algo. Pecnk adyes uses


tee
knapsack
botb boeef t+& =4s0
ditfer algoth Botk 48) =
paet eactona $
Paims (2)
algontho kali Kaus W choose usats
do
eat e Bt S-ltem
2 hava
fhee
value
the yo
ece
aing uct tec
minimcm 1s
a to
uocaght 4s0
5

centaen ¬ach Ve

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


(a6)
Cc,gf) th=
2g? (ede) =8(a
i) sb)
=
4
2 1 =t

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


Ca,h) =
8
xCb,c) 8= (a, 8h
Ce,d) =
3?=
2
lOMoARcPSD|41272507

Cbh)=
Cd,f) ) lox
(4X =Ce,f)= ah)=1
(d,f) 14
vto u
lOMoARcPSD|41272507

glu,v)= otheose
hatk shostest he
to u (w:e),
diuocted
chaoklem chatshortest
a

Mencguny
cast

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


lOMoARcPSD|41272507

Dge,se{A,
c, 14
lo

7
B
D=q A
A’B= D. B, Ne -ste?p
afe
=3
Ac 10
4A0 = B A
D
adfacd
D& Re B
alaent hace
to ele : Jtep5 DE
s-{A,c} A

Cig Exfract
3
3
& DE
& fA,c,E,
B}
B =S 8 A

& EntaactB Bc e
he ou d totane de step2
m
=88&

A DE B A I:
socenode.A3T1tro dhe Cons2des
as A Stepi:
D cdo hace cde ! step4 S=
cdhe auf fend
2
(O

DE B A

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


G-(r,oitbE)
algotlro

Downloaded by Muhammad Shaan (muhdshaaan@gmail.com)


sen olo
omest
lOMoARcPSD|41272507

lue o
cse
hgle
Belonan -haue
soutce3haert
fod
algo
Ma
b2os

You might also like