Skip to content
SmartFigureEduExam kits ₹19

AD3351 · 4 papers compared

AD 3351 Design and Analysis of Algorithms important questions

AD3351 exam kitRepeated questions + all papers, 1 PDF

Exam kit

Needed by the payment gateway. Not shared or used for marketing.

Secure payment by Cashfree Payments (UPI, cards, net banking). One-time payment, no subscription. The payment page may show StrangerYaar, the business that processes payments for SmartFigure.Terms · Refunds

ANNA UNIVERSITY · REGULATION 2021

Important Questions

AD 3351 — DESIGN AND ANALYSIS OF ALGORITHMS

Third Semester · Artificial Intelligence and Data Science

Prepared from 4 previous year question papers (Apr/May 2024, Nov/Dec 2023, Apr/May 2023, Nov/Dec 2022). Every question was compared with the others of its unit; the ones asked more than once come first. "Most asked topics" shows in how many different exams a syllabus topic had a question.

UNIT 1Introduction

Most asked topics: Empirical analysis (2/4)

Part A · 2 marks

  1. 1.
    What is empirical analysis? How it is done?

    Asked 2 times: Apr/May 2024, Nov/Dec 2022

    (2)
  2. 2.
    Define algorithm.

    Asked 2 times: Nov/Dec 2023, Apr/May 2023

    (2)
  3. 3.
    What is abstraction? Why do we need Abstract Data Type?

    Asked in Apr/May 2024

    (2)
  4. 4.
    Distinguish sequential and parallel algorithms.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    Compare between Worst-Case, Best-Case, and Average-Case Efficiencies of an algorithm.

    Asked in Apr/May 2023

    (2)
  6. 6.
    For the algorithm to compute then! indicate (a) the natural size metric for its inputs and (b) its basic operation.

    Asked in Nov/Dec 2022

    (2)

Part B · 13 marks

  1. 1.
    (i) Spotify, a digital music service platform employs algorithms to present you with music choices that will peak your interest and keep you on the platform. The general rule of thumb for determining if you like a song or not all depends on the first 30 seconds. If a user skips an unsaved song before the 30-second mark, Spotify counts that as a thumbs down. Identify the Finiteness, Definiteness, Generality and Effectiveness characteristics of an algorithm for this scenario. …

    Asked in Apr/May 2024

    (13)
  2. 2.
    (i) Exemplify in detail about asymptotic notations and basic efficiency classes of algorithm. (ii) Design a recursive algorithm for computing 2^n for any nonnegative integer n that is based on the formula 2^n = 2^(n-1) + 2^(n-1). Set up a recurrence relation for the number of additions made by the algorithm and solve it.

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) Write the pseudocode for Euclid's algorithm. (ii) Describe graph problems and combinatorial problems in detail.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) Indicate the steps for analyzing the efficiency of the algorithm with examples. (ii) Infer how asymptotic notations are used to express the complexity of an algorithm.

    Asked in Nov/Dec 2023

    (13)

UNIT 2Brute Force and Divide and Conquer

Most asked topics: Brute Force (3/4) · String Matching (3/4) · Exhaustive Search (3/4) · Heaps and Heap Sort (2/4) · Traveling Salesman Problem (1/4) · Assignment problem (1/4)

Part A · 2 marks

  1. 1.
    Write an algorithmic steps for string-matching problem using brute-force technique.

    Asked 2 times: Apr/May 2024, Apr/May 2023

    (2)
  2. 2.
    For a digraph with n vertices, what is the largest number of distinct solutions, the topological sorting problem can have?

    Asked in Apr/May 2024

    (2)
  3. 3.
    What is brute force approach?

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    List the major variations of decrease-and-conquer technique.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    How different is the traveling salesman problem from the problem of finding a Hamiltonian circuit?

    Asked in Apr/May 2023

    (2)
  6. 6.
    What is the asymptotic best-case and worst-case running time of selection sort?

    Asked in Nov/Dec 2022

    (2)

Part B · 13 marks

  1. 1.
    (i) Consider the problem of finding the distance between the two closest numbers in an array of n numbers. (The distance between two numbers x and y is computed as |x-y|). Design a presorting-based algorithm for solving this problem and determine its efficiency class. (ii) Outline an exhaustive-search algorithm for the Hamiltonian circuit problem.

    Asked in Apr/May 2024

    (13)
  2. 2.
    (i) Illustrate in detail about heap Construction and heap sort algorithm. (ii) Construct and demonstrate the divide-and-conquer closest-pair algorithm.

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) Reproduce an algorithm to implement brute-force string matching problem with an example and specify its worst case, average-case complexity. (ii) Describe Traveling sales person problem using exhaustive search technique and find the optimal tour for the following graph. [Figure: undirected graph with vertices a, b, c, d and edges a-b = 2, a-c = 5, a-d = 7, b-c = 8, b-d = 3, c-d = 1]

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) State the strategy of divide and conquer technique to compute the product of two n * n matrices using Strassen's method. (ii) Draw step by step successive key insertions for the list 2, 9, 7, 6, 5, 8 by bottom-up heap. Construct an algorithm for the same and specify its complexity.

    Asked in Nov/Dec 2023

    (13)

