Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture 1

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

Introduction to Graph Theory

Graph theory emerged as a mathematical science in the 18th


century, when the famous mathematician Leonard Euler attempted
to solve the Konigsberg Bridge problem.
The city of Konigsberg is located on the
banks of the Pregol River in Prussia. In the
city the river formed two islands, (denoted
by A and D) and 2 banks of the river
(denoted by B and C). All the land portions
A,B,C,D are interconnected by bridges: 2
bridges connect A and B, 2 bridges connect
A and C, 1 bridge connects A and D, 1 bridge
connects B and D, and 1 bridge connects C
and D, denoted by a, b, c, d, e, f, g.
The people of Konigsberg offered the visitors the following task: to
cross all the bridges and return to the starting point, and each
bridge should have been visited only once.

In 1736, the problem of seven bridges interested the


outstanding mathematician, a member of the St. Petersburg
Academy of Sciences, Leonard Euler. He found a rule to
determine whether it is possible to cross all the bridges without
crossing any of them twice. The answer was "no".
Graphs, representation
Definition
Let 𝑉𝑉 = {𝑣𝑣1 , 𝑣𝑣2 , ⋯ , 𝑣𝑣𝑛𝑛 } be a finite, non empty set, and 𝐸𝐸 be
a set of (unordered) pairs of elements of 𝑉𝑉, 𝐸𝐸 =
{𝑒𝑒1 , 𝑒𝑒2 , ⋯ , 𝑒𝑒𝑚𝑚 }. The ordered pair 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) is called graph
(simple, undirected), where 𝑉𝑉 is the set of vertices, and 𝐸𝐸
is the set of edges.
Thus, each element of 𝐸𝐸 is a pair of vertices.
If 𝑒𝑒 ∈ 𝐸𝐸, 𝑒𝑒 = (𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 ), then we say that 𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 are endpoints
of 𝑒𝑒 , and 𝑒𝑒 connects its endpoints 𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 .
Graph, which may have multiple edges (connecting the
same pair of vertices), is called multigraph.
An edge that connects a vertex to itself, is called loop.
Graphs that may include loops, and possibly
multiple edges connecting the same pair of vertices or a
vertex to itself, are sometimes called pseudographs.
A simple graph is a graph that has no loops and multiple
edges.
We call a graph with just one vertex trivial and all other
graphs nontrivial.
A graph is finite if both its vertex set and edge set are finite.
Let 𝑒𝑒 ∈ 𝐸𝐸, 𝑒𝑒 = (𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 ). We say that 𝒆𝒆 is incident to the
vertices 𝒗𝒗𝒊𝒊 and 𝒗𝒗𝒋𝒋 , or 𝒆𝒆 passes through the vertices 𝒗𝒗𝒊𝒊 and
𝒗𝒗𝒋𝒋 .
Vertices that are incident to the same edge 𝑒𝑒 (are endpoints of
some edge 𝒆𝒆 ) are called adjacent vertices (or neighbors) .
Example
𝐺𝐺 = (𝑉𝑉, 𝐸𝐸),
𝑉𝑉 = {𝑣𝑣1 , 𝑣𝑣2 , 𝑣𝑣3 , 𝑣𝑣4 }, 𝐸𝐸 = {𝑒𝑒1 , 𝑒𝑒2 , 𝑒𝑒3 , 𝑒𝑒4 , 𝑒𝑒5 },
where
𝑒𝑒1 = (𝑣𝑣1 , 𝑣𝑣2 ), 𝑒𝑒2 = (𝑣𝑣2 , 𝑣𝑣3 ), 𝑒𝑒3 = 𝑣𝑣2 , 𝑣𝑣4 , 𝑒𝑒4 = (𝑣𝑣3 , 𝑣𝑣4 ),
𝑒𝑒5 = (𝑣𝑣1 , 𝑣𝑣4 ).
Graphical representation
Graphs can be represented graphically.
Each vertex is indicated by a point in the plane (different
points for different vertices), and each edge by a line joining
the points which represent its ends. No line intersects itself
or passes through a point representing a vertex which is not
an end of the corresponding edge.
Example
𝑉𝑉 = {𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒},
𝐸𝐸 = {(𝑎𝑎, 𝑏𝑏), (𝑎𝑎, 𝑒𝑒), (𝑏𝑏, 𝑐𝑐), (𝑏𝑏, 𝑑𝑑), (𝑐𝑐, 𝑒𝑒), (𝑑𝑑, 𝑒𝑒)}
Two graphs are identical if they have the same set of vertices
and the same set of edges.
If two graphs are identical then they can be represented by
identical diagrams.
Definition
The simple graphs 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) and 𝐺𝐺𝐺 = (𝑉𝑉𝑉, 𝐸𝐸𝐸) are
isomorphic (written 𝐺𝐺 ≅ 𝐺𝐺𝐺), if there is a bijection (bijective
mapping) from 𝑉𝑉 to 𝑉𝑉𝑉, 𝑓𝑓: 𝑉𝑉 → 𝑉𝑉𝑉 such that for every pair of
vertices 𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 ∈ 𝑉𝑉 , (𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 ) ∈ 𝐸𝐸 if and only if
(𝑓𝑓(𝑣𝑣𝑖𝑖 ), 𝑓𝑓(𝑣𝑣𝑗𝑗 )) ∈ 𝐸𝐸𝐸. The mapping is called isomorphism
between 𝐺𝐺 and 𝐺𝐺𝐺.
Two simple graphs that are not isomorphic are called
nonisomorphic.
Isomorphism of simple graphs is an equivalence relation.
Example
𝐺𝐺 and 𝐻𝐻 graphs are isomorphic
𝑓𝑓: {𝑢𝑢1 , 𝑢𝑢2 , 𝑢𝑢3 , 𝑢𝑢4 } → {𝑣𝑣1 , 𝑣𝑣2 , 𝑣𝑣3 , 𝑣𝑣4 },
𝑓𝑓 𝑢𝑢1 = 𝑣𝑣1 , 𝑓𝑓 𝑢𝑢2 = 𝑣𝑣4 , 𝑓𝑓 𝑢𝑢3 = 𝑣𝑣3 , 𝑓𝑓 𝑢𝑢4 = 𝑣𝑣2 .
To show that two graphs are isomorphic, one must indicate an
isomorphism between them, i.e. to find the bijective mapping,
preserving the edges. To show that they are not isomorphic, we
need to find the properties of the graph that one graph satisfies and
the other does not, and the property is preserved by the
isomorphism. This property is called a graph invariant under
isomorphism.
.
For example, isomorphic simple graphs must have the same
number of vertices because there must be a 1-1 correspondence
between the sets of vertices. Then, they must have the same
number of edges, as the 1-1 correspondence between the sets of
vertices establishes the 1-1 correspondence between the edges.

