• Welcome to IT Acumens - A Web Design Company. Please login or sign up.

Sep 24, 2019, 07:23 AM

## News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

## DESIGN AND ANALYSIS OF ALGORITHMS CS2251 APRIL /MAY2011 ANNA UNIVERSITY QUESTION

Started by jagathesh, Jul 30, 2014, 11:13 PM

Go Down

#### jagathesh ##### Jul 30, 2014, 11:13 PM
B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2011
Fourth Semester
Computer Science and Engineering
CS 2251 -- DESIGN AND ANALYSIS OF ALGORITHMS
(Regulation 2008)
Time : Three hours Maximum : 100 marks
PART A -- (10 × 2 = 20 marks)
1. Using the step count method analyze the time complexity when 2 m × n
2. An array has exactly n nodes. They are filled from the set {0, 1, 2,...,n-1, n}.
There are no duplicates in the list. Design an O(n) worst case time algorithm to
find which one of the elements from the above set is missing in the array.
3. Show the intermediate steps when the numbers 123, 23, 1, 43, 54, 36, 75, 34
are sorted using merge sort.
4. Devise an algorithm to make a change for 1655 using the Greedy strategy. The
coins available are {1000, 500, 100, 50, 20, 10, 5}.
5. Write the difference between Greedy Method and Dynamic Programming.
6. Write an algorithm to find the shortest path between all pairs of nodes.
7. Define the chromatic number of a graph.
8. Draw a graph with a cycle but with no Hamiltonian cycle.
9. Define a strongly connected digraph and give the minimum in degree of all the
nodes in the graph.
10. Perform depth first and breadth first search on the following graph and find all
the nodes reachable from 'a'.
PART B -- (5 × 16 = 80 marks)
11. (a) Write the recursive and non-recursive versions of the factorial function.
Examine how much time each function requires as 'n' becomes large.
Or
(b) (i) Explain asymptotic notations in detail.         
(ii) Write an algorithm for linear search and analyze the algorithm for
its time complexity.         
12. (a) Write an algorithm to perform binary search on a sorted list of elements.
Analyze the algorithm for the best case, average case and worst case.
Or
(b) Using the divide and conquer approach to find the maximum and
minimum in a set of 'n' elements. Also find the recurrence relation for the
number of elements compared and solve the same.
13. (a) Use function OBST to compute w(i, j), r(i, j), and c(i, j), 0<=i<j<=4, for the
identifier set ( ) 4 3 2 1 , , , a a a a = (cout, float, if, while) with p(1) = 1/20, p(2) =
1/5, p(3) = 1/10, p(4) = 1/20, q(0) = 1/5, q(1) = 1/10, q(2) = 1/5, q(3) = 1/20,
and q(4) 1/20. Using the r(i, j)'s, construct the optimal binary search tree.
Or
(b) Using dynamic approach programming, solve the following graph using
the backward approach.
14. (a) Using backtracking, find the optimal solution to a knapsack problem for
the knapsack instance n = 8, m = 110, (p1, p2. ... p7) = (11, 21, 31, 33, 43,
53, 55, 65) and (w1, w2,...,w7) = (1, 11, 21, 33, 43, 53, 55, 65).
Or
(b) Write an algorithm for N QUEENS Problem and Trace it for n=6.
15. (a) Write the Kruskal's algorithm apply it to find a minimum spanning tree
for the following graph :
Or
(b) Write short notes on NP-hard and NP-completeness.

Go Up

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification:
Please leave this box empty: Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens Web Design Chennai | GinGly :: Mobile SMS Backup | CineBuzz :: Latest Cinema News | My Kids Diary :: Kids magical moment :: Book domain name @ 99 Rs monthly