MODEL PAPERS
B.TECH II YEAR – II SEM (R18)
(2019-20)
DEPARTMENT OF
COMPUTER SCIENCE AND ENGINEERING
MALLA REDDY COLLEGE OF ENGINEERING &
TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
Recognized under 2(f) and 12 (B) of UGC ACT 1956
(Affiliated to JNTUH, Hyderabad, Approved by AICTE - Accredited by NBA & NAAC – ‘A’ Grade - ISO 9001:2015 Certified)
Maisammaguda, Dhulapally (Post Via. Hakimpet), Secunderabad – 500100, Telangana State, India
R18
Code No: xxxxxx
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
DESIGN AND ANALYSIS OF ALGORITHMS
II B. Tech II Semester Model Paper-I
(CSE& IT)
Roll No
Time: 3 hours Max. Marks: 70
Note:
Question paper Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE
Questions, Choosing ONE Question from each SECTION and each Question carries 14
marks.
SECTION – I
1. Define time and space complexity. Explain with examples. [14M]
(OR)
2. For T(n)=7T(n/2)+18n2 Solve the recurrence relation and find the time complexity. [14M]
SECTION – II
3. Explain AND/OR graphs [14M]
(OR)
4. How 8-Queen’s problem can be solved using back tracking and explain with an example. [14M]
SECTION – III
5. Explain General method of Greedy method. Find the greedy solution for following job sequencing with
deadlines problem n = 7, (p1,p2,p3,p4,p5,p6,p7) = (3,5,20,18,1,6,30), (d1,d2,d3,d4,…,d7) =
(1,3,4,3,2,1,2) [14M]
(OR)
6. a) A motorist wishing to ride from city A to B. Formulate greedy based algorithms to generate shortest
path and explain with an example graph. [7M]
b) What is the solution generated by function Job Sequencing algorithm when n=6 (P1…p6) = (3, 5, 20,
18, 1, 6), and (d1..d6) = (1, 3, 4, 3, 2, 1). [7M]
SECTION – IV
7.Solve a travelling sales person problem using dynamic programming [14M]
(OR)
8 Write a function to compute lengths of shortest paths between all pairs of nodes for the given adjacency
matrix.[14M]
0 6 13
8 0 4
5 ∞ 0
SECTION – V
9. Discuss Draw the portion of state space tree generated by FIFOBB for the following
instance of 0/1 knapsack n= 5, M=12, (p1, ……p5) = (10,15,6,8,4) (w1,. ... w5)=(4,6,3,4,2)[14M]
(OR)
10. (a) Write and explain the Cooks theorem. [7M]
(b) What is non deterministic algorithm explain. [7M]
*******
R18
Code No: xxxxxx
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
II B.Tech II Semester Model Paper-II
Design and analysis of Algorithms
(CSE & IT)
Roll No
Time: 3 hours Max. Marks: 70
Note: Question paper Consists of 5 SECTIONS (One SECTION for each UNIT). Answer
FIVE Questions, Choosing ONE Question from each SECTION and each Question carries
14 marks.
.
SECTION – I
1. Illustrate Merge sort algorithm and discuss its time complexity.[14M]
(OR)
2. Explain Strassen’s matrix multiplication and its time complexity [14M]
SECTION – II
3. Discuss union and find algorithms in detail with an example. [14M]
(OR)
4. a) Explain Prim’s algorithm for minimal spanning tree with an example.[7M]
b) Write in detail about Hamiltonian cycles. Give example t o it.[7M]
SECTION – III
5. Write a greedy algorithm for sequencing unit time jobs with dead lines and profits. [14M]
(OR)
6. Derive time complexity of job sequencing with deadlines .Obtain the optimal solution when
n=5, (p1, p2,…)=(20,15,10,5,1) and (d1,d2,…)=(2,2,1,3,3).[14M]
SECTION – IV
7. Explain the chained matrix multiplication with suitable example.[14M]
(OR)
8. Describe Travelling Salesperson Problem (TSP) using Dynamic Programming.[14M]
SECTION – V
9. Discuss in detail about the class P, NP, NP-hard and NP-complete problems. Give examples for
each class.[14M]
(OR)
10. Describe Travelling Salesperson Problem (TSP) using Branch and Bound.[14M]
*******
Code No: xxxxxx R18
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
II B.Tech II Semester Model Paper-III
Design and analysis of Algorithms
(CSE & IT)
Roll No
Time: 3 hours Max. Marks: 70
Note: Question paper Consists of 5 SECTIONS (One SECTION for each UNIT). Answer
FIVE Questions, Choosing ONE Question from each SECTION and each Question carries
14 marks.
.
SECTION – I
1. Simulate Quick sort algorithm for the following example 25,36,12,4,5,16,58,54,24,16,9,65,78 [14M]
(OR)
2. a)Write an algorithm for linear search and analyze the algorithm for its time complexity. [7M]
b)What is pseudo-code? Explain with an example.[7M]
SECTION – II
3. Explain about bi-connected components in detail.[14M]
(OR)
4. Give the solution to the m-coloring of a graph using backtracking.[14M]
SECTION – III
5. Define Greedy knapsack. Find the optimal solution of the Knapsack instance n= 7, M=15, (p1, p2,
……p7) = (10,5,15,7,6,18,3) and (w1,w2,. ... w7)=(2,3,5,7,1,4,1). [14M]
(OR)
6. Write about 0/1 knapsack problem with an example.[14M]
SECTION – IV
7. Let n=4 and (a1,a2,a3,a4) Construct optimal binary search for (a1, a2, a3, a4) = (do, if, int,
while), p(1 : 4) = (3,3,1,1) q(0 : 4)= (2,3,1,1,1) [14M]
(OR)
8. Explain how solution will be provided for all pairs shortest path problem using dynamic
programming.[14M]
SECTION – V
9. a) Explain non-deterministic algorithm with an example.[7M]
b) Explain Satisfiability problem.[7M]
(OR)
10. Draw the portion of state space tree generated by LCBB for the following instance of 0/1 knapsack n=
5, M=12, (p1, ……p5) = (10,15,6,8,4) (w1,.....w5)=(4,6,3,4,2). [14M]
*******
R18
Code No: xxxxxx
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
II B.Tech II Semester Model Paper-IV
Design and analysis of Algorithms
(CSE & IT)
Roll No
Time: 3 hours Max. Marks: 70
Note: Question paper Consists of 5 SECTIONS (One SECTION for each UNIT). Answer
FIVE Questions, Choosing ONE Question from each SECTION and each Question carries
14 marks.
.
SECTION – I
1. a) Explain the process of designing an algorithm. Give characteristics of an algorithm. [7M]
b) Explain asymptotic notations. [7M]
(OR)
2. a) Give the general procedure of divide and conquer method.[7M]
b)Write about quick sort method with example.[7M]
SECTION – II
3. a) Explain about Disjoint set operations.[7M]
b) Write short notes on spanning trees. [7M].
(OR)
4. What is an articulation point? How to find articulation point for a given graph. [14M]
SECTION – III
5. Define Greedy knapsack. Find the optimal solution of the Knapsack instance n= 7, M=20, (p1, p2,
……p7) = (8,5,6,7,6,12,3) and (w1,w2,. ... w7)=(2,10,8,7,6,4,11). [14M]
(OR)
6. Give the optimal solution for 0/1 knapsack problem using greedy method.
(p1,p2,p3, p4) = (11, 21, 31, 33), (w1, w2, w3, w4) = (2, 11, 22, 15), M=40, n=4. [14M]
SECTION – IV
7. .Let n=4 and (a1,a2,a3,a4) Construct optimal binary search for (a1, a2, a3, a4) = (cout, float, if,
while), p(1 : 4) = (1/20,1/5,1/10,1/20) q(0 : 4)= (1/5,1/10,1/5,1/20,1/20) [14M]
(OR)
8. Explain optimal binary search tree with an example.14M]
SECTION – V
9. What is state space tree? What are the different ways of searching an answer node in an state space tree
explain with example. [14M]
(OR)
10. a) Write non-deterministic algorithm for knapsack problem?[7M]
b) Difference between NP-hard and NP-complete problems[7M]
*******
R17
Code No: R17A0508
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
II B.Tech II Semester Regular Examinations, April/May 2019
Design and Analysis of Algorithms
(CSE & IT)
Roll No
Time: 3 hours Max. Marks: 70
Note: This question paper Consists of 5 Sections. Answer FIVE Questions, Choosing ONE Question from
each SECTION and each Question carries 14 marks.
***
SECTION-I
1 a. Explain about Psuedo code for expressing algorithms [7M]
b. Define an algorithm and write the characteristics of algorithm. [7M]
OR
2 a. Describe performance analysis, space complexity and time complexity. [7M]
b. Differentiate between probabilistic analysis and amortized analysis. [7M]
SECTION-II
3 a. Illustrate the general method of divide and conquer technique. [7M]
b. Write an algorithm for Binary search and discuss its complexity. [7M]
OR
4 a. Explain knapsack problem in Greedy method [7M]
b. Explain algorithm for Job sequencing with deadlines [7M]
SECTION-III
5 Explain Matrix chain multiplication in dynamic programming. [14M]
OR
6 Explain 0/1 knapsack problem dynamic programming. [14M]
SECTION-IV
7 a. Write a depth first search algorithm for graph traversal. [7M]
b. Discuss about AND / OR graphs and game trees [7M]
OR
8 a. Define graph coloring and write an algorithm to find Hamiltonian cycles. [7M]
b. Compare and contrast between connected components and bi connected components. [7M]
SECTION-V
9 a. Explain FIFO Branch and Bound solution. [7M]
b. Differentiate between NP - Hard and NPComplete classes. [7M]
OR
10 a. Explain 0/1 knapsack problem in Branch and Bound technique. [7M]
b. Discuss about general method of branch and bound technique. [7M]
.
**********
R15
Code No: R15A0508
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
II B.Tech II Semester Regular/Supplementary Examinations, April/May 2018
Design and analysis of Algorithms
(CSE & IT)
Roll No
Time: 3 hours Max. Marks: 75
Note: This question paper contains two parts A and B
Part A is compulsory which carriers 25 marks and Answer all questions.
Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE Questions,
Choosing ONE Question from each SECTION and each Question carries 10 marks.
PART – A (25 Marks)
1. (a) General strategy of divide and conquer [2M]
(b) What are the performance analysis techniques of an algorithm? [3M]
(c) What is union and find? [2M]
(d) Explain bi connected components. [3M]
(e) What is job sequencing with deadlines? [2M]
(f) What is greedy method? [3M]
(g) What is a graph coloring problem? [2M]
(h) What is general backtracking method? [3M]
(i) What is the difference between NP hard and NP Complete problem? [2M]
(j) List the advantages of dynamic programming. [3M]
PART – B (50 Marks)
SECTION – I
2. Explain in detail about asymptotic notations. [10M]
(OR)
3. Explain Merge sort technique. Give the time complexity of merge sort. [10M]
SECTION – II
4. Explain the following graph traversal
(c) Depth First search [5M]
(d) Breath First search. [5M]
(OR)
5. Write short notes on
a) Game trees [5M]
b) AND/OR graphs [5M]
SECTION – III
6. How do you construct a minimum Spanning tree using kruskals algorithm explain? List any two
applications. [10M]
(OR)
7. State dynamic programming. Explain with one application. [10M]
SECTION – IV
8. Explain the Travelling salesmen problem using Branch and bound technique. [10M[
(OR)
9.Give the solution to the 8 queen’s problems using backtracking. [10M]
SECTION – V
10. Discuss in detail about the class P, NP, NP-hard and NP-complete problems. Give examples
for each class. [10M]
(OR)
11. (a) Write and explain the Cooks theorem. [5M]
(b) What is non deterministic algorithm explain. [5M]
******