This preview shows page 1. Sign up to view the full content.
Unformatted text preview: CSC 3102: Final Exam
December 8, Monday 3:00 PM to 5:00 PM 213 Tureaud CSC 3102 0.1 B.B. Karki, LSU Algorithm Design Techniques Brute force Divide-and-conquer Decrease-and-conquer Transform-and-conquer Space-and-time tradeoffs Dynamic programming Greedy techniques More on algorithms (not used for the exam) CSC 3102 0.2 B.B. Karki, LSU Topics Brute force Selection sort Brute-force string matching Convex hull problem Exhaustive search Traveling salesman, knapsack and assignment problems Divide-and-conquer Master theorem Mergesort Quicksort Quickhull CSC 3102 0.3 B.B. Karki, LSU Topics Decrease-and-conquer Insertion sort Permutations Minimal change approach Johnson-Trotter algorithm Fake-coin problem Ternary search Computing a median Transform-and-conquer Gaussian elimination Heaps and heapsort Problem reduction CSC 3102 0.4 B.B. Karki, LSU Topics Space-and-time tradeoffs Horspool's algorithm for string matching Boyer-Moore algorithm for string matching Dynamic programming Warshall's algorithm for transitive closure Floyd's algorithms for all-pairs shortest paths Greedy techniques Prim's algorithm for the MST problem Kruskal's algorithm for the MST problem Disjoint subsets and union-find algorithm Dijkstra's algorithm for single-source shortest path problem Huffman tree and code. CSC 3102 0.5 B.B. Karki, LSU Sample Questions: Type 1 The partition-based algorithm to find the median of a list of integers adopts a divide-and-conquer approach. True or false? The time efficiency of the Gaussian Elimination algorithm is in (n3). True or false? Warshall's algorithm constructs the transitive closure of a directed graph using dynamic programming technique. True or false? Exhaustive search is a brute-force approach to combinatorial problems. True or false? Any weighted connected graph with distinct weights has exactly one minimum spanning tree. True or false? It is always true that the bottom-up and top-down algorithms yield the same heap for the same input. True or false?
0.6 CSC 3102 B.B. Karki, LSU Sample Questions: Type 2 Apply Kruskal's algorithm to find a minimum spanning tree of the following graph. Calculate the total weight of the tree. Can this graph have more than one MST? Justify your answer. Generate the bad-symbol and good-suffix tables for a 7-bit long pattern 1000000. Construct a Huffman code for the following data: character A B C D probability 0.4 0.1 0.2 0.15 0.15 Encode the text ABACABAD using the above code. Decode the text whose encoding is 100010111001010 using the above code. Construct a heap for the list 1, 8, 6, 5, 3, 7, 4 using either the bottom-up algorithm or the top-down algorithm. Use Master Theorem to find the order of growth of the following recurrence: T(n) = 4T(n/2) + n3 for n > 0, T(1) = 1. CSC 3102 0.7 B.B. Karki, LSU ...
View Full Document
This note was uploaded on 10/06/2009 for the course CSC 3102 taught by Professor Kraft,d during the Fall '08 term at LSU.
- Fall '08
- C Programming