L.J. Institute of Engineering & Technology Semester: VIII (2016)

Similar documents
Sankalchand Patel College of Engineering - Visnagar Department of Computer Engineering and Information Technology. Assignment

Department of Computer Applications. MCA 312: Design and Analysis of Algorithms. [Part I : Medium Answer Type Questions] UNIT I

DESIGN AND ANALYSIS OF ALGORITHMS

INSTITUTE OF AERONAUTICAL ENGINEERING

CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION

END-TERM EXAMINATION

5105 BHARATHIDASAN ENGINEERING COLLEGE

D.K.M.COLLEGE FOR WOMEN (AUTONOMOUS), VELLORE-1.

R13 SET - 1. ''' '' ''' ' blog: anilkumarprathipati.wordpress.com. Code No: RT32054

Contents. 1 Introduction. 2 Searching and Traversal Techniques. Preface... (vii) Acknowledgements... (ix)

Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest. Introduction to Algorithms

Introduction to Algorithms Third Edition

15CS43: DESIGN AND ANALYSIS OF ALGORITHMS

2. (a) Explain when the Quick sort is preferred to merge sort and vice-versa.

CSCE 321/3201 Analysis and Design of Algorithms. Prof. Amr Goneid. Fall 2016

CS6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK UNIT I

DESIGN AND ANALYSIS OF ALGORITHMS

Virtual University of Pakistan

IV/IV B.Tech (Regular) DEGREE EXAMINATION. Design and Analysis of Algorithms (CS/IT 414) Scheme of Evaluation

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC)

UNIT 1 BASICS OF AN ALGORITHM

CSci 231 Final Review

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

ECE250: Algorithms and Data Structures Final Review Course

CS521 \ Notes for the Final Exam

n 2 ( ) ( ) + n is in Θ n logn


INTERNATIONAL INSTITUTE OF MANAGEMENT, ENGINEERING & TECHNOLOGY, JAIPUR (IIMET)

Analysis of Algorithms

PSD1A. DESIGN AND ANALYSIS OF ALGORITHMS Unit : I-V

CS6402-DESIGN AND ANALYSIS OF ALGORITHM. TWO MARK QUESTION WITH ANSWERS Unit-I. Introduction

Ph.D. Comprehensive Examination Design and Analysis of Algorithms

Algorithm Analysis. (Algorithm Analysis ) Data Structures and Programming Spring / 48

CS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK

