CISC 4080 —Computer Algorithms Spring 2019 Final Review Quide The final exam is cumulative, with 70% of the questions from the second half of the semester. Please bear in mind that all topics are related. In the list below, items 1-7 were covered before midterm exam.
- 1. Understand the basic concepts: algorithm, problem instance, input size, running time, space require-
ment (memory required), best case, worst case and average case performance (running time or space requirement)
- 2. Running time analysis: given pseudocode, write T(n) (i.e., number of computer steps executed by the
algorithm on an input of size n). (a) non-recursive: analyze the loop (including nested loop) to count the total number of steps executed (b) recursive algorithm: write a recursive formula for T(n).
- 3. Master theorem: know how/when to apply it to solve recursive formula for closed one For example, it
cannot be used to solve T(n) = 2T(n − 2) + n2, It can be used to solve T(n) = 3T(3n/4) + n2, with a = 3, b = 4/3, d = 2, because n/b = 3n/4.
- 4. Understand the meaning of O, Ω, Θ notations, and can use the simple rules of thumbs (book DPV and
slides) to decide for given pairs of functions of n, what is the relation between them.
- 5. Understand the algorithms studied for the problems listed below
(a) Search problem: linear search (works for unsorted array or sorted one) and binary search (requires array to be sorted already) (b) Sorting: bubble sort, selection sort, insertion sort, mergesort, quick sort, counting sort, radix sort and so on (c) Selection (find the k-th largest element): adapted bubble sort, divide-and-conquer (practiced in hw3). Expectation: you should be able to answer questions about these algorithms, adapte the algorithms, and trace the codes.
- 6. Sorting algorithms concepts
(a) comparison based vs non-comparison based (b) lower bound for comparison based sorting: n log n. (c) in-place vs out-of-place sorting (d) stable vs unstable sorting algorithms (depends on the implementation details) (e) n2 vs n log n vs n running time sorting algorithms
- 7. Problem solving paradigm: how to come up an algorithm to solve a new problem
- brute force: enumerate (try) all possibilities to find the best one