0% found this document useful (0 votes)
15 views18 pages

Graphs & Hashing

good notes for college exams

Uploaded by

mn9486
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views18 pages

Graphs & Hashing

good notes for college exams

Uploaded by

mn9486
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

nmu

intt sd ahuy and adep


dondtrad au h (V, E)

(y A

Lndinttd nph-
V LA ct d aph -

LV,v, Vs ,Vy, Vs
E-4, (2, a,tu, t5j wn
Gjacodt h Vi and V a adyaan
Yt and fen--VV o adjaant,(V,v3)
Jae not a d j a . in tg
(V3Vy
Sipth
-
Fh nslsn
a ph Cnt dinnd
Combinahon d Ldsy
May e muonbl Kwo venhta.
than
aa S a.
saM.
last verdtu
pah n whih instamd
Onny hn h u (u, v*)
Conhetu! Mph fe in Cemld
salatTd n o d
a

h V. I h u n

aph. all fh
n nti

Cmylut Cmaph
A B C,D
(A 6 ,D, C

D A ,B, C

humen outgey olgu


duaanl nComny Adsp.
numkin
n and ouhds
auk
o he s
Suum
m tn -deyuu
n -d e u
a ncds- ual
Dasn ud.
mh dsgnu Zero.
A
Aneto
helatr buu luo n-dss
-dsynu
posHve otdnu
SUunu buu 26n0 at-dsy
posi'ni [hdinu
Si'n

sinK
ALeLAD CA
A aph ht
Lgdan aph- hnhtoum)
( t q w numleon
dAae
dispe

O
O
-lasuan yrmgh -gulou -Lada
mcuph Caaph
epneamkthon 1 maphy
Seqmal Lhaesenkhen - By. usiry an adjacn Met
list thalr sheus nifhbavs
Hnkd piuntatioy-By usi adaon
anodt wsiy a inkd Li
AdjdoncyMl -A_ wih u an xenson nked leposmtatioy
ABCD

Undinect hajaceny Mhiy Dhvcd moph dienty Maux


naph eantahon, enhie
n e d pnanhaiey - U y Adany uis kjgnshan

B TPR

EBR

R
QAD L A
4iiin
a enneGd qeph wiln cilU h ' u y in

(V,E)
tneliwetrd dush
4

D 3D D
D
Tokl wit= Tehd-8
a subsa E Emh
mh minimus
SnnyJhe want h indl

,tp
STCw) 6fack veuus
A

ha te4.
3 fd cy (u,v)

etsr A
CompN z h r e k
bheblsn)
beblan) Cojeie
Conpcit
Arunli cahen SAnmain
Sniman

Tnavilin
TSP
TS P
Shet parh

MST KAussl ' g4fen findiny Minim Sp a n n bu

im's o
A-

S = + 2 r3 1t3t

REDIO PCC
Al QUAD CAWEA
E.
fonald
(a 5 4

u 12
fonall d
V:a,,Cc,d,e,f} nauw he minihmu ty
met Lqy
SApct h minim vti_js 1y Pemew Panalul
num bC .
b- a 3
S
D
Sum | + 3 t 4+2ts

Sum-5+Y #S

Khusked Algentn
Maph wh taps and Panalll edaps
5 Kus kal 's Myo 4
5
3 mtt Panalll ols

3
5 mimmum
m mim, Rdsd

3
3
SU-)+?+3TY-+S
Deint u u /scr
nndNon

BA
SUm-1R13
lmon all Hhe l.
a, lemot all panadlel ess b/w hmo
ayt wet
Aos ven,
3. choe1R euny anbinaay vaky a

S en eaht nALat Step )


. chek lons tetome
aukjstydgu oncl aluLt
mn ho y l .

- S

C
L

B (D) - (8)

Minmumpanwy hu

