graph theory chapter one - uotechnology.edu.iq filethe basic ideas of graph theory were introduced...

18
Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon 1 Graph Theory Chapter One Basic Definitions and Concepts What is a graph? How can we lay a cable at minimum cost to make every telephone reachable from every other? What is the fastest route from the national capital to each state capital? How can n jobs be filled by n people with maximum total utility? What is the maximum flow per unit time from source to sink in a network of pipes? How many layers does a computer chip need so that wir es in the same layer don’t cross? How can the season of a sports league be scheduled into the minimum number of weeks? In what order should a traveling salesman visit cities to minimize travel time? Can we color the regions of every map using four colors so that neighboring regions receive different colors? These and many other practical problems involve graph theory. 1.1 Introduction In recent years, graph theory has established itself as an important mathematical tool in a wide variety of subjects. The basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges of Königsberg problem. The city of K nigsberg (now Kaliningrad) was divided into four sections by the Pregel River, with seven bridges connecting the sections. It is said that residents spent their Sunday afternoons trying to find a way to walk around the city crossing each bridge exactly once and returning to where they started. Euler was able to solve this problem by constructing a graph of the city and investigating the features of this graph.

Upload: others

Post on 28-Oct-2019

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

1

Graph Theory

Chapter One Basic Definitions and Concepts

What is a graph?

How can we lay a cable at minimum cost to make every telephone reachable from every other?

What is the fastest route from the national capital to each state capital?

How can n jobs be filled by n people with maximum total utility?

What is the maximum flow per unit time from source to sink in a network of pipes? How many layers does a computer chip need so that wires in the same layer don’t cross?

How can the season of a sports league be scheduled into the minimum number of

weeks? In what order should a traveling salesman visit cities to minimize travel time?

Can we color the regions of every map using four colors so that neighboring regions

receive different colors?

These and many other practical problems involve graph theory.

1.1 Introduction

In recent years, graph theory has established itself as an important mathematical tool in a wide variety of subjects.

The basic ideas of graph theory were introduced c.1736 by Euler, a Swiss

mathematician, in his solution of the now famous Seven Bridges of Königsberg

problem. The city of K nigsberg (now Kaliningrad) was divided into four sections by the Pregel River, with seven bridges connecting the sections.

It is said that residents spent their Sunday afternoons trying to find a way to walk

around the city crossing each bridge exactly once and returning to where they started. Euler was able to solve this problem by constructing a graph of the city and

investigating the features of this graph.

Page 2: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

2

Graph theory has many applications and has proven to be an extremely useful tool in

analyzing various practical problems. For instance, graphs can be used to represent

electrical or telecommunications networks, traffic systems, pipelines and flow charts. Graph theory has also been found to be useful when working with biological

evolutionary trees, chemical compounds, organizational charts, computer data structures

etc.

Graph theory is major area of combinatorics, and during recent decades, graph theory

has developed into a major area of mathematics. In addition to its growing interested

and importance as a mathematics subject, it has applications to many fields, including computer science and chemistry.

Many real-world situations can conveniently be described by means of a diagram consisting of a set of points together with lines joining certain pairs of these points. For

example, the points could represent people, with lines joining pair of friends; or the

points might be communication centers, with lines representing communication links.

Notice that in such diagrams one is mainly interested in whether or not two given points are joined by a line; the manner in which they are joined is immaterial. A mathematical

abstraction of situations of this type gives rise to the concept of a graph.

Page 3: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

3

1.2 Introductory Concepts

In this section we will introduce basic definitions of graph and its characteristics.

A graph:

A graph is defined by an ordered pair , where is a nonempty

set whose elements are called points or vertices and is a set of unordered pairs of

distinct elements of

. The elements of are called lines or

edges of the graph . A graph with vertices and edges is called a - graph.

Note: A graph can be represented a plane figure by drawing a line (or a curve)

between the points (representing vertices) of the graph.

Order : The number of vertices in a given graph is called order of the graph, denoted

by .

Size :The number of edges in a given graph is called size of the graph, denoted

by .

Loop: An edge of a graph that joins a vertex to itself is called a loop. As an example,

see Figure 1.2 ( ).

Figure 1.1: (6,9) graph

Figure 1.2: Graph with loop

Page 4: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

4

Multiple edges:

If two vertices of a graph are joined by more than one edge then these edges are called

multiple edges. For instance, see Figure 1.3( and ).

Pseudo graph4: A graph in which loops and multiple edges are allowed, is called a

pseudo graph.

Simple graph: A graph which has neither loops nor multiple edges is called a simple

graph.

In any simple graph there is at most one edge joining a given pair of vertices.

However, many results that hold for simple graphs can be extended to more general

objects in which two vertices may have several edges joining them. In addition, we may

remove the restriction that an edge joins two distinct vertices, and allow loops - edges

joining a vertex to itself. The resulting object, in which loops and multiple edges are

allowed, is called a general graph - or, simply, a graph. Thus every simple graph is a

graph, but not every graph is a simple graph.

Finite graph: A graph is finite if both its vertex set and edge set are finite.

