Review of Complexity Theory

Similar documents
CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Exam Computability and Complexity

CSE 105 THEORY OF COMPUTATION

Computability Theory. CS215, Lecture 6,

Lecture 24: Randomized Complexity, Course Summary

Turing Machines and Time Complexity

Randomized Complexity Classes; RP

Non-Approximability Results (2 nd part) 1/19

Quantum Computing Lecture 8. Quantum Automata and Complexity

CS154, Lecture 17: conp, Oracles again, Space Complexity

Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

1 Randomized complexity

CS151 Complexity Theory. Lecture 1 April 3, 2017

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

UNIT-VIII COMPUTABILITY THEORY

Computability and Complexity

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Computation Histories

Decidability: Church-Turing Thesis

Computer Sciences Department

Randomized Computation

Variations of the Turing Machine

Space Complexity. The space complexity of a program is how much memory it uses.

Problems, and How Computer Scientists Solve Them Manas Thakur

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

CSCI 1590 Intro to Computational Complexity

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Definition: conp = { L L NP } What does a conp computation look like?

Non-emptiness Testing for TMs

The Cook-Levin Theorem

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

CSCC63 Worksheet Turing Machines

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

Lecture 19: Finish NP-Completeness, conp and Friends

PROBABILISTIC COMPUTATION. By Remanth Dabbati

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

Review of unsolvability

V Honors Theory of Computation

Computational Complexity of Bayesian Networks

A An Overview of Complexity Theory for the Algorithm Designer

Lecture 12: Mapping Reductions

CPSC 421: Tutorial #1

1 Showing Recognizability

conp, Oracles, Space Complexity

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Notes for Lecture Notes 2

Part I: Definitions and Properties

Answers to the CSCE 551 Final Exam, April 30, 2008

CSCE 551 Final Exam, Spring 2004 Answer Key

3 Probabilistic Turing Machines

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

6.5.3 An NP-complete domino game

Computational Complexity Theory

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

Turing Machines Part III

Turing s Thesis. Fall Costas Busch - RPI!1

Umans Complexity Theory Lectures

Decidable Languages - relationship with other classes.

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

Variants of Turing Machine (intro)

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE

CS154, Lecture 13: P vs NP

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Complexity Theory Part I

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine

1 Computational Problems

Notes for Lecture 3... x 4

Theory of Computation (IX) Yijia Chen Fudan University

Lecture 21: Space Complexity (The Final Exam Frontier?)

CS 525 Proof of Theorems 3.13 and 3.15

Time to learn about NP-completeness!

Lecture 16: Time Complexity and P vs NP

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

Computability Theory

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

CSCE 551 Final Exam, April 28, 2016 Answer Key

Chapter 3: The Church-Turing Thesis

Computability and Complexity CISC462, Fall 2018, Space complexity 1

MTAT Complexity Theory October 13th-14th, Lecture 6

Introduction to Advanced Results

4.2 The Halting Problem

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

CS154, Lecture 13: P vs NP

Midterm II : Formal Languages, Automata, and Computability

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

Logarithmic space. Evgenij Thorstensen V18. Evgenij Thorstensen Logarithmic space V18 1 / 18

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

CSE 105 THEORY OF COMPUTATION

CSCI 1590 Intro to Computational Complexity

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions

Chapter 7: Time Complexity

Transcription:

Review of Complexity Theory Breno de Medeiros Department of Computer Science Florida State University Review of Complexity Theory p.1

Turing Machines A traditional way to model a computer mathematically is the Turing Machine model (TM). A Turing Machine is characterized by that: TM recognizes a set of symbols from a finite alphabet Σ. Assume that Σ = {0,1, }. By a string understand any finite sequence of 0 s and 1 s followed by a. T M has an half-infinite tape containing cells. Each cell may store an element of Σ. TM has a set of states S with a special state called start. At the beginning of a computation, T M is at state start (an element of S), and the tape contains a string. There is a special state Halt. (Technically, NOT an element of S.) If the T M solves a decisional problem, it has also special states YES and NO (not part of S either). If the T M solves a computational problem, it has an (infinite) output tape, where it may write a string. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.2

Turing Machine Computations TM has a tape-head. At start, it lies in the first tape cell. TM s computations are described by a state-transition function δ. δ is a function from Σ S to Σ S { halt, YES, NO } {,, }. At each step, the TM reads the symbol σ curr in the tape cell at the current tape-head position, and its current state s curr. It then computes δ(σ curr, s curr ) = (σ next, s next, pos next ). Then: σ next is written to the current tape cell, and the tape head is moved one cell right, left, or stays in the same position according to pos next being equal to,, or. The current state is changed to s next. If s next is one of halt, YES, NO, then the computations is concluded. If TM has an output tape, δ also specifies an optional symbol to be written to output, and the movement of the output tape-head. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.3

Example of a Turing Machine Computation Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.4

Terminology Each step of a Turing Machine is given a unitary time cost. Let t TM (δ) be the number of steps taken by a Turing Machine TM to complete processing an input string δ. δ, the length of δ, is the number of 0 s and 1 s in the representation of δ. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.5

