Analysis & Design of Algorithm
3150703
Important Question for GTU Final Exam
Chapters - 1& 2
Basics of Algorithms and Mathematics
& Analysis of Algorithm
- Define following terms (i) Quantifier (ii) Algorithm (iii) Big ‘Oh’ Notation (iv) Big ‘Omega’ Notation (v) ‘Theta’ Notation.
- Explain an algorithm for Selection Sort Algorithm. Derive its best case, worst case and average case time complexity.
- Sort the given elements with Heap Sort Method: 20, 50, 30, 75, 90, 60, 25, 10, 40.
- Why do we use asymptotic notations in the study of algorithms? Briefly describe the commonly used asymptotic notations.
- Apply the bubble sort algorithm for sorting {U,N,I,V,E,R,S}
- Let f(n) and g(n) be asymptotically nonnegative functions. Using the basic definition of Θ-notation, prove that max(f(n), g(n)) = Θ (f(n) + g(n)).
- Define an algorithm. List various criteria used for analyzing an algorithm.
Chapters - 3
Divide
and Conquer Algorithm
- What is a recurrence? Solve recurrence equation T (n) =T (n-1) + n using forward substitution and backward substitution method.
- Write an algorithm for quicksort and derive best case, worst case using divide and conquer technique also trace given data (3,1,4,5,9,2,6,5)
- Explain the use of the Divide and Conquer Technique for Binary Search Method. What is the complexity of the Binary Search Method? Explain it with example.
- Write a program/algorithm of Quick Sort Method and analyze it with example.
- Solve the following recurrence using master method T(n) = 9T(n/3) +n.
- Solve the following recurrence using master method T(n) = T(2n/3) + 1.
- What do you mean by Divide & Conquer approach? List the advantages and disadvantages of it.
- Solve the following recurrence relation using the iteration method. T(n) = 8T(n/2) + n2 . Here T(1) = 1.
- Solve the following recurrence relation using the substitution method. T(n) = 2T(n/2) + n. Here T(1) = 1.
- Multiply 981 by 1234 by divide and conquer method.
- Sort the letters of word “EDUCATION” in alphabetical order using insertion sort.
Chapters - 4
Dynamic
Programming
- Write equation for Chained matrix multiplication using Dynamic programming. Find out optimal sequence for multiplication: A1 [5 × 4], A2 [4 × 6], A3 [6 × 2], and A4 [2 × 7]. Also give the optimal parenthesization of matrices.
- Explain how to find out Longest Common Subsequence of two strings using Dynamic Programming method. Find any one Longest Common Subsequence of given two strings using Dynamic Programming. X=abbacdcba & Y=bcdbbcaac
- Solve Making Change problem using Dynamic Programming. (Denominations: d1=1, d2=4, d3=6). Give your answer for making change of Rs. 9.
- Discuss Assembly Line Scheduling problem using dynamic programming with example.
- Solve Making change problem using dynamic technique. D1 = 1, d2=3, d3=5, d4=6. Calculate for making change of Rs. 8.
- Find optimal sequence of multiplication using dynamic programming of following matrices: A1[10x100], A2[100x5], A3[5x50] and A4[50x1]. List optimal number of multiplication and parenthesization of matrices.
- Discuss and derive an equation for solving the 0/1 Knapsack problem using dynamic programming method.
Chapters - 5
Greedy Algorithm
- Using greedy algorithm find an optimal schedule for following jobs with n=6. Profits: (P1,P2,P3,P4,P5,P6) = (20, 15, 10, 7, 5, 3) Deadline: (d1,d2,d3,d4,d5,d6) =(3, 1, 1, 3, 1, 3).
- Define MST. Explain Kruskal’s algorithm with example for construction of MST.
- Explain Dijkstra algorithm to find the shortest path.
- Explain in brief characteristics of greedy algorithms. Compare Greedy Method with Dynamic Programming Method
- List applications of a minimum spanning tree. Find minimum spanning tree using PRIM’s algorithm of the following graph.
- Prove that the fractional knapsack problem has the greedy-choice property.
Chapters - 6
Exploring
Graphs
- Explain Breath First Traversal Method for Graph with algorithm with example.
- Explain Depth First Traversal Method for Graph with algorithm with example.
- Explain: Articulation Point, Graph, and Tree.
- Define graph. Describe strongly connected graph with example.
- Given an adjacency-list representation of a directed graph, how long does it take to compute the out-degree of every vertex? How long does it take to compute the in-degrees?
Chapters - 7
- Explain Backtracking Method. What is N-Queens Problem? Give solution of 4- Queens Problem using Backtracking Method.
- Explain 4 queen problems with one of the solution.
- Define backtracking. State types of constraints used in backtracking.
Chapters - 8 & 9
String Matching & Introduction to NP-Completeness
- What is Finite Automata? Explain use of finite automata for string matching with suitable example.
- Define P, NP, NP complete and NP-Hard problems. Give examples of each.
- Give and explain Rabin-Carp string matching algorithm with example.
- What is the basic idea behind Rabin – Karp algorithm? What is expected running time of this algorithm? Explain it with example.
- Explain naïve string matching algorithm with example.
- Explain Traveling salesman problem with example.
- Show the comparisons the naive string matcher makes for the pattern P=0001 in the text T=000010001010001.
- Working modulo q=11, how many spurious hits does the Rabin-Karp matcher encounter in the text T=3141592653589793 when looking for the pattern P=26?
No comments:
Post a Comment