Description

Code No: RR210504
Set No. 1
II B.Tech I Semester Supplimentary Examinations, November 2007 DESIGN AND ANALYSIS OF ALGORITHMS ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Write an algorithm to evaluate a polynomial using Horner’s rule. (b) Present an algorithm that searches for the element x in unsorted array a[1:n]. If x occurs, th

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Related Documents

Share

Transcript

Code No: RR210504
Set No. 1
II B.Tech I Semester Supplimentary Examinations, November 2007DESIGN AND ANALYSIS OF ALGORITHMS( Common to Computer Science & Engineering, Information Technologyand Computer Science & Systems Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) Write an algorithm to evaluate a polynomial using Horner’s rule.(b) Present an algorithm that searches for the element x in unsorted array a[1:n].If x occurs, then return a position in the array; else return zero. Evaluate itstime complexity. [8+8]2. (a) Give the partition algorithm for Quick sort.(b) Modify the above algorithm to get the selection sort algorithm. Explain thetransition. [8+8]3. (a) Explain the terms feasible solution, optimal solution and objective function.(b) How are each of the above terms deﬁned ini. Knapsack problem andii. Storage on tapes. [6+10]4. (a) Write a pseudo code for constructing 2-3 trees for a given list of n integers.(b) Construct a 2-3 tree for the list E, X, A, M, I, N, A, T, I, O, N. [8+8]5. (a) What do you mean by forward and backward approach of problem solving inDynamic programming?(b) What are the diﬀerences between the Greedy and Dynamic programmingmethods of problem solving? [8+8]6. (a) Give an algorithm to count the number of leaf nodes in a binary tree T. Whatis its computing time?(b) Prove the relationship E = I + 2n, for a binary tree with n internal nodesexternal and the internal path length is I. [16]7. Compare and contrast(a) Bruteforce approach Vs Backtracking(b) ﬁxed Vs variable tuple size formulation. [8+8]8. Deﬁne dominance relations. Does the use of the dominance relations result inthe generation of more nodes than the nodes that would otherwise be generated?Justify. [16]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
Code No: RR210504
Set No. 2
II B.Tech I Semester Supplimentary Examinations, November 2007DESIGN AND ANALYSIS OF ALGORITHMS( Common to Computer Science & Engineering, Information Technologyand Computer Science & Systems Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. Write the non-recursive algorithm for ﬁnding the Fibonacci sequence and derive itstime complexity. [16]2. (a) Compute 2101 * 1130 by applying Divide and Conquer method.(b) Applying Divide and Conquer strategy, write a recursive algorithm for ﬁndingthe maximum and the minimum element from a list. [8+8]3. (a) Apply Greedy technique to solve Traveling salesperson problem.(b) Does the above algorithm generate a minimum length tour? Justify youranswer. [16]4. Write algorithms corresponding to ADJUST, HEAPIFY, INSERT and DELETEfor the case of a min-heap represented as a complete binary tree. Explain the timecomplexity of HEAPIFY. [16]5. (a) Apply Dynamic programming technique for ﬁnding an optimal order of mul-tiplying n matrices.(b) The root of OBST always contains the key with highest search probability.Discuss the validity of the above statement. [8+8]6. (a) Give an algorithm to count the number of leaf nodes in a binary tree T. Whatis its computing time?(b) Prove the relationship E = I + 2n, for a binary tree with n internal nodesexternal and the internal path length is I. [16]7. Draw tree organization for the solution space of Backtracking algorithm for(a) 4-queens problem and(b) Sum of subsets (n=4) and explain. [8+8]8. Present a program schema for a FIFO Branch & Bound search for a Least-Costanswer node. [16]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
Code No: RR210504
Set No. 3
II B.Tech I Semester Supplimentary Examinations, November 2007DESIGN AND ANALYSIS OF ALGORITHMS( Common to Computer Science & Engineering, Information Technologyand Computer Science & Systems Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) Write an algorithm to evaluate a polynomial using Horner’s rule.(b) Present an algorithm that searches for the element x in unsorted array a[1:n].If x occurs, then return a position in the array; else return zero. Evaluate itstime complexity. [8+8]2. (a) Design a Divide and Conquer algorithm for computing the number of levelsin a binary tree.(b) Compute the complexity of the above algorithm. [10+6]3. (a) Given a set of ‘n’ programs and lengths of each program, derive the timecomplexity to store the programs in increasing order of their lengths.(b) Explain the control abstraction of Greedy method. [10+6]4. (a) Write an algorithm for checking whether an array H [1,2,.......,n] is a heap ornot.(b) Determine the time eﬃciency of the above algorithm. [8+8]5. (a) Show that the computing time of OBST algorithm is O(n
2
).(b) Write an algorithm to construct Optimal binary search tree given the rootsR(i,j), 0
<
=i
<
j
<
=n. Show that the time complexity of the algorithm is O(n).[8+8]6. (a) Write an algorithm that uses BFS traversal to determine if the undirected anddirected graphs are cyclic?(b) Show that the time complexity of the above algorithm is of the order n.[10+6]7. Deﬁne the following terms: state space, explicit constraints, implicit constraints,problem state, solution states, answer states, live nod, E-node, dead node, boundingfunctions. [16]8. (a) Deﬁne the term Branch & Bound and explain with an example.(b) Explain the properties of LC- Search. [10+6]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
Code No: RR210504
Set No. 4
II B.Tech I Semester Supplimentary Examinations, November 2007DESIGN AND ANALYSIS OF ALGORITHMS( Common to Computer Science & Engineering, Information Technologyand Computer Science & Systems Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. A complex valued matrix X is represented by a pair of matrices (A,B) where Aand B contain real values. Write an algorithm that computes the product of twocomplex valued matrices (A,B) and (C,D) where (A,B) * (C,D) = (A+iB) * (C+iD)= (AC-BD) + i (AD+BC). Determine the number of additions and multiplicationsif all the matrices are all n
×
n. [16]2. (a) Trace the Merge sort algorithm for the given array. Also show the tree of callsfor Merge sort. 25, 57, 48, 37, 12, 92, 25, 86, 33(b) Use Insertion sort technique to improve Quick sort. [8+8]3. (a) Write Prim’s algorithm under the assumption that the graphs are representedby adjacency lists.(b) Analyze precisely the computing time and space requirements of this newversion of Prim?s algorithm using adjacency lists. [10+6]4. (a) Construct a 2-3 tree for the list E, X, A, M, I, N, A, T, I, O, N.(b) Construct the neap tree for the list E, X, A, M, I, N, A, T, I, O, N. [8+8]5. (a) Design a three stage system with device types
D
1
,D
2
,D
3
. The costs are Rs.30,Rs.15 and Rs.20 respectively. The cost of the system is to be not more thanRs.105. The reliability of each device type is 0.9, 0.8 and 0.5 respectively.(b) Explain in detail the reliability design problem. [10+6]6. (a) Explain the depth ﬁrst search algorithm for an undirected graph.(b) Deﬁne a binary search tree.(c) Write a possible linearly ordered binary search tree in lexographic order forthe keywords begin, else, end, if, then. [8+4+4]7. (a) Prove that the number of all subsets of n elements is 2
n
.(b) Give the algorithm to generate a breadth ﬁrst solution tree of the AND/ORtree. [8+8]8. (a) Which of the solutions to the traveling salesperson problem is eﬃcient: Dy-namic programming or Branch & Bound? Explain.(b) Can FIFOBB be applied to Traveling Salesperson problem? Justify. [8+8]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1

Search

Similar documents

Tags

Related Search

Design and Analysis of AlgorithmsDesign and Analysis of Aerospace Structures /Design and Analysis of Microstrip FiltersDesign and Analysis of ExperimentsDesign and Analysis of Custom Made ArtificialChassis design and analysis of heavy vehicleDesign and Analysis of Agricultural ExperimenDesign and Analysis of Subsonic Wind TunnelAircraft Structural Design and AnalysisDesign and development of blended learning en

We Need Your Support

Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks

SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...Sign Now!

We are very appreciated for your Prompt Action!

x