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

Ada Pyq

This is a ADA PYQ file for GTU students
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
11 views

Ada Pyq

This is a ADA PYQ file for GTU students
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
Seat No. Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER-V (NEW) EXAMINATION ~ SUMMER 2019 Subject Codi Subject Name: Analysis and Design of Algorithms Time: 02:30 PM TO 05:00 PM Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 (a) What isan algorithm? How it differ from flowchart? (b) Give cifference of dynamic programming and divide-and- (©) Explain Asymptotic notation, Arrange the growth rate of 2! conquer method. 1, log n, n logn, 3° and n in increasing order of growth. Q2 (a) Differentiate greedy and dynamic programming. (b) Find out the @-notation for the function: f(n)=27n"+16n, (©) What is recurrence? Explain recursion-tree method with suitable example, OR (©) Write the Master theorem. Solve following recurrence using it. wT j=9T(n/3) +n (ii) T(n)=3T(n/4) + nln Q3° (a) Use Iteration method to solve recurrence T(n) = T(n-1) + 1 , here T()= (1). (b) Explain general characteristics of greedy algorithms. ) Using dynamic programming find out the optimal sequence for the matrix chain multiplication of Asio, Bios, Caz, Dizen and Eno matrices. oR Q3 (a) Write the best and worst running time of Insertion sort algorithm. Why it differ? (b) What are the steps for dynamic programming? Explain principal (O} of optimality, Determine LCS of (1,0,0,1,0,1,0.1} and {0,1,0,1,1.0,1,1,0) Qa (a) What is string-matching problem? Define valid shift and invalid shift, (b)_ Define P, NP, NP-complete and NP-hard problems. © Q4 (a) Write pseudo-code for Naive-String-1 Explain 0/1 knapsack using suitable example. OR hing algorithm, (b) Define spanning tree and MST. How Krushkal’s algorithm is te) different from Prim’s algorithm. Explain fractional knapsack problem with example. Q5 (a) Define graph, complete graph and connected graph. (b) Differentiate BFS and DFS. © Write and explain Dijkastra algorithm with example. ‘OR Q5 (a) Explain“P= NP?” problem. (b) Write just steps for Backtracking and Branch-and-Bound © algorithms, Explain travelling salesman problem, Prove that it is NP complete problem. Total Mar! 150703 Date: 06/06/2019 0 MARKS 03 07 03 07 07 03 07 03 07 03 07 03 07 03 07 03 07 GUJARAT TECHNOLOGICAL UNIVERSITY 'SEMESTER-V (NEW) EXAMINATION ~ WINTER 2018 Subject Code:2150703 Date:27/11/72018 Subject Name: Analysis and Design of Algorithms ime: 10:30 AM TO 01:00 PME ‘Total Marks: 70 Instructions: 1 Attempt all questions. 2 Make suitable assumptions whercver necessary. Figures to the right indicate full marks, QA (a) Define Algorithm, Time Complenity and Space Complexity. 03 (Differentiate branch and bound and back tracking algorithm. os (e) Analyze Selection sort algorithm in best ease and worst cas. 0 Q2- (a) Solve the recurrence Ten) = 772) +0 03 (by Explain: Articulation Point, Graph, Twwe oO fe) Write Merge sort algorithm and compute its worst case and best-case 07 time complexity. Sort the List GUJARAT in alphabetieal order using merge sor. oR (©) Comider Knapsack capacity W=9, w = (34,5,7) and v=(1240,25.42) 07 find the maximum profit using dynamic methox: Q3- (a) Differentiate the Greedy And Dynamic Algorithm. 03 by Demonstrate Binary Search method to search Key = 14, form the array. 04 A=S24,78. 10,13, 14,609. (©) Solve Making change problem using dynamic technique. di = 1.d2=2, 07 Bet, 4-6, Coleulate for making change of Rs. 10. OR 3° (a) Find out the NCR (3)Using Dynamic Method 03 (b)_ Find single source shortest path using Dijkstra’s algorithm form atoe Os 2 7-H = (€) For the following chain of matrices find he order of parenthesization 07 for the optimal chain multiplication (13,5.89,3.34). QA (@) Explain Tower of Hanoi Problem, Derive its recursion equation and 03 ‘computer it's time complexity. (b) Explain finite automata algorithm for string matching 4 (©) Find out LCS of A=(K,A.N.D.LA.P) and B= [A,N,D.L) 7 OR Q4 (a) Explain Principle of Optimality with example. 03 Define BFS. How itis differ from DFS, oO 4e) Solve the following instance of knapsack problem using Backtracking 07 “Technique. The Capacity ofthe Knapsack W = 8 and w= (2.34.8) and value v= (3.56.10) QS (a) Draw the state space tee Diagram for 4 Queen problem. 03 (by Define P, NP, NP-Hard and NP-Complete Problem. os (€} Find out the Mi sven Graph, mum Spanning Tree using Kruskal Algorithm for 07 QS (a) Explain naive string matching algorithm with example. 03 (b) Explain DFS algorithm in bref. (©) Find all pair of shortest path using Floyd's Algorithm forgiven graph OT Ca ea => & GUJARAT TECHNOLOGICAL UNIVERSITY (-V (NEW) - EXAMINATION ~ SUMMER 2018 Subject Code:2150703 Date:04/05/2018 Analysis and Design of Algorithms :30 PM to 05:00 PM Total Marks: 70 Instrvttons: 1. Attempt al questions. 2 Make suitable assumptions wherever necessary. 2. Figures to the right indicate fall marks. Qa) _ Define Algorithm, Discuss key characteristics of algorithm. (b) Prove or disprove that fin) = 1 +243 +..0 + €@in"2), (6) Which are the hasie ste Derive its time comple: 1 of counting sort? Write counti Ly in worst case. sort algorithm, Q2 (a) What are the advantages of dynamic programming method over devide-&- ‘conquer method? () Solve following recurrence using recursion tree method: Tn) = 3T(w3) + 3, (©) Write standard(conventional) algorithm and Strassen’s algorithm for matrix ‘multiplication problem. What is the recurrence for Strassen’s algorithm”? Solve it using master method to derive time complexity of Strassen's algorithm, OR (€) Discuss best ease, average ease and worst ease time complesity of quick sort. Q3° (a) Justify with example that shortest paih problem satisfies the pri coptiriality. (b) Which are the the basic steps of the development of the dynamic programming algorithm? Mention any two examples of dynamic programming that we are using in seal life. (©) Solve the following making change problem using dynamic programming method: Amount = Rs. 7 ankl Denominations: (Rs. 1, Rs. 2 and Rs. 4) oR ciple of Q3- (a) Justify with example that longest path problem does not satisfy the principle of optimality (b) Discuss general characteristics of greedy method. Mention any two examples of greedy method that we are using in rel life, (e) Solve all pair shortest path problem for the following graph using Floyd's algorithm. 03 07 03 07 07 03 4 07 03 07 a @) o © ay o © w o © a o © What ate the disadvantages of greedy method over dynamic programming 03, raethod? \What is DFS? Explain with example, Show the ordering of vertices produced 04 by Topological-sort for the following graph, Solve the following Knapsack Problem using greedy method. Number of 07 50, 40,30, 20, 10) Waite an algorithm for Huttman code. 03 ‘What is an approximation algorthen? Explain performance ratio for o approximation algorithm, Explain use of branch and bound technique for solving assignment problem, 07 Explain polynomial-time reduction algorithm, of Working modulo = 11, How many spurious hits does the Rabin-Karp 07 ‘matcher encounter in the text T'= 3141592653889703 when looking forthe pattern P=26? oR Which are the three major concepts use to show thata problem isan NP. 03, ‘Complete problem? Explain breadth fast search with example, o4 Find minimum spanning tree for the following undirected weighted graph 07 using Kruskal’s algorithm, Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE -SEMESTER-V (NEW) - EXAMINATION ~SUMMER 2016 Date:21/05/2016 Subject Name:Analysis and Design of Algorithms 202: :30 PM to 05:00 PM Instructions: 2 Qs Qs Qs os Os as (a) (b) (a) b) (b) (a) ib) @ ib) (a) ib) (a) ») (@) ) x ‘Attempt all questions, Make suitable assumptions wherever necessary. igures tothe right indicate full marks. Why do we use asymptotic notations in the study of algorithms? Briefly describe the commonly used asymptotic notations. Define MST. Explain Kruskal’s algorithm with example for construction of MST. Explain finite automata for sting matching with example. Write a brief note on NP.completeness and tbe classes-P, NP and NPC. OR ‘What isthe basic idea behind Rabin — Karp algorithm’? What is expected runing time of this algorithm ? Explain it with example. Explain in brief characteristics of greedy algorithms. Compare Greedy Method ‘with Dynamic Programming Method. Explain the use of Divide snd Conquer Technique for Binary Search Methos.What is the complexity of Binary Search Methoe!? Explain it with example. ‘oR Explain Breadth First Traversal Method for Graph with algorithm, Explain Depth First Traversal Method for Graph with algorithm. ‘Wit is an amortized analysis? Expl using suitable example, Discuss Assembly Line Scheduling problem using dynamie programming with example. aggregate method of amortized analysis oR Write a program/algorithm of Quick Sort Method and analyze it with example, Explain Backiracking Method. What is N-Queens Problem? Give solution of 4 ‘Queens Problem using Backtracking Method, Explain Chained Matrix Multiplication with example. Explain Selection Som Algorithm and give its best case, worst case and av ccase complexity with example, oR Discuss matrix multiplication problem using divide and conquer technique. Sort the letters of word “EDUCATION” in alphabetical order using insertion sort ‘Total Marks: 70 07 07 0 07 07 7 07 07 o o

You might also like