JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B. Tech III Year DESIGN AND ANALYSIS OF ALGORITHMS Previous Question Paper (March - 2024 - R16)

B. Tech | III Year | I Semester | R16 | March - 2024

Answer PaperPaper Code: 135AFMaximum Marks: 75Time: 3 Hours

Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory (25 marks). iii) In Part B, Answer any one question from each unit (10 marks each).

Part A

1a

What is time complexity?

2 marks

Answer

Time complexity is a computational concept that quantifies the amount of time an algorithm takes to complete as a function of the length of the input. It provides a theoretical estimate of the growth rate of an algorithm's execution time rather than measuring the exact clock time, which depends on hardware and implementation details.

It is typically expressed using Asymptotic Notation, such as Big O notation, which describes the upper bound of the algorithm's running time. For an input size denoted by n, the time complexity represents the number of elementary operations performed by the algorithm.

T(n) = O(f(n))

This measure is crucial for evaluating the efficiency and scalability of an algorithm, allowing developers to predict how performance will degrade as the input size increases.

1b

What are randomized algorithms?

3 marks

Answer

A randomized algorithm is an algorithm that employs a degree of randomness as part of its logic. Unlike deterministic algorithms, which always produce the same output for a given input and follow a fixed sequence of operations, a randomized algorithm makes decisions based on random numbers generated during its execution.

Key characteristics and classifications include:

  • Non-deterministic behavior: The running time or the output of the algorithm depends on the random choices made, meaning the performance can vary across different runs for the same input.
  • Las Vegas Algorithms: These algorithms always produce the correct result, but their running time is a random variable. A classic example is Randomized QuickSort, where the pivot is chosen randomly to ensure an expected time complexity of
    O(n log n)
    regardless of the input distribution.
  • Monte Carlo Algorithms: These algorithms have a deterministic running time, but there is a non-zero probability that the output may be incorrect. The probability of error can often be reduced to an arbitrarily small value by repeating the algorithm multiple times.

Randomized algorithms are frequently used to simplify complex problems, improve average-case performance, or break symmetry in distributed systems where deterministic approaches might suffer from worst-case scenarios.

1c

What are biconnected components?

2 marks

Answer

Sign in to view the complete answer paper.

1d

Write down the algorithm for union().

3 marks

Answer

Sign in to view the complete answer paper.

1e

Distinguish between backtracking and greedy approach.

2 marks

Answer

Sign in to view the complete answer paper.

1f

What are the applications of single source shortest path?

3 marks

Answer

Sign in to view the complete answer paper.

1g

What is chained matrix multiplication?

2 marks

Answer

Sign in to view the complete answer paper.

1h

What is time and space complexity of all pairs shortest path using dynamic programming approach?

3 marks

Answer

Sign in to view the complete answer paper.

1i

What is NP hard problem?

2 marks

Answer

Sign in to view the complete answer paper.

1j

What is meant by state space tree?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

2

What is the basic idea of Quick sort algorithm? Write an algorithm for quick sort and derive its time complexity. Also perform quicksort on the following data: 3,2,8,9,11,42,27,5,7

10 marks

Answer

Sign in to view the complete answer paper.

OR
3

Explain strassen’s matrix multiplication? Show how time complexity of this algorithm is reduced through divide and conquer method.

10 marks

Answer

Sign in to view the complete answer paper.

4

Write an algorithm and explain how to find Hamiltonian cycles through backtracking approach.

10 marks

Answer

Sign in to view the complete answer paper.

OR
5

What is n-queens problem? Write an algorithm and find the solution to it using backtracking approach.

10 marks

Answer

Sign in to view the complete answer paper.

6

What is minimum cost spanning tree? Explain prim’s and krushkal’s algorithm to find minimum cost spanning tree with an illustrative example.

10 marks

Answer

Sign in to view the complete answer paper.

OR
7

State and explain knapsack problem. Give solution to it using greedy approach.

10 marks

Answer

Sign in to view the complete answer paper.

8

What are optimal binary search trees? Write down algorithm for it and derive its time complexity.

10 marks

Answer

Sign in to view the complete answer paper.

OR
9

Define travelling salesperson problem. Give solution to it using backtracking approach. Write down algorithm for it and illustrate with an example.

10 marks

Answer

Sign in to view the complete answer paper.

10

Give FIFO Branch and Bound solution to 0/1 Knapsack problem.

10 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

State and explain cook’s theorem.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain about NP complete problems.

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 CE(SE) III Year I Semester, March - 2024, R16.

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...