Adjacent vertices: If two vertices of a graph are joined by an edge then these vertices

are called adjacent vertices.

Adjacent edges: If two or more edges of a graph have a common vertex then these

edges are called adjacent edges.

Figure 1.3: Graph with multiple edges

Page 5: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

5

Degree : Degree of a vertex of any graph is defined as the number of edges incident

on . It is denoted by

Isolated vertex: A vertex of degree 0 is an isolated vertex and a vertex of degree 1 is

an end-vertex, leaf, or a pendant vertex.

Open neighborhood: The open neighborhood of in is ,

the respective closed neighborhood is . For simplicity, and

will be used as abbreviation of ( ) and [ ], respectively.

Subgraphs: A graph is a subgraph of if every vertex of is a vertex of , and

every edges of is an edge of . In other words, and .

Spanning subgraph: We say that a subgraph is a spanning subgraph of if

contains all vertices of .

Induced subgraph: A subgraph of , such that whenever are adjacent

in G then they are adjacent in is called an induced subgraph of . (for example, see

Figure 1.4 and 1.5)

Figure 1.4:

is a subgraph of .

is a spanning subgraph of .

is an induced subgraph of .

G

Page 6: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

6

Figure 1.5

Complement: The complement of a simple graph with vertex set is the graph

in which two vertices are adjacent if and only if they are not adjacent in . (for instance,

see Figure 1.6)

Figure1.6: Graph with its complement.

Isomorphism: The two graphs G and H are isomorphic G H if there is a one to one

correspondence ϕ mapping from onto such that ϕ preserves adjacency, i.e.,

for if and only if . Thus the two graphs

Page 7: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

7

shown in Figure 1.7 are isomorphic under the correspondence

.

Equivalence relation:

A relation on a set is a subset of .

A relation on a set is an equivalence relation if

1. ( ) ( is reflexive).

2. ( ) implies ( is symmetric).

3. and imply ( is transitive).

An equivalence relation defines a partition of the base set into equivalence classes.

Elements are in relation iff they are within the same class.

Claim. The isomorphism relation is an equivalence relation on the set of all graphs.

An isomorphism class of graphs is an equivalence class of graphs under the

isomorphism relation.

Automorphism: An automorphism of is an isomorphism of to .

Vertex transitive: A graph is vertex transitive if for every pair of vertices there

is an automorphism that maps to .

Figure 1.7: G H

Page 8: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

8

Decomposition: A decomposition of a graph is a list of subgraphs such that each edge

appears in exactly one subgraph in the list.

Self-complementary: A graph is self-complementary if it is isomorphic to its

complement.

Deletion: If e is an edge of a graph , we denote by the graph obtained from G

by deleting the edge e. Similarly, if v is a vertex of , we denote by the graph

obtained from by deleting the vertex together with the edges incident on .

Figure 1.8 illustrates the deletion of vertex or edge from

Matrix representations:

Other representation is in a matrix for, in order to program graphs in arrays. Computers

cannot just look and point at graphs like we can. Instead, they understand graphs via

matrix representations. Such representation is an adjacency matrix and also an incidence matrix.

Adjacency matrix: A simple graph with vertex set and

edge set can also be described by means of matrices. One such

matrix is the adjacency matrix

, where

, where

Thus, the adjacency matrix of a graph is a symmetric ( ) matrix having zero entries

along the main diagonal.

Figure 1.8: Vertex deletion and edge deletion.

Page 9: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

9

Incidence matrix: Another matrix is the incidence matrix

, where

For example, a graph is defined by the sets and

, where , , , and

A diagram of this graph and its adjacency (A) and incidence (B) matrices is

shown in Figure 1.9.

Figure 1.9: A graph and its adjacency and incidence matrices.

Adjacency matrices can also be used to represent undirected graphs with loops and with

multiple edges. A loop at the vertex is represented by 1 at the th position of the

adjacency matrix. When multiple edges connecting the same pair of vertices and ,

or multiple loops at the same vertex, are present, the adjacency matrix is no longer a

zero – one matrix, because the th entry of this matrix equals the number of edges

that are associated to . All undirected graphs, including multigraphs and pseudo

graphs, have symmetric adjacency matrices.

For example:

Page 10: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

10

Figure 1.10: A graph and its adjacency and incidence matrices.

Degrees:

With the exception of the order and the size, the parameter that one encounters most

frequently in the study of graphs is the degree of a vertex. The degree of a vertex in a

graph is the number of edges of incident with which is denoted by deg or

simply by if is clear from the context. A vertex is called even or odd according

to whether its degree is even or odd. A vertex of degree 0 in is called an isolated

vertex and a vertex of degree 1 is an end-vertex of . The minimum degree of is the

minimum degree among the vertices of and is denoted by . The maximum

degree is defined similarly and is denoted by . In Figure 1.11 graph is shown

together with the degrees of its vertices. In this case, and .

Figure 1.11 :The degree of vertices of a graph.

Page 11: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

11

Paths and cycles:

Walk: Given a graph , a walk in is a finite sequence of edges of the form

