You are on page 1of 20

/'f) a-t he rnci +,c s - J.

V"V"'

--
N
Llrn be¥ Sei.-5 :

-) N :=:{ 1,2,3 1 .. . } oy No -=-{o, 1,2,3) . . . } (Na-hcral nufl"\be-r.s)

-) Z -l. ... 1 -3.,-2..,-1 1 0.,1,~ 1 3)• •· } ( Jn+e 9evs)

-> ~:: { P/i, I PJ<tEZ , (nco (P,<t,):: J.} C Ra+ionaJ nur0bers)

-:':) R= Q V { lt,.-otioha) n4rnbers} c Req/ nurnbeYs)

-> Caydinqli+~ : co~n+ of i-l:err,.s lo f,nif-e .se+


E-)(: CC\~~inol,+~ of powey sei- of a se+ wi+h n hO . ot elf'l'YH'()-t IS en.
A = { oJ b ,.. cJ
Powev.se+ of A = {¢,,{a}J.l,.bJ J{c}J{o,b_}J{b.,c} ){a 1 c}Ao 1 b . , c)

- > .5 4 b set : A£ B
P'toprv S4b se-1:: : Ac B b~+- A::t (3 ,.e, A $-B

- .) ErnPtj .S et ¢ : FoY t'\Je'l''j s e+ A I


cjJ c R

--:) Union : AU8 To+ers ed-ion : A nB Dif-f evmce: A-8 ol' A\B
U A B


Complement ; A 1 o"'I Ac 0¥ A
* FL!nc+ion~ :

d- = x Y
1 T '\
f4o(tion Oomaln ( o clom qln

-> Ol)e-i-o- One (I"nj ecthie) func ·tion : H :i.,:/=-· :X.2 -'> -f.(.XiJ =I= -H.xa)
-> onto C Su-a·J ec+ hJe) f' l-lnC +, on : VJ e co dofr)qi-o (-f) J +h eYe iS 3.x E= Dom.(+
..SI.le n +hat +c.:t) == ':}.

-) Bij ec+h•e func-Ho0 J:f +uric+ ion is one --!-o -one )ct oo+o also , i-l:- is
ca /Je cl biJ ec+ive fuoction.

--:) TfC.:c) = No. ot p-riroes s ::c


17(.::() z
lnc.:x:J

4 Sec -ti o n F o Y rnL/ l a .:·

Auo. cd Tyian.:> le :

AC t:,ABc..) =
-;jf

--
Slope '~

Line
A e1a+ ·,ori :

L, : rn 1 .slop e Cnon - v ry+icie)


rn = tqn@
Li ne Le : r() 2 Slope (flof) -'l t'V'-hcle) t j
S Jo pe. IncJina+Jon

L, l e o-r e pa y q))el if.. q0cJ onl:J if-

- :> L, L.z ci n peYprooli c. Llla( i-/- qncJ o0lj i+ r<) 1• me.== - ;[.

L, & L.2 a ye in+u.sec. tin'., rna!<in<a qn-3Jes


1.3 & O{ _

J
• <P = 1so· - e

ton 0 = rn /
f() 2 -

J-t-ro<rn,

-,;// E'l..4 0 -l-io n s of Lin e:

--e) CneneYol eq,n : Q-X +b~ -t c =o j a& b-=to SifflL/l-b-one ou s iy

-) HcYi2c:rn t-a/ line

-.) VeY-t-icle )i,ne : .x. = a.

-.) Poin+ slope foYf() ld =rnc..x.-.xo)+~o

-0 Two point fo"i'ff\ :

-.) Slope int-FYcep-1- fon-n : .:J == rn:x. +C ( .:J int-eycert )


= rn c.::c- d) ex in +ey-cep !: )

-> J"n+e¥Cept foYn'\ : X + -1_ = J... a= X- in +enef 1:-


o. b
b-= - in+eYCept
O istqn<e o + Poin-t fr om Line

Oi.St-qnce = J Cl.:t1 -+ b~, + c /