REDM OE 2PR
CAU QAD CAMER
Knwyal
A daaw MIntum Spcannin Ru CmsT) aph
Obt e.
(B

A
se

(
23,3 ,L8,1o,)
1

(B

Knaya y o
humune all h loyu.
ull

eas weialut Cnentasi ndok teykt


At.
Cnetasíy ndes
alltols th ihtis
Amoass
33.
fen eul
end ih no
yd,
has me uas e n t
da ht Lds
-£ 2
2
D- 3

3
A
REDM t
A QLA CAMER.
lt2t5rS

Mhina wnt
MST
ykara ALant bmm oived tiawn

A lol
5 (3) lo
lo
/18 E
8
S 8) lo

a
151S/E3
B,E,6 vii
f a ,E,
B ad A,C

A 3

A 16
o
pEHj6s 8

S= A,B, D, FeE}
Sduhen 0 , , 58

A PAx u , w)
,
Seunce G,S)
Tahialty Singl dtTV]> du[u
t J-gh(u,u))
ir
S
C)=JHu) 4 bvH ( )
3) ALU he yet dis
uhnn
4) l &fo
h a t - mtn ( )
S SUut enS+u

ulax Cu,v,w

Al CLA AME4
Tleytl ek eshu Cne-ph as
Jin mph
pos tbl Gnod only
.

Toyelogtia Certiy,"
CMaph COA)oho s t possi.
DinAkrd Au ndenlh tehe qiren OA
Thu ma Lubt mulipl Toyotoal Diudid
Snhy-Topetogkal Soiy h Ayce map,
Topeloyical ehe tn Audh a
way hhat i
auntas deth t h e
CiO) t DA ati Mom
Cm

hun u(om

OO REDMI NOTE 9 PRO


CO ATQUAD CAMERA
Sp Wauti
tndu a wlk
Andayna A)

D) n C):a
nd CE): 3
S'nce k y A has n 2e ndanse
h Aeagt
CAS Soctatiod ihdsnu , so mmont mtiA
nhu Lds Omd updat h indtnn d of

Sep3 Sinu
"E
enky 3 hon eas thday
Co)
So mevt edtr B Omoltb
Moulelad LAra and
pdati hs hd ofhes eahu

stepy Wov
ow, w hane 2 henhtay mn lm hdases Cie. 2jo indayes)

Se Ml hae hw Conej.

Cose T CaA L

emoin C ,me harn PAimevin D, han


(D) o(C)

Toelorpet
ondu

shps Cast

Topeloia lopelota ende


uA Aph ,2 culeunk Topelual Orduin sesible.
dABCDE
Brrhdh i St antd. CB)
StShddt ns Sand tnavun a Aaph a bna d h oanematto
3Fs A3 Dala huchae.

Fen
v- uisu haya

nentr eky amod mak tt a


Vis1 eo
Pul.Vi Husanhiy
Di'splay it hhs sashi veulei uwwntly wel J
heslts)
St a panta
ruk han adjacmt Unvia kd ulu )
Lule 2 5-(wwtly w e i
it an visi ed
adltaont umsittd
n ty amd Monk
M's' h
un a uu. Enquu

Dtsylay

thpein ho h Fhst unud ne


pdat
MEnr a s} alomlet S

ule2 nhk Anp)


ua
arp -

ue Disgay ABCDETGH

REDM E PRD
AlOLAD AER4
Deph Fs Stet CDsDAAJei)A,
DFS Deshm Ang seanct ) AlJont)hm haenen a naph ln ephisand

mohom Shaek data s h h u .

fen

2
Ple. Put e shan Hn vety tnbo
s)ac.
NaK iF a sikol

Pisylay
5 (s}eck Cto) has adjon uvs1d okr)
ist hu adjaunt unv'si d vos x
n d MM cnk as
wskd
Puah it inho h stak.
D play it

omunt Sauk.
Pop p
Sha
A Pqutat ule 2 Umhil shaCK
is Unp)

H
Disgloy ABEFC6D

op
0p s}ack i empy Noo

