Gujarat Technological University
Gujarat Technological University
___________
MARKS
Q.3 (a) Explain the Strassen’s matrix multiplication algorithm. Obtain its time 03
complexity.
(b) Find multiplication (A x B) of A = 2341 and B = 6780 using divide and 04
conquer methodology.
(c) Explain the concept of greedy technique for Prim’s algorithm. Also obtain 07
the Minimum Spanning Tree from the following graph.
OR
Q.3 (a) Arrange following growth rates in increasing order. 03
O(n1/4), O(n1.5), O(n3 log n), O(n1.02), Ω(n6 ), Ω(n!), O(√n), O(n6/2), Ω(2n )
1
(b) Demonstrate Binary Search method to search Key = 14, form the array A= 04
{1,3,5,7,8,14,15,20}
(c) What are the Huffman trees? Construct the Huffman code for the 07
following data:
Character A B C D E F
Frequency 0.5 0.35 0.2 0.1 0.4 0.6
(c) Using Dynamic programming solve the below instance of the knapsack 07
problem with the knapsack capacity W=5
Item I1 I2 I3 I4
Weight 2 1 3 2
Value 12 10 20 15
OR
Q.4 (a) Explain string matching using finite automata with suitable example. 03
(b) Using Floyd Warshall’s algorithm find the shortest path distance between 04
every pair of vertices from the following graph.
Q.5 (a) Differentiate between depth first search and breadth first search. 03
(b) Explain use of branch and bound technique for solving assignment 04
problem.
(c) Apply backtracking to the problem of finding Hamilton circuit in the 07
graph shown below.
OR
2
Q.5 (a) Draw the state space tree Diagram to generate the solutions to 03
4-Queen problem.
(b) Explain polynomial-time reduction algorithm. 04
(c) Demonstrate Topological sort for the following graph. 07
*************