Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech III ALGORITHM DESIGN AND ANALYSIS Previous Question Paper (February/March - 2022 - R18)

B.Tech | III | II | R18 | February/March - 2022

Answer PaperPaper Code: 156ADMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

What are the features of an efficient algorithm? Explain with an example.

9 marks

Answer

An efficient algorithm is characterized by its ability to solve a problem using minimal computational resources, specifically time and space. The key features include:

  • Input/Output: It must have zero or more inputs and produce at least one output.
  • Definiteness: Each step must be clear, unambiguous, and precise.
  • Finiteness: The algorithm must terminate after a finite number of steps for any valid input.
  • Effectiveness: Every instruction must be basic enough to be carried out exactly and in a finite amount of time.
  • Generality: It should be applicable to a range of inputs rather than a single specific case.

For example, consider the Binary Search algorithm. Compared to a linear search, it is highly efficient for sorted arrays because it reduces the search space by half in each step, resulting in a time complexity of O(log n). This demonstrates efficiency by minimizing the number of comparisons required to locate an element.

b

Write control Abstraction algorithm of Divide – and Conquer.

6 marks

Answer

The control abstraction for the Divide and Conquer strategy represents the general structure of the algorithm, where a problem is split into subproblems, solved recursively, and then combined.

Algorithm DAndC(P) { 
  if (Small(P)) return S(P); 
  else { 
    Divide P into smaller instances P1, P2, ..., Pk; 
    Apply DAndC to each subproblem; 
    return Combine(DAndC(P1), DAndC(P2), ..., DAndC(Pk)); 
  } 
}

In this abstraction, Small(P) checks if the problem size is small enough to be solved directly, S(P) provides the direct solution, and Combine merges the results of the recursive calls.

215 marks
a

Give the Big – O notation definition and briefly discuss with suitable example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain recursive functions algorithm analysis with an example.

5 marks

Answer

Sign in to view the complete answer paper.

c

What is stable sorting method? Is Merge sort a stable sorting method?

5 marks

Answer

Sign in to view the complete answer paper.

3

Explain the Graph – coloring problem. And draw the state space tree for m= 3 colors n=4 vertices graph. Discuss the time and space complexity.

15 marks

Answer

Sign in to view the complete answer paper.

4

Write the backtracking algorithm for the sum of subsets problem using the state space tree corresponding to m=35, w = (20,18,15,12,10,7,5). Also draw the state space tree.

15 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Explain the Optimal Binary Search Tree with an example.

8 marks

Answer

Sign in to view the complete answer paper.

b

Find the shortest path of the following by using all pairs shortest path.

7 marks

Answer

Sign in to view the complete answer paper.

6

Design a 3 stage system with device types D1, D2, D3. The costs are Rs 30, 15, 20 respectively. The cost of system is to be no more the Rs 105. The reliability of each device type is 0.9, 0.8 and 0.5 respectively.

15 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Find optimal solution to the knapsack problem instance n=6, m=15, (p1…p6) = (10,5,15,7,6,18), (w1…w6) = (2,3,5,7,1,4).

8 marks

Answer

Sign in to view the complete answer paper.

b

Write a greedy algorithm for sequencing unit time jobs with deadlines and profits.

7 marks

Answer

Sign in to view the complete answer paper.

8

Draw the portion of state space tree generated by LCBB for the 0/1 Knapsack instance: n = 5, (p1,p2,…,p5) = (10,15,6,8,4), (w1,w2,..,w5) = (4,6,3,4,2) and m=12. Find an optimal solution using fixed – tuple sized approach.

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of ALGORITHM DESIGN AND ANALYSIS from Jawaharlal Nehru Technological University Hyderabad for B.Tech IT III II, February/March - 2022, R18.

For the question paper without answers, switch to the Question Paper tab.

Other papers in ALGORITHM DESIGN AND ANALYSIS

Loading Question Papers

Fetching data from database...