ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Programming & Data Structures
MCS312: NP-completeness and Approximation Algorithms
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
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.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
Introduction to NP Instructor: Neelima Gupta 1.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
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
Limitation of Computation Power – P, NP, and NP-complete
Complexity Classes.
NP-Complete Problems.
More NP-Complete and NP-hard Problems
More NP-complete problems
Chapter 10 NP-Complete Problems.
EMIS 8373: Integer Programming
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Lecture 2-2 NP Class.
Part VI NP-Hardness.
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
Lecture 22 Complexity and Reductions
Lecture 5 NP Class.
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Chapter 34: NP-Completeness
Approximation Algorithms
Richard Anderson Lecture 30 NP-Completeness
CS 583 Fall 2006 Analysis of Algorithms
Chapter 11 Limitations of Algorithm Power
Richard Anderson Lecture 27 NP Completeness
NP-completeness The Chinese University of Hong Kong Fall 2008
CS 3343: Analysis of Algorithms
Richard Anderson Lecture 26 NP-Completeness
P, NP and NP-Complete Problems
The Theory of NP-Completeness
Reductions Complexity ©D.Moshkovitz.
Reductions Complexity ©D.Moshkovitz.
P, NP and NP-Complete Problems
A Few Sample Reductions
Richard Anderson Lecture 25 NP Completeness
Lecture 24 Classical NP-hard Problems
RAIK 283 Data Structures & Algorithms
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Instructor: Dr. Gautam Das Lecture 3 January 29, 2009 Class notes by Alexandra Stefan

Review (see previous lecture): optimization problem, decision problem, verification problem; P, NP; polynomial time reduction; Overview of lecture: New definitions: Decision problem as a set, complement of a decision problem, Co-NP, NP-Complete Example problems used or mentioned: HCP, TSP, SP, PRIME, SATISFIABILITY (HCP = Hamiltonian Cycle, TSP = Traveling Salesman, SP = Shortest Path ) Other things to remember: Pay attention to the proper formulation of what constitutes the input of each problem. It is not always easy to produce a certificate for a decision problem.

Definitions NP Decision problems as sets: set of problems whose verification version can be solved in polynomial time. Imporatnt: You need to have a certificate Decision problems as sets: A decision problem takes an input and produces an ‘Yes’ or ‘No’ output. Any decision problem, X, can be defined as the set of inputs for which the answer is ‘Yes’. The complement of a decision problem: Given a decision problem X, the complement of X is the set of inputs for which the answer is ‘No’. Co-NP = set of decision problems whose complement problem is in NP. NP-Complete: A problem X is NP-Complete if: X is NP Any NP problem Y can be reduced in polynomial time to X. (“X should be the hardest problem in it’s class”) (Intuition: finding an NP-Complete problem is like finding the largest number in a set of numbers)

NP-Complete NP NP Co-NP P P

SP – Shortest Path SP SP is in NP: SP is in Co-NP: Set version of SP: Input: G (graph) ,s (vertex), t (vertex), x (value) Output: ‘Yes’ if there exists a path from s to t of length less or equal to x. ‘No’, otherwise. SP is in NP: Certificate: list of vertices Easy to check if the certificate is a valid path, to compute it’s length and compare it with x. SP is in Co-NP: Certificate: nothing use Dijkstra to get the shortest path and it’s length, y. This runs in polynomial time. Compare x with y. Set version of SP: The set of tuples: < G (graph) ,s (vertex), t (vertex), x (value) > for which the answer is ‘Yes’.

Hamiltonian Cycle Problem (HCP) Definition: Input: unweighted graph Output: Yes, if there exists a cycle that visits all vertices exactly once No, otherwise Examples Graph: Does it have a Hamiltonian cycle? Answer: No Yes

Hamiltonian Cycle Problem (HCP) Is HCP in NP ? Yes A certificate is a list of vertices It is easy to verify that the certificate constitutes a valid cycle in the graph and that it covers all vertices Is HCP in Co-NP ? yes Since HCP is in NP

NP-Complete How do you show that a problem is NP-Complete? You have to show that any problem in NP can be reduced to it. First problem that was shown to be NP-Complete is the SATISFIABILITY problem. It is known as Cook’s Theorem. Once we have an NP-Complete problem, X, to show that another NP problem, Y, is NP-Complete, we only need to show that X reduces in polynomial time to Y.

NP-Complete Y X If X is NP-Complete and X reduces in polynomial time to Y then any problem can be reduced in polynomial time to Y by First reducing it to X and then reducing X to Y. (Here we used the property of polynomials of being closed under multiplication.)

(using reduction of X to Y) Polynomial reduction 3 equivalent ways of saying that X reduces in polynomial time to Y: reducer Solver of Y Solver of X (using reduction of X to Y) Input for X answer Set mapping after reduction X Y Universe of inputs for X Universe of inputs for Y X Y

PRIME NP Co-NP P PRIME First believed to be NP. Input: number n (of m bits) Output: Is n a prime number or not? First believed to be NP. First shown to be both in NP and Co-NP. Then shown to be in P. NP Co-NP P PRIMES PRIMES