Unit2 - Subjective Questions

CSE408 • Practice Questions with Detailed Answers

1

Explain the Brute-Force String Matching algorithm. Discuss its time complexity in the best and worst-case scenarios.

2

Define the Closest-Pair Problem in computational geometry and explain how the exhaustive search approach solves it.

3

What is the Convex-Hull Problem? Describe the brute-force algorithm to find the convex hull of a set of points.

4

Explain the concept of Exhaustive Search in algorithm design. What are its main advantages and disadvantages?

5

What are Voronoi Diagrams? Discuss their key properties and applications in computational geometry.

6

Describe the Naive String-Matching algorithm. Why is it considered inefficient for certain types of text and pattern combinations?

7

Explain the core concept of the Rabin-Karp algorithm. How does hashing improve the string matching process?

8

What is a 'spurious hit' in the Rabin-Karp algorithm? How is it resolved?

9

Explain the significance of the Prefix Function (or array) in the Knuth-Morris-Pratt (KMP) Algorithm.

10

Derive the prefix function (LPS array) for the pattern . Show the values at each step.

11

Compare and contrast the Naive String Matching algorithm with the Knuth-Morris-Pratt (KMP) algorithm.

12

Explain how Sequential Search differs from Brute-Force String Matching.

13

Discuss the time complexity of the Knuth-Morris-Pratt (KMP) algorithm. Break down the preprocessing and matching phases.

14

In the Rabin-Karp algorithm, modulo arithmetic is used extensively. Explain why a prime number is chosen for the modulo operation.

15

How does the divide-and-conquer approach improve upon the exhaustive search method for the Closest-Pair problem?

16

Define a 'Convex Set' and 'Convex Hull'. Provide real-world applications where the Convex Hull problem is utilized.

17

What is the relationship between Voronoi Diagrams and Delaunay Triangulation?

18

Write down the rolling hash formula used in the Rabin-Karp algorithm. Explain each variable in the formula.

19

Give a step-by-step trace of the Naive String-Matching algorithm for Text and Pattern .

20

What are the common practical applications of String-Matching algorithms?