0% found this document useful (0 votes)
22 views

Discrete chapter 4

Uploaded by

kelbessaadugna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Discrete chapter 4

Uploaded by

kelbessaadugna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Chapter 4

Graph Theory
3.1. Definitions and Examples
Undirected graph Directed graph

loop

G=(V,E)

isolated vertex
multiple
edges
Pendant vertex
Notes:
1. Adjacent :- two vertices are said to be adjacent if there is an edge between them.
2. Degree of a vertex , d(v):- is the number of edges incident with it.
3. A vertex is pendant if and only if it has degree one. (only 1 edge is incident with it)
4. A vertex of degree zero is called isolated. (no edge is incident with it)
General Types of Graph
1. Undirected Graph
Definition:- A graph G = (V , E) consists of V, a non-empty set of
vertices (or nodes) and E, a set of edges. Each edge has either one or
two vertices associated with it, called its end points. An edge is said to
connect its endpoints.
2. Directed Graph
Definition:- A directed graph (or digraph) (V , E) consists of a nonempty
set of vertices V and a set of directed edges (or arcs) E. Each directed
edge is associated with an ordered pair of vertices.
The directed edge associated with the ordered pair (u, v) is said to start
at u and end at v.
3. Mixed Graph
Definition:- A graph with both directed and undirected
edges is called a mixed graph.
Types of Undirected Graph
1. Simple Graph
-A graph in which each edge connects two different vertices and where
no two edges connect the same pair of vertices is called a simple graph.
-In other word, A graph with out loops and multiple edges.
An edge that connect a vertex to itself is called loop
2. Multi Graph
Graphs that may have multiple edges connecting the same vertices are
called multigraphs.
3. Pseudo Graph
Graphs that may include loops, and possibly multiple
edges connecting the same pair of vertices or a vertex to
itself, are sometimes called pseudo graphs
3.2. Types of Simple Graphs
1. Empty Graph(En) is a graph without edges.
2. Cycle Graph(Cn)
3. Wheel Graph(Wn)
4. Complete Graph(Kn)
5. Regular Graph(Rn)
2. Cycle:- Continued…
A cycle C𝑛 , 𝑛 ≥ 3, consists of n vertices v1, v2,..., vn and
edges {v1, v2}, {v2, v3},...,{vn−1, vn}, and {vn, v1}. The cycles
C3, C4, C5, and C6 are displayed in Figure below

3. Wheels:- We obtain a wheel graph W𝑛 when we add an


additional vertex to a cycle C𝑛 , for 𝑛 ≥ 3, and connect
this new vertex to each of the n vertices in C𝑛 by new
edges. The wheels W3 , W4 , W5 , and W6 are displayed in
Figure
Continued…
4. Complete Graphs:- A complete graph on n vertices,
denoted by Kn, is a simple graph that contains exactly one
edge between each pair of distinct vertices.

5. Regular Graph:- A graph G is regular of degree n or n-regular if


every vertex has degree n. that is, if every vertex has the same degree

Example 1: Is it possible to have a 4-regular graph with 10 edges?


Here, |E|=10 & 2|E|= 2(10)=20 which implies 4|V|=20 & |V|=5 possible (K5)
Example 2: Is it possible to have a 4-regular graph with 15 edges?
Here, |E|=15 & 2|E|= 2(15)=30 which implies 4|V|=30 & |V|=30/4 impossible
Graph Terminology
1. Adjacency:-Two vertices u and v in an undirected graph
G are called adjacent (or neighbours) in G if u and v are
endpoints of an edge e of G. Such an edge e is called
incident with the vertices u and v and e is said to
connect u and v.
2. Degree:- The degree of a vertex in an undirected graph
is the number of edges incident with it, except that a
loop at a vertex contributes twice to the degree of that
vertex. The degree of the vertex v is denoted by deg(v).
• degree of a vertex: number of edges connected
(indegree, outdegree)
For simple graphs,  deg(v )  2 | E |
vi V
i
Continued…
• Find the degrees of each vertex in the
following graph G and H.
Continued…
• the number of odd vertices in any graph is even. (since the sum
of odd numbers is even iff they are even in number)
• In a graph with directed edges the in-degree of a vertex v,
denoted by
deg−(v) = is the number of edges with v as their terminal vertex.
• The out-degree of v, denoted by
deg+(v) = is the number of edges with v as their initial vertex.
Note that :A loop at a vertex contributes 1 to both the in-degree
and the out-degree of this vertex.)
Example:- Find the in-degree and out-degree of each vertex in the
graph G with directed edges shown in Figure below.
3.7 Trees and Forest

• A tree is a connected simple undirected graph


with no simple circuits.

• Properties:
o There is a unique simple path between any 2
of its vertices.
o No loops.
o No multiple edges.

You might also like