graphs i - purdue universityarapura/preprints/graphs.pdf · graphs ① a graph consists of a f. a ,...

12
Graphs I

Upload: others

Post on 24-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

Graphs I

Page 2: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

Graphs ①-

A graph consists of a f.a , he sat V af✓ er tie - s

,a-I a fan . he set E of edge.

To each edge,

we can assign the

Set of its endpoint, ; which consist , fe ,

' ther one or two vertices.

A graph can be visualized like

this er✓ = { 1,2, 3 )

(•#µ ' E = ( eye, ,e , .eu, este,

ee,↳

Eg 3

e, is called a loop

,

since it has

one e- d paint . ez,

e,

are called

multiple edge . . A graph with no

loop , or multiple edge, c 's called simple

Two vertices are adjacent. .f

they are joined by an edge .

If v is an end point of a - edgee,

e is said to be i'no ,-de- t to ✓ ,

Page 3: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

Basic E- + cpl . of Simula C-- pl. ②-

(nhas aCycle

•Thy verticesCs Kool

wheel

q-•Wn 'has ne

'

Wu \¥ Vertices,

including$_• a center joining everything elsn

Cubejoy

Q oooQI.

! ?:c,3 1*1,40 h

,le-gh n bat strings

.

( ou Two strings are connectedif they differ by one bit

Complete graphK T kn has' q.tt:7 a:Ei÷:

connected

complete bipartite

•→

1<2,3 ✓ km,a

•-•\ has m - a

\ Venti ice, j⑧

m of one color,

n of arok color ;any 2 re - L. -cu , af differentcolors connected

.

Page 4: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

Ha- Ishak .-

-

y Theo-en ③-

The degree of a re- he - of a

s . - ✓ he graph i 's th number . ofedges incident to if . When thereare loops

,

it should be co - ahead Lucic,

F;E.degree 3 degree 4

Hand shaking Theo--

If G is a graph

Z degcv ) = 2 ( Elre v -

# edges .

proof ( whee- C simple ).

-

DefineI = ( ( v

,e) c- Vx El e incident -6 r }

Sine - th - - e one 2 pairs ( v,e) C- f-

fur e -T EEE,III = 21 El

Page 5: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

④On the other heh

,

toeup re

V,

there - deg CV) pairs (V,e) E I

.

So Ifl = I degcr ?Therefor Z deg cu ) = 2 ( El

¢

Eg Compute the n- - her of edgesin Q

n'

Solution : pick a verb, labelled 00 --- O,

-

the adjacent edges are 10 . -- o,010 - - o

,etc

.

So deg (o . - O ) = n -The s -

reasoninghull , for a-

y Verte> .

The- L

( El = t -2 degen ) = Iz (z" ) . n

= z- - '

n

Isomorphism of Graphs-

An isomorphism fr- o-e graph( Vi,E. ) tu ( Vz

,Er ) is a por - r

af on- to one co - - e. poulenc -

f : V , → Ve

f : E,→ E

-

such tht th e - d point, y feel anten images if the endpoint , f e n-h f .

Page 6: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

⑤The graph, one c 's armor -ph :c if an

l 's om c -Mi 's - e- lists.

↳ Shen Wg is isomorphic to Kc,

i:*:I

( → a,Zeb

,3 -7C

,

4 → d works

( To check rigorously,

we c- use adjacencymat - icu , ; s - e below . )

&

IG A-- ¥-4.1.

42£.

isamunrh . - ?

( the obu.ae , things ( / VI,IE ! Segue -ofdegrees ) match

.

Nene - he less answer

is No, why ? )

Here is a sure,

b - t not very efficient,

test . Given a graph C,label

vertices I,2,

- - n.

The adjacencymatrix ft with ent - c'e ,

aij = # edge . between r - I g-

Page 7: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

Theyre G al C ' one isanan.ph . .②

(' f and only if it's poss , the to number

✓er tree , for both so that th ad,-

ace- ey

ma tries are equal .

Both Wz & kg ( with previous numbing )hae adjacency matrices (Q f ! ! )( l U l

l l 0

So they are isamu -ph!

One can be a bit more clever byobserving

'

'

Th -or- If C al G"one isomorph . ,

-

then,regardless if he un- Levings , the

adjacency matrices would be similar.

Connectedness of Graphs-

A path in a graph is a sequence fedge , e

, ,er,

- - en such that wa

C - f . - d a segue- e e f Ve- fi -cues✓ i ,

Va, Vy - - - the- e e

,connects

✓,to Va

,ez connects Va to V

,etc

.

Page 8: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

⑦This i 's a circuit if he find✓• - he - is V

,

A path is simple if there are

no repent-1 edges.

A graph is connected if a-2

two vertices are connected by a

path .

Thew---

In a connected graph an >

two vertices are connected by a

simple path .

prod Civ- c'

- Clas , ( or sue Rosen ).

A tree i 's a connected graphwithI s - mph c.

'

r Cui's.

A TreeE &

a a

HD.leave,

Page 9: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

- ⑧Theo- A true I wite n re - has-

has n -l edges

First we need

tenner A tr-- contains a leaf .

prod : If not then we ca- Id Awfe- infirm .

he path,conk - chicly un -

stealing ass -mph . - tht graphs

are f.uh . ¢

proffthen i.We um

induction on n.

The La .- Cas-

af n > l is clear : the- u w. - II Le

O - dye , edge , or else it would he

a true .For H- induction ship

,

Pich a leaf ( L> th le-ne ).

Delete her in- here,

and hedgecantering it , t get a g --pl T !T ' is still a true .

It ha ,

Page 10: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

⑥n - l ve - tide . . By Inder .hu

C-"mush here (n - is- l edge .

.

Su 7 has (n - 11 - I c- I = n - I

edge "

,

#A spanning tr- - of a graph

is a guts that, ; a tree

which contains every Verhey,

Ex -- 4¥

ha , seal sp - - iz he- nka

M: 1-9 eh.

Theorem A connected graph Len-

- Spann . -mytree

. Courtly , graphwith a s p -n n ,

'

ng tr- u i 's Connie kid.

pI In class.

Corollary A connected graph wid n re- ti -cus

t least n - l edges .

proof A span - ing tree he , n - l edges. ¢

Page 11: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

④A Vertu> in a connected graph is

called a cat re- te, i. f. t become - ,

disconnected after deleting it . The

connect a v. ty isthe m - in , 'm-- n u - Le

-

f var t.ca . that ha-n te Le deleted to

disconnect it .

This is clenched by KCC)

T.

¥1. H

.cut vertex deal - L yk = I

Le = 2

theorem KCG ) f mi 's clay Cnn)L G ✓

Prod If ✓ or,he delutry all

the - trues adjacent to ~ will discount. C.

The-f Kcc ) E dry V .

Now choose ✓ so tht dez Cr ) is as

small as possible .h

Page 12: Graphs I - Purdue Universityarapura/preprints/Graphs.pdf · Graphs ① A graph consists of a f. a , he sat V af er tie-sa-I a fan. he set E of edge To each edge we can assign the

④Number of Paks-

then I f A is the ad,-

ace- ers

matrix of a graph C,the - th i;

- h

entry of An is the number of paths

of length n fro the ith un- ta, -6

he j th ve- hes .

prod We prone this by induct , - on

h.

When n= I,

this folk- s from h

det- h- f N..

S - pros- ne k-on h

Stahr- t f n . Let D= An.ch

C. = An- '

= A B

Air bkg . = # paths f length httfrom i tu j , with k

as he 2-d vortex.

Thetc..

,- = ? aikbkj

is he # of la- gh nel f-- n - hey'µ