whne a.:c+b,y+c~o i.s line.
,/a<+b 2
C-x, .,':/ ,J is polnt.

+ Oistcmce b/,..; 1wo P<1Yc1J l e l Line. :

o ;.s t--on, e. = l c , - cz ) "'1heYe a.:( +b.:J +c, =O is lirie - l.


{a<+ b 2 a.:x +b_y + cc :::.o is line - z..

* S ·h ' o 1-:)h

-----:> n obS<->YvoHon in fo-rrf\ of C.Xi.,~;) v.Jhel'e. i=- 1J 2 J .. . n.


Le+ = m.::x: + c is f i +h-t> d° line .

S5 & ( sg__,vq-re d St.If() ey10'6) -=- £ ( lj i - :f) 2.. =


n
2..
i=J i=I

-c::) Slope of a.:x<+b.:x.+c 2aJ., +b

* So II) of Q 1w d Ya +i c fun c+i on :

-) x = -oi ± ..[b <-t+ac whe-r-e -./bZ-4-ac... =O c.qJJecJ clisc-r-iminanb.


ca
D ==o ==? E-q,vq/ Yea/ Yoois.
D>o Dist-inc+ real 100+5.

O -< o -) Distinct ima~ina?f!j Yoots.


=+- P q-(q bo l a :

Polyn o m,q/

-.') Fon-oaf oefiniiior, AO al9ebb'iC e~pn.ssion in which onl~ a-ri-H,e+ic lS


-+ (acldi-Hon)
( SLfbtl'a c+ion)
X ( m 1..n ii p I icci i-1on)
/\ (na+uyoJ t>Jponeo-t)
of- \JOYiobles .

.;.r:, I '4/+ed J•

fflonoto,aJ is <1J.So polynoroial .


Ex : 4.x<y J .30 i y'-+ e.+c.

-.) One \Ja¥i able poly norn iaJ


n ex pon <' n t-
'> a :xro
=-
rn - 0
rh')
Va Y j q bi e.

<o d t- icien-c

-:,) Q:>~¥ee of pollj)')Omic,) :

~x : 3.:x 3 + 4.x?y 2 + Jo_ij +I


./,
.3
"'
4 1..
t
0

-> Fox poJ.:j r>ornia O, de~ ee Is no -l:, clefin ed.

-.) I f c.Je9(PCx))=-n ClncJ de~cq_cxJ)-=rn +heftj

de~ ( f(:x) ± <\..,C.xJ) = max Cm I


n.).
c PC:~) -q_c:x--))-= m+n
::'t'- O i v i.SOf\ o f- Pol:jn o rniq)

PC.:X) = 'i C:x) --t r( x) <- 1< t'rn oincl c<


.9 (.)() ._<)CX)
1'
1' G:il.lo{i('() t
D iv i.So¥

-> ('f)\../l+ipliCq"hiori o+ 2 p oljnornjaJ : Alwi:1~.s po)~'()orniaJ


Divi.sion of- 2 pci:::; ncmia) : (qn oY Ccin no+ be pol~n~mia/

+ CnYqph.s o+ Po!_y nom iq/ :

-) Smoot-h qn cl Con ilnuo L{S .

can be -f-a ctoYf.Se cl q s


f C:O =
If P ;S f. \J t'f"\ 0 G, yq p h
Bor,ce-of-f- a+ J:::==-a,
J:-F P is o dciJ 9 GrYaph \ SOMe f-ov a -b-hey
CYos~es )(-Qxis o+ .x:-:::: a., J +q c +ol'S a )50,

-;:, ~o"( n -th dec)Yee polj nomiG} J rnqx. nu of- h1Yn,n9 poin+s iJ'l.-1

* Trde-rm C?d i o--le \JqJue ThroYr ro :.

rf- -f(oJ on.; feh) ho" oppo.si~e si~n., +hen :!fc s>ich +ho-I: fCc)::o,

* Vey ficle Line Tes t ; (one-+o-one +es+)

fo)

