JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II DESIGN AND ANALYSIS OF ALGORITHMS Previous Question Paper (April - 2018 - R13)

B.Tech | II | II | R13 | April - 2018

Answer PaperPaper Code: 114CTMaximum Marks: 75Time: 3 Hours

Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.

Part A

125 marks
a

Write the algorithm for recursive permutation generator.

2 marks

Answer

To generate permutations of a list A[k...n]:

Algorithm Permute(A, k, n)
if k == n then
    print A
else
    for i = k to n do
        swap(A[k], A[i])
        Permute(A, k + 1, n)
        swap(A[k], A[i])
b

Explain the usefulness of the UNION operation on sets.

3 marks

Answer

The UNION operation is fundamental in Disjoint Set Union (DSU) data structures. It is used to merge two disjoint sets into a single set. Its primary usefulness lies in efficiently tracking connected components in graphs (e.g., Kruskal's algorithm for Minimum Spanning Trees) and managing equivalence relations, where it helps determine if two elements belong to the same partition.

c

Write the control abstraction for greedy method.

2 marks

Answer

Sign in to view the complete answer paper.

d

Discuss Knapsack problem.

3 marks

Answer

Sign in to view the complete answer paper.

e

List out the advantages of dynamic programming.

2 marks

Answer

Sign in to view the complete answer paper.

f

State the principle of optimality.

3 marks

Answer

Sign in to view the complete answer paper.

g

List the applications of Backtracking.

2 marks

Answer

Sign in to view the complete answer paper.

h

Give the solution for the 8 queens problem.

3 marks

Answer

Sign in to view the complete answer paper.

i

Define class P.

2 marks

Answer

Sign in to view the complete answer paper.

j

What are non-deterministic algorithms?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Develop the algorithm for Find using collapsing rule with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Draw the tree of calls of merge sort for the following set (35, 25, 15, 10, 45, 75, 85, 65, 55, 5, 20, 18).

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Explain about Amortized Analysis.

5 marks

Answer

Sign in to view the complete answer paper.

b

Analyze the time complexity of quick sort for best, average and worst cases.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Demonstrate the kruskal’s algorithm to find the minimum spanning tree by taking an illustrative graph.

5 marks

Answer

Sign in to view the complete answer paper.

b

Consider the following instance of Knapsack problem N=3, M=20, (p1,p2,p3)=(25,24,15), (w1,w2,w3)=(18,15,10). Calculate Maximum profit, Minimum weight and Maximum profit per unit weight.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Explain job sequencing with deadlines with a suitable example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Illustrate single source shortest path problem with a suitable example.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Write an algorithm for 0/1 Knapsack Problem using Dynamic Programming.

5 marks

Answer

Sign in to view the complete answer paper.

b

Use function OBST to compute w(i,j), r(i,j) and c(i,j), 0<=I<j<=4, for the identifier set (a1, a2, a3, a4)=(count, float, if, while) with p(1)=1/20, p(2)=1/5, p(3)=1/10,p(4)=1/20, q(0)=1/5, q(1)=1/10, q(2)=1/5, q(3)=1/20, and q(4)=1/20. Using the r(i,j)’s, construct the Optimal Binary Search Tree.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Consider three stages of a system with r1=0.3, r2=0.5, r3=0.2 and c1=30, c2=20, c3=30. Where the total cost of the system is C=80 and u1=2, u2=3, u3=2 find the reliability design.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain and write the algorithm for travelling salesman problem.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Describe the backtracking technique to m-coloring graph. Explain with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the general method of Branch and Bound.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Briefly explain sum of subsets problem using backtracking. Explain its applications.

5 marks

Answer

Sign in to view the complete answer paper.

b

Solve 0/1 knapsack problem using Branch and Bound.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Briefly explain Cooks-theorem.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain the NP, NP-Hard and NP- complete classes with suitable examples.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

How are P and NP problems related? Give the relation between NP-hard and NP problems.

5 marks

Answer

Sign in to view the complete answer paper.

b

Compare and contrast deterministic and nondeterministic algorithms.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of DESIGN AND ANALYSIS OF ALGORITHMS from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE II II, April - 2018, R13.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in DESIGN AND ANALYSIS OF ALGORITHMS

Loading Question Papers

Fetching data from database...