Who created the Rabin-Karp Algorithm?
Joseph Rabin and Michael Karp
Michael Rabin and Joseph Karp
Richard Karp and Michael Rabin
Michael Karp and Richard Rabin
20 practice sets · Page 1 of 1
Who created the Rabin-Karp Algorithm?
Joseph Rabin and Michael Karp
Michael Rabin and Joseph Karp
Richard Karp and Michael Rabin
Michael Karp and Richard Rabin
What is the basic principle in the Rabin-Karp algorithm?
Hashing
Sorting
Augmenting
Dynamic programming
If the expected number of valid shifts is small and modulus is larger than the pattern length, what is the matching time of the Rabin-Karp Algorithm?
Theta(m)
O(n+m)
Theta(n-m)
O(n)
What happens when the modulo value (q) is taken large?
Complexity increases
Spurious hits occur frequently
Cost of extra checking is low
Matching time increases
Rabin-Karp algorithm can be used for discovering plagiarism in a sentence.
True
False
What is the worst case running time of the Rabin-Karp Algorithm?
Theta(n)
Theta(n-m)
Theta((n-m+1)m)
Theta(n log m)
What is the basic formula applied in Rabin-Karp Algorithm to achieve pre-processing in Theta(m)?
Halving rule
Horner's rule
Summation lemma
Cancellation lemma
Rabin-Karp Algorithm makes use of elementary number theoretic notions.
True
False
What is the pre-processing time of the Rabin-Karp Algorithm?
Theta(m^2)
Theta(m log n)
Theta(m)
O(n)
What is the Rabin-Karp Algorithm?
String matching algorithm
Shortest path algorithm
Minimum spanning tree algorithm
Approximation algorithm
Given input string = "ABCDABCATRYCARCABCSRT" and pattern string = "CAT". Find the first index of the pattern match using Quick search algorithm.
2
6
11
14
The searching phase in Quick search algorithm has good practical behaviour.
True
False
What is the worst case running time in the searching phase of Boyer-Moore's algorithm?
O(n)
O(log n)
O(m+n)
O(mn)
What character shift tables does Boyer-Moore's search algorithm use?
Good-character shift tables
Bad-character shift tables
Next-character shift tables
Both good and bad character shift tables
Quick search algorithm starts searching from the rightmost character to the left.
True
False
What is the space complexity of the Quick search algorithm?
O(n)
O(log n)
O(m+n)
O(mn)
What character shift tables does the Quick search algorithm use?
Good-character shift tables
Bad-character shift tables
Next-character shift tables
Both good and bad character shift tables
What is the time complexity of the Quick search algorithm?
O(n)
O(log n)
O(m+n)
O(mn)
Which of the following algorithms formed the basis for the Quick search algorithm?
Boyer-Moore's algorithm
Parallel string matching algorithm
Binary search algorithm
Linear search algorithm
Which of the following is the fastest algorithm in the string matching field?
Boyer-Moore's algorithm
String matching algorithm
Quick search algorithm
Linear search algorithm