Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Q-3: In a graph (directed or undirected) with n vertices, prove that

if there is a path from vertex u to vertex v then the path


cannot be of length greater than (n – 1)
ANS :
The path u to v, sequence of vertices are u, v1, v2, v3,…..vj….v

If there is total m vertices including u then there should be (m-1)

edges which is length of path.

For m<n, This is proved by default.

For m>n,

There is a vertex vj in the path such that it appears more

then once in the sequence (u, v1….vj, vj…..v)

Deleting the sequence of vertices that leads back to the vertex vj,

All such cycles in the path should be removed.

Since there is n node in the graph, there cannot be n distinct

node and hence n-1 edges.

Q-4 : A graph is shown in Fig.1. Edges (links) and nodes of the


graph are labeled using a unique number.

Determine the following:


(i) Four Paths from nodes 14 to 15
(ii) A Cycle passing through nodes 14 to 13
(iii) Nodes having degree more than 2

ANS :
(i) Four Paths from nodes 14 to 15

• Path (14-9-11-10-15)

• Path (14-13-11-10-15)

• Path (14-13-12-17-15)

• Path (14-8-16-12-17-15)

(ii) A Cycle passing through nodes 14 to 13

• Cycle (14-13-11-9-14)

• Cyclic (14-9-11-13-14)

• Cyclic (14-13-12-16-8-14)

• Cyclic (14-8-16-12-13-14)

(iii) Nodes having degree more than 2

• 11

• 12

• 13

• 14

Q-5: Find all circuits in the graph as shown in Fig.

ANS :
Circuit (P-B-Q)

Q-6 : Draw the undirected graph represented by adjacency


matrix A given by

ANS :
A B C D E

A 0 1 1 0 0

B 1 0 1 0 0

C 1 1 0 1 0

D 0 0 1 0 1

E 0 0 0 1 1

A E
D

C
Q-7 : For the graphs A and B as shown in Fig., calculate
different parameters as given below

(i) Alpha Index


(ii) Beta Index
(iii) Relative Cost
(iv) Diameter
(v) Shimble Index

ANS :
u
Graph Vortex (v) Edges (e) Alpha Beta
= e-v+1

A 5 7 3 0.6 1.4

B 5 7 3 0.33 1.4

Alpha Index
For planner = u /(2v − 5)

For non planner = (e − v)/(v(v − 1)/2 − (v − 1))

Beta Index = e/v

Diameter : Length of shortest path between the most Distanced nodes.

= 2 (e=1 consider)

Relative Cost

25 10
10 10

15

10 10
10 15
10

10
10 20
25

Cost (wt) Cost(Links) Total Cost

Graph A 85 7 595

MST 40 4 160

GT 150 10 1500

Relative Cost 0.325


10 10
10
15

15 15
10 10
15 15
10

10

Cost (wt) Cost(Links) Total Cost

Graph A
B 85 7 595

MST 40 4 160

GT 125 10 1250

Relative Cost 0.399

Shimble Index : A measure of accessibility representing the sum of the

all shortest paths connecting all other nodes in graph.

(e=1 consider)

Graph A (a-b-c-d-e-a) = 5e = 5

Graph B (a-b-c-d-e-a) = 5e = 5

Q-8 : How many vertices do the following graphs have if


they contain
(i) 16 edges and all vertices of degree 2
(ii) 21 edges, 3 vertices of degree 4 and others each of degree 3.

ANS :
(i) 16 edges and all vertices of degree 2

e = 16

d = 2

v = ?


d . v = 2e

2 × v = 2 × 16

v = 16
(ii) 21 edges, 3 vertices of degree 4 and others each of degree 3

3×4 + (v - 3)×3= 2×21

v = 13

Q-9 : Write down the number of vertices, the number of edges,


and the degree of each vertex, in
(i) the graph in Fig. 2 (a)
(ii) the tree in Fig. 2 (b).

Degree Of Degree of
Graph a Vertex Graph b Vertex
Vertex Vertex

P 3 P 3

Q 4 Q 4
Vertex = 5
Vertex = 5

R 2 R 2
Edges = 8 Edges = 8
S 4 S 4

T 3 T 3

You might also like