There are no useful sets of invariants currently known that can be


used to determine whether simple graphs are isomorphic.
One way to represent a simple graph is to list all the vertices
and edges of this graph.
Another way to represent a graph is to use adjacency lists,
which specify the vertices that are adjacent to each vertex of
the graph.
Example,
𝑉𝑉 = {𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒}
𝐸𝐸 = {(𝑎𝑎, 𝑏𝑏), (𝑎𝑎, 𝑒𝑒), (𝑏𝑏, 𝑐𝑐), (𝑏𝑏, 𝑑𝑑), (𝑐𝑐, 𝑒𝑒), (𝑑𝑑, 𝑒𝑒)}

𝐸𝐸 𝑎𝑎 = {𝑏𝑏, 𝑒𝑒}, 𝐸𝐸 𝑏𝑏 = {𝑎𝑎, 𝑐𝑐, 𝑑𝑑}, 𝐸𝐸 𝑐𝑐 = {𝑏𝑏, 𝑒𝑒},


𝐸𝐸 𝑑𝑑 = 𝑏𝑏, 𝑒𝑒 , 𝐸𝐸 𝑒𝑒 = {𝑎𝑎, 𝑐𝑐, 𝑑𝑑}.
Ggraphs can be represented using matrices. Two types of matrices
are commonly used to represent. One is based on the adjacency of
vertices, and the other is based on incidence of vertices and edges.
Representation by Adjacency matrix
Suppose that 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) is a simple graph, with the vertex set
𝑉𝑉 = {𝑣𝑣1 , 𝑣𝑣2 , ⋯ , 𝑣𝑣𝑛𝑛 }. The adjacency matrix 𝐴𝐴 = (𝑎𝑎𝑖𝑖,𝑗𝑗 ) of 𝐺𝐺 with
respect of this ordering of vertices is the 𝑛𝑛 × 𝑛𝑛 binary (0-1 elements)
matrix, where 𝑎𝑎𝑖𝑖,𝑗𝑗 = 1 if (𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 ) ∈ 𝐸𝐸, i.e. 𝑣𝑣𝑖𝑖 and 𝑣𝑣𝑗𝑗 are adjacent, and
1, if (𝑣𝑣𝑖𝑖 , 𝑣𝑣𝑗𝑗 ) ∈ 𝐸𝐸
𝑎𝑎𝑖𝑖,𝑗𝑗 = 0 , when they are not adjacent: 𝑎𝑎𝑖𝑖,𝑗𝑗 = �
0, 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜
The adjacency matrix of a simple graph is symmetric, i.e. 𝑎𝑎𝑖𝑖,𝑗𝑗 = 𝑎𝑎𝑗𝑗,𝑖𝑖
Furthermore, because a simple graph has no loops, each entry 𝑎𝑎𝑖𝑖,𝑖𝑖 = 0,
𝑖𝑖 = 1, 2, 3, . . . , 𝑛𝑛.
Example
𝑉𝑉 = {𝑣𝑣1 , 𝑣𝑣2 , 𝑣𝑣3 , 𝑣𝑣4 , 𝑣𝑣5 },
𝐸𝐸 = {(𝑣𝑣1 , 𝑣𝑣2 ), (𝑣𝑣1 , 𝑣𝑣5 ), (𝑣𝑣2 , 𝑣𝑣3 ), (𝑣𝑣2 , 𝑣𝑣4 ), (𝑣𝑣3 , 𝑣𝑣5 ), (𝑣𝑣4 , 𝑣𝑣5 )}