UNIT 3Dynamic Programming and Greedy Technique

Most asked topics: Dynamic programming (4/4) · Principle of optimality (3/4) · Dijkstra's algorithm (3/4) · 0/1 Knapsack problem (3/4) · Coin changing problem (1/4) · Knapsack Problem and Memory functions (1/4)

Part A · 2 marks

  1. 1.
    State the principle of optimality of dynamic programming.

    Asked 2 times: Apr/May 2024, Apr/May 2023

    (2)
  2. 2.
    Why the time efficiency class of Warshall's algorithm is inferior to that of the traversal-based algorithm for sparse graphs represented by their adjacency lists?

    Asked in Apr/May 2024

    (2)
  3. 3.
    Define principle of optimality.

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    Write the pseudo code of Floyd's algorithm.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    What is Dijkstra algorithm used for?

    Asked in Apr/May 2023

    (2)
  6. 6.
    What is the principal difference between dynamic programming and divide - and - conquer techniques?

    Asked in Nov/Dec 2022

    (2)

Part B · 13 marks

  1. 1.
    (i) Write a pseudo code of the bottom-up-dynamic programming algorithm for the knapsack problem. (ii) Illustrate in detail about Huffman trees and codes.

    Asked 2 times: Apr/May 2024, Apr/May 2023

    (13)
  2. 2.
    (i) Outline the Dijkstra's algorithm for solving single-source shortest-path problem for directed weight graphs. (ii) Write down the binary search algorithm and trace it with a key value of k=57 in the data set L={5,23,28,31,35,38,42,44,49,53,55,57,61,65,77,88,90,97,99}.

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) Discuss how coin changing problem can be solved by dynamic programming with an example. (ii) Indicate the algorithm to find the optimal feasible subset of first i entries by memory function for the knapsack problem.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) Write Dijkstra's algorithm to find the shortest path for the following graph using greedy technique. [Figure: directed graph with vertices 1 to 6 and edges 1->2 = 50, 1->3 = 45, 1->4 = 10, 2->3 = 10, 2->4 = 15, 3->5 = 30, 4->1 = 20, 4->5 = 15, 5->2 = 20, 5->3 = 35, 6->5 = 3] (ii) Explain how Huffman trees are constructed for assigning shorter bit strings to high-frequency symbols and longer ones to low-frequency symbols.

    Asked in Nov/Dec 2023

    (13)

UNIT 4Iterative Improvement

Most asked topics: The Simplex Method (4/4) · The Maximum-Flow Problem (2/4) · Maximum Matching in Bipartite Graphs (2/4) · The Stable marriage Problem (2/4)

Part A · 2 marks

  1. 1.
    Why do we need slack and surplus variables in the LPP for solving using simplex method?

    Asked in Apr/May 2024

    (2)
  2. 2.
    State the mathematical formulation of maximum flow problem.

    Asked in Apr/May 2024

    (2)
  3. 3.
    List the requirements of standard form.

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    Infer when a pair (m, w) is said to be a blocking pair.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    Construct a feasible solution space of below LPP Maximize 3x + 5y Subject to x + y <= 4, x + 3y <= 6, x >= 0, y >= 0

    Asked in Apr/May 2023

    (2)
  6. 6.
    How can you solve a maximum flow problem of a flow network with multiple sources and or multiple sinks?

    Asked in Apr/May 2023

    (2)

Part B · 13 marks

  1. 1.
    (i) Design a simple algorithm for checking whether a given marriage matching is stable and determine its time efficiency class. (ii) Explain how the maximum-flow problem for a network with several sources and sinks can be transformed into the same problem for a network with a single source and a single sink.

    Asked in Apr/May 2024

    (13)
  2. 2.
    (i) Prove that a matching M is a maximum matching if and only if there exists no augmenting path with respect to M. (ii) Solve the following linear programming problem geometrically (Graphically) Maximize x+2y Subject to 4x >= y, y <= 3+x, x >= 0, y >= 0

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) List the steps of the simplex method. (ii) State the shortest-augmenting-path algorithm to find a maximum flow and a minimum cut in the networks.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) Outline the pseudo code for Maximum Matching Bipartite graph. (ii) Describe how you will find a stable marriage matching for men's and women's preferences.

    Asked in Nov/Dec 2023

    (13)