( one-io -man{)
(one--l-o-one)
* Ho '! i zuntq l Linc Te:s i-: C Io\/n.Si b le -lest)

f(:r) ::J -f (...r)

!:i-:::.C !::j-=:-C

0 0 ----------..;> J..

( NOl"\-In\/eYSi ble) CJnvey.Slble)


Crnol'.~ -+o -one) Col)e- +o -one)
:;'(<- 0lJc- { o- One f u n c +i on 5

If +<..1nc+1on pqsses Bo+h ho-riioni-Q/ 6< Vrr+fc/e line -!-e5t- J H:· iS


one -+o - one. ·h10c+i on.

- ) l.~ anj t\Jnc+ion ·1.s incteosin~ / cJecYectsin9 1


i-b i5 one-+o-one fl/nci-ion.

7'· Corn posi +e F Ll n ct-i on :

f(-')(X))

-> Sllbst-i-hu+e followin-3 -vql<u..s fYoro olomC9) --i-o fino) olol'<) (-fo~tx.)).
(J) {:t: l sc.xJ ¢ oloroG-)j

(ii) V-:.x. -fo-, w hie h :H=rJ i5 hot cl e Hne d ,

+ Inve-rse F1.mc ti on ;
f(_x')

-f-1 iS ·1Me-rse of f if a0 d onJ_y iL


(iJ f-~ + CX) -= .:C anol f oV 1 CxJ -=-X
r'c.x)
( "1j) f i.S one -to - one f 1..m c+J on.

-> Ran9e[f) = Ooro Cf- 1)


0 o rn ( f ) = f?an[:}e [ f - 1) 0 .,.1..."- - - - - -- 7 :JC
....

( /'Y) I '!'Yoo )
* ~ Xp o n e n+i q l FL,f nc+ ·,on :

::c.
-> f(:x):: a:x: J \,JheYe a>o qncJ a=t= I j .x. ER e

Ooffl(f) =R
Ron~e Cf)::: Co1~)

-> /in') :::c.


n -::)oO - e

* Lo 9 q Yi th rn i c F <-1 nc t Ion

H = io;_) a. :x wheye o > o on o/ a *I .J .x > O

OoroC~)= (c..,oa)
ffonseCj) = R.

-) Foy o.>i. j lo~°'.x. i5 inCr'eQSin9 fLIY'lC+ion.


Fot 0
-< a.< 1 j Jo~ 0 x is cJecrea.sin~ -ft.me-Hon.

Jo~, 0 ~ is corriff)on Jo~ . while l03e:::c Cln::x.) iS

lo;Ja.(rn/n) = Jo=)am - Jo5an

lo~a. ( l;r0) = - lo~ m


a.

10 3a:X., Jo~bz
)ojb Cl
>If G-i Yaph :

-;:. Co /lee+ ion of +,..,,o sets V on J E ; Gi :::: CV; E)


V : se+ of VPY-/- i< PS oY nodes

t : .s e + ot e d~r S E f: V XV)

,r. 'walk' :

An~ sel}..uence o + vey +l<f'S on1.11-1 ecl ~--_,


"~ l\c_ we ha vese a. 0o.yaph.
• Vel'+ex Qf'cl ~cl';)rs ca0 be repeated

* Pa+h :

wi+hout Yppeafin-3 an'J VHtex Clnd ec!~e.

--:> Pa+h wh o.se stqr·Hn~ ond endin~ vertex iS .SQrne. Can Yfpeqf vey+ex b'-i-/;
no{ an ecJ9e.
TYee :

-:) ffisnir-nall.!::1 connect-eel o.<_yclic. 9-raph.

Ci) -hee on 'n' verti<Qs ha~ e.xac+lj 'n -1' ecJ~es


