ma 208: graph theorymat.iitm.ac.in/home/ramar/public_html/ma208-slides1.pdf · multigraph if the...
TRANSCRIPT
MA 208: Graph Theory
Prof R. Rama,Dept. of Mathematics
IIT Madras
January 17, 2007
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
Definitions
A Graph is a pair G = (V , E) of sets satisfying E ⊆ [V ]2.[V ]2 means all 2 element subsets of V , e.g.
Definitions
A Graph is a pair G = (V , E) of sets satisfying E ⊆ [V ]2.[V ]2 means all 2 element subsets of V , e.g.
If S = {1, 2, 3}, then,
Definitions
A Graph is a pair G = (V , E) of sets satisfying E ⊆ [V ]2.[V ]2 means all 2 element subsets of V , e.g.
If S = {1, 2, 3}, then,
[V ]2 = {{1, 2}, {1, 3}, {2, 3}}
Definitions
A Graph is a pair G = (V , E) of sets satisfying E ⊆ [V ]2.[V ]2 means all 2 element subsets of V , e.g.
If S = {1, 2, 3}, then,
[V ]2 = {{1, 2}, {1, 3}, {2, 3}}This type of graphs are also called as simple graphs in somebooks.
Definitions
A Graph is a pair G = (V , E) of sets satisfying E ⊆ [V ]2.[V ]2 means all 2 element subsets of V , e.g.
If S = {1, 2, 3}, then,
[V ]2 = {{1, 2}, {1, 3}, {2, 3}}This type of graphs are also called as simple graphs in somebooks.The notations of Graph Theory are not standardized.
Examples
4
7
2
1
3 56
Example of the Graph G = (V , E) where
Examples
4
7
2
1
3 56
Example of the Graph G = (V , E) where
G = {1, 2, 3, 4, 5, 6, 7}
E = {{1, 2}, {1, 5}, {2, 5}, {3, 4}, {5, 6}}
Examples
4
7
2
1
3 56
Example of the Graph G = (V , E) where
G = {1, 2, 3, 4, 5, 6, 7}
E = {{1, 2}, {1, 5}, {2, 5}, {3, 4}, {5, 6}}For us, Graph means Simple Graphs, if not stated otherwise.
Directed GraphI Instead of taking
E ⊆ [V ]2,
if we takeE ⊆ V × V
then we get a graph call Directed Graph.
4
7
2
1
3 56
Example of the Directed Graph G = (V , E) where
E = {(1, 2), (1, 5), (3, 4), (5, 2), (5, 6)}
MultigraphIf the edge set is a multiset, i.e. it contains same element Morethan once, then the corresponding graph is called a Multigraph.
MultigraphIf the edge set is a multiset, i.e. it contains same element Morethan once, then the corresponding graph is called a Multigraph.
Moreover a multigraph may contain loops, viz. for some v ∈ V ,the element {v , v} ∈ E once or more than once.
MultigraphIf the edge set is a multiset, i.e. it contains same element Morethan once, then the corresponding graph is called a Multigraph.
Moreover a multigraph may contain loops, viz. for some v ∈ V ,the element {v , v} ∈ E once or more than once.
4
7
2
1
3 56
Example of the Multigraph Graph G = (V , E) where
E = {{1, 2}, {1, 2}, {1, 5}, {2, 5}, {2, 5}, {3, 4}, {3, 4}, {5, 6}}
MultigraphIf the edge set is a multiset, i.e. it contains same element Morethan once, then the corresponding graph is called a Multigraph.
Moreover a multigraph may contain loops, viz. for some v ∈ V ,the element {v , v} ∈ E once or more than once.
4
7
2
1
3 56
Example of the Multigraph Graph G = (V , E) where
E = {{1, 2}, {1, 2}, {1, 5}, {2, 5}, {2, 5}, {3, 4}, {3, 4}, {5, 6}}
Similarly, there are directed multigraphs too.
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
On V (G), E(G)
Order The number of vertices of a graph G is called itsorder. Graphs are finite or infinite according totheir order. If not stated otherwise a graph isalways finite.
Incident A vertex v is incident with an edge e if v ∈ e.Then e is an edge at v .An edge {x , y} is usually written as xy (or yx ).
On V (G), E(G)
Order The number of vertices of a graph G is called itsorder. Graphs are finite or infinite according totheir order. If not stated otherwise a graph isalways finite.
Incident A vertex v is incident with an edge e if v ∈ e.Then e is an edge at v .An edge {x , y} is usually written as xy (or yx ).
E(X , Y ) If x ∈ X an y ∈ Y then xy is an X − Y edge. Theset of all X − Y edges is denoted by E(X , Y ).Instead of writing E({x}, Y ) or E(X , {y}) wesimply write E(x , Y ) and E(X , y).
On V (G), E(G)
Order The number of vertices of a graph G is called itsorder. Graphs are finite or infinite according totheir order. If not stated otherwise a graph isalways finite.
Incident A vertex v is incident with an edge e if v ∈ e.Then e is an edge at v .An edge {x , y} is usually written as xy (or yx ).
E(X , Y ) If x ∈ X an y ∈ Y then xy is an X − Y edge. Theset of all X − Y edges is denoted by E(X , Y ).Instead of writing E({x}, Y ) or E(X , {y}) wesimply write E(x , Y ) and E(X , y).
E(v) The set of all edges in E at a vertex v is denotedby E(v).
On V (G), E(G)
Order The number of vertices of a graph G is called itsorder. Graphs are finite or infinite according totheir order. If not stated otherwise a graph isalways finite.
Incident A vertex v is incident with an edge e if v ∈ e.Then e is an edge at v .An edge {x , y} is usually written as xy (or yx ).
E(X , Y ) If x ∈ X an y ∈ Y then xy is an X − Y edge. Theset of all X − Y edges is denoted by E(X , Y ).Instead of writing E({x}, Y ) or E(X , {y}) wesimply write E(x , Y ) and E(X , y).
E(v) The set of all edges in E at a vertex v is denotedby E(v).
Adjacent Two vertices x , y ∈ V (G) are adjacent if xy is anedge between them. Two edges e 6= f areadjacent if they have an end vertex common.
contd...Complete graph A graph of degree n where any two vertices
are adjacent. It is denoted by K n. K 3 is a triangle.
contd...Complete graph A graph of degree n where any two vertices
are adjacent. It is denoted by K n. K 3 is a triangle.Isomorphism G = (V , E) & G′ = (V ′, E ′) are said to be
isomorphic if ∃ a bijection ϕ : V −→ V ′ withxy ∈ E ⇔ ϕ(x)ϕ(y) ∈ E ′, ∀x , y ∈ V . We denote itby G ' G′.
contd...Complete graph A graph of degree n where any two vertices
are adjacent. It is denoted by K n. K 3 is a triangle.Isomorphism G = (V , E) & G′ = (V ′, E ′) are said to be
isomorphic if ∃ a bijection ϕ : V −→ V ′ withxy ∈ E ⇔ ϕ(x)ϕ(y) ∈ E ′, ∀x , y ∈ V . We denote itby G ' G′.
G ∪ G′ := (V ∪ V ′, E ∪ E ′).G ∩ G′ := (V ∩ V ′, E ∩ E ′).G′ ⊆ G If V ′ ⊆ V & E ′ ⊆ E . Then we say G′ is a subgraph
of G.
contd...Complete graph A graph of degree n where any two vertices
are adjacent. It is denoted by K n. K 3 is a triangle.Isomorphism G = (V , E) & G′ = (V ′, E ′) are said to be
isomorphic if ∃ a bijection ϕ : V −→ V ′ withxy ∈ E ⇔ ϕ(x)ϕ(y) ∈ E ′, ∀x , y ∈ V . We denote itby G ' G′.
G ∪ G′ := (V ∪ V ′, E ∪ E ′).G ∩ G′ := (V ∩ V ′, E ∩ E ′).G′ ⊆ G If V ′ ⊆ V & E ′ ⊆ E . Then we say G′ is a subgraph
of G.Induced subgraph If G′ ⊆ G and G′ contains all the edges
xy ∈ E with x , y ∈ V ′. We then say V ′ induces orspans G′ in G and write G′ := G[V ′].
Spanning subgraph G′ ⊆ G is a spanning subgraph of G if V ′
spans all of G, i.e. if V ′ = V .
contd...
− Let U ⊆ V , we write G − U for G[V \ U]. IfU = {v} be singleton then we write G − v ratherthan G − {v}.
contd...
− Let U ⊆ V , we write G − U for G[V \ U]. IfU = {v} be singleton then we write G − v ratherthan G − {v}.
+ If F ⊆ [V ]2 we write G − F := (V , E \ F ) &G + F := (V , E ∪ F ).
contd...
− Let U ⊆ V , we write G − U for G[V \ U]. IfU = {v} be singleton then we write G − v ratherthan G − {v}.
+ If F ⊆ [V ]2 we write G − F := (V , E \ F ) &G + F := (V , E ∪ F ).
G ∗ G′ If G & G′ are disjoint then G ∗ G′ is the graphobtained by G ∪ G′ by joining all the vertices of Gto all the vertices of G′.
contd...
− Let U ⊆ V , we write G − U for G[V \ U]. IfU = {v} be singleton then we write G − v ratherthan G − {v}.
+ If F ⊆ [V ]2 we write G − F := (V , E \ F ) &G + F := (V , E ∪ F ).
G ∗ G′ If G & G′ are disjoint then G ∗ G′ is the graphobtained by G ∪ G′ by joining all the vertices of Gto all the vertices of G′.
L(G) The line graph L(G) of a graph G is the graph onE in which x , y ∈ E are adjacent as vertices if andonly if they are adjacent as edges in G.
Degree of a vertexN(v) Set of neighbours of a vertex v in G is denoted by
NG(v), or by N(v). If U ⊆ V , then the neighboursin V \ U of vertices in U are called neighbours ofU. The set is denoted by N(U).
Degree of a vertexN(v) Set of neighbours of a vertex v in G is denoted by
NG(v), or by N(v). If U ⊆ V , then the neighboursin V \ U of vertices in U are called neighbours ofU. The set is denoted by N(U).
d(v) The degree dG(v) = d(v) of a vertex v is thenumber |E(v)| of edges at v . By our definition ofgraph, this is equal to the number of neighbours ofv .
Degree of a vertexN(v) Set of neighbours of a vertex v in G is denoted by
NG(v), or by N(v). If U ⊆ V , then the neighboursin V \ U of vertices in U are called neighbours ofU. The set is denoted by N(U).
d(v) The degree dG(v) = d(v) of a vertex v is thenumber |E(v)| of edges at v . By our definition ofgraph, this is equal to the number of neighbours ofv .
δ,∆ δ(G) := min{d(v)|v ∈ V}∆(G) := max{d(v)|v ∈ V}
Degree of a vertexN(v) Set of neighbours of a vertex v in G is denoted by
NG(v), or by N(v). If U ⊆ V , then the neighboursin V \ U of vertices in U are called neighbours ofU. The set is denoted by N(U).
d(v) The degree dG(v) = d(v) of a vertex v is thenumber |E(v)| of edges at v . By our definition ofgraph, this is equal to the number of neighbours ofv .
δ,∆ δ(G) := min{d(v)|v ∈ V}∆(G) := max{d(v)|v ∈ V}
k -regular If all vertices of G are of same degree k . Wesimply call it regular.
The numberd(G) :=
1|V |
∑
v∈Vd(v)
is the average degree of G. Clearlyδ(G) ≤ d(G) ≤ ∆(G).
contd...Proposition: For any graph G = (V , E)
2|E | =∑
v∈Vd(v)
contd...Proposition: For any graph G = (V , E)
2|E | =∑
v∈Vd(v)
Proposition: Number of vertices of odd degree is always even.
contd...Proposition: For any graph G = (V , E)
2|E | =∑
v∈Vd(v)
Proposition: Number of vertices of odd degree is always even.We define the average degree of a graph as ε(G) := |E |
|V | . It isclear that
ε(G) =12d(G)
contd...Proposition: For any graph G = (V , E)
2|E | =∑
v∈Vd(v)
Proposition: Number of vertices of odd degree is always even.We define the average degree of a graph as ε(G) := |E |
|V | . It isclear that
ε(G) =12d(G)
Proposition: For every graph G with at least one edge has asubgraph H with
δ(H) > ε(H) ≥ ε(G)
Proof: We construct a sequence G = G0 ⊇ G1 ⊇ · · · ofinduced subgraphs of G as follows, if Gi has a vertex vi ofdegree d(vi) ≤ ε(Gi), we let Gi+1 := Gi − vi ; if not we terminateour sequence and set H := Gi . By the choice of vi , we haveε(Gi+1) ≥ ε(Gi) ∀i , and hence ε(H) ≥ ε(G).
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
Paths and cyclesA path is a non empty graph P = (V , E) of the form
V = {x0, x1, · · · , xk} E = {x0x1, x1x2, · · · , xk−1xk},
where xi ’s are all distinct. The vertices x0 & xk linked by P arecalled ends. The number of edges in a path is called its length.A path of length k is denoted by Pk .We write for 0 ≤ i ≤ j ≤ k
Pxi := x0 · · · xixiP := xi · · · xk
xiPxj := xi · · · xjP ′ := x1 · · · xk−1
Px ′i := x0 · · · xi−1
x ′i P := xi+1 · · · xk
x ′i Px ′
j := xi+1 · · · xj−1
contd..If P = x0 · · · xn−1 is a path with n ≥ 3, then the graphC := P + xn−1x0 is called a cycle of length n.The length of a cycle is the number of edges. A cycle of lengthn is denoted as Cn.
contd..If P = x0 · · · xn−1 is a path with n ≥ 3, then the graphC := P + xn−1x0 is called a cycle of length n.The length of a cycle is the number of edges. A cycle of lengthn is denoted as Cn.The minimal length of a cycle in a graph G is called girth g(G)of G.The maximum length of a cycle in a graph G is calledcircumference.
contd..If P = x0 · · · xn−1 is a path with n ≥ 3, then the graphC := P + xn−1x0 is called a cycle of length n.The length of a cycle is the number of edges. A cycle of lengthn is denoted as Cn.The minimal length of a cycle in a graph G is called girth g(G)of G.The maximum length of a cycle in a graph G is calledcircumference.The distance dG(x , y) in G of two vertices x , y is the length ofthe shortest x − y path in G. If no such path exists we setd(x , y) := ∞.The greatest distance between any two vertices is called thediameter of G.
contd..If P = x0 · · · xn−1 is a path with n ≥ 3, then the graphC := P + xn−1x0 is called a cycle of length n.The length of a cycle is the number of edges. A cycle of lengthn is denoted as Cn.The minimal length of a cycle in a graph G is called girth g(G)of G.The maximum length of a cycle in a graph G is calledcircumference.The distance dG(x , y) in G of two vertices x , y is the length ofthe shortest x − y path in G. If no such path exists we setd(x , y) := ∞.The greatest distance between any two vertices is called thediameter of G.Proposition: Every graph G contains a path of length δ(G) anda cycle length of at least δ(G) + 1 (provided δ(G) ≥ 2).
contd..If P = x0 · · · xn−1 is a path with n ≥ 3, then the graphC := P + xn−1x0 is called a cycle of length n.The length of a cycle is the number of edges. A cycle of lengthn is denoted as Cn.The minimal length of a cycle in a graph G is called girth g(G)of G.The maximum length of a cycle in a graph G is calledcircumference.The distance dG(x , y) in G of two vertices x , y is the length ofthe shortest x − y path in G. If no such path exists we setd(x , y) := ∞.The greatest distance between any two vertices is called thediameter of G.Proposition: Every graph G contains a path of length δ(G) anda cycle length of at least δ(G) + 1 (provided δ(G) ≥ 2).Proposition: Every graph G contains a cycle satisfyingg(G) ≤ 2diam(G) + 1.
contd..
A vertex is central in G if its greatest distance from any othervertex is as small as possible. This distance is called the radiusof G, denoted by rad(G). Formally,
G = minx∈V (G)
maxy∈V (G)
dG(x , y)
contd..
A vertex is central in G if its greatest distance from any othervertex is as small as possible. This distance is called the radiusof G, denoted by rad(G). Formally,
G = minx∈V (G)
maxy∈V (G)
dG(x , y)
Clearly we have
rad(G) ≤ diam(G) ≤ 2rad(G)
contd..
A vertex is central in G if its greatest distance from any othervertex is as small as possible. This distance is called the radiusof G, denoted by rad(G). Formally,
G = minx∈V (G)
maxy∈V (G)
dG(x , y)
Clearly we have
rad(G) ≤ diam(G) ≤ 2rad(G)
Proposition: A graph G of radius at most k and maximumdegree at most d has no more than 1 + kd k vertices.
contd..
A vertex is central in G if its greatest distance from any othervertex is as small as possible. This distance is called the radiusof G, denoted by rad(G). Formally,
G = minx∈V (G)
maxy∈V (G)
dG(x , y)
Clearly we have
rad(G) ≤ diam(G) ≤ 2rad(G)
Proposition: A graph G of radius at most k and maximumdegree at most d has no more than 1 + kd k vertices.A walk (of length k ) in a graph G is a non-empty alternatingsequence v0e0v1e1 · · · ek−1vk of vertices and edges of G suchthat ei = {vi , vi+1 ∀i < k . If v1 = vk we say that the the walk isclosed.
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
Connectivity
A non-empty graph G is called connected if any two of itsvertices are linked by a path in G.
Connectivity
A non-empty graph G is called connected if any two of itsvertices are linked by a path in G.Proposition: The vertices of a connected graph G can alwaysbe enumerated, say as v1, · · · vn, so that Gi := G[v1, · · · , vi ] isconnected for each i .
Connectivity
A non-empty graph G is called connected if any two of itsvertices are linked by a path in G.Proposition: The vertices of a connected graph G can alwaysbe enumerated, say as v1, · · · vn, so that Gi := G[v1, · · · , vi ] isconnected for each i .et G = (V , E) be a graph . A maximal connected subgraph of Gis called a component of G. A component, being connected isalways non-empty.
Connectivity
A non-empty graph G is called connected if any two of itsvertices are linked by a path in G.Proposition: The vertices of a connected graph G can alwaysbe enumerated, say as v1, · · · vn, so that Gi := G[v1, · · · , vi ] isconnected for each i .et G = (V , E) be a graph . A maximal connected subgraph of Gis called a component of G. A component, being connected isalways non-empty.If A, B ⊆ V & X ⊆ V ∪ E are such that every A − B path in Gcontains a vertex or an edge from X , we say that X separatesthe sets A and B in G.
Connectivity
A non-empty graph G is called connected if any two of itsvertices are linked by a path in G.Proposition: The vertices of a connected graph G can alwaysbe enumerated, say as v1, · · · vn, so that Gi := G[v1, · · · , vi ] isconnected for each i .et G = (V , E) be a graph . A maximal connected subgraph of Gis called a component of G. A component, being connected isalways non-empty.If A, B ⊆ V & X ⊆ V ∪ E are such that every A − B path in Gcontains a vertex or an edge from X , we say that X separatesthe sets A and B in G.G is called k -connected for k ∈ N if |G| > k and G − X isconnected for every set X ⊆ V with |X | < k .
Connectivity
A non-empty graph G is called connected if any two of itsvertices are linked by a path in G.Proposition: The vertices of a connected graph G can alwaysbe enumerated, say as v1, · · · vn, so that Gi := G[v1, · · · , vi ] isconnected for each i .et G = (V , E) be a graph . A maximal connected subgraph of Gis called a component of G. A component, being connected isalways non-empty.If A, B ⊆ V & X ⊆ V ∪ E are such that every A − B path in Gcontains a vertex or an edge from X , we say that X separatesthe sets A and B in G.G is called k -connected for k ∈ N if |G| > k and G − X isconnected for every set X ⊆ V with |X | < k .The greatest integer k such that G is K -connected is theconnectivity κ(G) of G.
contd..
If |G| > 1, and G − F is connected for every set F ⊆ E of fewerthan l edges, then G is called l-edge connected.
contd..
If |G| > 1, and G − F is connected for every set F ⊆ E of fewerthan l edges, then G is called l-edge connected.The greatest integer l such that G is l-edge connected is callededge connected λ(G) of G.
contd..
If |G| > 1, and G − F is connected for every set F ⊆ E of fewerthan l edges, then G is called l-edge connected.The greatest integer l such that G is l-edge connected is callededge connected λ(G) of G.For every non-trivial graph G we have
κ(G) ≤ λ(G) ≤ δ(G)
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
Trees
An acyclic graph, i.e. not containing any cycle as a subgraph iscalled a forest.A connected forest is called a tree. The vertices of degree 1 iscalled leaves.
Trees
An acyclic graph, i.e. not containing any cycle as a subgraph iscalled a forest.A connected forest is called a tree. The vertices of degree 1 iscalled leaves.TheoremThe following assertions are equivalent for a graph T :
1. T is a tree.2. Any two vertices of T are linked by a unique path in T .3. T is minimally connected, i.e. T is connected but T − e is
disconnected for every edge e ∈ T .4. T is maximally acyclic, i.e. T contains no cycle but T + xy
does, for any two non-adjacent vertices x , y ∈ T .
CorollaryThe vertices of a tree can always be enumerated, say asv1, · · · , vn, so that every vi , with i ≥ 2 has a unique neighbourin {v1, · · · , vi−1}.
CorollaryThe vertices of a tree can always be enumerated, say asv1, · · · , vn, so that every vi , with i ≥ 2 has a unique neighbourin {v1, · · · , vi−1}.
CorollaryA connected graph with n vertices is a tree if and only if it hasn − 1 edges.
CorollaryThe vertices of a tree can always be enumerated, say asv1, · · · , vn, so that every vi , with i ≥ 2 has a unique neighbourin {v1, · · · , vi−1}.
CorollaryA connected graph with n vertices is a tree if and only if it hasn − 1 edges.
CorollaryIf T is a tree and G is any graph with δ(G) ≥ |T | − 1, thenT ⊆ G, i.e. G has a subgraph isomorphic to T .
CorollaryThe vertices of a tree can always be enumerated, say asv1, · · · , vn, so that every vi , with i ≥ 2 has a unique neighbourin {v1, · · · , vi−1}.
CorollaryA connected graph with n vertices is a tree if and only if it hasn − 1 edges.
CorollaryIf T is a tree and G is any graph with δ(G) ≥ |T | − 1, thenT ⊆ G, i.e. G has a subgraph isomorphic to T .Proposition: Every connected graph contains a normalspanning tree.
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
Bipartite graphs
Let r ≥ 2 be an integer. A graph G = (V , E) is called r -partite ifV admits a partition into r classes such that every edge has itsends in differend classes, i.e. vertices in same partition classesmust not be adjacent. 2-partite graphs are called bipartite.
Bipartite graphs
Let r ≥ 2 be an integer. A graph G = (V , E) is called r -partite ifV admits a partition into r classes such that every edge has itsends in differend classes, i.e. vertices in same partition classesmust not be adjacent. 2-partite graphs are called bipartite.A r -partite graph in which every two vertices from differentpartition classes are adjacent is called complete r -partite graph.
Bipartite graphs
Let r ≥ 2 be an integer. A graph G = (V , E) is called r -partite ifV admits a partition into r classes such that every edge has itsends in differend classes, i.e. vertices in same partition classesmust not be adjacent. 2-partite graphs are called bipartite.A r -partite graph in which every two vertices from differentpartition classes are adjacent is called complete r -partite graph.TheoremA graph is bipartite if and only if it contains no odd cycle.
Outline
What is a graph?
On vertices and edges
Paths and cycles
Connectivity
Trees
Bipartite graphs
Euler tour
Euler tour
A closed walk in a graph is called an Euler tour if it traversesevery edge exactly once. A graph is Eulerian if it admits anEuler tour.
Euler tour
A closed walk in a graph is called an Euler tour if it traversesevery edge exactly once. A graph is Eulerian if it admits anEuler tour.Theorem (Euler)A connected graph is Eulerian if and only if every vertex haseven degree.