Language Accepted by a Turing Machine A language L is a subset of {0, 1}. (Considered strings by implicitly appending a terminating.) The language L(TM) accepted by a turing machine TM is the set of strings that lead to TM terminate in finitely many steps, in the state YES. The class P (polynomial-time) contains all languages L such that: Given L, there is a Turing Machine TM L such that L is the language accepted by TM L, and moreover a polynomial p TML (n) such that, if l is in L and l n, then t TML (l) p TML (n). Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.6

Example of a Polynomial Language Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.7

Non-deterministic Turing Machines A non-realistic computational model that is nonetheless important from a theoretical standpoint is that represented by a non-deterministic Turing Machine (N T M). An NTM is similar to a (deterministic) TM except that instead of a single-valued transition function δ, it has a multi-valued one δ. At any given step in the computation, the machine may choose which of the possible values to take for the transition. A string l is accepted by an NTM if there is a valid computational path (i.e., set of choices at each step compatible with δ) which lead to NTM terminate in state YES, when given l as its input at state start, and if no valid computational paths lead to NTM terminating in state NO, when given l as input. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.8

Non-deterministic time If l is accepted by NTM, the time t NTM (l) to process string l is, by definition, the shortest valid computational path leading to N T M accepting l. The complexity class NP is defined as the set of languages that are accepted by a non-deterministic machine in polynomial time. More precisely: Given L, there is a non-deterministic Turing machine NTM L such that L is the language accepted by NTM L, and a polynomial p NTML, such that if l is in L, and l n, then: t NTML (l) p NTML (l). Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.9

Example of an NP language Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.10

Introducing randomization We have considered deterministic computations, as well as (non-realistic) non-deterministic ones. However, in practice one often considers probabilistic computations. These computations are like non-deterministic ones in the sense that their transition function is many-valued, but each type of transition is associated with a probability value. Given a probabilistic machine PTM, each input string l may lead to both accepting and rejecting computational paths. The probability of acceptance is the total sum of the probabilities associated to all accepting computational paths. Randomized complexity classes are defined in terms of the existence of P T M s that accept their languages with specified acceptance and rejection probabilities. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.11

The class RP RP is the class of languages L such that: There is a probabilistic turing machine PTM L and a polynomial p P T ML. For every string l with l n, all computational paths of PTM L terminate in at most p P T ML (n) steps. If l does not belong to L, then PTM L always rejects l. If l belongs to L, then the probability that PTM L accepts is at least 1/2. Observations: RP contains P, as any (deterministic) Turing Machine T M is also a probabilistic (non-deterministic) T M satisfying the above probability restrictions. NP contains RP, as eliminating the probabilities from PTM gives a non-deterministic machine N T M. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.12

RP language example Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.13

The classes co-rp and ZPP The definition of RP is not symmetric, as the behavior when l is in L or not differ. If we invert the definition, we have the co-rp class, containing the languages L such that there is a Turing machine that always accepts if l is in L but rejects with probability at least 1/2 if l is not in L. As before, P co-rp. The class ZPP is defined as RP co-rp. P ZPP, and many believe that P = ZPP, but that has not been proven. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.14

Another characterization of ZP P ZPP can also be characterized by the class of languages that have PTM such that with probability 1 the algorithm will terminate with the correct answer. Note that here the answer is guaranteed to be correct always, but the running time is not guaranteed to be polynomial, only expected to, in a probabilistic sense. Show the equivalence. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.15

Bounded-error, Probabilistic Polynomial (BPP) Class BPP is the class on languages decidable by PTM that finish all instances in polynomial time, and have an error at most 1/3 in all instances. Formally: A language L is in BPP, if there are a probabilistic Turing machine PTM L and polynomial p P T ML s.t. PTM L takes at most p P T ML (n) steps to process any strings of length n, and: If l L, then PTM L accepts with probability at least 2/3. If l L, it accepts with probability at most 1/3. The bound 1/3 is arbitrary. By simulating the PTM on the same input a polynomial number of times and using majority voting, one can show that is sufficient to start with error probability 1/2 1/p 1 (n), where p 1 ( ) is any polynomial and then the error can be reduced to ǫ, such that log 2 ǫ < p 2 (n), for any polynomial p 2 ( ). In particular, any constant C (0, 1/2) can be used instead of 1/3. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.16

The Complexity Class PP P P is the class of all decision problems solvable in (deterministic) polynomial time by a PTM, with the following error probabilities: If l belongs to the language, (is a YES instance), then the PTM accepts with a probability strictly larger than 1/2. On a NO instance, the algorithm replies YES with probability at most equal to 1/2. For instance, SAT is a problem in PP. To see this, consider a Boolean formula φ in n variables, and the following PTM: Choose a random assignment {true, false} x i to each of the boolean variables, independently. Evaluate φ on the above assignment. If true, answer YES. If false, answer YES or NO with equal probability 1/2. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.17

ra Summary P P P P B P R C o P R P P Z i t y x l e mp o d c i mz e d o n h e t n t ee w b e s hi p s n ito l a R e se s l a c s. The class P P is not efficiently decidable because the probabilities cannot be amplified by repeated application of the protocol. BP P and the other classes are efficiently recognizable via probabilistic algorithms. Breno de Medeiros, Florida State University :: Adv. Top. Crypt. Netw. Sec. p.18