( ii)
Adclif\~ an eJee to <1 +Yee, cveai-es (JcJe
(iii)
f\Jrl~ Pai"( of \JeY+1res (0D()<>c 1 e- 1 b" ·
' .- ci J o un, q,ue Poth

-> ro.ST foY q wei.~h+ed., connected aYJ d ~nclirere+e d ,9YQfh is a


.sponnin~ t-Ye w i+heti-+ we i~ hi less ot eci.,uaJ +o +he we i()h-1:; of
e\/t'"f~ othey spqnnin9 tree.

(ii)
liJ Priro'o
kYu.skaJ'.s
a1001i+tn

<'.lll?)olii-hrn
J (('f)inirnurn SepaYa+o~ Lemma)

1
--i> P't'iro s lnCY<crnPotallj -9rows fT)\nirnuYf'I .Sfqn-nin~ -+rE'e .

-> k"6vS kal<s bLfild rnST b~ qcJdin~ ~~'?)P.5 in incyrosinc> otdey.


--X P,rirn ,,S A l 90 Yi-l-hm : kYu ~ko / -'s Al 90 Y1 -Hn :
(..s +or + wi¼h qn'j veY-1:-ex)
( s+ot+ wf-t h rn in,murn wri-!'lhfrol
10
31- - -- ---1 ed~e J
18

1--- 20
10
- --l c

\
@-i¼1
\
\
3

6
IO
0 J.

@ Jo\ eo
® 0
10
3

&

c.O
4-

C.

(E ND )
.3 4,

g
6
@ 10

(END)
-> Fo1 -wef~h+ecJ .s h oY-t-ecJ pa+h .1 /en-,+h of a p a+h fS sum of +he wei9hts,
ho+ no . of ed ~e..':>,

-:) BF5 9 ive!> .S hoY{-eJ p q ih I(') +er rn of no. o+ ecJ3 e5, vJhich need not he
vJt' i.:?Jh+cd .s h or-1:e.s t Pat-h.

I::.
J ..s1 n.9 le .'.:>o utce l !All pail's,

'v

• Dfjk s ir-a 'S Alcaorithm Cnon- nr9 a-live rcJ~e) • FloHcJ-wav..shaW.s Al~orH-hm
• Bel/roan - F-o'6 J

- ) FoY °' 9 YO Ph w f th 11 -1 •
<','.)Q,ive (jcle C no+ ne9a+lve ec1~e) wei~hi-eJ ~hor-1-est
f<Hh is ho+ cl ef.loed ,

.,;t,;; D ljks+ YoJs A/ so r i+hm :

(staY-l:) "O
DO

6
go 6
5· iO
oO 00 oO
JO
0 i cO
4 so C>e)

©-- -- - --- -®
o()
00
©
o()

/ ' / \
/ ' ' I '
''
/ /

'' /

®----------0 ---------® -- - - - - - -'®


/ /
/ , oQ oO/ , 0()

0
oO
80 ___/':;'\ 17\ 0()
0 ------ --- ~
/ / \.'
l..z)
. /
/ '
\ \

/
/ '' I
/ '
/ ' / '
/ ' I '

-- - - - - @ -- - - - - - -®
' JO oO / ' oO
/ - - - - ( D--
o@i--
16 oO
--------®
0()

,, c
/
/
/
©',
/
/
/ ''
30 / ',
- - - - -®
0 / / 10 0V

o- - - - - 1 ---- - --- -@----

16 86 35
/ i -- - - - - - - -Q) /~)
//
/
/
/ ''
/ / \
/ IO 30 / ' ~'O
o o ·/ 11---------1 4 ----- - -- @

. 16 S6 35
® 2 - - - - -- --® 6
/ '\
/
/ '\
// 10 30 \ 4-5
a
0,1--------~1,--- -~4-- -- ---- ®

16 86
2 ---------6) 6 35
/
/
/
/
/
/
IO 30
o of
" - - - - - - 1 1 - - -- - ~ 4 - - ------

16
( Enol)

/
/
/
0
o,J=-_,.....,.,_
/
_ _

*· 8 e l/-rnan - Food AJ ~oyifhrn;

