Complexity Classes P and NP



Similar documents
Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

The Classes P and NP. mohamed@elwakil.net

Computational complexity theory

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

Why Study NP- hardness. NP Hardness/Completeness Overview. P and NP. Scaling 9/3/13. Ron Parr CPS 570. NP hardness is not an AI topic

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

Welcome to... Problem Analysis and Complexity Theory , 3 VU

Theoretical Computer Science (Bridging Course) Complexity

On the Relationship between Classes P and NP

P versus NP, and More

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

OHJ-2306 Introduction to Theoretical Computer Science, Fall

Lecture 7: NP-Complete Problems

Introduction to computer science

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Quantum and Non-deterministic computers facing NP-completeness

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

Introduction to Logic in Computer Science: Autumn 2006

Tutorial 8. NP-Complete Problems

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

The Classes P and NP

A Working Knowledge of Computational Complexity for an Optimizer

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Notes on NP Completeness

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

CAD Algorithms. P and NP

Tetris is Hard: An Introduction to P vs NP

Turing Machines: An Introduction

Universality in the theory of algorithms and computer science

Million Dollar Mathematics!

3. Computational Complexity.

Some Minesweeper Configurations

Theory of Computation Chapter 2: Turing Machines

Mathematics for Algorithm and System Analysis

Introduction to Algorithms. Part 3: P, NP Hard Problems

Boulder Dash is NP hard

Ian Stewart on Minesweeper

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X.

NP-Completeness and Cook s Theorem

Guessing Game: NP-Complete?

Chapter 1. Computation theory

CHOOSING THE BEST HEURISTIC FOR A NP-PROBLEM

Prime Numbers. Difficulties in Factoring a Number: from the Perspective of Computation. Computation Theory. Turing Machine 電 腦 安 全

Quantum Monte Carlo and the negative sign problem

Ant Colony Optimization and Constraint Programming

CSC 373: Algorithm Design and Analysis Lecture 16

Cloud Computing is NP-Complete

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

A logical approach to dynamic role-based access control

Chapter 7 Uncomputability

Minesweeper as a Constraint Satisfaction Problem

P vs NP problem in the field anthropology

How To Solve An Npa-Complete Problems With Quantum Computing And Chaotic Dynamics

Classification - Examples

Finite Automata and Formal Languages

CoNP and Function Problems

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

Informatique Fondamentale IMA S8

Course Manual Automata & Complexity 2015

Algebraic Computation Models. Algebraic Computation Models

Chapter. NP-Completeness. Contents

Integer factorization is in P

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Offline 1-Minesweeper is NP-complete

3515ICT Theory of Computation Turing Machines

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Graph Security Testing

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

One last point: we started off this book by introducing another famously hard search problem:

CS 3719 (Theory of Computation and Algorithms) Lecture 4

The Parameterized Complexity of Short Computation and Factorization

Lecture 30: NP-Hard Problems [Fa 14]

The P versus NP Solution

THE P VERSUS NP PROBLEM

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

NP-completeness and the real world. NP completeness. NP-completeness and the real world (2) NP-completeness and the real world

Turing Machines and Understanding Computational Complexity

Factoring & Primality

History of Artificial Intelligence. Introduction to Intelligent Systems

New trend in Russian informatics curricula: integration of math and informatics

Lecture 2: Universality

A Fast Algorithm For Finding Hamilton Cycles

Bounded Treewidth in Knowledge Representation and Reasoning 1

Analog devices have been used, over the years, to solve a variety of problems. Perhaps most widely

SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL. Department of Computer Science

CS5310 Algorithms 3 credit hours 2 hours lecture and 2 hours recitation every week

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

The van Hoeij Algorithm for Factoring Polynomials

Transcription:

Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas

The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker

Computational Complexity Theory In computer science, computational complexity theory is the branch of the theory of computation that studies the resources, or cost, of the computation required to solve a given computational problem. The relative computational difficulty of computable functions is the subject matter of computational complexity. Complexity theory analyzes the difficulty of computational problems in terms of many different computational resources. Example: Mowing grass has linear complexity because it takes double the time to mow double the area. However, looking up something in a dictionary has only logarithmic complexity because a double sized dictionary only has to be opened one time more (e.g. exactly in the middle then the problem is reduced to the half). Source: Wikipedia (Computatoinal Complexity Theory)

Complexity Classes A complexity class is the set of all of the computational problems which can be solved using a certain amount of a certain computational resource. The complexity class P is the set of decision problems that can be solved by a deterministic machine in polynomial time. This class corresponds to an intuitive idea of the problems which can be effectively solved in the worst cases. The complexity class NP is the set of decision problems that can be solved by a non deterministic machine in polynomial time. This class contains many problems that people would like to be able to solve effectively. All the problems in this class have the property that their solutions can be checked effectively. Source: Wikipedia (Computatoinal Complexity Theory)

