Final Exam (EX3) Review Questions
CS 4521, Fall 2000
Ch. 35 - Line-Sweep Algorithms and Line Intersections
-
What is the purpose of the X-data structure in a sweepline algorithm?
What kind of data structure is it?
What kind of entries does it contain?
How are the entries ordered?
-
What is the purpose of the Y-data structure in a sweepline algorithm?
What kind of data structure is it?
-
In the line-sweep algorithm for determining intersections of horizontal
and vertical lines, what kind of entries does the Y data structure
contain?
How are the entries ordered?
Ch. 34 - String Matching
-
Suppose you have a text string of length n, a pattern string of
length m, and an alphabet of size s.
How much time does it take to construct a standard finite state machine
for finding matches to the pattern in the text?
How much time does the finite state machine take to find the matches?
-
How does the Knuth-Morris-Pratt algorithm modify the finite state
machine?
What is the effect on the runtimes?
Ch. 16 - Recursive Optimization, Memoization, and Dynamic Programming
-
Recursive optimization algorithms are often modified to use memoization
or converted into dynamic programming algorithms.
Why?
-
What is the difference between memoization and dynamic programming?
-
What are some trade-offs to consider in deciding between memoization and
dynamic programming?
-
What are some problems that can be solved by memoization or dynamic
programming?
-
Solve the Optimal Binary Search Tree problem with the following
frequencies.
index | 0 | 1 | 2
|
frequency | 0.5 | 0.3 | 0.2
|
Ch. 17 - Greedy Algorithms
-
Describe the greedy algorithm approach to solving an optimization
problem.
-
Give an example where the greedy approach does not yield an optimal
solution.
Ch. 36 - NP-Completeness
-
What is the class P?
-
What is the class NP?
-
Is P = NP?
-
What does it mean when you say that problem A is reducible to problem B?
-
What is an NP-Complete problem?
Ch. 37 - Approximation Algorithms
-
What are the most important considerations in deciding between an
optimal solution and an approximate solution of an optimization problem?
-
What algorithm approach often provides useful approximate solutions to
an optimization problem?
For the final exam, you should also reread the following: