CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 3.

Slides:



Advertisements
Similar presentations
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013 Lecture 2.
Advertisements

COMP 482: Design and Analysis of Algorithms
Greedy Algorithms.
Great Theoretical Ideas in Computer Science for Some.
CSCI 256 Data Structures and Algorithm Analysis Lecture 22 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Great Theoretical Ideas in Computer Science for Some.
CSE373: Data Structures & Algorithms Lecture 24: The P vs. NP question, NP-Completeness Nicki Dell Spring 2014 CSE 373 Algorithms and Data Structures 1.
Five Problems CSE 421 Richard Anderson Winter 2009, Lecture 3.
Lectures on Network Flows
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Complexity Theory: The P vs NP question Lecture 28 (Dec 4, 2007)
9/3/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Guest lecturer: Martin Furer Algorithm Design and Analysis L ECTURE.
Piyush Kumar (Lecture 1: Introduction)
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Chapter 1 Introduction: Some Representative Problems Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 27.
1 Chapter 10 Extending the Limits of Tractability Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Approximation Algorithms
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 8.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 33.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 17.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSCI 256 Data Structures and Algorithm Analysis Lecture 6 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
COMPSCI 102 Introduction to Discrete Mathematics.
CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 1.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
NP-Complete problems.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Instructor Neelima Gupta Table of Contents Five representative problems.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 6.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CSCI 256 Data Structures and Algorithm Analysis Lecture 2 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Introduction to Graph Theory
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 10.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
Markov Random Fields in Vision
1 Algorithms CSCI 235, Fall 2015 Lecture 29 Greedy Algorithms.
Great Theoretical Ideas in Computer Science.
CSC 172 P, NP, Etc.
Bipartite Matching Lecture 8: Oct 7.
Great Theoretical Ideas in Computer Science
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Piyush Kumar (Lecture 1: Introduction)
Piyush Kumar (Lecture 1: Introduction)
Lecture 22 Complexity and Reductions
Algorithm Design and Analysis
Lecture 22 Network Flow, Part 2
Great Theoretical Ideas in Computer Science
Greedy Algorithms / Interval Scheduling Yin Tat Lee
Richard Anderson Lecture 29 Complexity Theory
CSE 421 Richard Anderson Autumn 2016, Lecture 3
Richard Anderson Lecture 30 NP-Completeness
CSE 421 Richard Anderson Autumn 2015, Lecture 3
Algorithms CSCI 235, Spring 2019 Lecture 29 Greedy Algorithms
Piyush Kumar (Lecture 1: Introduction)
CSE 421, University of Washington, Autumn 2006
Piyush Kumar (Lecture 1: Introduction)
CSE 421 Richard Anderson Winter 2019, Lecture 3
Lecture 22 Network Flow, Part 2
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 3

Five Representative Problems Show the types of problems we will be considering in the class Similar looking problems with very different characteristics Problems –Scheduling –Weighted Scheduling –Bipartite Matching –Maximum Independent Set –Competitive Facility Location

Interval Scheduling Input: Set of jobs with start and finish times Goal: Find maximum cardinality subset of mutually compatible jobs Time f g h e a b c d h e b jobs don't overlap

Interval Scheduling n log n greedy algorithm

Suppose We Add Values?

Weighted Interval Scheduling Input: Set of jobs with start, finish, and weights Goal: Find maximum weight subset of mutually compatible jobs Time n log n dynamic programming algorithm

Bipartite Matching Input: Bipartite graph –A graph G = (V, E) is bipartite if V can be partitioned into sets X and Y such that every edge in E has one end in X and the other end in Y Goal: Find maximum cardinality matching –A matching is M  E with property that each node in V appears in at most one edge of M C A E 3 B D4 professors courses can teach

Bipartite Matching C A E 3 B D4

Find a Maximum Matching n k max-flow based algorithm

Independent Set Input: Graph Goal: Find maximum cardinality independent set subset of nodes such that no two joined by an edge

Find a Maximum Independent Set NP-complete No efficient algorithm is known, and it is conjectured that no such algorithm exists

Key characteristics Hard to find a solution Easy to verify a solution once you have one Other problems like this –Hamiltonian circuit –Clique –Subset sum –Graph coloring

NP-Completeness Theory of Hard Problems A large number of problems are known to be equivalent Very elegant theory

Are There Even Harder Problems? Simple game: –Players alternating selecting nodes in a graph Score points associated with node Remove node’s neighbors –When neither can move, player with most points wins

Competitive Facility Location For a particular player P i, is there a strategy so that, no matter how the other players play, P i will be able to select a set of nodes with a total value of at least X? Hard to convince someone of the answer to this question (i.e., no short proof, lengthy case-by-case analysis), compare with Independent Set Problem PSPACE-complete