SUBJECT QUESTION PAPER COLLECTION

IT5402 – Design and Analysis of Algorithms

Anna University

B.Tech. Information and Technology Information and Technology Regulation 2019 Semester 4
2 Question Papers
2024 Earliest Year
2024 Latest Year

📚 Previous Year Question Papers

2 question papers available. Select an examination session to view its question paper.

PDF

November / December 2024

Design and Analysis of Algorithms

PDF

April / May 2024

Design and Analysis of Algorithms

Historical Examination Intelligence

Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.

2Source papers
2Papers with questions
41Question occurrences
41Distinct question candidates
0Exact repeat candidates
100.0%Extraction coverage

Papers by examination year

20242

Question type candidates

Other Or Unclassified24
Definition7
Derivation4
Comparison3
Numerical2
Design1

Detected examination patterns

A+B2

Search historical questions

Compare the growth of functions where f(n)=logan and g(n) = logsn Zz CO4 | L3

0 eligible source papers

Prove that 1/8n? -3/2 n = @(n?) by finding positive constants for ௦1, 2 CO4 | L3 c2 and no.

0 eligible source papers

Derive the worst case analysis of Merge sort algorithm from its z 04 | L2 recurrence relation.

0 eligible source papers

Write down the Memoized Matrix chain procedure which is used to 2 02 | L2 resolve overlapping sub problems.

0 eligible source papers

Consider an activity selection problem with start time and end time 2 03 | L2 Cc as follows: Activity 12 3 45 6 7 8 StattTime 1 4 2 63 79 11 EndTime 2 7 5 9 6 10 11 14 Find out the optimal set of activities to be completed using Greedy strateav.

0 eligible source papers

Find the maximum profit using greedy strategy by finding the 2 03 | L3 subset of items to be added in the knapsack whose capacity is 150 kg. Items 1 , 2 3 4 5 Weights (in kg) 15 25 30 55 | 60 Value 30 40 100 | 78 | 90 fi Write down the Schur complement of A with respect to 811. Also 2 CO2 | L2 Prove that A = LU.

0 eligible source papers

Convert the following Linear program into a standard form: 2 006 | L3 Minimize -4x1 + 3x2 - 4x3 Subject to the constraints x1 -x2=8 2x1 +x2+x3s7 -5x1 — 2x2 + 3x3 2 -2 x1, x220

0 eligible source papers

Define the problems P, NP and NPC. 2 Cos: 12

0 eligible source papers

Write down the verification algorithm A which verifies the language 2 CO5 | L2 L belongs to NP.

0 eligible source papers

(a)(i) | Solve the following Recurrence relation using Recursion Tree 9 coi |L3 approach: 04 T(n) = 3T(n/4) + cn? (ii) | Using Masters Theorem, solve the following recurrence relation: 4 CO1 | L2 T(n) = 97 {n/4) + n? 04

0 eligible source papers

(b) (i) | Given an array of size n and a number k, find all the elements that 9 டும்‌ | Ls appear more than n/k times with a suitable algorithm. Derive the CO4 recurrence relation for the algorithm and solve the time complexity using Backward Substitution method. (ii) | Write down the Insertion Sort algorithm and determine the 4 CO1 (2 operation count of the algorithm to derive its worst case time CO4 complexity.

0 eligible source papers

(a) (i) | Write down the Quick Sort algorithm using Divide and Conquer 9 CO3 | L3 approach and derive the best case, worst case and average case analysis of the algorithm from the recurrence relation formed for the respective cases. Solve the recurrence relation using Recursion Tree method (ii) | Simulate the steps involved in editing the distance between the 4 co3 | L3 strings CLEVER to RIVER.

0 eligible source papers

(b) | Define the problem solving strategy used to determine the order for 13 CO3 | L3 multiplying a set of matrices at a lowest cost. i) Write down the steps involved in that strategy. ii) Compute and Construct the optimal solution to multiply the following set of matrices (at a minimum cost) by writing necessary algorithms: . A1 (6* 5) A2 (5* 4) A3 (4* 7). A4 (7 * 3) (Simulate the steps with the necessary tables in a detailed manner)

0 eligible source papers

(a) | Find the L, U and P values for the following set of linear equations. 13 Co2 | L3 Solve the equations to determine the values of x1, x2 and x3 after 2 decomposition. Write down the algorithms involved in LUP decomposition process. x1 +x2 -x3 = 4 X1-2x2+3x3 = -6 2x1 +3x2+x3 = 7

0 eligible source papers