-:') s+ob ili<e ci-Hl"( n-1 ifevot f ons .


V O(V)
0 0 0 0 0 0 0 0
J. 00 10 lo 5 s 5 5
2 co c-0 4- 4- 4- 4- 4-
3 0() C() co s
ol) ao
5
8'
5 5
11 1

s
4- oO o()

5 oO
0() 00 =J- 5 5 6 3 ,©
6 o,/) 00 9 6 6 6 6 l 0.1/3
- '5't-(--\.::!}
=,.. oc, g g g 9 \::_I -1
- ;:,. H Bellman- FoycJ al'.30-ri-thrn clo~s n o t <onver3e Q·Hff n-1 iteyq+Jon s , -there
i.s
a ne.3a+ive <jcle,

.,.,_ nY1n 'i m 1Jrn (o lo'fln '.J:

-> AS!.i9i, Co lour~ +o nocJ()5 ..S uch t ho-! enc-Jpoi l'l!S of ecJ~e have di-f+C>Y<>n-/;
Co loi.J r.s.

- ) Foll'( (o)oY Th t>oY<'n'l : G-ieo e> ~aph,·cQ/


v dNivecJ EJ ropf-, a+ mq.J'. Lf ro/or neeclec).
-ii{

- -
Vn tex Cove -r :

-:> .Srna J/e.s+ 5 ub.se+ o-f V .Sl!c h ·Hat

o~r
i - - -3
vc -= {3}

/VCCG,)j :.1_
vc = .[4-;2}

/vccc.,)/=-2
oY ~4-.,o.}

--ii<- InJep endm t se + :

-;) .StJ bse+ of V .svch -/:-hqt ho t-wo are connec+ecl b_) an ecl.:)e.

1
Mevt'-5-/:-ecJ in fin d,n,.., ma :ximum /JepencJen+ se t .

rnax. XS (G,) .:: { q, C, ej


/rn qx. :rs CGi))-= 3

--:i<' (Y) a--{;chi n3 :

-> fl rno-hhin~ is a SUb.se+ of £ .such +ha+ Jm~Ejmem_}are mufoaJ1_y JisJo in


ec:.J~e.s .

in-teYesleol in -Hndin~ rnaAirnsi m mactchi n~.

I rn(G1)j = 3

-.) pey-fec+ mqtchir:,3 n o+ 0Jvv0ys possible.


* Ad j a ren c~ frl o +t'iX :
0 1 2 3 4-
0
0 1. I.? 0 :t
1 0 0 i.. 1 0
2. 1 0 C 0 0
~ 1
3 .3 0 0 0 0 0
4 - 1 ()
4 0 0 0

-> R o'W ve pYrse nd o ut ~ol nt e J '2f,S


c ol umn YfPYt'~en-l- i n comin~ eDl .9 eS

-> D eE) Ye e o-f \Jrvtex : No . of i0coro i11~ )ov+ ~o h'\~ ecJ ~es .
- ) O (n2) (l3Fs o y OFS)

.:it- Ad jarfnr':1 Li .s + :
0 ~1,4-}

-.) u s+ of neie,hb ovy of each ve-rte.x . 1 -l_ci3J


-) oc n+m) ( 'wheve n veviice.s
r - - - t---:: -
C: ,\,(1)
-

(8 f5 oi OFS) rn e<.-Jf)e5)
3 {¢}
4- OJ

-> Fo1 t..mdiYec+ccJ ~Yoph M - o f eci~l'S


-1 '-
I EI _< (~]

-) Fo'< cHrec+ccl '2) taph no . of ecJ~es l El S 2x[:)

-) Connec+rd G-ivqph : r-J evevj vev+ex is YeachqbJe +tom evrtj o+hei ver./:-ex.

--:1 Complete. Gnqph : J:.t eVC'Y~ veY-J-ex is <onnec+ecJ to t'verj ot-hey vet¼-ex:.i
(has n-1 d e~Yess)

