0% found this document useful (0 votes)
6 views24 pages

Intro

The document is an introduction to graph theory, detailing its fundamental concepts, types of graphs, and their properties. It emphasizes the importance of graph theory for computer science students and provides definitions for various graph-related terms such as complete graphs, bipartite graphs, and connected graphs. Additionally, it discusses graph algorithms and their applications in modeling real-world problems.

Uploaded by

Anubala
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)
6 views24 pages

Intro

The document is an introduction to graph theory, detailing its fundamental concepts, types of graphs, and their properties. It emphasizes the importance of graph theory for computer science students and provides definitions for various graph-related terms such as complete graphs, bipartite graphs, and connected graphs. Additionally, it discusses graph algorithms and their applications in modeling real-world problems.

Uploaded by

Anubala
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/ 24

Graph Theory: Introduction

Pallab Dasgupta
Dept. of CSE, IIT Kharagpur
[email protected]

CSE, IIT KGP


Resources
• Copies of slides available at:
http://www.facweb.iitkgp.ernet.in/~pallab

• Book to be followed mainly:


Introduction to Graph Theory
-- Douglas B West

CSE, IIT KGP


Graph Theory
• A graph is a discrete structure
– Mathematically, a relation
• Graph theory is about studying
– Properties of various types of Graphs
– … and graph algorithms

Why should CSE students study graph theory?

CSE, IIT KGP


Graphs can be used to model problems
• The following table illustrates a number of possible duties
for the drivers of a bus company.
• We wish to ensure at the lowest possible cost, that at
least one driver is on duty for each hour of the planning
period (9 AM to 5 PM).

Duty
9–1 9 – 11 12 – 3 12 – 5 2 – 5 1–4 4–5
hours

Cost 300 180 210 380 200 340 90

CSE, IIT KGP


Graphs can be used to model problems

CSE, IIT KGP


Graph
• A graph G = (V,E) with n vertices and m edges consists of:
– a vertex set V(G) = {v1, …, vn}, and
– an edge set E(G) = {e1, …, em}, where each edge consists
of two (possibly equal) vertices called its endpoints.

• We write uv for an edge e={u,v}, and say that u and v are


adjacent

• A simple graph is a graph having no loops or multiple edges


– What is a loop ?

CSE, IIT KGP


Digraph
• A directed graph or digraph G consists of a vertex set
V(G) and an edge set E(G), where each edge is an ordered
pair of vertices.

– A simple digraph is a digraph in which each ordered


pair of vertices occurs at most once as an edge.

– Throughout this course we shall consider undirected


simple graphs, unless mentioned otherwise.

CSE, IIT KGP


Complement

• The complement G′ of a simple graph G is


the simple graph with vertex set V(G) and
edge set defined by:
– uv∈ E(G′ ) if and only if uv ∉ E(G)

CSE, IIT KGP


Subgraph

• A subgraph of a graph G is a graph H, such


that:
– V(H) ⊆ V(G) and E(H) ⊆ E(G)
• An induced subgraph of G is a subgraph H
of G such that E(H) consists of all edges of
G whose endpoints belong to V(H)

CSE, IIT KGP


Complete Graph / Clique

• A complete graph or a clique is a simple


graph in which every pair of vertices is an
edge.
– We use the notation Kn to denote a clique of n
vertices
– The complement Kn′ of Kn has no edges
– How does an induced subgraph of a clique look
like?

CSE, IIT KGP


Independent set

• An independent subset in a graph G is a


vertex subset S ⊆ V(G) that contains no
edge of G

CSE, IIT KGP


Bipartite Graph

• A graph G is bipartite if V(G) is the union of


two disjoint sets such that each edge of G
consists of one vertex from each set.
– A complete bipartite graph is a bipartite graph
whose edge set consists of all pairs having a
vertex from each of the two disjoint sets of
vertices
– A complete bipartite graph with partite sets of
sizes r and s is denoted by Kr,s

CSE, IIT KGP


K-partite Graph

• A graph G is k-partite if V(G) is the union of


k independent sets.

CSE, IIT KGP


Chromatic number

• A graph is k-colorable, if we can color the


vertices of the graph using k colors such
that the endpoints of each edge have
different colors
– The chromatic number, χ(G) of a graph G is the
minimum number of colors required to color G.

CSE, IIT KGP


Planar Graph

• A graph is planar if it can be drawn in the


plane without edge crossings

CSE, IIT KGP


Path & Cycle

• A path in a graph is a single vertex or an


ordered list of distinct vertices v1, …, vk such
that vi-1v1 is an edge for all 2 ≤ i≤ k.
– the ordered list is a cycle if vkv1 is also an edge
– A path is an u,v-path if u and v are respectively
the first and last vertices on the path
– A path of n vertices is denoted by Pn, and a
cycle of n vertices is denoted by Cn.

CSE, IIT KGP


Connected Graph

• A graph G is connected if it has a u,v-path


for each pair u,v∈ V(G).

CSE, IIT KGP


Walk and Trail

• A walk of length k is a sequence, v0,e1,v1,e2,


…, ek,vk of vertices and edges such that ei =
vi-1vi for all i.
• A trail is a walk with no repeated edge.
– A path is a walk with no repeated vertex
– A walk is closed if it has length at least one and
its endpoints are equal
– A cycle is a closed trail in which “first = last” is
the only vertex repetition
– A loop is a cycle of length one

CSE, IIT KGP


Equivalence Relation

• A relation R on a set S is a collection of


ordered pairs from S.

• An equivalence relation is a relation R that


is reflexive, symmetric and transitive.

CSE, IIT KGP


Graphs as Relations

• A graph is an adjacency relation. For simple


undirected graphs the relation is symmetric,
and not reflexive.
– The adjacency relation is not necessarily an
equivalence relation, since it is not necessarily
transitive.

CSE, IIT KGP


Graph Isomorphism

• An isomorphism from G to H is a bijection


f:V(G)  V(H) such that uv ∈ E(G) if and
only if f(u)f(v) ∈ E(H).
– We say that G is isomorphic to H, written as
G≡H, if there is an isomorphism from G to H.
– Is isomorphism an equivalence relation?

CSE, IIT KGP


Automorphism

• An automorphism of G is a permutation of
V(G) that is an isomorphism from G to G.
– A graph is called vertex transitive if for every
pair u,v ∈ V(G) there is an automorphism that
maps u to v.

CSE, IIT KGP


Union, Sum, Join
• The union of graphs G and H, written as
G∪H, has vertex set V(G) ∪ V(H) and edge
set E(G) ∪ E(H).
– To specify the disjoint union V(G) ∩ V(H) = φ,
we write G+H.
– mG denotes the graph consisting of m pairwise
disjoint copies of G.
– The join of G and H, written as G∨H is obtained
from G+H by adding the edges
{xy : x∈V(G), y∈V(H)}
Is (G+H)′ = G′ ∨ H′ ?
CSE, IIT KGP
Cut-vertex, Cut-edge

• The components of a graph G are its


maximal connected subgraphs.
– A component is non-trivial if it contains an edge.
– A cut-edge or cut-vertex of a graph is an edge
or vertex whose deletion increases the number
of components

CSE, IIT KGP

You might also like