RED 0E 2PR
AL QLA ANERA
ash rnhoy
Th bago T n hashunp
a Ku CAOAAL pondinp Avcot em in h
ula Tnis dene oy has
asn
hash fumchon. A hosh
CA nchon that ale fmhoy
C nput nd
m C hash inole x,isuoluy dn@hd by taamapon
.
HKM wu His
K
a Hes h tncNom
M a Set
To o0e Hu mimey1
. ddnaMA).
hus b uila. Hhs,
Cmol
{un then H shuuld h
vy oy
al'k to
Cmp ut, Secomd H
un chon 'H'Ahadd
datnu b utt H Key ho honuman d ADcoNom hos
numba Collu'st'an. lons Aash
umch'anu Ce!
D( sion Nmelndlee Mthod
1) 1Ma Sqnuos muhoel.
Faldins mhmod.
n tuy mutwod,Ky
) Divist'm Lmounoden mehod-
K dtndud by hunkur unol fhe amautnd
m

his cktnst'o aken as dned tn hash te4k ie,

hK) =K mod m
he numko
Small iusgu sinu mu Aeant
nume
mheud ,

the huumaA Collis lons


minim 24

nA a Hash ale mh m - 7 , Mhon hosh


map 6 9 ondy13D o
un hon
s nCK ) -
K md m
t1L9) - 169 mod 16 manpid bsRot )
h Cy3o) 130 mod F 4 (_13 o mul h det2

169 )
130 hCK)

A l LAD AEA
(1 M Squau Mhod n M tA a MrMd
s Squantd ThnlM,
.
Fho nanh neien

wheu P ebaintd b dlte hipk tn ba


K Tu pwprly hMUment hs a
am posin
Condidt c hash lel &e mhh So slok - m-50 nl
Yolly k 1632, 1931,3123
Seln
G32 739 3123
K2 26342 4 3o 24121
nCk )
34 31
TThe heuh vol ant cloteuned by akit Th
tout
md hith digih CoUn hi AtgUt.
nAic a ad h zhlp mm Vauuy k 35
-3s
48, A3 45
HH& 3 24
2 Io&92 015 S 093 1o4
n K):
93
i Folcdt Mhod n Foldte rhud h K
-

K
panh'homd into a numleu pan K,k.-- Kn ew Lah pot
pposibly Bu losF Oes he ama
numen
Naind addaes. They the disN As
part ane aeldeoh
nty las.Caou y ,
H (K) k, +k2T-- Ki
when e
Loadnp -oiats Cannn,tt onug an
Comáidin hash teuh
lahe,
a
t h fo0 stek itm-loond
Yauuu K-733 S, 163>1, 1623 ,7613.
K Pay Sum o ia 4ck)
73,2S 8
32 7,32, 1
623 39 39
RET MIOTE PRO 7613 t6,13
COACLAD ME 81
NULL

NULL

NULL

Collis)'n leoluhem by Open ddaeniy


n ho be hashd i b put.
tpen addnomim Ha Ko put i
Sepuati Locohon h hash tuhl ah Iocohen
Centeu' Aom indiesh
Hhout he
poahuda Locoh'en is hu.
huy method
y nash ha KH l e oash funthen
S
teuh OCaho tuwise, e a h Me Locohem th u lee
dnuchm h tehla, ohnd hhe let in a
Tu sR maht man
phoCn indn he slas n hhe hah hble
à oll
nan Liobine Th 'nRan H
hash tun chon
hobl allot
hCK,t) 'CK) + Jm od
wwen hs
m
hniz0,1,2.-m
hu Moh a l l cnd h'lK) =Kmud i
h bosie hosh tumhoy an dl he pols nua.
2
uadnah'e Pro bine
The (9ucdnahc adbin
YwAy hhe follo honfansdn,
CK,=L4'K)
+C+Ci 2]moch n on a0
whe m S
boS1Mash fumhiy hash tukle 'LR) =Kmod m
Cunol Ca o ans
Probe humky auelany
33 powel Huht
nn Dnwb Os
hlng sLLonol hchintnahoyH
OO RECM IKO- RLlvy ALelle1'om. Suppu ca oH
LA IS- has hahash addonu HCK) h anol
Thn th SeaMe
ean AcCAhon ath addvms
inan hobin
(K,i )-Shk)+i) mod m
Linso o larbiry ve o V
Talo Siz lop 2,,
36,2,G 3,81,92,J0
n(7 o) -
)? 2mod io-+o) mod1o
amedID 2 2
h (27, o)= mod lo 4+o modio 63 3

