Topics for Final Exam
The final exam is open book and open notes. You are free to use any
computing devices although I ask that you do not search the Internet for answers or otherwise communicate online with other people. The test is not comprehensive and will only cover
the material since the midterm (i.e. the Automata and Complexity material will
not be on the test, except for P/NP). I am aiming for a 2 hour exam but
you have the full 2 hours and 45 minutes.
NP
-
What it means for a problem to be in P, NP, or NP Complete
-
You will definitely be given a problem where you prove, using reduction from a
known NP-Complete problem, that some other problem is NP-Complete.
Math Basics
-
Big-O vs Theta vs Omega and Little-O notations
-
You may need to solve summations (will be one you have seen before so you may
want to have old summations we covered in class/homework handy)
Solving recurrence relations
-
You will definitely have to solve a recurrence relation on the exam.
-
Induction
-
Iteration / Recursion Tree
-
Master Theorem Method
Selection Problem
-
How to partition an array in linear time, no additional space
-
Good, bad cases for partitioning and impact on the algorithm runtime
-
Different methods for selecting the partition element
-
Using the partition routine to select the ith largest element in expected
linear time
Sorting
Mergesort, Quicksort
Expected O(n) Sorting Algorithms
Count Sort, Radix Sort, Bucket Sort
Graphs
-
Basic concept, edges, vertices, relationship
-
Directed, Undirected
-
Adjacency List vs. Adjacency Matrix, advantages/disadvantages
-
Properties of connected graphs, relationship between E and V
-
Breadth First Search
-
Algorithm, Purpose, space/time behavior
-
Run on a graph, be able to identify when it may be useful
-
Use to detect a bipartite graph
-
Depth First Search
-
Algorithm, Purpose, space/time behavior
-
Run on a graph, be able to identify when it may be useful
-
Detecting cycles
-
DAG, Directed Acyclic Graph
-
Minimum Spanning Tree
-
Maximum Flow
-
Be able to demonstrate Ford-Fulkerson method on a graph
-
Be able to calculate residual network
-
Reduce some other problem to the maximum flow for a graph
-
Might have some new graph problem that incorporates aspects of several of the above issues into one problem
issues
Dynamic Programming / Greedy Algorithms
-
Difference between Greedy/Dynamic Programming, what makes an algorithm greedy
-
Be able to come up with a greedy algorithm to approximate an optimal solution (or perhaps find the optimal solution)
-
You will definitely have to come up with the dynamic programming solution; e.g. a D[current-sized-problem]
= D[smaller-sized-problem]
-
An understanding of how the following examples work will help you to
solve the test problem
Longest Common Subsequence
-
Floyd-Warshall All Pairs Shortest Path algorithm
-
Approximate String Matching
-
Knapsack Problem
String Algorithms
-
Brute Force
-
Finite State Automaton
-
Horspool
-
Boyer Moore
-
Concepts behind KMP and Rabin Karp
-
Be able to demonstrate each on a string, best and worst case scenarios for
each