Intro to Theory of Computation

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CS 310 – Fall 2006 Pacific University CS310 P vs NP the steel cage death match Section 7.2 November 29, 2006.
Time Complexity.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
Piyush Kumar (Lecture 7: Reductions)
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Sailesh Prabhu Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
CSCI 2670 Introduction to Theory of Computing November 17, 2005.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
April 13 th Class Notes Hw# 5 will be worth 50 points and it will be posted tonight or tomorrow.
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
CSE 105 theory of computation
P & NP.
Chapter 10 NP-Complete Problems.
Computational Complexity Theory
Data Structures and Algorithm Analysis Lecture 23
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
Lecture 2-2 NP Class.
Polynomial-Time Reduction
Great Theoretical Ideas in Computer Science
Part VI NP-Hardness.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
Intro to Theory of Computation
Lecture 5 NP Class.
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
Intro to Theory of Computation
Intro to Theory of Computation
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Intro to Theory of Computation
Chapter 34: NP-Completeness
NP-Complete Problems.
Chapter 34: NP-Completeness
CSC 4170 Theory of Computation The class NP Section 7.3.
CS154, Lecture 13: P vs NP.
NP-completeness The Chinese University of Hong Kong Fall 2008
Intro to Theory of Computation
CS21 Decidability and Tractability
NP-Completeness Yin Tat Lee
The Theory of NP-Completeness
Instructor: Aaron Roth
Instructor: Aaron Roth
CSE 105 theory of computation
RAIK 283 Data Structures & Algorithms
Theory of Computability
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Intro to Theory of Computation
Presentation transcript:

Intro to Theory of Computation LECTURE 24 Last time Relationship between models: deterministic/nondeterministic Class P Today Class NP CS 464 Homework 9 due Homework 10 out Sofya Raskhodnikova 11/24/2018

I-clicker question (frequency: AC) Consider the following algorithm A for PRIMES. Given b, try to divide b by 2,3,…, 𝒃 . If one of them divides b, accept; o.w. reject. If 𝒏 = input length, # of divisions A performs is 𝚯( 𝑛 ) 𝚯(𝑛 ) 𝟐 𝚯(n) 𝟐 𝚯( 𝒏 ) None of the above. t(n)= n log n 3/17/2016

Central ideas Poly-time as “feasible” most natural problems either are easy (say in TIME(n3)) or have no known poly-time algorithms P =languages that can be decided in poly-time NP = languages for which the membership in the language is easy to verify given a hint EXP = languages that can be decided in exponential time Poly-time Reductions: X is no harder than Y for poly-time TMs 11/24/2018

The class P P is the class of languages decidable in polynomial time on a deterministic 1-tape TM: 𝑷= 𝑘 𝑇𝐼𝑀𝐸 𝑛 𝑘 . 11/24/2018

Examples of languages in P Problem Description Algorithm Yes No MULTIPLE Is x a multiple of y? Grade school division 51, 17 51, 16 RELPRIME Are x and y relatively prime? Euclid (300 BCE) 34, 39 34, 51 PRIMES Is x prime? AKS (2002) 53 51 all CFLs (e.g. the language of balanced parentheses and brackets) Is the string in the given CFL? (e.g., is the string of parentheses and brackets balanced?) Dynamic programming Depends on the language; e.g. (([])[]) ([)], (() LSOLVE Is there a vector x that satisfies Ax = b? Gauss-Edmonds elimination 0 2 0 1 4 3 1 −2 15 , 2 4 36 1 1 0 0 1 1 0 1 1 , 1 1 1 11/24/2018

Class NP Verification algorithm intuition Verifier views things from "managerial" viewpoint. Verifier doesn't determine whether w  L on its own; rather, it checks with a proposed hint whether w  L. Algorithm V( 〈𝑤,𝑐〉 ) is a verifier for language L if for every string w, w  L iff there exists a string c such that V(〈𝑤,𝑐〉) accepts. The running time of a verifier is measured only in terms of length of w. A polynomial-time verifier runs in time polynomial in |w| and has certificate c of length polynomial in w: i.e., |c|=O( 𝑤 𝑘 ) for some constant k. "certificate" or "witness" 11/24/2018

The class NP NP is the class of languages that have polynomial-time verifiers. 11/24/2018

Examples of languages in NP COMPOSITES = {〈𝑥〉∣𝑥=𝑝𝑞, for int 𝑝,𝑞>1} certificate: integer 𝑝>1 that divides 𝑥 such a certificate exists iff 𝑥 is composite verifier V = `` On input 〈𝒙,𝒑〉, where 𝒙 and 𝑝 are integers: If 𝒑≤𝟏 or 𝒑≥𝒙, reject. Else if (𝑥 is a multiple of 𝑝, accept. O.w. reject.’’ 11/24/2018

Examples of languages in NP UHamCycle = {〈𝐺〉∣𝐺 is an undirected graph that contains a cycle C that visits each node exactly once} certificate C: Hamiltonian cycle (i.e., permutation of the nodes) graph G certificate C 11/24/2018

Examples of languages in NP UHamCycle = {〈𝐺〉∣𝐺 is an undirected graph that contains a cycle C that visits each node exactly once} certificate C: Hamiltonian cycle (i.e., permutation of the nodes) verifier V = `` On input 〈𝑮,𝑪〉: Accept if each node of G appears in C exactly once there is an edge between every pair of adjacent nodes in C O.w. reject.’’ 11/24/2018

Examples of languages in NP: SAT Boolean variables: variables that can take on values T/F (or 1/0) Boolean operations: ∨, ∧, and ¬ Boolean formula: expression with Boolean variables and ops Example: 𝑥 1 ∨ 𝑥 2 ∧ 𝑥 3 An assignment of 0s and 1s to the variables satisfies formula 𝜑 if it makes it evaluate to 1. 𝜑 is satisfiable if there exists an assignment that satisfies it. SAT ={ 𝜑 ∣𝜑 is a satisfiable Boolean formula}. Prove: SAT ∈ NP. 11/24/2018

Classes P, NP, EXP P. Languages for which there is a poly-time algorithm. algorithm that runs in time O( 𝑛 𝑘 ) for some 𝑘 EXP. Languages for which there is an exponential-time algorithm. algorithm that runs in time O( 2 𝑛 𝑘 ) for some 𝑘 NP. Languages for which there is a poly-time verifier. Lemma. P  NP. Lemma. NP  EXP. Lemma. A language L is in NP iff L can be decided by a polynomial-time nondeterministic TM. 11/24/2018

P vs. NP Does P = NP? [Cook 1971, Edmonds, Levin, Yablonski, Gödel] Is the decision problem as easy as the verification problem? Clay $1 million prize. If yes: Efficient algorithms for UHamPath, SAT, TSP, factoring If no: No efficient algorithms possible for these problems. Consensus opinion on P = NP? Probably no. EXP NP EXP P P = NP If P  NP If P = NP would break RSA cryptography (and potentially collapse economy) 11/24/2018