n 92
(3L o) =L36 modio + oJmodi o
316
Gmod 10 = ToL
h (24, )- [24 modio+ o) modio
o

A
modlo =4
n 68, o)-63modio +o) modio
3 mod lo 3 -

h (81, o) -L8) mad


lo +0) *modio
mod lo
dn (12,o) =
12 mod jo to) modlo
modio = 2. OCukd
N(92 1) q2 vma jo +) med (o
tDmoded to 3modJo
3 (ocutied
h
(92)) 92m ddlo+ 2) modio
L2+2) mod o
n12, hmedio 4 (ocuplel)
3)
md-l 10 +3) madfo -
213) mod fo C mod to -S =

h(lol, o)-Slol mod o ta Jmod lo lmo d i0 I


h ( lo l, 1) io }modjot ) modi (bCpd
- o r

LItmodio= 2(ocu

REDM 0TE
)Llo l mod to+7)
modlo [+9)medJo
A CL a 8mod jo - (vrEn
2,3,3 6,24,63, &) omd
1o
C C1 =
h
3
cize =Jo
(K,t ) -
h tx) + C, tA Cz med y
h (7 o ) |2a
= noed lo t 0xo]

0+3xo mod jo 63
( 9 , o ) = \39-modio --1a
[9)mod jo
36

3 3 lo
mbd
h (36,o)

tomodlo
lo
o) = ( 2y moel
n Ca

) K63 -63mod
fot0)
mrdjo

hC63,o)

mod 1o + I«ó+3*o)
81, (8),o) = ral
m ocd o

h Llo
1o),o) 1)mocl
=

o
Colo) eolliu
CROl cio. odio
moel 1o t
la/+3xi)
[lol
9RheAl e )
Al CA AMERA + 1 +3JmodI
5 muclJo
Doule Hoghing
s 22,,3 6,24,63,&),92 ,
K,i) =LhK) + th Ck)] mod
m m-2 9
hK) K mod m =

C t o nume m O m-1.
m ct o t» he Ro
m =- O1 m-

se
h 9,0) L2 mod 10 + (oxmod )
t o ) mod Io9

tlova>rod &mod
lo
lo
h (a,o) L
-
mod
mod 10 22

8 K 36
: 36m od lo +
d Y3 6 mad 8) modlo
ha6,o) 2
TT1
72 12
633

44
a,0 ) - Y
36
63
AC63, 6) =3
(6 (81,o):
-2 CCollision) 2 , ) -?
12,1) =L?2msol lo + (1 92 nod 8)moel fo
E ) m o d jo
REDMbE PE Callisro Counuld )
Al QLAD AME G
elna Ain- wun h Hash fal n (rna a y tull, k
m
numhm Cellsisny tnCtans, hupy dnadl'y Pnkomoa
hom nd nh oLAno n hiy Cone, ca hattar apioy

Ceat
e u Heuh n th Siy. douklu te
nginnl hosh tebl
motal to hu nod ash al.
hen hare b b
nby, lompuky th
a
ach
Thi by frekig
elem
ncd fhey ienhin, i t i n h ned hesh LQ
hah valun
f l s q SS) 5 .
Cnyin thu hash

2
a3 43 1

23 413
w2ont he k t Usmg Ckiny Muhmod hon Celu sim {anokuhon

24, 18,S9,3/ ,Sy,u *md 23


mmNy Cahor

-
3 X

k 7moe 9 ACY 52 mod i


m tk) 14moel 92
(K)=18 mod 9 eo
h(K)= SAmed 1 >
h ( ) =36 mod i 0
nCK) 3 mod 1 0

hCK) m0dmud 1 22
COABHPM SA4LS
C A QUAB GAVENA

You might also like