0% found this document useful (0 votes)
80 views

Document From

Hjhhj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Document From

Hjhhj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

109 109 109 109 109 109 109 109

Registration No :

109
Total
109
Number of 109
Pages : 02 109 109 109 109
B.Tech. 109
PCS4I102
4th Semester Regular / Back Examination 2017-18
DESIGN & ANALYSIS OF ALGORITHMS
BRANCH : CSE
Time : 3 Hours
Max Marks : 100
Q.CODE : C893
109 109 Answer
109 Part-A which
109 is compulsory
109 and any four
109 from Part-B. 109 109

The figures in the right hand margin indicate marks.


Answer all parts of a question at a place.

Part – A (Answer all the questions)


Q1 Answer the following questions:multiple type or dash fill up type: (2 x 10)
a) The time factor for determining the efficiency of algorithm is measured by ------
----.
109 109 109 109 109 109 109 109
b) ______________ notation provides an asymptotic lower bound on a function.
c) Determining the connected components of an undirected graph is an
application of _____________________.
d) The running time of Quick sort depends heavily on the selection of
___________.
e) Kruskal’s algorithm uses a _____________ to determine whether an edge
connects vertices in different components.
109 109
f) ________________
109
algorithm
109
deign technique
109
is used in finding
109
all pairs of
109 109
shortest distances in a graph.
g) Backtracking is ______________ search with some bounding function.
h) Any problem for which answer is either zero or one is called a _________
problem.
i) Optimization problems are often solved efficiently by expanding a partial
solution until the problem is solved, using ____________ algorithms.
j) Merging 4 sorted files containing 50,10,25 and 15 records will take ____ time.
109 109 109 109 109 109 109 109

Q2 Answer the following questions: Short answer type: (2 x 10)


a) The recurrence relation T(n)=1 for n=1 and T(n)= 2T(n-1) + n for n≥2
evaluate to 2n+1 – n -2. Justify.
b) Order the following time complexities in increasing order
1, log2n, n log2 n, n, n3, 2n, 3n
c) What is the recurrence relation if two matrices of n xn are multiplied.
d) Find the minimum number of comparisons required to determine if an integer
109 109 109 109 109
appears more than n/2 times in a sorted array of n integers. 109 109 109

e) Mention the elements of the Greedy algorithm.


f) Write the Huffman code for the letters a, b, c, d, e, f?
g) Describe the steps of a Dynamic programming designing of an algorithm.
h) What are the constraints required for a Backtracking method
i) Which data structure is generally used to implement Branch and Bound?
j) Determine whether the following problems are P, NP or NP-Complete,
109 109
Satisfiability
109
problem, Hamiltonian
109
cycle, TSP
109
problem, Knapsack
109
problem,
109 109
Clique, Set partitioning

109 109 109 109 109 109 109 109


109 109 109 109 109 109 109 109

Part – B (Answer any four questions)


Q3 a) Solve the following recurrence relation T(n) = 2T(√ ) + log n (5)
b) Sort the following elements using Quick sort algorithm. Analyze the time (10)
complexity.
109 109 21, 17, 34,
10928, 11, 9, 18, 76
109 109 109 109 109

Q4 a) Explain the Divide-and Conquer technique.Design a recursive algorithm for (7½)


binary search.
b) Sort the given list using the Merge sort (7½)
50, 40, 20, 70, 15, 35, 20, 60

Q5 a) Given the 10 activities along with their start and finish time as (10)
109 109
Si = <1, 2,1093, 4, 7, 8, 9, 11,10912> 109 109 109 109

Fi= <3,5, 4, 7, 10, 9, 11, 13, 12, 14>


b) Prove that fractional Knapsack problem has the Greedy choice property. (5)

Q6 a) Define all pairs shortest path problem. Discuss the solution of this problem (5)
basing on dynamic programming
b) Determine LCS of <1, 0, 0, 1, 0, 1, 0, 1> and <0, 1, 0, 1, 1, 0, 1, 1,1 1, 0> (10)
109 109 109 109 109 109 109 109
Q7 a) Describe the Krushkal’s algorithm for MST with an example. (10)
b) What is a branch and bound technique? How the TSP can be solved using (5)
this technique?

Q8 a) What is the backtracking? Give the solution for the 8 queen’s problem. (10)
b) Differentiate between NP-Complete and NP-hard problems. (5)

109 Q9109 Write short


109 notes (Any THREE)
109 of the following
109 : 109 109 (5 x 3) 109

a) Approximation Algorithm
b) Amortized Analysis
c) Disjoint-set Operations
d) Rabin-Karp algorithm

109 109 109 109 109 109 109 109

109 109 109 109 109 109 109 109

109 109 109 109 109 109 109 109

109 109 109 109 109 109 109 109

You might also like