You are on page 1of 16

CHAPTER

DEFINITIONS AND EXAMPLES

1 you saw how a graph can be used to depict the relationships between certain objects; you simply represent the objects by venices, and the reiationships by edges joiaing the vertices. In order to investigate such relationships more deepiy, we need to study the theory of graphs in greater detail. To this end, we now inrroduce some usefui terminology which will be needed in what follows.

In Chapter

2.1 ADJACENCY AND INCIDENCE


Since graph theory is primariiy concerned with interconnections between objects, we shall need some terminology which teils us when certain vertices and edges occur next to each other in a graph. This terminology applies to all graphs, and can be used equaiiy weli for wires connecting terminals in an electrical network, bonds connecring atoms in a chemicai molecule, or roads connecting towns on a road map.

DEFINITIONS. Let v and w be vertic'e s of a graph. If v and w are joined by an edge e, then v and w are said to be ad,jacent. Moreol,er, v and w are said o e incident with e, and e is said o e incident with v and w.

31

?i-

CHAPTER

2,

DEFINITIONS AND EXAMPLES

t
tt

vew H
v and w ate adjacent;
'

lr
l

:i: ;"il:,:i i: i::t'-:'

5
ir

You have already seen two ways of representing a graph-as a diasram consisting of points joined by iines. and as a set of vertices and a list of edges. The pictorial represenution is useful in many situations, especially when we wish to examine the structure of the graph as a whole, but its value diminishes as soon as we need to describe large or complicated graphs. For example, if we wish to store a large _eraph in a computer, then a pictorial representation may well be unsuitable, and some other method would
then be necessary. One possibility is to store the set of vertices and the list of edges; this method is often used in practice, especially when the graph is 'sparse'-that is, it has a lot of vertices but relatively few edges. Another method is to take each vertex in turn and list those vertices that are adjacent to it. By joining each vertex to its 'neighbors', we can easiiy reconstruct the graph. Ye another method is to draw up a table indicating the pairs of vertices that are adjacent, or a table indicating'hich vertices are incidenr wirh which edges. Each of these methods has its advantases, but the last one is particularly useful in a number of practicai appiications. In this method, we represent a graph bv a rectangular rr-ra.v of numbers, called a matrix: a mairix with trows and /coiumns is callecl akxt ntan'ix. Such matrices lend themselves to mechanical manipulation, and in several

).i-

I t
t.
P

&

i
+

applications of graph theory they yield the most natural wav of formuiaring a given probiem. There are various types of matrices thar can be used to specify a given graph. Here we describe the most important ones-the adjacency matrix and the incidence marrix. For sirnplicity, we restrict our attention to graphs without loops.

i!

Ii

The Adjacency Matrx


Consider the following exampie

t
tl

col. col. coi.

tr4r':,

row row row

0 1 o t\

i*yt

1231

col.

*
$

2
3

row 4

0 1 o 1l ! 2 1 al

1 0 t ,l