-> .sum of de~Yees ot al/ vn+ires is q/""°-!:J.S even.

-:) No . of veYtices
o-f odd cle9ree b Q/wo~ s even.
---
* 8~e acJ-l-h
-.> BFS
Fir.s -t

explotes 9toph
.Se ayc h :

level-b~-Jeve/ .
--;) Cnive .shor.i~c I p....Lh l _j

-i " ' ' v~ n ,enn.s o-f ed~e.5,

V ViSii-ed~ Le'I e I favent


'l F -I
2 F -I
3 F -,
'+ F -1
5
6
F -, To err loYe q_,ueue

F -1
'
V vi.si+ecl Leve I fqYent
t T 0
C. F -I
3 F -1
4- F -,
F -, To e,<ploYe 'l,Ueue
5
6 F -,
V Vi.Sji-eol Level Poren -6
1 T 0
2 T I 1
3 T I 1
4- F -I
5 F -, To explore q,.L1eue

6 F -I 2 3

V Vl.Si·kd Le'lel Pqrent


1 T 0
2. T I 1
3 T I 1
4- T 2 2.
5 T 2 2. To eJ{ploYe q,LJ eue.
6 F -I
3 4- 5
V v·1.si +-ed Le."el Poven-\:
1 T 0
<- T 1
3 T I 1
4 T 2 2. To el(plore q,,1.ieue
( Now €1"f'4)t-j
T 2. 2
5 5 6 q___.ueue)
6 i 3 4
In Bf-.S seaYCh +r<"e 1 an.':] Vt'Ytex apovt m ote +han by 1 le ve l can -no+ be
an et-1::}e In o-ri~lna) 9toph .

ii' Oe p+h f i Ys t SCH h :

-) OF.s po+h 01e no+ .Shod~s+ ,::ioih.

V 1 2. 3 4- 5 6 .Stock of suspmc.-leoi
v isi+ed veYfices
F F F F F F
I I I I I
!I Stock

l I I
I Stack
.1 I 2 I I
I 5+o ck
1 I2 4- I
IStack
1 I2 I 4- ]s I
151 .
V 1 2 3 4- 5 6 I Sl-ock
\tisi+eol9 T T T T T i= i 12 4- 5 13 I
6
I StQck
. l 2. I 4- I5 I I
V :J. 2. .3 4- 5 6 !Stock emp+y
15 I 6 I
(Now
? I
VisH- ed T T T T T T 1. 2 4
I stack)

7 As.si~n each WYfe.x an rn+-r-:1 qn~ exit no. -h CYea+e DF.s -free .

6 6 :i-
- -:.
Df-rec+rol 9 Yaph5 ran be c-le <ornpo !Je c/ in+o Secs.
->
ln sec, l:'a ch Pei i'( o + vt>di(es l..s .'.:i h or,j !_j connec+ed (i.e . if +heYe 1.s P o+h
fYorn i +o J +hen -+1-->ere ts q/vva~ pci+h fi e,<) J to i)

--
-.:k Cl4t 'vE'Y-frx :