(b) (i) | A text document consisting of a set of characters with its repeated Co2 | L3 occurrence is shown below. Compress the document efficiently using Huffman coding technique. Simulate the compression process step by step. A X பர B U F H 150 225 247 382 215 230 347 Write down the algorithm involved in generating Huffman code for the above text document. Represent the string பட) using generated code. (ii) | Find an optimal set cover for the below problem using greedy CO2 | L2 strategy with a suitable algorithm: $1 ={4, 5, 8, 9} cost(S1) = 10 $2 = {2, 4, 6, 8, 10} » cost(S2) = 20 S3 = {1, 2, 4, 6, 7, 9, 10, 11} cost(S3) = 15 54 = {3, 8, 10} cost(S4) = 11 $5 = {1, 6, 7, 13} cost(S5) = 14

0 eligible source papers

(a) (i) | Solve the following linear equations using Simplex method 06 | L3 Maximize 300x+350y Subject to the constraints xt+3y<=24 3xt+2y<=36 3xt4y<=44 x ,y>=0 (ii) | Write down the Pivoting and Simplex algorithms involved in CO6 | L2 solving the linear equations.

0 eligible source papers

(b) (i) | Determine whether the initial basic feasible solution is possible for 06 | L3 the following linear equations: Maximize x1 -2x2 Subject to the constraints: 2x1-3x2 <= 4 X1-3x2 <= -6 x1, x2 >=0 if basic feasible solution is available, find the appropriate objective function and slack form for the above equations. Also write down the necessary algorithm involved in this process. compete each other for similarity of characters among them. String generated by the first LLM is “GTXABAABBTX’ whereas the string generated by the second LLM is “XABBTX”. How do you compute the similarity of the strings generated by these language models? a) Write down the recurrence relation involved in it. b) Simulate the steps involved in similarity computation in a detailed manner. (ii) | Write down the steps involved in converting a primal linear problem 4 CO6 | L2 to a dual linear problem. Convert the following primal problem to dual: Maximize 6x1+x2+x3 Subject to the constraints 9x1-x2+x3 <=18 24x1+x2-4x3<=42 12x1-3x2+4x3<=96 x1, x2, x3>=0

0 eligible source papers

(a) | Write down the properties of NP Complete. Prove that satisfiability 13 CO5 | L3 of Boolean formulas in 3 Conjunctive Normal form (3-CNF) is NP Complete in a detailed manner.

0 eligible source papers

(b) (i) | What is a clique problem? How do you convert the Clique 9 CO5 | L3 optimization problem ints a decision problem? Prove that Clique belongs to NPC by reducing from the 3-CNF formula: & =C1%C24C3 where C1 = (x1 v7 x2 v 7 x3) and C2 = (“x1 v x2 v x3) and C3 = (x1 v x2 v x3) (ii) 4 CO5 |L3 CO6 Determine the Vertex Cover for the above graph using Approximation algorithm. Also write down the algorithm involved in finding the near optimal solution. டட PART- 0 (1 x 15 = 15 Marks)

0 eligible source papers

(i) | Sequence of strings generated by two Large Language models 10 002 |L3 03 c) Write down the necessary algorithm involved in this process. (ii) A farmer has 20 hectares for growing barley and rice. The farmer has to decide how much of each to grow. The cost per hectare for barley is Rs.300 and for rice is Rs.150. The farmer has budgeted Rs.980. Barley requires 1-man day per hectare and rice requires 2-man days per hectare as labor. There are 36 man-days available. The profit on barley is Rs.100 per hectare and on rice is Rs.120 per hectare. Find the number of hectares of each crop the farmer should sow to maximize the profits. Tabulate the problem and formulate an LPP to maximize the profit. (ஐ) ie) a

0 eligible source papers

Define the basic asymptotic notations. 2 C 0 1 L2

0 eligible source papers

Compare the order of growth of log2 n and logen. 2 . C 0 1 L3

0 eligible source papers

Differentiate Divide and Conquer Strategy with Dynamic 2 C 0 2 L4 Programming.

0 eligible source papers

Define the optimal substructure property of an LCS. 2 C 0 2 L2

0 eligible source papers

Define the elements of greedy strategy. 2 COS L2

0 eligible source papers

Consider a system Ax = b where A can be factored as A = LU, 2 COS LS where L is lower triangular and U is upper triangular. Write the two steps/stages to solve the system Ax = b. -

0 eligible source papers

What is Linear Programming? 2 C 0 4 L2

0 eligible source papers

Construct the dual to the primal problem 2 C 0 4 L3 Maximiite- Z - 3X| BX^, .Subject U- •+ BX^ <5S - 3>4 < 18 Where X, > 0, X^ s 0.

0 eligible source papers