& ( D. " mnp ' ( ) n 3. n 2. ( ) C. " n

4.1.2 Merge Sort Sorting Lower Bound Counting Sort Sorting in Practice Solving Problems by Sorting...

Introduction to Data Structure

Review for Midterm Exam

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: CS6402- Design & Analysis of Algorithm Year/Sem : II/IV UNIT-I INTRODUCTION

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1

COMP 251 Winter 2017 Online quizzes with answers

( ) n 3. n 2 ( ) D. Ο

( ) + n. ( ) = n "1) + n. ( ) = T n 2. ( ) = 2T n 2. ( ) = T( n 2 ) +1

TOTAL CREDIT UNITS L T P/ S SW/F W. Course Title: Analysis & Design of Algorithm. Course Level: UG Course Code: CSE303 Credit Units: 5

Multiple Choice Question. Unit-1 Introduction

Model Answer. Section A Q.1 - (20 1=10) B.Tech. (Fifth Semester) Examination Analysis and Design of Algorithm (IT3105N) (Information Technology)

Introduction to Algorithms May 14, 2003 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser.

Design and Analysis of Algorithms - - Assessment

Chapter 9 Graph Algorithms

Lecture Summary CSC 263H. August 5, 2016

( ) 1 B. 1. Suppose f x

CS-6402 DESIGN AND ANALYSIS OF ALGORITHMS

CAD Algorithms. Categorizing Algorithms

CS161 - Final Exam Computer Science Department, Stanford University August 16, 2008

( D. Θ n. ( ) f n ( ) D. Ο%

Chapter 9 Graph Algorithms

4. Give the diagram representation of Notion of algorithm. [M 13]

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

DATA STRUCTURES AND ALGORITHMS

n 2 C. Θ n ( ) Ο f ( n) B. n 2 Ω( n logn)

2. True or false: even though BFS and DFS have the same space complexity, they do not always have the same worst case asymptotic time complexity.

Anany Levitin 3RD EDITION. Arup Kumar Bhattacharjee. mmmmm Analysis of Algorithms. Soumen Mukherjee. Introduction to TllG DCSISFI &

DESIGN AND ANALYSIS OF ALGORITHMS

9. Which situation is true regarding a cascading cut that produces c trees for a Fibonacci heap?

22 Elementary Graph Algorithms. There are two standard ways to represent a

2. (a) Explain the concept of virtual functions in C++ with suitable examples. (b) Explain the concept of operator overloading in C++.

Algorithms and Data Structures (INF1) Lecture 15/15 Hua Lu

n 2 ( ) ( ) Ο f ( n) ( ) Ω B. n logn Ο

( ). Which of ( ) ( ) " #& ( ) " # g( n) ( ) " # f ( n) Test 1

Cs502 Solved MCQS MidTerm

SUGGESTION : read all the questions and their values before you start.

CS6402 Design and Analysis of Algorithm. 2 Marks Question & Answer UNIT I INTRODUCTION

Problem Score Maximum MC 34 (25/17) = 50 Total 100

Total No. of Questions :09] [Total No. of Pages : 02

Reference Sheet for CO142.2 Discrete Mathematics II

Chapter 9 Graph Algorithms

University of the Western Cape Department of Computer Science

Test 1 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. 2 points each t 1

Midterm solutions. n f 3 (n) = 3

9. The expected time for insertion sort for n keys is in which set? (All n! input permutations are equally likely.)

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

logn D. Θ C. Θ n 2 ( ) ( ) f n B. nlogn Ο n2 n 2 D. Ο & % ( C. Θ # ( D. Θ n ( ) Ω f ( n)

Algorithms (IX) Guoqiang Li. School of Software, Shanghai Jiao Tong University

Algorithm Design Techniques part I

CS583 Lecture 01. Jana Kosecka. some materials here are based on Profs. E. Demaine, D. Luebke A.Shehu, J-M. Lien and Prof. Wang s past lecture notes

PROGRAM EFFICIENCY & COMPLEXITY ANALYSIS

Data Structures and Algorithm Analysis in C++

( ) ( ) C. " 1 n. ( ) $ f n. ( ) B. " log( n! ) ( ) and that you already know ( ) ( ) " % g( n) ( ) " #&

Topic Analysis PART-A

22 Elementary Graph Algorithms. There are two standard ways to represent a

Overview of Data Structures, Algorithm Analysis

CMPSCI 311: Introduction to Algorithms Practice Final Exam

Chapter 3 Dynamic programming

Total Score /1 /20 /41 /15 /23 Grader

) $ f ( n) " %( g( n)

1. To reduce the probability of having any collisions to < 0.5 when hashing n keys, the table should have at least this number of elements.

Department of Computer Science and Technology

( ) D. Θ ( ) ( ) Ο f ( n) ( ) Ω. C. T n C. Θ. B. n logn Ο

[ 11.2, 11.3, 11.4] Analysis of Algorithms. Complexity of Algorithms. 400 lecture note # Overview

Transcription:

Subject Name: Design & Analysis of Algorithm Subject Code:1810 Faculties: Mitesh Thakkar Sr. UNIT-1 Basics of Algorithms and Mathematics No 1 What is an algorithm? What do you mean by correct algorithm? What do you mean by instance of a problem? List out the criteria that all algorithms must satisfy. On what bases will you consider algorithm A is better than algorithm B? [May-201][LJIET] 2 What do you mean by Polynomial time complexity and Logarithmic time complexity? Which one is higher? What does O (1) mean? [May-201][LJIET] Marks 3 Arrange following functions n in increasing order: [May-201][LJIET] Define an algorithm. What features does one look for in a good computer algorithm? When an algorithm is said to be correct? When an algorithm is said to efficient? Can an abstract algorithm be directly implemented? If yes, how? If not, what is its use? [May-2012][LJIET] 5 Give an example where the choice of data structure has a bearing effect on the performance of the algorithm. Also give the circumstances where: (i) It is advantageous to use array instead of linked list (ii) It is advantageous to use linked list instead of array. [May-2012][LJIET] Define:Algorithm[DEC- 1 UNIT-2 Analysis of Algorithm: 1 Define Time Complexity and Space Complexity. Why we are generally concerned withtime Complexities than Space Complexities? What is a major contributor for inefficiency of a loop? What will be theta notation for: n3+5n+? [May-201][LJIET] 2 Explain why the statement, The running time of algorithm A is at least O (n2) is meaningless. Also explain what is the smallest value of n such that an algorithm whose running time is 100n2 runs faster than an algorithm whose running time is 2n on the same Design & Analysis of Algorithm (1810) 201 Page 1

machine? [May-201][LJIET] 3 What is Time Complexity? What is significance of Time Complexity in Algorithm Analysis? Provide methods and ways to measure the time complexity? What is significance of Time Complexity in algorithm analysis? Explain Limit rules for O, Ω, θ notations. Express the function n3/1000-100n2-100n+3 in terms of Ө notation and prove that. [May- 201][LJIET] Write down the algorithm to find minimum of N numbers and find its complexity. Also derive the worst case complexity of searching a Key from a binary search tree (balanced) having n nodes. [May-201][LJIET] 5 Write an algorithm to find the maximum and minimum element in an array A storing n integers. What is the running time of this algorithm for computing the maximum Element in an array of integers? [May-201][LJIET] What do you mean by eventually non decreasing function? Give an example for the same[may-201][ljiet] What is optimal binary search tree problem? Explain in brief. [May-201][LJIET] 8 What is Space Complexity? How algorithms can be analyzed in terms of space complexity? Will it depend on type of Instance (input) or will change? [May-201][LJIET] 9 Solve the following recurrence equations. 1. T (n) = T (n/3)+ n2 10 2. T (n) = T (n/2)+ log n[may-201][ljiet] Is 3logn+loglogn is O (log10 n)? Is 3logn+loglogn is Ω (log10n)? [May-201][LJIET] 11 Check equalities(true/false): [May-201][LJIET] Design & Analysis of Algorithm (1810) 201 Page 2

12 Write the recurrence for solving Tower of Hanoi problem having n rings and 3 rods and solve the recurrence[may-201][ljiet] 13 Define: (1) Algorithm (2) Average case (3) Time complexity () Space complexity (5) Set () Function () Relation[Sep-2013][LJIET] 1 Write algorithms to find (1) Sum of integers from 1 to n. (2) Fibonacci sequence using recursion Calculate the time complexity for both on each case. [Sep-2013][LJIET] 15 Define: (1) O(n) (2) Ω(n) (3) Θ(n) () Barometer instruction.[sep-2013][ljiet] 1 Write an algorithm for selection sort. Calculate the time complexity for each case. [Sep-2013][LJIET] 1 How to compare the two algorithms? What do you mean by worst-case, average-case and best-case analysis of an algorithm? Is a Recursive algorithm less efficient compared to an Iterative one? Why or Why not? [May-2012][LJIET] 18 Define Time Complexity and Space Complexity. Why we are generally Concerned with Time Complexities than Space Complexities (Requirements)? What do you mean by Polynomial time complexity and Logarithmic time complexity? Which one is higher? What is a major contributor for inefficiency of a loop? [May-2012][LJIET] 19 Solve the following recurrence equations. [May-2012][LJIET] 1. T(n) = T(n-1) +2T(n-2) 2T(n-3) Design & Analysis of Algorithm (1810) 201 Page 3

2. T (n) = 2T(N/2) + n log n 20 Develop an algorithm and program (recursive function) to calculate the GCD of two integers using Top-Down Design. Analyze the algorithm. [May-2012][LJIET] 21 Write an efficient algorithm to find exponentiation X= an, where a and n are integers. Give the detailed analysis and worst case behavior for the same. [May-2012][LJIET] 22 Write a recursive algorithm to find Fibonacci numbers. Write recurrence equation for it. Solve the recurrence equation and find out the complexity. [May-2012][LJIET] 23 Give the algorithm to find the best way to multiply n matrices. Analyze the algorithm and give the timing analysis. [May-2012][LJIET] 2 What do you mean by performance analysis of an algorithm? Explain average case and worst case analysis with the help of suitable example. [May-2013][LJIET] 25 What is an Algorithm? What do you mean by linear inequalities and linear equation? Explain asymptotic notation with the help of example[may-2013][ljiet] 5 2 What are the elementary operations? Explain Amortized Analysis. [May-2013][LJIET] 2 Explain all asymptotic notations used in algorithm analysis. [Sep-201][LJIET] 28 Using step count method analyze the time complexity when two m*n matrices are added. [Sep-201][LJIET] 29 Sort the letter of the word EXAMPLE in alphabetical order using insertion sort. [Sep- 201][LJIET] 30 What is an amortized analysis? Explain potential method of amortized analysis using suitable example. [Sep-201][LJIET] 31 Explain the accounting method of amortized analysis using stack operations. [May- 32 Explain potential method of amortized analysis. [May- 33 Use master method to give tight asymptotic bounds for the following recurrence. [May- T(n) = 2n T(n/2) + nn T (n) = 3T (n/2)+ n2 T (n) = 1T (n/)+ n 3 1. Let f(n) = n + 3 and g(n) = n Is f(n) = Ω(g(n))? Design & Analysis of Algorithm (1810) 201 Page

2. Let f(n) = n2 and g(n) = n2 + 2 Is f(n) = Ω (g(n))? If yes, find n0 and c[may- 35 Explain Insertion sort algorithm. Derive the algorithmic complexity in Best case, worst case and Average case analysis. [DEC- 3 Explain master theorem and solve the following recurrence equation with master method [DEC- 1. T(n)= 8T(n/2) + n 2. T(n)= T(n/) + n2 logn 3 Give the properties of Heap Tree. Sort the following data with Heap Sort Method: 5, 5, 5, 55, 25, 30, 90, 5, 80. [DEC- UNIT-3 Divide and Conquer Algorithm: 1 Suppose we are comparing implementations of insertion sort and merge sort on the same machine. For input of size n, insertion sort runs in 8n2 steps, while merge sort runs in n lg n steps. For which values of n does insertion sort beat merge sort? [May-201][LJIET] 3 Write an algorithm for binary search. Calculate the time complexity for each case. [Sep-2013][LJIET] 5 3 Explain the multiplying large integer problem in detail. [Sep-2013][LJIET] Write an algorithm for merge sort with divide and conquer strategy. Analyze each case. [Sep-2013][LJIET] 5 Write an algorithm for quick sort with divide and conquer strategy. Analyze each case. [Sep-2013][LJIET] Derive the recurrence relation for quick sort in best case and find the complexity. [May-2012][LJIET] Justify the general statement that if a problem can be split using Divide and Conquer strategy in almost equal portions at each stage, then it is a good candidate for recursive implementation, but if it cannot be easily be so divided in equal portions, then it better be implemented iteratively. Explain with an example. [May-2012][LJIET] 8 Explain how to apply the divide and conquer strategy for sorting the elements using Merge sort. [May-2013][LJIET] Design & Analysis of Algorithm (1810) 201 Page 5

9 What is divide and conquer technique? Apply this method to find multiplication of integers 2101 and 1130. [Sep-201][LJIET] 10 Explain merge sort problem using divide and conquer technique. Give an example. [Sep-201][LJIET] 11 Write the Quick sort algorithm. Trace the same on data set: 5, 3,1,9,8,2,,. [Sep- 201][LJIET] 12 Write the case in which worst case behavior for quicksort occurs. Find out the worst case running time of quicksort. Write and explain randomized partition for QUICKSORT[May- 13 How MERGE-SORT can be done with Divide and Conquer strategy? Explain with example. [May- 1 What is divide and conquer technique? Apply this method to find multiplication of integers 395 and 122. [DEC- 15 Sort the following list using quick sort algorithm:<80,55,3,25,5,98,59,,15,31,8,9> Also discuss worst and best case of quick sort algorithm. [DEC- 1 Explain Binary search algorithm with divide and conquer strategy and use the recurrence tree to show that the solution to the binary search recurrence relation is Ѳ(logn). [DEC- 1 Define: minimax principle[dec- 1 UNIT- Greedy Algorithm: 1 There is a network given in the figure below as a highway map and the number recorded next to each arc as the maximum elevation encountered in traversing the arc. A traveler plans to drive from node 1 to 12 on this highway. The traveler dislikes high altitudes and so would like to find a path connecting node 1 to 12 that minimizes the maximum altitude. Find the best path for the traveler using a MST.(Graph do be drawn for Kruskal or Prims algorithm for minimum spanning tree) [May-201][LJIET] Design & Analysis of Algorithm (1810) 201 Page

2 Write down the general characteristics of greedy algorithm with respect to making change problem. [Sep-2013][LJIET] 3 Explain Kruskal s algorithm to find minimum spanning tree with an example. What is it s time complexity? [Sep-2013][LJIET] Explain Prim s algorithm to find minimum spanning tree with an example. What is it s time complexity? [Sep-2013][LJIET] 5 What is Knapsack problem (1)? Explain it. [Sep-2013][LJIET] Prove that Greedy Algorithms does not always give optimal solution. What are the general characteristics of Greedy Algorithms? Also compare Greedy Algorithms with Dynamic Programming and Divide and Conquer methods to find out major difference between them. [May-2012][LJIET] Give and explain Kruskal s Algorithm for Minimum Spanning Tree and Compare it with Prim s algorithm with an example. [May-2012][LJIET] 8 What do you mean by minimum spanning tree? Explain single source shortest path With the help of example. [May-2013][LJIET] 9 Solve the following Knapsack Problem using Greedy Algorithm The capacity of knapsack is 15 Design & Analysis of Algorithm (1810) 201 Page

Items 1 2 3 5 Weight 2 3 5 1 1 Value 10 5 15 18 3[May-2013][LJIET] 10 Give and explain Prim s Algorithm for Minimum Spanning Tree and Compare it with Kruskal s algorithm with an example. [May-2013][LJIET] 11 Devise an algorithm to make a change for 155 using the greedy strategy. The coins available are {1000, 500, 100, 50, 20, 10, 5}.[Sep-201][LJIET] 12 Using greedy algorithm find an optimal schedule for following jobs with n=5 profits: (P1,P2,P3,P,P5) = (3,5,18,20,38) and deadline :(d1,d2,d3,d,d5) = (1,3,3,,1) [Sep-201][LJIET] 13 Write Dijkstra s algorithm and apply the same to find single source shortest path problem for the following graph taking vertex a as a source. [Sep-201][LJIET] 1 Define terms: Greedy Algorithm[May- 2.5 15 Define terms: Minimum Spanning Tree (MST) [May- 2.5 1 Write Prim s algorithm and apply it on following graph. And find running time of the algorithm. [May- Design & Analysis of Algorithm (1810) 201 Page 8

1 Describe Dijkstra s algorithm for single source shortest path problem. Give a simple example of a directed graph with negative-weight edges for which Dijkstra s algorithm produces incorrect answers. [May- 18 Solve the following Knapsack Problem using Greedy Algorithm The capacity of knapsack is W=18 19 Using greedy algorithm find an optimal schedule for following jobs with n= profits: (P1,P2,P3,P,P5,P) = (,,20,25,8,18) and deadline :(d1,d2,d3,d,d5,d) = (1,3,3,,1,2) [DEC- 20 Write Dijkstra s algorithm and apply the same to find single source shortest path problem for the following graph taking vertex a as a source. [DEC- Design & Analysis of Algorithm (1810) 201 Page 9

21 Define: Principle of Optimality[DEC- 1 UNIT-5 Dynamic Programming: 1 Differentiate between Greedy, Dynamic Programming and Divide and Conquer method. [May-201][LJIET] 2 Given two sequences of characters: P=<MLNOM> & Q=<MNOM>. Obtain the longest common subsequence. [May-201][LJIET] 3 Given a knapsack having maximum weight capacity W=, and number of items available are three, such that S=3 wi=<1, 3, > vi=<3,, 5> 5 Fill the knapsack using dynamic programming such that knapsack should not exceed its maximum capacity and it should have maximum profit value. Is dynamic programming a Top-Down or a Bottom-Up technique? Why? [May-201][LJIET] Define principle of optimality. Explain Knapsack problem (2) in detail. [Sep-2013][LJIET] 5 Differentiate divide-and-conquer and dynamic programming. Write the recurrence for calculating binomial coefficient. [Sep-2013][LJIET] Explain chained matrix multiplication with example. [Sep-2013][LJIET] State Principle of optimality. Principle of optimality does not hold for all problems whose solutions can be viewed as a sequence of decisions. Find out such problem and show that it fails. [May-2012][LJIET] 8 Given a finite set of distinct coin types, say 50,20,10,5,2,1, and an integer constant C. Each type is available in unlimited quantity. Write an algorithm to find the exact change with minimum number of coins? Which strategy will you use? [May-2012][LJIET] 9 Write an algorithm to find binomial coefficients using recursion. Analyze it. [May- 2012][LJIET] 10 Give the algorithm with example to solve 0/1 Knapsack Problem using Dynamic Programming. [May-2012][LJIET] 5 Design & Analysis of Algorithm (1810) 201 Page 10

11 Differentiate the following: [May-2013][LJIET] 1. Divide and conquer & Dynamic Programming 2. Greedy Algorithm & Dynamic Programming 12 Compute Longest common subsequence for the strings, [May-2013][LJIET] A=<X,Y,Z,Y,T,X,Y>, B=<Y,T,Z,X,Y,X> 13 Solve the following Knapsack Problem using Dynamic Programming Method Write the equation for solving the problem. The capacity of knapsack is 5 Items 1 2 3 Weight 2 3 5 Value 3 5 [May-2013][LJIET] 1 Compute Matrix chain order for the following matrices, [May-2013][LJIET] A1 (5 X ), A2 ( X ), A3 ( X 2), A (2 X ) 15 Using algorithm determine a Longest Common Sequence of S1= abbacdcba S2= bcdbbcaac (use dynamic programming). [Sep-201][LJIET] 1 Solve the following knapsack problem with the given capacity W=5 using dynamic programming[sep-201][ljiet] 1 What kind of problems is solved by Bellman Ford algorithm? Run the bellman Ford algorithm on following graph. Find the running time[may- Design & Analysis of Algorithm (1810) 201 Page 11

18 UsGiven weight. Choose items with maximum total benefits but with at most W=10ml. [May- 19 Determine a Longest Common subsequence (LCS) of {1,0,0,1,0,1,01} and {0,1,0,1,1,0,1,1,0} with proper diagram[may- 20 Explain assembly line scheduling and how it can be done by dynamic programming? Write the procedure for computing the fastest times to get the assembly out of factory. [May- 21 Using dynamic programming find an optimal parenthesization of a matrix chain product whose sequence of dimension is 13,5,89,3,3 [DEC- 22 Using dynamic programming algorithm determine an Longest Common Sequence of S1= wxxwyzyx and S2= xyzxxywwz [DEC- 23 Describe an assembly line scheduling problem and give dynamic programming algorithm to solve it. [DEC- 2 Define: Optimal Substructure property[dec- 1 UNIT- Exploring Graphs 1 Explain depth-first-search and breadth-first-search with example. [Sep-2013][LJIET] 2 Prove/Give counter example: A graph with n nodes and more than n-1 edges must contain cycle. [May-2012][LJIET] 3 What is the main advantage of back-tracking? How does it achieve this? [May- 2012][LJIET] Depth First Search (DFS) algorithm can be used to find the connected components of an undirected graph. Justify the statement with reason. [May-2012][LJIET] 5 Define Graph. Explain types of graph and different ways of graph representations. [May-2013][LJIET] Give and explain Prim s Algorithm for Minimum Spanning Tree and Compare it with Kruskal s algorithm with an example. [May-2013][LJIET] 2 Design & Analysis of Algorithm (1810) 201 Page 12

What is an articulation point? Give applications of BFS and DFS. Generate at least 3 solutions for 5 queen s problem. [May-2013][LJIET] 8 Give the important properties of relation and also solve 8 queen s problem for a feasible sequence (,,, 1). [May-2013][LJIET] 9 Give the algorithm for Depth First Search of a Graph. Also define ArticulationPoint of the graph and explain how to find it. [Sep-201][LJIET] 10 What is the central principle of back tracking? Taking n-queens problem as an example, explain the solution process[sep-201][ljiet] 11 Explain with example how backtracking algorithm is useful in solving Hamilton cycle problem. [Sep-201][LJIET] 12 With an example, explain how the branch and bound technique is used to solve 0/1 knapsack problem. [Sep-201][LJIET] 13 Find the running time of breadth first search algorithm. [May- 1 Explain recursive algorithm of depth first search (DFS) for directed graph. [May- 15 Discuss how 8-queen problem can be solved using backtracking. [DEC- 1 Explain Backtracking with Knapsack problem. [DEC- 1 Explain use of Branch & Bound Technique for solving Assignment Problem[DEC- 18 Define: Articulation Point[DEC- 1 19 Define: Directed Acyclic Graph[DEC- 1 UNIT- String Matching 1 Define String-matching problem. Compare all string matching algorithms. [May- 201][LJIET] 2 What are the basic ideas behind string matching? Which are the two popular algorithms for string matching? Explain and analyze any one in brief. [May-2012][LJIET] Design & Analysis of Algorithm (1810) 201 Page 13

3 What is the need of matching the string? Explain Finite automata for string Matching. [May-2013][LJIET] Explain Rabin Karp method of string matching. [May-2013][LJIET] 5 Working modulo q=13, how many spurious hits does the Rabin Karp matcher encounter in text T=2359023115239921 when looking for pattern P=3115[May- Explain finite automata for string matching. [DEC- UNIT-8 Introduction to NP-Completeness 1 Differentiate decision problem and optimization problem. Is P= NP? List out the problems which can solve in polynomial time. List out the problems which cannot solve in polynomial time. [May-201][LJIET] 2 Define : (1) P (2) NP (3) NP-complete () NP-hard[Sep-2013][LJIET] 3 Define the class P and class NP. Is there any NP-Hard problem, which is also NP? If yes, give an example, if no, why? [May-2012][LJIET] What is backtracking? Explain P, NP and NP complete problems. [May-2013][LJIET] 5 What is polynomially turing reducible problem? Explain with example how problem A can be polynomially Turing reduced to problem B. [Sep-201][LJIET] Define terms: Polynomial time algorithm[may- 2.5 Define terms: NP-Complete[May- 2.5 8 Prove that travelling salesman problem is NP-complete. [May- 9 Define: P and NP Problems[DEC- 1 Design & Analysis of Algorithm (1810) 201 Page 1