UNIT 5Limitations of Algorithm Power

Most asked topics: Branch and Bound (4/4) · P, NP, NP-Complete and NP Hard Problems (3/4) · Knapsack Problem (3/4) · Knapsack problem (3/4) · N-Queen problem (2/4) · Traveling Salesman Problem (1/4)

Part A · 2 marks

  1. 1.
    How does a branch and bound algorithm work?

    Asked 2 times: Apr/May 2024, Apr/May 2023

    (2)
  2. 2.
    What do you mean by polynomial time approximation algorithm?

    Asked in Apr/May 2024

    (2)
  3. 3.
    Write about information-theoretic lower bound.

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    State Heuristic with an example.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    What is meant by N-Queen problem?

    Asked in Apr/May 2023

    (2)
  6. 6.
    What are tractable and intractable problems?

    Asked in Nov/Dec 2022

    (2)

Part B · 13 marks

  1. 1.
    Solve the following instance of the Knapsack problem by the branch-and bound algorithm [Table: Item / Weight / Value: 1: 10, $100; 2: 7, $63; 3: 8, $56; 4: 4, $12; W = 16]

    Asked 2 times: Apr/May 2024, Nov/Dec 2022

    (13)
  2. 2.
    Compare and contrast between P, NP, NP-complete and NP hard problems with examples.

    Asked 2 times: Apr/May 2024, Apr/May 2023

    (13)
  3. 3.
    (i) Summerize P, NP and NP-Complete problems. (ii) Discuss how N-Queen's problem can be solved by back tracking technique.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) Describe Traveling sales person problem using Branch and Bound technique with an example. (ii) Infer the steps of greedy algorithm for discrete and continuous knapsack problem with an example.

    Asked in Nov/Dec 2023

    (13)

PART CAny unit

Part C · 15 marks

  1. 1.
    Let A={a1,...,an} and B={b1,....,bm} be two sets of numbers. Consider the problem of finding their intersection, i.e., the set C of all the numbers that are in both A and B. (i) Design a brute-force algorithm for solving this problem and determine its efficiency class (ii) Design a presorting-based algorithm for solving this problem and determine its efficiency class. (iii) Compare the efficiency of both the algorithms.

    Asked in Apr/May 2024

    (15)
  2. 2.
    Solve the all-pairs shortest-path problem for the digraph with the following weight matrix : [Matrix rows: 0 2 inf 1 8; 6 0 3 2 inf; inf inf 0 4 inf; inf inf 2 0 3; 3 inf inf inf 0]

    Asked in Apr/May 2024

    (15)
  3. 3.
    (i) Devise an algorithm for the multistage graph problem using dynamic programming design technique. (ii) Compute the minimum cost and path from s to t for the following multistage graph. [Figure: five-stage graph, K = 1: vertex 1 (S); K = 2: vertices 2, 3; K = 3: vertices 4, 5, 6; K = 4: vertices 7, 8; K = 5: vertex 9 (T). Edges: 1-2 = 5, 1-3 = 2, 2-4 = 3, 2-6 = 3, 3-4 = 6, 3-5 = 5, 3-6 = 8, 4-7 = 1, 4-8 = 4, 5-7 = 6, 5-8 = 2, 6-7 = 6, 6-8 = 2, 7-9 = 7, 8-9 = 3]

    Asked in Nov/Dec 2023

    (15)
  4. 4.
    (i) Justify how backtracking technique is used to solve sum of subsets problem with its pseudo code and complexity. (ii) Construct all possible subsets of weights that sum to M for the given instance n = 6. M = 30 and Weights (1:6) = (5, 10, 12, 13, 15, 18).

    Asked in Nov/Dec 2023

    (15)
  5. 5.
    Apply the DFS-based algorithm to solve the topological sorting problem for the following digraphs: (i) [Figure: digraph with vertices a to g and edges a->b, a->c, b->e, b->g, c->f, d->a, d->b, d->c, d->f, d->g, g->e, g->f] (ii) [Figure: digraph with vertices a to g and edges a->b, b->c, c->d, d->g, e->a, f->b, f->c, f->e, f->g, g->e]

    Asked in Apr/May 2023

    (15)
  6. 6.
    Find a stable marriage matching for the instance defined by the following ranking matrix: [Table: columns A, B, C, D; alpha: 1,3 2,3 3,2 4,3; beta: 1,4 4,1 3,4 2,2; gamma: 2,2 1,4 3,3 4,1; delta: 4,1 2,2 3,1 1,4]

    Asked in Apr/May 2023

    (15)

A question asked once is no guarantee for the next exam; cover the full AD3351 syllabus. Read the papers themselves:Apr/May 2024, Nov/Dec 2023, Apr/May 2023, Nov/Dec 2022.