You are on page 1of 4

UNIT -3 Trees and algorithms

----------------------------------------------Trees---------------------------------------------------------

1. Prove that a Tree with ‘n’ vertices has ‘n-1’ edges


2. In any Tree T=(V,E), prove that there are at least two pendent vertices
3. How many different spanning trees can be constructed with 4 vertices?
4. Find the spanning trees of the graph

5. Find the spanning trees of the graph

6. Find all the non isomorphic spanning trees of the graph G

7. Find the spanning trees of the graph shown below. And also find all the non-isomorphic
spanning tees.

8. Define a spanning tree and find the spanning trees of the graph

b c d
9. Show that in a tree, if the degree of non-pendent vertices is 3, then the number of vertices in
the tree is even.
10. A tree has N1 vertices of degree 1, N2 vertices of degree2, N3 vertices of degree 3 and so on
Nk vertices of degree k, prove that N1 = 2 + N3 + 2N4 + 3N5 + …… + (k – 2)Nk.

1
--------------------Distance , center , Radius and Nullity----------------------------------------
11. Define the following: Distance, Center, Radius and Nullity.
12. What is meant by Rank and nullity of the graph.

(i)What is the Rank and Nullity of the complete graph on ‘n’ vertices

(ii) What is the Rank and Nullity of K4,5

(iii) What is the Rank and nullity of Kurtowski’s1st and 2nd Graphs, Peterson Graph

13. Prove that every tree has either one or two centres.
14. Prove that a graph G=(V,E) is connected iff G has a spanning tree.

15. With respect to any of its spanning trees, a connected graph of n vertices and m edges
Has n-1 branches and m - n +1 chords.
16. Define the following:
(i) Rooted Tree
(ii) Internal vertices
(iii) m –ary tree:
(iv) Binary Tree
(v) Complete Binary Tree:
(vi) Balanced Tree
(vii) Full Balanced Tree
17. Define minimally connected tree.Prove that a graph is minimally connected iff it is a Tree.
18. What is the difference between minimally connected and maximal connected graphs.
19. Explain the structure of a Rooted Tree and a Binary Tree.
Sketch a 13- vertex, 4-level Binary Tree
20. What is meant by m-ary tree and a complete m-ary tree?
21. Let 𝑇 be a complete 𝑚 − 𝑎𝑟𝑦 tree of order 𝑛 with 𝑝 leaves and 𝑞 internal vertices. Prove the
𝑚𝑝−1
following : (i) 𝑛 = 𝑚𝑞 + 1 = , (𝑖𝑖)𝑝 = (𝑚 − 1)𝑞 + 1.
𝑚−1
22. A complete 5-ary tree with 817 leaves have how many internal vertices?
23. If a tree has 4 vertices of degree 2, one vertex of degree 3,
two of degree 4 and one of degree 5, how many pendant vertices does it have?
24. A class room contains 25 micro computers, that must be connected to a wall socket
that has 4 outlets. Connections are made by using extension cards,
that have 4 outlets each. What is the least number cords needed to get
those computers setup for class use?
25. If a tree T has 2 vertices of degree 2, 4 vertices of degree 3 and 3 vertices of degree 4.
Find the number of pendent vertices in T.

2
-------------------------------------------Merge sorting--------------------------------------------

16. Using the merge sort method, sort the list 7,3,8,4,5,10,6,2,9.
17. Construct optimal prefix code for the symbols 𝑎, 𝑜, 𝑞, 𝑢, 𝑦, 𝑧 that occur with frequencies
20,28,4,17,12,7, respectively.
18. Using the merge sorting method sort the following list -1, 0, 2, -2, 3, 6, -3, 5, 1, 4.
------------------------------------------------Prefix codes---------------------------------------------
15. Obtain the Optimal Prefix code for the following message s

(i)“HEALTH IS WEALTH” (ii) “ALL IS WELL” (iii) FALL OF THE WALL

(iv) SHE SELLS SEA SHELLS (v) OLD GOLD WAS SOLDvi) ROAD IS GOOD.

using labeled binary tree and hence encode the message.

19. Construct an optimal prefix code for the symbols a,b,c,d,e,f,g,h,i,j

that occur with respective frequencies 78,16,40,35,125,36,28,52,83,4.

---------------------------------------------DFS and BFS--------------------------------------------------


20. Find the DFS and BFS spanning tree for the graph shown below if the order of the vertices is

given as i)a,b,c,d,e,f,g,h

21. Find the BFS and DFS spanning tree for the following graph where the vertices

are in order a,b,c,d,e,f,g

-------------------------------------------------Matrix representation of a graphs-----------------------

22. Define the following: Adjacency Matrix, Incidence Matrix, Circuit matrix , Fundamental
circuit matrix, cut set matrix, and the path matrix.
23. Findp-t path matrix and the cut set matrix of the following graph

3
24. What is a prefix code. For the prefix code P = {111, 0, 1100, 1101, 10} draw the labeled full

binary tree of height 4.

25. Prove that if A(G) is an incidence matrix of a connected graph G with n vertices, the rank of
A(G) is n-1.
26. Let A and B be the incidence matrix and circuit matrix respectively then prove that
𝐴. 𝐵 𝑇 = 𝐵. 𝐴𝑇
27. Prove that if B is a circuit matrix of a connected graph G with e edges and n vertices, then
rank of B=e – n+1.
28. The number of different spanning trees in a complete graph is given by the formula nn-2.
Hence find the no.of spanning trees in K4, K5, K7
29. Show that a Hamilton path is a spanning tree
30. Show that a tree is a planar graph.
Assignment Questions
1. Show that a tree with exactly 2 leaves must be a path
2. If a tree has 4 vertices of degree 3, two vertices of degree 4 and one vertex of degree 5,
find the number of pendent vertices.
3. In a tree with x+y vertices, if ‘x’ vertices are pendent vertices and ‘y’ vertices have
degree 4 each, prove that 2y=x-2
4. Prove that every tree with 2 or more vertices is 2- chromatic
5. If F1 =(V1,E1) be a forest of 9 trees, where E1 = 46, then find V1
6. If F2= (V2,E2) be a forest with V2 =77 and E2 = 42, find the number of trees in the
forest F2
7. A complete Binary tree has 30 leaves, what is the order of the tree?
8. A complete 4-ary tree has 54 internal vertices . How many leaves does the tree has?
9. Prove that a graph is connected iff it has a spanning tree.
10. Obtain the Optimal prefix code of the message “MISSION SUCCESSFUL”

You might also like