You are on page 1of 1

SESSION:2023-24

ABES Engineering College, Ghaziabad


Department of Information Technology

DESIGN AND ANALYSIS OF


ALGORITHM CLASS/SEM:
(KCS 503) B.TechVth (ODD)
UNIT-IV & V

1 Write Rabin Karp string matching algorithm. Working modulo q=11, how many spurious
hits does the Rabin karp matcher in the text T= 3141592653589793, when looking for the
pattern P=26.

2 Explain and Write the Knuth-Morris-Pratt algorithm for pattern matching also write its
time complexity. Perform KMP algorithm to search the occurrence of pattern abaab in
the string abbabaabaabab

3 Explain and Write the Naïve-String string matching algorithm: Suppose the given pattern
p= aab and given text T = a c a a b c. Apply Naïve-String Matching algorithm on above
Pattern (P) and Text (T) to find the number of occurrences of P in T.
4 Explain approximation algorithm. Explore set cover problem using approximation
algorithm.
5 Write and explain the algorithm to solve vertex cover problem using approximation
algorithm
6 Define P, NP, NP hard and NP complete. Give example of each

7. What is N queens problem? Draw a state space tree for 4 queens problem using
backtracking

8 Discuss LCS algorithm to compute Longest Common Subsequence of two given strings
and time complexity analysis with example

9 Write down the Floyd Warshal algorithm and its complexity. Explain with example

10 What is backtracking? Discuss sum of subset problem with the help of an example.

You might also like