, also denoted by , in which any

two consecutive edges are adjacent or identical. Such a walk determines a sequence of

vertices .

We call the initial vertex and the final vertex of the walk, and speak of a walk

from to . The number of edges in a walk is called its length; for example, in

Figur.1.12, is a walk of length 7 from to .

Figure 1.12

The concept of a walk is usually too general for our purposes, so we impose some

restrictions.

Trail: A walk in which all the edges are distinct is a trail. If, in addition, the vertices

are distinct (except, possibly, ) , then the trail is a path.

Note: a walk in which no vertex appears more than once called a path.

Path: A path of length , denoted by , is a sequence of distinct

edges .

Note: If then the walk, trail and path is closed.

Cycle: A closed path, a path with is called a cycle. A cycle with vertices is

denoted by .

Page 12: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

12

Circuit: A closed trail (without specifying the first vertex) is a circuit. A circuit with no

repeated vertex is called a cycle.

Figure 1.13

1.3 Special Types of Graphs

Well known graphs would be presented here. The importance of these graphs relies

in combining or modifying them to create new graphs.

Regular graph: A regular graph is defined as a graph that all of its vertices are of the

same degree, in such case we say that the graph of degree is a -regular graph.

Complete graph: A complete graph of order ( ) is a regular graph of degree

(as an example, see Figure 1.14).

Null graph: A null graph is a regular graph of degree zero. Null graph of vertices is

denoted by . ( for example, see Figure 1.15).

Page 13: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

13

Bipartite graph: If the vertices set of a graph can be partitioned into two sets and

such that any edge of joins one vertex in to one vertex in then is called a

bipartite graph having bipartition ( .

Complete bipartite: A complete bipartite graph is a bipartite graph in which each

vertex in is joined to each vertex in . The complete graph having bipartition

( such that = and = is denoted by .

A bipartite graph of the form is called a star graph . Figures 1.16, 1.17 and 1.18

are examples of bipartite graphs

As a similar argument of a bipartite graph, a graph G is k-partite graph, , if it is

possible to partition into subsets (called partite sets) such that

every element of ) joins a vertex of to a vertex of , .

complete k-partite: A complete k-partite graph is a k-partite graph with partite sets

, having the added property that if u and v , , then

If , then this graph is denoted by .

Figure 1.17:

Figure 1.18:

Figure 1.14:

Figure1.16: Bipartite graph

Figure 1.15:

Page 14: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

14

(for instance, see Figure 1.19).

1.4 Operations on graphs

In this section we will show sample operations between two graphs that would

generate a resultant new graph.

Union: Let and be two disjoint graphs. The union of and is the

graph having vertex set ) and edge set ).

(see Figure 1.20)

Cartesian product : The Cartesian product of and is the graph having

vertex set ) and two vertices ( ) and ( ) of are adjacent if

and only if either

and or

and

Figure 1. 21 illustrates the Cartesian product of and .

Figure 1.19:

Figure 1.20:

Page 15: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

15

Composition: The composition of and is the graph having vertex set

) and edge set {( ) ( ): or

( ))}.

Figure 1.22 illustrates the composition of and .

Join: The join of and is the graph having vertex set ) and

edge set ) { ( ) and v )}. (as an example, see

Figure 1.23).

Figure 1.21: The Cartesian of two graphs

:

Figure 1.22: The composition of two graphs

: :

Page 16: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

16

Corona: Let and be two disjoint graphs. The corona of two graphs

and is the graph obtained by taking one copy of (which has vertices) and

copies of , and then joining the vertex of to every vertex in the copy of .

(Figure 1.24 is an example of this operation).

1.5 Some resultant graphs from graph operations

In this section, graphs are given as an example of operations (given in previous

section) between other two graphs.

Wheel: A wheel is the graph . (Figure 1.25 illustrates ).

Figure 1.23: The join of

:

Figure 1.24: Two graphs and their coronas

:

:

Page 17: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

17

Fan: The fan is defined to be the graph .

Double Fan: The double Fan is defined to be the graph .

(see Figures 1.26 and 1.27).

The corona graph , where is a triangular snake (for

instance, see Figure 1.28).

Figure 1.25:

Figure 1.26:

Figure 1.28:

Figure 1.27:

Page 18: Graph Theory Chapter One - uotechnology.edu.iq fileThe basic ideas of graph theory were introduced c.1736 by Euler, a Swiss mathematician, in his solution of the now famous Seven Bridges

Chapter one Graph Theory Dr. Manal Najy @ Dr. Ahmed Abed Ali Basic Definitions and Concepts University of Technology - -University of Babylon

18

Note: We can form a new graph from two or more graphs as in the following examples.

Example.

Dragon: The dragon is the graph obtained by joining the end point of a path

to one vertex of (for example, see Figure 1.29).

Example.

Triangular snake: The triangular snake is the graph obtained from the path

having the vertices by adding new vertices and connecting

to the vertices for each i. ( as an example, see Figure 1.30).

Figure 1.29:

Figure 1.30: Triangular snake