CPGA Module 1 Complete Solutions
CPGA Module 1 Complete Solutions
Module 1
1. Define Graph.
A. A Graph is a non-linear data structure consisting of vertices and
edges. The vertices are sometimes also referred to as nodes and the
edges are lines or arcs that connect any two nodes in the graph. More
formally a Graph is composed of a set of vertices( V ) and a set of
edges( E ). The graph is denoted by G(E, V)
3. Give the condition for the adjacency of (i) two vertices (ii)
two edges.
A.A simple graph is a graph that does not have more than
one edge between any two vertices and no edge starts and
ends at the same vertex. In other words a simple graph is a
graph without loops and multiple edges. Two vertices are
said to be adjacent if there is an edge (arc) connecting
them.
● Adjacent Vertices
Two vertices are said to be adjacent if there is an edge (arc)
connecting them.
● Adjacent Edges
Adjacent edges are edges that share a common vertex.
4. Draw all simple graphs of one, two, three, and four vertices.
A.
5. Define a null graph. Draw a null graph of order 4.
A.Null Graph
Here, in this example, vertex 'a' and vertex 'b' have a connected edge 'ab'. So
with respect to the vertex 'a', there is only one edge towards vertex 'b' and
similarly with respect to the vertex 'b', there is only one edge towards vertex 'a'.
Finally, vertex 'a' and vertex 'b' has degree as one which are also called as the
pendent vertex.
Isolated Vertex
A vertex with degree zero is called an isolated vertex.
Example
Here, the vertex 'a' and vertex 'b' has a no connectivity between each other and
also to any other vertices. So the degree of both the vertices 'a' and 'b' are zero.
These are also called as isolated vertices.
Multiple edges are two or more edges connecting the same two vertices
within a multigraph. Multiple edges of degree between vertex and
vertex correspond to an integer as the entry of the incidence matrix of
the multigraph. A diagonal entry corresponds to a single or multiple
loop.
a. Pseudograph
Simple Graph
A simple graph is a graph that does not have more than one
edge between any two vertices and no edge starts and ends
at the same vertex. In other words a simple graph is a graph
without loops and multiple edges. Adjacent Vertices. Two
vertices are said to be adjacent if there is an edge (arc)
connecting them.
9. What is a finite graph?
The incidence matrix of a graph G is a |V| ×|E| matrix. The element aij=
the number of times that vertex viis incident with the edge ej.
A.A graph consisting of vertices and line segments such that every line
segment joins two vertices and every pair of vertices is
connected by a line segment.
13. Define Kn and Cn
A.Definitions.• Kn: the complete graph on n vertices. • Cn:
the cycle on n vertices. • Km,n the complete bipartite
graph on m and n vertices. • Qn: the hypercube on 2n
vertices.
16. State the relation between the number of edges and total degree
of a graph.
A.the sum of degrees is equal to twice the number of edges. This
fact is stated in the Handshaking Theorem. An undirected graph
has an even number of vertices of odd degree.
The degree of a vertex is the number of edges that are attached to it.
The degree sum formula says that if you add up the degree of all the
vertices in a (finite) graph, the result is twice the number of the edges in
the graph.
17. Define the terminology bipartition in a graph.
A. A bipartite graph is a graph in which a set of graph vertices can
be divided into two independent sets, and no two graph vertices
within the same set are adjacent. In other words, bipartite graphs
can be considered as equal to two colorable graphs.
18. What is Km,n?
A. The complete bipartite graph Km,n is defined by taking two
disjoint sets, V1 of size m and V2 of size n, and putting an edge
between u and v whenever u ∈ V1 and v ∈ V2.
19. Define labeling of a graph.
A.A graph labeling is an assignment of integers to the vertices or edges,
or both, subject to certain conditions. Graph labelings were first
introduced in the mid 1960s.
20. Define isomorphism of two graphs G1 and G2.
A.Two graphs which contain the same number of graph vertices
connected in the same way are said to be isomorphic. Formally, two
graphs and with graph vertices are said to be isomorphic if there is a
permutation of such that is in the set of graph edges iff is in the set of
graph edges .
21. Are the given graphs isomorphic?
Isomorphic Graphs
Two graphs G1 and G2 are said to be isomorphic if −
22. State the conditions that are required to check for isomorphism
of two graphs.
1 Draw all six non isomorphic simple graphs with five vertices and five
edges
three utilities;(b) four houses and four utilities,(Use 𝐻𝑖 ′ 𝑠 for houses and 𝑈𝑖
2 Draw graphs representing problems of connecting (a) two houses and
′𝑠 for utilities)
4 Justify that an infinite graph with a finite number of edges must have an
infinite number of isolated vertices.
5 Show that an infinite graph with a finite number of vertices will have at
least one pair of vertices or one vertex joined by an infinite number of
parallel edges.
6 Show that the maximum degree of any vertex in a simple graph with n
vertices is n – 1.
7 Show that the maximum number of edges in a simple graph with n
vertices is n (n – l)/2.
8 What is meant by the terms sub graph and induced sub graph of a graph.
Explain in detail with a graph of order 5 and size 8.