Complexity Classes (taxonomy) Decision Problem Type 0 (recursively enumerable) Undecidable Decidable PSPACE Type 1 (context sensitive) NP PSPACE Complete Co NP P NP Complete Type 2 (context free) P Complete Type 3 (regular) Strict subset relationship Set equality is unknown Source: Wikipedia (Complexity Class)

Deterministic (Turing) Machine Deterministic or Turing machines are extremely basic symbolmanipulating devices which despite their simplicity can be adapted to simulate the logic of any computer that could possibly be constructed. They were described in 1936 by Alan Turing. Though they were intended to be technically feasible, Turing machines were not meant to be a practical computing technology, but a thought experiment about the limits of mechanical computation; thus they were not actually constructed. Studying their abstract properties yields many insights into computer science and complexity theory. Turing machines capture the informal notion of effective method in logic and mathematics, and provide a precise definition of an algorithm or 'mechanical procedure'. Source: Wikipedia (Deterministic Turing Machine)

Nondeterministic (Turing) Machine In theoretical computer science, a non deterministic Turing machine (NTM) is a Turing machine whose control mechanism works like a nondeterministic finite automaton. An ordinary (deterministic) Turing machine (DTM) has a transition function that, for a given state and symbol under the tape head, specifies three things: the symbol to be written to the tape the direction (left or right) in which the head should move the subsequent state of the finite control An NTM differs in that the state and tape symbol no longer uniquely specify these things many different actions may apply for the same combination of state and symbol. Source: Wikipedia (Nondeterministic Turing Machine)

Complexity Class P P is the complexity class containing decision problems which can be solved by a deterministic Turing machine using a polynomial amount of computation time, or polynomial time. P is often taken to be the class of computational problems which are "efficiently solvable" or "tractable. Problems that are solvable in theory, but cannot be solved in practice, are called intractable. There exist problems in P which are intractable in practical terms; for example, some require at least n 1000000 operations. P is known to contain many natural problems, including the decision versions of linear programming, calculating the greatest common divisor, and finding a maximum matching. In 2002, it was shown that the problem of determining if a number is prime is in P. Source: Wikipedia (P (complexity))

Complexity Class NP In computational complexity theory, NP ("Non deterministic Polynomial time") is the set of decision problems solvable in polynomial time on a non deterministic Turing machine. It is the set of problems that can be "verified" by a deterministic Turing machine in polynomial time. All the problems in this class have the property that their solutions can be checked effectively. This class contains many problems that people would like to be able to solve effectively, including the Boolean satisfiability problem (SAT) the Hamiltonian path problem (special case of TSP) the Vertex cover problem. Source: Wikipedia (NP (complexity))

Complexity Class NP Complete In complexity theory, the NP complete problems are the most difficult problems in NP ("non deterministic polynomial time") in the sense that they are the ones most likely not to be in P. If one could find a way to solve any NP complete problem quickly (in polynomial time), then they could use that algorithm to solve all NP problems quickly. At present, all known algorithms for NP complete problems require time that is superpolynomial in the input size. To solve an NP complete problem for any nontrivial problem size, generally one of the following approaches is used: Approximation Probabilistic Special cases Heuristic Source: Wikipedia (NP Complete)

Complexity Class NP Complete (cont) Some well known problems that are NP complete are: Boolean satisfiability problem (SAT) N puzzle Knapsack problem Hamiltonian cycle problem Traveling salesman problem Subgraph isomorphism problem Subset sum problem Clique problem Vertex cover problem Independent set problem Graph coloring problem Minesweeper Source: Wikipedia (NP Complete)

Complexity Classes P and NP Source: Wikipedia (Complexity Classes P and NP)

Your Chance to be Famous The question of whether P is the same set as NP is the most important open question in theoretical computer science. There is even a $1,000,000 prize for solving it. Source: Wikipedia (Clay Mathematics Insitute)

I'm never going to be famous. My name will never be writ large on the roster of Those Who Do Things. I don't do any thing. Not one single thing. I used to bite my nails, but I don't even do that any more. Dorothy Parker

References Computational Complexity Theory: http://en.wikipedia.org/wiki/computational_complexity_theory Complexity Class: http://en.wikipedia.org/wiki/complexity_class Deterministic Turing Machine: http://en.wikipedia.org/wiki/deterministic_turing_machine Nondeterministic Turing Machine: http://en.wikipedia.org/wiki/nondeterministic_turing_machine P (complexity): http://en.wikipedia.org/wiki/p_%28complexity%29 NP (complexity): http://en.wikipedia.org/wiki/np_%28complexity%29 NP Complete: http://en.wikipedia.org/wiki/np complete Complexity Classes P and NP: http://en.wikipedia.org/wiki/complexity_classes_p_and_np Clay Mathematics Insitute: http://en.wikipedia.org/wiki/clay_mathematics_institute