Topics for Exam #2, Tuesday 4/3

You are allowed to use one page of notes (both sides, 8.5 X 11) with anything you would like to put on it for the test.  You can also use a calculator if you wish.   Aside from those materials, no other books or notes are allowed.  The test will cover graphs, complexity, and dynamic programming.

Graphs

• Basic concept, edges, vertices, relationship
• Directed, Undirected
• 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
• Topological sort using DFS
• Minimum Spanning Tree
• Notion of the 'cut' for Kruskal's algorithm
• Demonstrate Kruskal and Prim's algorithms
• Runtime
• Data structures required for each
• Practical uses of MST
• Dijkstra's Shortest Path Algorithm
• Limitations
• Runtime
• Demonstrate on a graph

P/NP

• Relationship between classes P and NP
• What an NP-Complete problem is
• You will be asked to show that a problem is NP-Complete via polynomial reducibility
• Decision problem vs. Optimization problem
• Know what the following NP-Complete problems are
• Graph Coloring
• Bin Packing
• Knapsack Problem
• Subset Sum
• Traveling Salesman
• Hamiltonian Cycle
• Implications if an NP-Complete problem can be shown to have a polynomial solution

Dynamic Programming

• Idea of optimal substructure
• Come up with the dynamic programming solution; e.g. a D[current-sized-problem] = D[smaller-sized-problem]
• There are no specific questions that ask you to demonstrate exactly one of the following, but it will be helpful to understand how these work as examples to solve the test problem
• Floyd-Warshall All Pairs Shortest Path algorithm
• Approximate String Matching
• Knapsack Problem