Note that an adjacency matrix of a graph is


𝑣𝑣1 𝑣𝑣2 𝑣𝑣3 𝑣𝑣4 𝑣𝑣5
based on the ordering chosen for the vertices.
𝑣𝑣1 0 1 0 0 1
𝑣𝑣2 1 0 1 1 0
𝑣𝑣3 0 1 0 0 1
𝑣𝑣4 0 1 0 0 1
𝑣𝑣5 1 0 1 1 0
Representation by Incidence Matrices
Another common way to represent graphs is to use incidence
matrices.
Suppose that 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) is a simple undirected graph, which has 𝑛𝑛
vertices: V = {𝑣𝑣1 , 𝑣𝑣2 , ⋯ , 𝑣𝑣𝑛𝑛 } and 𝑚𝑚 edges: 𝐸𝐸 = {𝑒𝑒1 , 𝑒𝑒2 , ⋯ , 𝑒𝑒𝑚𝑚 }.
The incidence matrix 𝐴𝐴 = (𝑎𝑎𝑖𝑖,𝑗𝑗 ) of 𝐺𝐺 with respect of this ordering of
𝑉𝑉 and 𝐸𝐸 is the 𝑚𝑚 × 𝑛𝑛 binary (0-1 elements) matrix, where
1, 𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑒𝑒𝑖𝑖 𝑖𝑖𝑖𝑖 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑣𝑣𝑗𝑗
𝑎𝑎𝑖𝑖,𝑗𝑗 = �
0, 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜
Each edge is incident to two vertices, and therefore, each row of
the incidence matrix contains exactly two 1 (in case of simple
graphs all the rows are different).
Example,
𝑉𝑉 = {𝑣𝑣1 , 𝑣𝑣2 , 𝑣𝑣3 , 𝑣𝑣4 , 𝑣𝑣5 },
𝑒𝑒1 = 𝑣𝑣1 , 𝑣𝑣2 , 𝑒𝑒2 = 𝑣𝑣1 , 𝑣𝑣5 , 𝑒𝑒3 = 𝑣𝑣2 , 𝑣𝑣3 , 𝑒𝑒4 = 𝑣𝑣2 , 𝑣𝑣4 , 𝑒𝑒5 = 𝑣𝑣3 , 𝑣𝑣5 ,
𝑒𝑒6 = (𝑣𝑣4 , 𝑣𝑣5 )
𝑣𝑣1 𝑣𝑣2 𝑣𝑣3 𝑣𝑣4 𝑣𝑣5
𝑒𝑒1 1 1 0 0 0
𝑒𝑒2 1 0 0 0 1
𝑒𝑒3 0 1 1 0 0
𝑒𝑒4 0 1 0 1 0
𝑒𝑒5 0 0 1 0 1
𝑒𝑒6 0 0 0 1 1
By the given adjacency or incidence matrix the corresponding graph can be
recovered.
Complementary graph
The complementary graph 𝐺𝐺̅ = (𝑉𝑉, 𝐸𝐸) � of a simple graph 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸)
has the same vertices as 𝐺𝐺. Two vertices are adjacent in 𝐺𝐺̅ if and only if
they are not adjacent in 𝐺𝐺.
Example
For the graph 𝐺𝐺 = 𝑉𝑉, 𝐸𝐸 , where 𝑉𝑉 = {𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒}, and 𝐸𝐸 =
{(𝑎𝑎, 𝑏𝑏), (𝑎𝑎, 𝑒𝑒), (𝑏𝑏, 𝑐𝑐), (𝑏𝑏, 𝑑𝑑), (𝑐𝑐, 𝑒𝑒), (𝑑𝑑, 𝑒𝑒)}, the complement is 𝐺𝐺̅ =
� , where 𝐸𝐸� = 𝑎𝑎, 𝑐𝑐 , 𝑎𝑎, 𝑑𝑑 , 𝑏𝑏, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 .
(𝑉𝑉, 𝐸𝐸)
𝑏𝑏 𝑐𝑐
𝑏𝑏 𝑐𝑐

