UMass Lowell Computer Science 91.503 Analysis of Algorithms Prof. Karen Daniels Spring, 2003 Review Lecture Tuesday, 5/6/03.

Slides:



Advertisements
Similar presentations
C&O 355 Lecture 23 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Advertisements

Introduction to Algorithms
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Midterm Review Fri. Oct 26.
02/01/11CMPUT 671 Lecture 11 CMPUT 671 Hard Problems Winter 2002 Joseph Culberson Home Page.
1 Linear Programming Jose Rolim University of Geneva.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/4/01.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2005 Lecture 1 (Part 1) Introduction/Overview Tuesday, 1/25/05.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2009 Lecture 1 Introduction/Overview Text: Chapters 1, 2 Th. 9/3/2009.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 2 Tuesday, 9/10/02 Design Patterns for Optimization.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 6 Tuesday, 10/30/01 Approximation Algorithms.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/3/02.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 4 Tuesday, 10/2/01 Graph Algorithms: Part 2 Network.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2006 Lecture 7 Monday, 4/3/06 Approximation Algorithms.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Review Lecture Tuesday, 12/10/02.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2002 Tuesday, 5/7/02 Computational Geometry Chapter 33.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 1 Introduction/Overview Wed. 9/5/01.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 1 Course Introduction.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2005 Lecture 1 Introduction/Overview Text: Chapters 1, 2 Wed. 9/7/05.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2000 Final Review Wed. 12/13.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 1 (Part 1) Introduction/Overview Wednesday, 9/8/04.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2009 Lecture 7 Tuesday, 4/7/09 Approximation Algorithms.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2007 Lecture 1 Introduction/Overview Text: Chapters 1, 2 Wed. 1/24/07.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Lecture 1 Introduction/Overview Wed. 1/31/01.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2000 Lecture 1 Introduction/Overview Wed. 9/6/00.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2008 Lecture 2 Tuesday, 9/16/08 Design Patterns for Optimization.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2002 Lecture 1 (Part 1) Introduction/Overview Tuesday, 1/29/02.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Final Review Mon. 5/14-Wed. 5/16.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2008 Lecture 9 Tuesday, 11/18/08 Linear Programming.
Approximation Algorithms
1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2002 Lecture 1 Introduction/Overview Text: Chapters 1, 2 Thurs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
MIT and James Orlin1 NP-completeness in 2005.
Approximation Algorithms
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2009 Lecture 1 (Part 1) Introduction/Overview Tuesday, 1/27/09.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Unit 9: Coping with NP-Completeness
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Review Lecture Tuesday, 12/11/01.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 7 Tuesday, 4/6/10 Approximation Algorithms 1.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 9 Tuesday, 4/20/10 Linear Programming 1.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
Design and Analysis of Algorithms (09 Credits / 5 hours per week)
Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/9/08
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Lecture 1 Introduction/Overview Text: Chapters 1, 2 Wed. 1/28/04
Summary of lectures Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture Slides Recurrence and Master Theorem (Chapter 4). Lecture Slides.
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Richard Anderson Lecture 29 Complexity Theory
Richard Anderson Lecture 30 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 27 Survey of NP Complete Problems
Presentation transcript:

UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2003 Review Lecture Tuesday, 5/6/03

Some Algorithm Application Areas Computer Graphics Geographic Information Systems Robotics Bioinformatics Astrophysics Medical Imaging Telecommunications Design Apply Analyze

