Module 6 Tutorial
Module 6 Tutorial
3
Course Code : BMAT205L
Course Title : Discrete Mathematics and Graph Theory
Easy:
1. a) A tree has 8 vertices, and their degrees are 1, 1, 1, 2, 2, 2, 3, 4. Find the number of edges
in the tree.
b) A graph has 12 vertices and 15 edges. How many edges should be removed to form a
spanning tree?
c) Consider a full binary tree where every non-leaf vertex has degree 3, and there are n leaves.
Find the total number of vertices and edges in the tree.
2. a) How many leaves and internal vertices does a full binary tree with 25 total vertices have?
b) A full binary tree has a height of 4. How many nodes does this tree have?
3. A tree T has 2n vertices of degree 1, 3n vertices of degree 2 and n vertices of degree 3. find the
number of vertices and edge in T.
4. In a graph G, consider the spanning tree with edge set E (T) = { e 1 , e 3 , e 4 , e 8 , e 9 }. Find the funda-
mental cut set of the spanning tree.
5. List cut vertex set and cut edge set for the above graph.
Moderate:
1. Find the diameter, radius, center and eccentricity of each vertex of the following graph
2. For the given graph G , determine two distinct minimum-weight spanning trees using Kruskal’s
algorithm. Also, what is the weight of such a tree?. Determine a minimum-weight s-t path using
Dijkstra’s algorithm.
4. Find (i) Eccentricities of all the vertices and (ii) Center of the following tree.
Page 2
5. Find the minimum spanning trees of the weighted graphs given in figure using Prim’s algorithm.
Hard:
1. A utility company needs to lay down electrical cables to connect five different towns: Town A,
Town B, Town C, Town D, and Town E. The company has multiple options for connecting each
pair of towns, each with different costs (in thousands of dollars). The goal is to connect all towns
using the minimum total cost, ensuring every town is connected either directly or indirectly to
all others, without any closed loops (cycles).
The costs (in thousands) for connecting the pairs of towns are as follows: A to B: 12 ; A to C: 8
;A to D: 10 ; B to C: 9 ; B to D: 6 ; B to E: 7 ; C to D: 5 ; C to E: 11 ; D to E: 4 Find the minimum
cost required to connect all the towns using the minimum spanning tree (MST) approach, and
list which connections (edges) should be used.
2. A railway company is planning to construct railway tracks to connect several cities for a new
high-speed rail network. The cities are labeled City A, City B, City C, City D, City E, and City F.
The cost of constructing the track between each pair of cities (in millions of dollars) varies due
to the terrain and construction difficulty. Here are the construction costs for each pair of cities:
A to B: 20 ; A to C: 25 ;A to D: 22 ; B to C: 18 ; B to D: 24 ; B to E: 19 ; C to D: 17 ; C to F: 28
; D to E: 21 ;D to F: 23 ;E to F: 16 However, the company has an additional condition: Due to
political agreements, City A must be connected to City F either directly or indirectly, and City
B cannot be directly connected to City F. Question: a) What is the minimum total construction
cost to connect all the cities, while ensuring City A is connected to City F (directly or indirectly),
and City B is not directly connected to City F? b) Which railway connections should be used to
form the Minimum Spanning Tree, meeting these constraints?
Solution: Apply Kruskal’s algorithm ; Minimum total cost: 112 million dollars.
3. . A university’s computer science department is building a local area network (LAN) to connect
six different labs: Lab A, Lab B, Lab C, Lab D, Lab E, and Lab F. The goal is to minimize
the total cost of the network, ensuring that all labs are connected directly or indirectly. The
network engineers have determined the cost of laying network cables between each pair of labs
(in hundreds of dollars) as follows: Lab A to Lab B: 5 ; Lab A to Lab C: 8 ; Lab A to Lab D: 7 ;
Lab B to Lab C: 10 ; Lab B to Lab E: 3 ; Lab C to Lab D: 6 ; Lab C to Lab F: 4 ; Lab D to Lab E:
12 ; Lab D to Lab F: 9 ; Lab E to Lab F: 11 However, there are some constraints: • Lab A must
be connected to Lab F to provide high-performance computing resources. • Lab B cannot be
directly connected to Lab E due to firewall restrictions. Question: 1. What is the minimum total
Page 3
cost to connect all the labs, while ensuring that Lab A is connected to Lab F, and Lab B is not
directly connected to Lab E? 2. Which cable connections should be used to form the Minimum
Spanning Tree (MST), considering these constraints?
4. A company is considering building a gas pipeline to connect 8 wells a,b,c,...,h to process a plant.
The possible pipelines that they can construct and their costs are listed below as weights of the
pipelines. Which pipelines do you suggest to build so that the total cost is minimum?
5. Determine the order in which a preorder, inorder, and postorder traversal visit the vertices of
the given ordered rooted tree
Page 4