COMPSCI 330 Design and Analysis of Algorithms Rong Ge
Algorithms From wiki: In mathematics and computer science, an algorithm is a self-contained sequence of actions to be performed.
Designing an Algorithm - Basics Divide and conquer Dynamic programming Greedy algorithms
Designing an Algorithm - Examples Graph algorithms Shortest paths Minimum spanning tree Bipartite matching Data structrues Hashing Disjoint sets
Designing Algorithm – General Tools Linear Programming Formulation Duality Algorithms
Designing Algorithm - Intractability What (we believe) cannot have efficient algorithms. P vs. NP NP completeness Reductions
Final Format 5 problems Problem 1 Warm-up Possible topics: recursions/running graph algorithms/graph examples Problems 2-4 Topics covered in previous midterms Basic design techniques Graph algorithms Linear Programming There might be probabilities in the problems. Problem 5 Reduction You will be given an NP-hard problem as starting point (make sure to reduce this problem to the new problem)
Example of “probabilities in problems” You are trying to predict the result of election based on available data. There are n states, state i has vi votes, and there are m votes in total. Based on the current data, state i has probability pi to vote for democratic party, and probability 1-pi to vote for republican party. Compute the exact probability of democratic party to win the election.