Some Typical Problems Fourier Transform Input: A sequence of n real or complex values h_i, 0 <= i <= n-1, sampled at uniform intervals from a function h. Problem: Compute the discrete Fourier transform H of h Nearest Neighbor Input: A set S of n points in d dimensions; a query point q. Input: A set S of n points in d dimensions; a query point q. Problem: Which point in S is closest to q? Problem: Which point in S is closest to q? SOURCE: Steve Skiena’s Algorithm Design Manual (for problem descriptions, see graphics gallery at ) (for problem descriptions, see graphics gallery at Shortest Path Input: Edge-weighted graph G, with start vertex and end vertex t Problem: Find the shortest path from to t in G Bin Packing Input: A set of n items with sizes d_1,...,d_n. A set of m bins with capacity c_1,...,c_m. Problem: How do you store the set of items using the fewest number of bins?

Some Typical Problems Transitive Closure Input: A directed graph G=(V,E). Problem: Construct a graph G'=(V,E') with edge (i,j) \in E' iff there is a directed path from i to j in G. For transitive reduction, construct a small graph G'=(V,E') with a directed path from i to j in G' iff (i,j) \in E. Convex Hull Input: A set S of n points in d- dimensional space. Problem: Find the smallest convex polygon containing all the points of S. Problem: Find the smallest convex polygon containing all the points of S. Eulerian Cycle Input: A graph G=(V,E). Problem: Find the shortest tour of G visiting each edge at least once. Edge Coloring Input: A graph G=(V,E). Problem: What is the smallest set of colors needed to color the edges of E such that no two edges with the same color share a vertex in common?

Some Typical Problems Hamiltonian Cycle Input: A graph G=(V,E). Problem: Find an ordering of the vertices such that each vertex is visited exactly once. Clique Input: A graph G=(V,E). Problem: What is the largest S \subset V such that for all x,y \in S, (x,y) \in E?

Topics ä Advanced Algorithmic Paradigms ä Dynamic programming ä Greedy algorithms ä Simplex optimization ä Approximation algorithms & schemes ä Randomized algorithms ä Sweep-line algorithms ä Advanced Analysis Techniques ä Amortized ä Output-sensitive ä Graph Algorithms ä Shortest paths (single source & all pairs) ä Maximum flow ä Theory: NP-Completeness ä Complexity classes, reductions, hardness, completeness ä Advanced Algorithms for Special Applications ä Cryptography ä String/Pattern Matching ä Computational Geometry

Chapter Dependencies Math Review: Asymptotics, Recurrences, Summations, Sets, Graphs, Counting, Probability, Calculus, Proofs Techniques (e.g. Inductive) Logarithms Ch 6-9 Sorting Ch Data Structures Math: Linear Algebra Ch 33 Computational Geometry Math: Geometry (High School Level) Ch Advanced Design & Analysis Techniques Ch Graph Algorithms Ch 34 NP-Completeness Ch 35 Approximation Algorithms Ch 31 Number-Theoretic Algorithms: RSA Math: Number Theory Ch 32 String Matching Automata Ch 29 Linear Programming

Important Dates ä Final Exam: ä Saturday, 17 May, Olsen Hall, Room 311, 11:30 am

Grading ä ä Homework35% ä ä Midterm 30% (open book, notes ) ä ä Final Exam35% (open book, notes )

Review Topics ä Linear Programming ä Formulating an LP model ä Multicommodity flow [handout] ä Factory scheduling ä SIMPLEX: infeasible initial basic solution [slides] ä Approximation Algorithms ä Euclidean TSP tour non-self-intersecting [handout] ä Clique approximation [handout] ä NP-completeness Reductions ä Dominating Set ä Rectangular Containment (kRR) ä Factory Scheduling

Multicommodity Flow source: textbook Cormen et al. should be s i

Fundamental Theorem of Linear Programming source: textbook Cormen et al.

Simplex Method

Simplex Algorithm: Pseudocode source: textbook Cormen et al. to be defined later (detects infeasibility) Feasibility initial basic solution optimal solution

Simplex Algorithm: Basic Solution source: textbook Cormen et al. Standard Form Slack Form Basic Solution: set each nonbasic variable to 0. Basic Solution:

Simplex Algorithm: Example Reformulating the LP Model source: textbook Cormen et al. Main Idea: In each iteration, reformulate the LP model so basic solution has larger objective value Select a nonbasic variable whose objective coefficient is positive: x 1 Increase its value as much as possible. Identify tightest constraint on increase. For basic variable x 6 of that constraint, swap role with x 1. Rewrite other equations with x 6 on RHS. PIVOT leaving variable entering variable new objective value

Simplex Algorithm: Issues to be Addressed… source: textbook Cormen et al.

Initial Basic Feasible Solution

Simplex Algorithm: Basic Solution source: textbook Cormen et al. Standard Form Slack Form Basic Solution: set each nonbasic variable to 0. Basic Solution: How can this fail to be feasible?

Finding an Initial Solution source: textbook Cormen et al. An LP model whose initial basic solution is not feasible

Finding an Initial Solution (continued) source: textbook Cormen et al. Auxiliary LP model L aux :

Finding an Initial Solution (continued) source: textbook Cormen et al. Original LP model L aux L aux in slack form

Finding an Initial Solution (continued) source: textbook Cormen et al.

Finding an Initial Solution (continued) source: textbook Cormen et al. PIVOT

Review Topics ä Linear Programming ä Formulating an LP model ä Multicommodity flow [slide & handout] ä Factory scheduling ä SIMPLEX: infeasible initial basic solution [slides] ä Approximation Algorithms ä Euclidean TSP tour non-self-intersecting [handout] ä Clique approximation [handout] ä NP-completeness Reductions ä Dominating Set ä Rectangular Containment (kRR) ä Factory Scheduling

Vertex Cover source: Garey & Johnson B E C F D A Vertex Cover of an undirected graph G=(V,E) is a subset vertex cover of size 2

Clique source: Garey & Johnson B E C F D A Clique of an undirected graph G=(V,E) is a complete subgraph of G. clique of size 3

Reducing Clique to VertexCover source: textbook Cormen et al. Construct complement G =(V, E ) of graph G such that G has clique of size k iff graph G has a vertex cover of size |V|-k. z w u y v x 34.15

Review Topics ä Linear Programming ä Formulating an LP model ä Multicommodity flow [handout] ä Factory scheduling ä SIMPLEX: infeasible initial basic solution [slides] ä Approximation Algorithms ä Euclidean TSP tour non-self-intersecting [handout] ä Clique approximation [handout] ä NP-completeness Reductions ä Dominating Set ä Rectangular Containment (kRR) ä Factory Scheduling

Expanding List of Hard Problems via Reduction ä Relationships among some NP-complete problems source: textbook Cormen et al. source: Garey & Johnson Circuit-SAT Dominating SetkRR

Dominating Set source: Garey & Johnson

Course Evaluations ä Need student volunteer to collect them.