𝑎𝑎
𝑎𝑎

𝑑𝑑
𝑒𝑒 𝑒𝑒 𝑑𝑑
Deleting a vertex
Let 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) be a graph, and 𝑣𝑣 ∈ 𝑉𝑉.
If we delete the vertex 𝑣𝑣 from 𝐺𝐺 , the resulting graph has vertex set
𝑉𝑉 \{𝑣𝑣} and edge set 𝐸𝐸 \{𝑒𝑒|𝑒𝑒 𝑖𝑖𝑖𝑖 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑣𝑣}.
Then, the graph is denoted by 𝐺𝐺 \{𝑣𝑣} .

Deleting an edge
Let 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) be a graph, and 𝑒𝑒 ∈ 𝐸𝐸.
If we delete the edge 𝑒𝑒 from 𝐺𝐺 , the resulting graph has vertex set
𝑉𝑉 and edge set 𝐸𝐸 \{𝑒𝑒}.
Then, the graph is denoted by 𝐺𝐺 \{𝑒𝑒} .
Subgraph
Let 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) and 𝐺𝐺𝐺 = (𝑉𝑉𝑉, 𝐸𝐸𝐸) be graphs.
We say that 𝐺𝐺𝐺 is a subgraph of 𝐺𝐺 if 𝑉𝑉𝑉 ⊆ 𝑉𝑉 and 𝐸𝐸 ′ ⊆ 𝐸𝐸.
A subgraph 𝐺𝐺𝐺 of 𝐺𝐺 is a proper subgraph of 𝐺𝐺 if 𝐺𝐺𝐺 ≠ 𝐺𝐺.
Induced Subgraph
Let 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) be a simple graphs. We say that 𝐺𝐺𝐺 = (𝑉𝑉𝑉, 𝐸𝐸𝐸) is a
subgraph of 𝐺𝐺 induced by the subset 𝑉𝑉𝑉 ⊆ 𝑉𝑉 if 𝐸𝐸𝐸 contains an edge in
𝐸𝐸 if and only if both endpoints of this edge are in 𝑉𝑉𝑉.
Example, for the graph below:

The following graph is a subgraph

and this one is an induced by the vertices 𝑣𝑣1 , 𝑣𝑣2 , 𝑣𝑣4 , subgraph.
Vertex Degree
The degree of a vertex 𝑣𝑣 , denoted by 𝑑𝑑(𝑣𝑣), (or 𝑑𝑑𝑑𝑑𝑑𝑑(𝑣𝑣)) in an
undirected simple graph is the number of edges incident with it.
Example

𝑑𝑑 𝑎𝑎 = 2, 𝑑𝑑 𝑏𝑏 = 4, 𝑑𝑑 𝑐𝑐 = 4, 𝑑𝑑 𝑑𝑑 = 1, 𝑑𝑑 𝑒𝑒 = 3, d f = 4, d g = 0
A vertex of degree zero is called isolated. It follows that an
isolated vertex is not adjacent to any vertex.
A vertex is pendant if and only if it has degree one.
Consequently, a pendant vertex is adjacent to exactly one
other vertex.
If we consider the adjacency matrix of a graph, then the number of 1s
in the column and row corresponding to the certain vertex 𝑣𝑣, is 𝑑𝑑(𝑣𝑣),
the degree of 𝑣𝑣 .
And in the incidence matrix the number of 1s in the column
corresponding to the certain vertex 𝑣𝑣, is 𝑑𝑑(𝑣𝑣).
In addition, the degrees of the vertices in isomorphic simple graphs
must be the same.
Theorem (Handshaking theorem).
If 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) is an undirected graph with 𝑚𝑚 edges, then
∑𝑣𝑣∈𝑉𝑉 𝑑𝑑(𝑣𝑣) = 2𝑚𝑚
Proof.
Consider the incidence matrix of the graph 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸), the sum
of all columns = ∑𝑣𝑣∈𝑉𝑉 𝑑𝑑(𝑣𝑣), and the sum of all rows = 2𝑚𝑚.□
Theorem. In any undirected graph 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸) the number of
odd-degree vertices is even.

Proof.
From the previous theorem we have 2 𝐸𝐸 = ∑𝑣𝑣∈𝑉𝑉 𝑑𝑑(𝑣𝑣). If
the number of odd degree vertices is odd, then the sum could
not be even.
Degree sequence
If graph 𝐺𝐺 has vertices 𝑣𝑣1 , 𝑣𝑣2 , ⋯ , 𝑣𝑣𝑛𝑛 , the sequence
(𝑑𝑑(𝑣𝑣1 ), 𝑑𝑑(𝑣𝑣2 ), ⋯ , 𝑑𝑑(𝑣𝑣𝑛𝑛 )) (usually written in nonincreasing order) is
called the degree sequence of 𝐺𝐺.
Every graph has a degree sequence, but which sequences occur?
That is,
given nonnegative integers 𝑑𝑑1 , ⋯ , 𝑑𝑑𝑛𝑛 , is there a graph with these as
the vertex degrees?

A sequence 𝑑𝑑 = (𝑑𝑑1 , 𝑑𝑑2 , ⋯ , 𝑑𝑑𝑛𝑛 ) is graphic if there is a simple graph


with degree sequence 𝑑𝑑.
A simple graph with degree sequence 𝑑𝑑 “realizes” 𝑑𝑑.

You might also like