What is meant by polynomial time algorithms? List two examples 2 COS L2 that are not solved in polynomial time.

0 eligible source papers

Define NP completeness. 2 COS L1

0 eligible source papers

(a)(i) Write an algorithm to determine the number of times each 8 C O l L4 element has occurred in an array. Analyze the algorithm and estimate the running time associated with cost. (ii) Solve the following recurrence relation using Master's Theorem; 5 C 0 1 LS T(n) = 7T(n/3) + n'

0 eligible source papers

(b)(i) Write the recurrence relation of Factorial function and determine 8 C 0 1 L4«- its complexity. (ii) Find the order of growth for the following recurrence: 5 C 0 1 LS T(n) = 4T(n/2) + n^ T(1) = 1.

0 eligible source papers

(a)(i) Find an optimal parenthesization of a matrix-chain product whose 8 C 0 2 LS sequence of dimensions is ( 5, 3, 2, 4, 6). A 1 = 5 * 3 A 2 = 3 * 2 A 3 = 2 * 4 A4 = 4 * 6 (ii) Simulate the divide and conquer strategy of mergesort for n = 32 5 C 0 2 LS elements using recursion tree. (Draw the tree and justify)

0 eligible source papers

(b)(i) Write the algorithm of quicksort using Partitioning method and 8 C 0 2 LS describe the best case, worst case and average case analysis. (ii) Determine an L C S of x= <A,B,C,B,D,A,B> AND 5 C 0 2 LS y = <B,D,C,A,B,A>.

0 eligible source papers

(a) (i) Determine the Huffman Encoding Tree for { A : 10 8:10 C: 25 8 COS LS D:15 E:30 F: 21} (ii) Simulate the activity selection problem for the following set of 5 COS LS activities. A 1 2 3 4 5 6 7 8 9 S 1 3 0 5 3 4 5 3 6 F 4 5 .6 7 9 9 11 13 14

0 eligible source papers

(b) 8 + 5 COS LS i. Find the L, U and P values for the following and solve it further to determine the values of the variables Xi, Xg and X3. Xi + X2 + X3 = 1 3 x i + X2 - 3 x 3 = 5 Xi - 2 x 2 - 5 x 3 = 10 ii. Write down the algorithm involved in it.

0 eligible source papers

(a)14(a) (i)(i) WhatWhat isis thethe standardstandard formform ofof linearlinear programmingprogramming problem?problem? 8 CC 00 44 LSLS ConvertConvert thethe givengiven linearlinear programprogram toto standardstandard form,form, minimizeminimize ZZ == 2x22x2 ++ 5X35X3 .. subjectsubject toto xixi ++ X2X2 >> 22 ll §§ ff \\ 2xi2xi ++ XX 22 ++ 66 xx 33 << 66 §§ hh ^^•^ ^^ // xixi -- X2X2 ++ 33 xx 33 == 44 j Xi,Xi, X2X2 ,, X3X3 >> 00 ^ (ii) Find an initial basic feasible solution for the linear program in 5 C 0 4 L3 standard form obtained in 14 a (i).

0 eligible source papers

(b) Solve the linear program using SIMPLEX. 13 ^ C 0 4 L3 maximize Xi+x-z subject to: 4xi - X2 < 8 2xi + X 2 < 1 0 5xi - 2x2 > -2 x-i, X2 >0

0 eligible source papers

(a) Prove that Circuit satisfiability is an NP complete problem. 13 COS L4

0 eligible source papers

(b) Prove that the vertex-cover problem is NP-complete and give a 13 COS L4 polynomial-time approximation algorithm for the same. P A R T - 0(1 X 15=15Marks) Q.No. Questions IVlarks CO B L

0 eligible source papers

(i) Given two strings s 1 = P A R K and s2 = S P A K E of 6+4 C 0 4 LS lengths m and n respectively. a. Find the minimum number of edits (operations) to convert ' s 1 ' into '52'. b. Write the algorithm to solve the problem. (ii) Consider a farmer who cultivates only two kinds of fruit trees - 5 C 0 3 L5 A and B. Both the trees require Water and Fertilizer only. To grow each tree of A and B, the following quantities are required: • Each unit of A requires 1 unit of Water and 3 units of Fertilizer • Each unit of B requires 1 unit of Water and 2 units of Fertilizer The farmer has a total of 5 units of Water and 12 units of Fertilizer. On each yield, the farmer makes a profit of . Rs 6 per unit A grown . Rs 5 per unit B grown. Now, the farmer wishes to maximize his profit. How many units of A and B should he cultivate respectively? f \ Formulate the above requirements as a linear programming problem.

0 eligible source papers

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.