-) rn '-'ndivec+ eol ronnec +ecJ ::,-raph I o. cu+ \Je't'tex lS an 01+1<1..11 <::ition fOi()i
'whose
Ye tnova1 ~i.::, <onnec-{-s +h e ~1aph.

An <?cJ~e in undirec+eol (Onnec-+ec:I ::rroph.J \rlhc.)e Ye mo\JQ/ disconnec+s


-the 9Yqph.

---;> An ed~e ,n \.t"ncHYec+eol di.sronnec+ecl ::>taph, 'whose removal '1nc1eose.s


no . o-f cJbconnec.+ed components.

-> A 9•'lph wi-4:-hoLl+ c_yc/e OY'lc/ also diYec+ecJ.


(iJ Topolo:,i(q/ SoY+in9
(ii) Lon'2)e.s+ pci{h

-) :r+J.s notl./YQ/ WOJJ -1:o YE'fYes ep--l- clepenc:lencie5

* Topo lo.';} icq/ -S or+ in9 :

-> A 31oph with <'::jc/e con no+ be +opo/o~icq/lj so-cted .


-> Topolo-9icoJ
SoYtin-:;, rneon.) .se q__u1>nc/n-9 Vf'dice.s .such
i qppear.s
b etore J. -t hot
-> (omplA-l,e
incJe.':)ree of ecich
\JeYtex.
Remove v <."1 +ex wi{h
il":lolt>i:)ree O,-f1orn
lJpda -1:-e DAGJ.
in<:ilr~tees .
Rrp <' qt fill
al/ veYtic~s qye li5ted.

-> T,--nolo~icaJ .SO"(fin9 con oY ~an n • o.· ,, u ·(le


--,- , o-c- ahe nJyU 5C<)..Uer>ce.
Se iumce ¢

.S e q,u en ce 1

0
02 '-+

I
2s~ 3' \
, ~ w- 3
6 =t
Seq,uenre 'J.) 0

0
0

2 1../-

,/ :16
I \ 2 Seq.,uence 1 J 0) 3

0
4

0
5
I
6
1
+ C.
.Seq,.uence 1;013;2

4 0

06 ~ q . 2.
1 Se 'l,..l-lenc e : 1 ; 0 J 3,2;5

0 / I
I)--;>=,.

.Se'}.,4fn <e : i ;0,3 2 5 4-


1 ) ) ) 6

5eq,uen ce : 1 J0,3c,54-1
1 J J 01 '.:J- ,1
Ta1<e 'o' a.'.> lon3 rs + pq+h foy <W ve-r+ire s iriitaJI~.

--) Rrfr) ove '<eY4 ex ""1+h o incie.9 Yee and L1pcJa+e lon~est pqth a0cl indeE)tecs.
-~ Repeat un+ill all vPdires listed.

C' 0
0

"2
L, 1 30
I
4
0 Top o lo.'.:) ica / OYcl e l ;
Lon~e.'.,+ pq+h io:
2. 1/
5 0--- - 6-0 - - ~ ~o
,~1 4

To po lo~ icq l oHl et ; ;J_

Lon~es!- pa+h +o : 0

o I O I 0 1
4

1/ ,
2 3~ / Top o lo;,ic aJ 01 <:let : 1 0

2
~
s0:____ 60- - \<
~ '
Lon9e5-1: pa+h -to : 0 0

oc , 04- 1
To po lo .'.') ica l oYciet · J.
l
0 3
J
' 5-----::,16 I ---; =f- 2. 2.
Lon9 es+ pa+h +o : o 0 1
?. 0

0 It- I

0
5 ~
2
·6 - - - >
O
i 2
2
Top o lo3 ico 1

Lon.9e.s+ path
otcJer :

-+o :
:L

o
0

0
3

1
2.

J.

Topo lo-'.) iCa J 01d et : ;J_ 3


0 2 5
Lon f:J e.s+ pa+h +o : 0 1
O 1 2.

o I
4-
l Tu polo_'.J ica/
Lon?Je.s+
orde '( : ;_ 0 3 c .s 6
,~ 4 Pa-ti\ +o : 0 0 l 1 2 3

T op o lo ~ i( a l CJ¥c/ er : J._
+4
0 3 2. 5 b 4- +
0
LQ,3e.5!- pa+h +o : C'.) 0 l 1 c 3 4
-clt· T-n1n~i -l i ve Cl os e t :

-) A+ [ i,JJ i.s ;[ if ancl onJ!:1 if +heYe i.s pqth -frorn i +o.j.


+ < n _,
A .::: A+ A + . .. -t- A (' whe'rt '-+-' is lo~ica1 'oy' opnatot)

* rno+Y1c mL.11+iplica ·+ion :

-> A iS rnxn
B iS nxp
C is Ax(3 which rnxp
n-1
-> ;Jj J =-
C [ L. A [ iJ k ] • B t k Jj ]
k=o

You might also like