What is the time complexity of string matching using a suffix tree?
A. O(m*n)
B. O(m log n)
C. O(n)
D. O(m + n)
Select an option to see the answer and solution.
Which algorithm is well-suited for string matching when dealing with long and complex patterns?
A. Boyer-Moore
B. Knuth-Morris-Pratt (KMP)
C. Rabin-Karp
D. Naive Search
Select an option to see the answer and solution.
In the Boyer-Moore algorithm, how is the "good suffix rule" utilized?
A. It preprocesses the text.
B. It creates hash values for substrings.
C. It processes the text in reverse.
D. It shifts the pattern to align with previously matched suffixes.
Select an option to see the answer and solution.
Which string matching algorithm is known for being efficient with very large alphabets?
A. Boyer-Moore
B. Knuth-Morris-Pratt (KMP)
C. Rabin-Karp
D. Naive Search
Select an option to see the answer and solution.
What is a key characteristic of the Naive string matching algorithm?
A. It uses advanced hashing techniques.
B. It requires sorting the pattern.
C. It is simple to implement.
D. It has a high worst-case time complexity.
Select an option to see the answer and solution.
What is the pre-processing time of Rabin and Karp Algorithm?
A. Theta(m2 )
B. Theta(mlogn)
C. Theta(m)
D. Big-Oh(n)
Select an option to see the answer and solution.
Given a pattern of length-5 window, find the suitable modulo value.
4 3 2 5 0 Select an option to see the answer and solution.
What is the basic principle in Rabin Karp algorithm?
A. Hashing
B. Sorting
C. Augmenting
D. Dynamic Programming
Select an option to see the answer and solution.
What is the space complexity of quick search algorithm?
A. O(n)
B. O(log n)
C. O(m+n)
D. O(mn)
Select an option to see the answer and solution.
If n is the length of text(T) and m is the length of the pattern(P) identify the correct matching algorithm.
Options are not available for this question.
Select an option to see the answer and solution.
Rabin Karp Algorithm makes use of elementary number theoretic notions.
Select an option to see the answer and solution.
If n is the length of text(T) and m is the length of the pattern(P) identify the correct pre-processing algorithm. (where q is a suitable modulus to reduce the complexity)
p=0; t0=0;
Options are not available for this question.
Select an option to see the answer and solution.
What is the worst case running time in searching phase of Boyer-Moore's algorithm?
A. O(n)
B. O(log n)
C. O(m+n)
D. O(mn)
Select an option to see the answer and solution.
Which of the following is the fastest algorithm in string matching field?
A. Boyer-Moore's algorithm
B. String matching algorithm
C. Quick search algorithm
D. Linear search algorithm
Select an option to see the answer and solution.
What is the worst case running time of Rabin Karp Algorithm?
A. Theta(n)
B. Theta(n-m)
C. Theta((n-m+1)m)
D. Theta(nlogm)
Select an option to see the answer and solution.
What happens when the modulo value(q) is taken large?
A. Complexity increases
B. Spurious hits occur frequently
C. Cost of extra checking is low
D. Matching time increases
Select an option to see the answer and solution.
Rabin- Karp algorithm can be used for discovering plagiarism in a sentence.
Select an option to see the answer and solution.
If the expected number of valid shifts is small and modulus is larger than the length of pattern what is the matching time of Rabin Karp Algorithm?
A. Theta(m)
B. Big-Oh(n+m)
C. Theta(n-m)
D. Big-Oh(n)
Select an option to see the answer and solution.
Which of the following algorithms formed the basis for the Quick search algorithm?
A. Boyer-Moore's algorithm
B. Parallel string matching algorithm
C. Binary Search algorithm
D. Linear Search algorithm
Select an option to see the answer and solution.
Given a pattern of length- 5 window, find the valid match in the given text.
Pattern: 2 1 9 3 6
Modulus: 21
Index: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Text: 9 2 7 2 1 8 3 0 5 7 1 2 1 2 1 9 3 6 2 3 9 7A. 11-16
B. 3-8
C. 13-18
D. 15-20
Select an option to see the answer and solution.