(Jir the lefi-hand side we have a graph withT'bur vertices, and on the righrhand side rve have a I x 4 matri.r. The ntmbers appearing in the matrix refer to he number of edges joining the corresponding vertices in the graph. For example.

2.1 AOJACENCY AND INCIDENCE

vertices I and 2 arejoined by 1 edge, so 1 appears in row

1 column 2 and in row 2 coiumn I vertices 2 and 4 arejoined by 2 edges, so 2 appears in row 2 column 4 and in

row 4 column 2 vertices I and 3 arejoined by 0 edges, so 0 appears in row I column 3 and in row 3 column 1 Note that every entry on the main (top-left to bottom-righ| diagonal is 0, since the graph has no loops. Note also that the matrix is symmetrical about this main diagonal. We can generalize this idea as follows.

DEFINITION. Let G be a graph without loops, with n vertices


Ilre adjacency matrix M(G) is the nxn matrix in which is the number of edges joining the vertces i and j.

labeled I

,2

3 ,...,n.

the entry in row i and column

The lncidence Matrix


Whereas the adjacency matrix of a graph involves the adjacency of vertices, the incidence matrix involves the incidence of vertices and edges. To see what is involved, consider the foilowing example; we have circled the iabels of the vertices to distinguish them from the labels of the edges.

col. col. co[. col. col.

'w"

ro,,O*lt o o ,o*@*f 1 1 0 ,o*(D*|i0 I I ,o*O--\o o 1

+++t++
1 0 0 i

123456

col.

o o\ I 1 0 0l 1 tl

On the left-hand side we have a graph with/our vertices and sx edges, and on the righrhand side we have a 4 x 6 matrix. Each of the numbers appearing in the matrix is either 1 or 0, depending on whether or not the corresponding vertex and edge are incident with each other. For example, vertex O is incident with edge 4, so I appears in row I coiumn 4

vertex @ is not incident with edge 4. so 0 appears in row 2 column 4 We can generalize this idea, as follows.

DEFINITION.

Let G be a graph without loops, with n vertices labeled @,@,@,..., n and m edges labeled I,2.3,..., m.The incidence matrix I(G) is the nxm matix in which the enrry in row i and column j is L if vertex i is incident with edge j, and 0 otherwise.

Note that the incidence matrix depends on the particular way that th vertices and

;'- _*_

CHAPTER

2. DEFINIT}ONS

AND EXAMPLES

,s
.

edges are labeleci. We obtain one incidence matrix from another ltv interchanging rows (correspondiltg to relabeiing the venices) and columns (corresponding to relabeiing the
eciges ).

&
r;!

2.2 PATHS AND CYCLES


Many of the aoplications of
a graph. For example, how can you find the shortest route between one London Under-eraph

L
theory involve 'getting from one vertex to anottler' in
s.

ground station and another? Other examples inciude the routing of a telephone call between one subscriber and another, the flow of current between two terminals of an elecrical netu'ork, and the uacing of a maze. Our aim in this section is to make this idea precise by means of some definitions. We srart by defining awalkin a graph.

i,r
$...

5 h
,

-L

DBFINITION.
Jbrm

A walk of length kin a graphG is a succession ofkedges of G of the

*
&

Ul''\'tW'tVX""' )"i
We denorc this walk by uvt',x...';2. and refer to it as a

F4

walk between

and:.
"{,:

Noe that tlle 'second veriex' of each edge is the same as the 't-irsr vertex' of the next. Iuturti'rr-1,v. \'e c?n think of this as a walk tiom io v, tben ro w. then o,v, and so on, until

1.

we eventuaily end up ai vertex r. Alternatively, since the edges have no specified direcion. we can think of it as a *'alk from : to y and so on, eventually, to r. r,v. v, and u. Thus we can alsr denate iiris waik by :1..-nvvrr, and refer to it as a walk tetween z and
u^

14

{L
p

We do not require ail rhe edges or vertices in a walk to be differenl For exampie, in
the fbliowing graph
F

F-

t
,r fr

f,
$.

Lwrr't.vw'.t::, iE av,alk o! lenzth 9 between l and y, which includes the edge i4r iwice, ud lhe verices v-, tt,, y, and z twic.-. This leads to the lbllowing r1efinitions.

{:'

f.

f:_
\.

.H

l.,

..

2.3 EXAMPLES OF GRAPHS

DEFINITIONS. If all the edges (but not ne('essarily all the verrices) of a v,alk are different , then the walk is called a trail. If , in addition, all the vertices are differenr, the n the trail is called a path.
In the above diagram, the waik yz4-wxy s atrail which is not a path (since the vertices y and : both occur twice), whereas the waik vn,r]: has no repeated vertices, and is therefore a path. Note that a walk such as u:vuz ts also a trail, as long as the two
occunences of uz refer to the two different edges joining u and z. It is also useful to have special terms for those waiks or trails which stan and finish at the same vertex.

DEFINITIONS. A closed walk in a graph G is a succession


Lv,

of edges of G of the form

vw, wx, ..., yz, zu

If all of these edges are dffirent, then the walk is clled a closed trail. If , in addition, the yertices u,v-,wyr.,...,!,2 are all different, then t.he trail is called a cycle.
In the above graph, the closed walk vwyvzuis aclosed trail which is not a cycle (since the vertex v occurs twice), whereas he closed trails zz, vwxJv, and vwryzv are all cycles. A cycle of length three, such as rlryv or wxyw, is called a triangle, for obvious reasons. In describing closed walks, we can ailow any vertex to be the stafiing vertex. For exampie, the triangle ),14/yu can equally well be described by the letters wyvw or yvwy or (since the direction is immaterial) by ywvy, vywv, or wvyw. We can use the concept of a path to explain exactiy what is meant by a connected graph. Recall from Chapter I that a graph is connected if it is 'in one piece'. For example, the tbilowing graph is not connected, but can be split into four connected pieces.

The observation that there is a path between;r and y (which lie in the same piece). but not between u end y (which lie in different pieces), ieads to the following definitions.

DEFII,{ITIONS. A graph G is connected if there is a path inG betvveen anv given pair ofvertices, ad disconnected othenvise. Every disconnec'ted graph can be split up into

number of connected suhgraphs , cal/ed components.

2.3 EXAMPLES OF GRAPHS


We now introduce some irnportant tvpes of graphs. You shouid make sure 'ou are famiiiar wiih them since they will appear liequentiy. both in applicarions and as examples.

*;. .:-.-

.$
36 CHAPTER

2.

DEFINITIONS AND EXAMPLES

r$
I
l

Complete Graphs
are joined by exactly one edge. The complete graph with n vertices is denoted by Xo. Note ihat, apafi from Ka, we usually draw the vertices of K" in the form of a regular polygon.

-^ t.

A complete graph is a gr aph in which every two distinct vertices

x -*

-+

a Kr

o---{
K7

AA",K@@
K3 Ka

-s * -i
r
;

K5

K6

d -x

The graph K" is regular of degree n


quence 3 of the handshaking lemma.

1, and therefore has Lrn(n

- l)

edges, by conse-

4'
-{ { -{
I

NullGraphs
A null graph is a graph conuining no edges. The null graph with byN,.
?

vertices is denoted

-x

tc

ta
a
lv1

a o

ac aa
f

aa aaaa
N2

aa
N1

*
A

f3

/5

-4.

Note that N" is regular of degree 0.

I.i

Cycle Graphs
A c:t:le graph is a graph consisting of
denoted by C,.
a single

i', cycle. The cycle glaph with n verdces is


H

---\i

cr
Noe that C"

cz

A n
cl
c4

{}

,r4..

\_J
Lj

o
c6

*l

s
,.a)

A
.,,p

is reguku of degree 2. and has n edges.

tA.

Path Graphs
A path graph
noted by P,.
rs a graph

"E

consisting of a siigle path. The path $aph wiih n venices is de-

-l.. I

A ,A
'f-, .,M;
r$.

;F

iF
F

2.3 EXAMPLES OF GRAPHS

a
P1

F-{ P2

H--a
P3

(}-F-{H
P4 Ps

tH_..._tF-,F-a
D t6

Note that Pnhas n


any
ed_se.

-1

edges, and can be obtained from the cycle graph C" by removing

Bipartite Graphs
Of particular importance in applications are the bipartite graphs. A bipartite graph is a graph whose vertex-set can be spiit into sets A and B in such a way that each edge of the graph joins a vertex in A to a vertex in B. We can distinguish the vertices in A from those in B by drawing the former in black and the latter in white. so that each edge is incident with a black vertex and a white vertex. Some examples of bipartite graphs are /
A

f ,--_-- e u

black

vertices

'Ivertices

whie

A complete bipartite graph is a bipartite graph in which each black vertex is joined to each white vertex by exactly one edge. The complete bipartite graph with r black vertices and s white vefiices is denoted by K",. A complete bipartite graph of the form K,, is called a star graph. Some examples of complete bipartite graphs are

*n+"'Mffi"'M
Xr.s Kz.z Kzt
Kz;
{ir
a{:

Note that K,., has r + s venices (r vertices of degree s, and s vertices of degree r), and rs edges. Note also that K,., = K,.,: it is usual, but not necessary, to put the smaller of r and s
t'irst.

{
t:
l

q:'

, .j
a

Cube Graphs
Of particular interest among the bipartite graphs are the cube graphs. These graphs have important applications in coding theory, and may be constructed by taking as vertices ail binarywords(sequencesof 0sand ls)of agivenlengthandjoiningtwoof thesevenices if the corresponding binary words differ in just one place. The graph obtained in this way from the binary words of length fr is cailed the t-cube (or k-dimensional cube), and
is denoted by

p.

ab

:s
CHAPTER

2.

DEFINITIONS AND EXAMPLES

4.

0i
e
q.

{
Qt
Qz

Qt

Note that Qohas2 vertices, and is regular of degree k. It foilows from consequence 3 of the handshaking lemma that eohas k x 2r - I edges.

The Platonic Graphs


The following five reguiar solids are known as the platonic solids.

i
5

!
q

ffi
I ----F <___J_,/ -J
tetahedron
cube

!
T

octahedron

dodecahedron

icosahedron

he vertices and edges of each soiid as the vertices and. edges of a graph. The resulting live graphs are known as he platonic graphs, and are orlen drawn as

we can regard

,,'-A-\ i ,e--".
tetrahedron
cube

Atr
i

lrl*\ / \ \{1
\F/ 5
ocahedon dodecahedron
cosahcdron

.rfr ,,,A.\

i
-t,

A Piatonic graph is obuined by projecting

nativelv, it is the view you get when yowlook at a wire model or the solid from a point near the niddle of one of the faces. The name P \atonic aises from the fact that these solids were rnentioned in plato's Timaeus.

rhe corresponding solid on o a piane. Alter-

i
't

.t

s
if 4 j

2.3 EXAMPLES OF GRAPHS

39

't a
it

The Petersen Graph our next example is a famous graph which has already appeared in the problems of Chapter 1. It is known as the Petersen graph, and has several interesting properties which you will discover as you progress through the book. The petersen graph may be
drawn in various ways, two of which are shown here

t
L

Julius Petersen (1839-1910) was a Danish mathematician, who discussed the graph
named after him in a paper of 1898.

i
F

Trees
A connected graph which contains no cycles is called a tree. Some examples of trees are as foilows; the tree on the right is particularly well known for its barkl

$g

-*-*H

r-r--------a-__-_.

-1 ''rr'
r\

ib

D--_.-

..

fli
I

a,

;-

If G is a connected graph, then a spanning tree in G is a subgraph of G which includes every vertex of G and is aiso a tree. For e.xampie. a graph and three of its spanning trees are
H

t1
l-_+-- :y.x
spanning tree

fB

J-_]J---

zyx
F

/ /\ J \ :yx
spanning tree

l*_7,

tw

!t

rp

tV. :y.
spanning tree

a graph
I

,
i
I
E
F

The number of spanning trees in a graph can be very large. For example, the petersen graph has no fewer than 2000 different spanning trees.

Unions and Complements


There are ,"u"rui operations we can perform on graphs in order to form new ones. The simplest of these is to form their union, which is the graph whose componerts are he

j4

i{
CHAPTER

2.

DEFINITIONS AND EMMPLES

-$

individual graphs. For example, the null graph iV, is the union of n copies of N,, and the
graph

J
--{

II AAN
is the union of two copies of Kr, two copies of K3, and one copy of K2.r. Finally, if G is a simple graph, we form its complement G by taking the vertex-set of G anci joining two vertices by an edge whenever they are not joined in G. For example, the complement of K, is Nn, and the complement of
rs

J
-$

{
-^I
a

{ -{

{ {
J'.

J
-that original graph to the
is, the path graph Pr. Note that if we uke the complement of G, rhen we get back G.
.-{,

{ { {

.t
PROBLEMS
Here, and throughout this book, the dagger
-1.

(i)

indicates chalLenge problems.

,A

Adiacency and lncidence

A
,
$

Qz.l

Consider the following graph:

n.

{
"t-

Classify each of the following statements as ffue or false: a. u and z are adjacent; e. u is incident with c; b. v anci z are adjacent; f. is incident with d; c. d and z are adjacenr; g. is incident with w;

i\

I
.

trA
,i.L.

d.

v is incident with

d;

h.

v is incident

withl

, I
.L

f,

:s-.

i.r*o

tR :*.

A
,s.

PROBLEMS

t-

.,,

Consider the following graph:

F
F.

A
E.

'#
b.
c is adjacent to

l\\ /t \\

*--I

t.

Classify each of the following statements as true or false: a. e is incident with u; c. a is incident with e;

L
p--

x;

d. w is adjacent to v.

Match up each of the following graphs with its adjacency matrix and incidence matrix:

r*F-

t--T\, L-V
5,t
(a)

L
,L-

(b)

Adjacency matrices.

r^

(l

:i;il (iiii) (i ilri)


lncidence matrices.

('ili:r)
2.4.

(r

i:riil fi;:iiil
i--A l,/ vv \l *
,or'
l2

Write down the adjacency matrices of rhe graphs

D,
4

')

o(a)

a*
CHAPTEN

2.

DEFNITIONS AND EXAMPLES

.r$

'{
Draw the graphs whose adjacency matrices are x

lr o o r o oi

io l l o o o\

s -\
t

(i
62.6a2'7

iiiil
o(a)

{;lr;;l
l0 0 0 0 0 I

\o o o o r
(b)

o/

,&

what can you say about the sum of ihe numbers in any rorv or corumn of an
adjacency matrix? The foliowing diagrams illustrate a graph with three different labelings. Find the adjacency matrix in each case, and exprain the connections between these three matrices.

4
n
-

'

$
s-

\
_9.

A {
Write down the incidence maftices of rhe following graphs:

,/\ ') \,
E.

ft

o
6

a
)

o
o(a)
(b)

A
\
F
F

o2.9.

Draw he graph whose incidence marix is

r li o o i r o o\ l{) o o o o o ol I \o 0 o 0 o 0 r rl \0 I I
t t/

)1 i I I 0 0 0

0r

rs-

w-

,&,! ttl

--,

F v-

-*
I

t tr

ft^

!fltbtsi/

,t_,

PROBLEMS

2.L0.
(

What can you say about the sum of the numbers in

a. b.

any row of an incidence matrix? any column of an incidence matrix? graph:

2.11.i Consider the foilowing

Write down the adjacency matrix M of this graph, and compute the matrices M2 andM3. What does the entry in row i and columni of each of these matrices represent? Make a guess as to what the entries of M represent, and prove your
result.

Z.lZ.t

(For those who have studied linear algebra.) The eigenvalues of a simpie graph are defined as the eigenvaiues of its adjacency matrix.

a.

Use the results of the previous problem to prove that

i. ii.
iii.

the sum ofthe eigenvalues

ofG is zero;

the sum of their squares is 2m, where m is the number of edges of G; the sum of their cubes is 6r, where r is the number of triangles in G. -l (n - I times), and n ' I '

b.

Show that the eigenvalues of K, are

c. What are he eigenvalues of K,,?

Paths and Cycles 42.13. Compiete the statements conceming

the graph shown.

a. b. c.

between and length between and vuvzv is a length between and -; of iength vw is a and between d- uvwxtzu is-of a of lensth -; -;
xyzzry is
a

of

\
h
CHAPTER

2.

DEFINITIONS AND EXAMPLES

F
g_

In the tbllowing graph, find

a. b. c.

a rvalk of length 7 between

and

w,;

t "\

cycles of lengths I , 2, 3, and 4; a path crf maximum length.

L
{
&_

,TN
2.15.

,-1"

$-

L.
a

Find all the paths between s and z in the graph

Li
F.
ts

H
"-

&

2.T6.

In the following graph, find

--

a. b. c.

ciosed walk which is not

closed trail;

a closed

trail which is not a cycle;

1t

all the cycles of lengths l, 2, 3, and 4.

L
tti;i

{
ii

Examples of Graphs 02.17, Draw ihe tbllowing

graphs:

a. b.

K;
,V*;

c.C*; d.Pr;

e'Kr.rl

g'

Kr.s'

f.K,i

PNABLEMS

02.18. Fill

in the following table:


tetraKe

trta-

ce

Qr hedron r cub hedron hedron

dodeca- rcoghedor Petersn

number of vertices number of


edges degree of each vertex

2.L9.

Complete the following statements:

a. b. c. d. e.
2.20.

the graph K.., is a regular $aph only when the oniy bipartite Platonic gmph is the and the graph K,., is ttre union of

if G is a simple graph with


regular of degree

/?

verrices wbich is regular of degree r, then G is -;

-;

if G is a simple graph with


and edges.

r?

vertices and m edges, then G

-;

has

vertices

From the set ofgraph cards, locate the cards that depict the graphs

-;

a. b' c. d'

No;

e.

Kt;
Cu; Pt;

K,51 f. K1;
g. h.
the tenahedron graph: the union of K. and K.;

i: i.

C o;

Po.

2.21

Which of the tbllowing graph cards depict brpanite graphs?

a. b. c. 2.22
02.23.

number 38; number 78;

d. number 128: e. number i29:

g. number 152;

h. number

154

number 106;

f.

numbe 130:

Using your graph cards, determine the number of connected bipartite graphs

with five vertices. Show that in any bipartite graph all cycles have even leng.

Z.ZA.i fnV complete tripartite graph K..,, consists of three sets of vertices of sizes r. s, and f, with edges joining two vertices if and only if they iie in different sets.

a. b. c.
2.25.

Draw the graphs K,.... and K3,3. How many veriices and edges has K,,.'? What is the compiement of K.,,.,?

The girth of a graph is the length of i.s shoftest cycle. Find the girths of (a) Ks; (b) Kosi (c) the Petersen graph; (d) the Platonic graphs: (e) the 6-cube Qo.

E
CHAPTEN

2,

DEFINITIONS AND EMMPLES


!\

2.26.

The circumference of a graph is the length of its longest cycie. Find the circumferences of (a) Kn: (b) Ks.s; (c) the Petersen graph; (d) the dodecahedron graph; (e) the 4-cube Q*.

.+ How many dift'erent cycies of lengch 5 does the Petersen graph have? 2.28. Locate the graph cards depicting the complement of each of the following
2.27

graphs:

a. b.
2.29. 02.30.

the path graph P,; the complete bipartite graph K.*.

How many components has each of the follorving graphs?


(a) Ns; (b) K,; (c) Rr.s.

Prove that a graph and its complement cannot both be disconnected.


ir

2.3I.

A graph is called self-complementary if it is isomorphic to its complement. a. Show that C, is self-complementary, and find two other self-complementary
graphs.

i s
F

b.
4232.

Prol'e that a self-complernentary graph has 4k or 4k + 1 vertices. tbr some

integer ft. There are 14 trees with six or fewer vertices. Draw them, and locate rhe graph cards depicting them.

2.33. There are l1 trees with seven vertices. Drarv them. 0.234, Show that if a tree has n vertices then it has n - 1 edges. 2.35. Use he handshak;ng iemma to prove that every tree rvirh two or rnore vertices
has at least two vertices of degree

i.

,j

7.3(). 2.37.

Shorv that every tree is a bioartite graph.


i,

Find ajl the spannins irees in each oi the ibllo..,ring graphs: 1{

?r. .4 I \B// ,,\ ED


1.38.

Lx'.
{

i.,' v\ .?C
(

"!I r--7 it'!


I

b,t

Drew some (but nor ail !) of rhe 2000 spanning trees of rhe Petersen graph.

?..39.i I'he line graoh t (G ) of a sin'iole graph G is rhe graph obrarned by taking the edge.s of G as vertices, and joining trvo of r"hese vel-lices whene'er the corresponding edges of G have a vertex in common. Find an expression for the number of edges of L(G) in terms of the degrees ol the 'zeriices of G, and show that:

t.

3. if C" is the c)'cle graph wirh r verrices, thc.n l(C" i is isomor.ohic b. t(:{") has lntn - 1) vertic'es, and is regular of rlegree 2n - 4', c. l(tetrahedron) = octahedrou d. ihe contplement of I(Kr) is rhe Petersen graph.

to C";
i

;
.*"--.

You might also like