0% found this document useful (0 votes)
65 views4 pages

Question Paper Code:: (10×2 20 Marks)

This document contains information about a question paper for the course Design and Analysis of Algorithms. It includes 15 questions divided into 3 parts (Part A, B, C) worth a total of 100 marks. Part A contains 10 short answer questions worth 2 marks each. Part B contains 5 questions worth 13 marks each. Part C contains 1 question worth 15 marks. The questions cover topics related to algorithm analysis including brute force algorithms, divide and conquer, dynamic programming, greedy algorithms, graphs, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views4 pages

Question Paper Code:: (10×2 20 Marks)

This document contains information about a question paper for the course Design and Analysis of Algorithms. It includes 15 questions divided into 3 parts (Part A, B, C) worth a total of 100 marks. Part A contains 10 short answer questions worth 2 marks each. Part B contains 5 questions worth 13 marks each. Part C contains 1 question worth 15 marks. The questions cover topics related to algorithm analysis including brute force algorithms, divide and conquer, dynamic programming, greedy algorithms, graphs, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

*X10314*

Reg. No. :

Question Paper Code : X 10314


B.E./B.Tech. Degree Examinations, november/december 2020 AND
APRIL/MAY 2021
Fourth Semester
Computer Science and Engineering
CS 8451 – Design and Analysis of algorithms
(Common to Computer and Communication Engineering/Information Technology)
(Regulations 2017)

Time : Three Hours Maximum : 100 Marks

Answer all questions

Part – A (10×2=20 Marks)

1. Define algorithm with its properties.

2. List the reasons for choosing an approximate algorithm.

3. Write an example problem that cannot be solved by brute-force algorithm. Justify


your answer.

4. Write the general divide and conquer approach to solve a problem.

5. What is meant by optimal substructure property of a dynamic programming problem.

6. Write the control abstraction for greedy method.

7. What are the essential properties of a flow graph ?

8. What is meant by iterative improvement technique ?

9. Differentiate between NP hard and NP complete problems.

10. What is LC search and how it is efficient from other search methods in branch
and bound algorithms ?
X 10314 -2- *X10314*

Part – B (5×13=65 Marks)

11. a) i) Consider the problem of counting, in a given text the number of substrings
that start with an A and end with a B. For example, there are four such
substrings in CABAAXBYA. Design a brute-force algorithm for this
problem and determine its efficiency class. (8)
ii) “The best-case analysis is not as important as the worst-case analysis of an
algorithm”. Yes or No ? Justify your answer with the help of an example. (5)
(OR)
b) i) Solve : T(n) = 2T(n/2) + n3. (4)
ii) Explain the importance of asymptotic analysis for running time of an
algorithm with an example. (4)
iii) Write and explain recursive algorithm to find the factorial of any given number
n > = 0. Find the time complexity. (5)

12. a) i) Let x1 < x2 < ... < xn be real numbers representing coordinates of n villages
located along a straight road. A post office needs to be built in one of these
villages. Design an efficient algorithm to find the post-office location
minimizing the average distance between the villages and the post-office. (8)
ii) Explain how exhaustive search can be applied to the sorting problem and
determine the efficiency class of such an algorithm. (5)
(OR)
b) i) Write an algorithm using divide and conquer to search an element in a
list of numbers. If the number is not present, the algorithm returns the
closest number of the searches number. (8)
ii) What is Strassen’s matrix multiplication and explain how it is solves the
problem using divide and conquer technique. (5)

13. a) i) Compare and contrast dynamic programming and greedy method. (5)
ii) Write the algorithm for optimal binary search tree and solve the following
problem instance to construct the optimal binary search tree. Keys are
a, b, c, d and the probabilities are 0.1, 0.2, 0.4 and 0.3. (8)
(OR)
*X10314* -3- X 10314

b) i) Write the prim’s algorithm to find the minimum spanning tree and
illustrate the algorithm for the following graph. Where a, b, c, d and e are
nodes and each edges are weighted by numbers. (8)


ii) What is multistage graph ? List any three applications of multistage graph. (5)

14. a) i) Find a stable marriage matching for the instance defined by the following
ranking matrix : (8)
a B c D
α 1, 3 2, 3 3, 2 4, 3
β 1, 4 4, 1 3, 4 2, 2
γ 2, 2 1, 4 3, 3 4, 1
δ 4, 1 2, 2 3, 1 1, 4
ii) Determine the time efficiency of the above algorithm in the worst case. (5)
(OR)
b) Advertising alternatives for a company include television, radio and newspaper.
The table below shows the costs and estimates of audience coverage for each
types of media.
Cost per Audienceper
advertisement advertisement
Television $20000 100, 000
Newspaper $ 600 40, 000
Radio $ 300 18, 000

The newspaper limits the number of weekly advertisements form a single


company to ten. Moreover to balance the advertising among the three types
of media, no more than half of the total number of advertisements should
occur on the radio, and at least 10% should occur on television. The weekly
advertising budget is $ 18,200. How many advertisements should run in
each of the three types of media to maximize the total audience ? Solve the
problem using simplex method. (13)
X 10314 -4- *X10314*

15. a) i) What are the general approaches exit for branch and bound algorithms ?
Also explain the data structure need for storing live nodes in each approach
with suitable example. (5)
ii) Write the algorithm for solving 0/1 knapsack problem using LC branch
and bound and solve the knapsack instance ; n = 4; (p1, p2, p3, p4) = (10,
10, 12, 18); (w1, w2, w3, w4) = (2, 4, 6, 9) and M = 15, using LCBB, Draw
the state space tree. (8)
(OR)
b) i) Write the algorithm for sum of subsets problem using backtracking technique. (8)
ii) Illustrate the algorithm for the instance n = 6, M = 30 and W = (5, 10, 12,
13, 15, 18). Draw possible state space tree. (5)

Part – C (1×15=15 Marks)

16. a) i) Assume {500, 100, 50, 20, 10, 5} currency of denominations is available
in a bank. Devise a greedy algorithm to obtain the minimum number of
denominations for any amount which is a multiple of 5. Find the time
complexity of your algorithm. (5)
ii) Explain the maximum-bipartite-matching problem with an illustration. (5)
iii) Prove that TSP problem is NP complete, assuming that Hamiltonian
problem is NP complete. (5)
(OR)
b) i) Solve the TSP using branch and bound technique. (10)
a B c D
a  ∞ 12 5 7 
B 11 ∞ 13 6 
c  4 9 ∞ 18 
 
D 10 3 2 ∞ 

ii) Explain the operations of approximate vertex cover and Give an example of
a graph for which APPROX-VERTEX-COVER always yields a suboptimal
solution. (5)


–––––––––––––

You might also like