CSCI 1590 Intro to Computational Complexity

Size: px
Start display at page:

Download "CSCI 1590 Intro to Computational Complexity"

Transcription

1 CSCI 59 Intro to Computational Complexity Overview of the Course John E. Savage Brown University January 2, 29 John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 / 26

2 Overview of Theoretical CS 2 Characterization of Computational Problems 3 Serial and Parallel Models of Computation 4 Complexity Classifications 5 Course Outline John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 2 / 26

3 Goals of the Course Introduce important models Problem statements: functions, languages Serial computational models Parallel computational models Develop methods to classify problems by time and space. E.g. L, NL, P, NP, PSPACE, NPSPACE, etc. Study approximation algorithms for NP-hard problems. Explore resource tradeoff results, such as trading space and time, for problems on real-world computational models. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 3 / 26

4 Problem Representation Encodings - representing objects as strings Sets as bit vectors, tables as strings Languages - set of strings over an alphabet Regular {, } ; Context-Free { n n } Functions - mappings from domains to range f : {, } n {, }, f : {, } {, } Hard computational problems Traveling Salesperson Problem, Graph Coloring John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 4 / 26

5 Serial Models I Circuits Deterministic Finite State Machines (DFM) Nondeterministic FSM (NDFM) Random Access Machine (RAM) Model for the stored program computer John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 5 / 26

6 Logic Circuits Definition A circuit is a directed acyclic graph in which input vertices are associated with Boolean variables and non-input vertices carry the labels of Boolean functions such as and( ), or ( ), not ( ), and exor ( ). c j+ s j s j g j p j c j+ FA j c j v j u j c j v j u j John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 6 / 26

7 The DFSM Definition A deterministic finite-state machine (DFSM) is a seven-tuple M = (Σ, Ψ, Q, δ, λ, s, F ) where Σ and Ψ are the input and output alphabets, Q is the set of states of the machine, δ : Σ Q Q is its next-state function, λ : Q Ψ is its output function, s is its initial state, and F Q is a set of final states. A DFSM makes transitions. Before each transition it is in a state q. On input x Σ it makes a transition to a state q = δ(q, x) Q, and produces an output y = λ(q ) Ψ. q/ q/ Start John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 7 / 26

8 Computation by a DFSM Definition If a sequence of inputs x, x 2,..., x T causes a DFSM M to move from its initial state s to a state q F, the string x x 2 x T is accepted by the M. The language L(M) recognized by M is the set of accepted strings. A DFSM M computes a function f M defined by the mapping from inputs x, x 2,..., x T to outputs y, y 2,..., y T. q/ q/ Start John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 8 / 26

9 Computation by a DFSM Examples The language L recognized by the DFSM shown below contains all strings over {, } with an odd number of s. q / q / Start John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 9 / 26

10 Nondeterministic FSMs Definition A nondeterministic finite-state machine (NFSM) is a five-tuple M = (Σ, Q, δ, s, F ) where Σ is the input alphabet, Q is the set of states of the machine, δ : Σ Q 2 Q is its next-state function, s is its initial state, and F Q is a set of final states. The next-state function maps a state and an input to a set of states, thereby providing a set of choices for the next state. q / q / q 3/ Start q 2/ John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 / 26

11 NFSM Language Recognition Definition A string x, x 2,..., x T is accepted by an NFSM M if when started in state s, there are successor states that result in M arriving at a final state in F. A certificate to acceptance is the set of choices that lead to an accept state. The language recognized by an NFSM is the set of strings that it accepts. q / q / q 3/ Start q 2/ John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 / 26

12 Equivalence between FSMs and NFSMs Theorem The languages accepted by FSMs and NFSMs are equivalent. Proof. Given NFSM M = (Σ, Ψ, Q, δ, s, F ), create DFSM M whose states are subsets of Q (2 Q ) and start state contains s. If q = {q, q 2,..., q k } is state of M, q i Q, its successor under input a is set of states that reachable from some q i. q accepts if q F φ. Is this NFSM is equivalent to previous FSM? Q = {q }, Q = {q, q 2 }, Q 3 = {q, q 3 }. q/ q/ q3/ Start q2/ John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 2 / 26

13 Random Access Machine Implements fetch-execute cycle Uses direct and indirect addressing Arithmetic logic unit (ALU) performs addition, single-bit shifts. No multiplication because it introduces parallelism. Words increase at most one bit in length/per cycle CPU Decode ALU reg a reg b prog ctr Random-Access Memory b cmd out wrd in wrd addr m m 2 John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 3 / 26

14 Serial Models II Deterministic (Nondeterministic) Turing Machines (TMs) One or more tapes whose head(s) are controlled by a DFM (NDFM) The Church-Turing thesis asserts that any function that can be physically realized (i.e. computed ) can be computed by a Turing Machine. Universal TM (UTM) a TM that simulates other TMs Each TM T can be described by a table (string). Used to show that some problems cannot be solved by any TM. 2 m b Control Unit Tape Unit John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 4 / 26

15 Parallel Models I k-d mesh-based machines Cell (i, i 2,..., i k ) adjacent to (i, i 2,..., i k ) if i r i r = for only one r [... k]. Network-based machines Interconnection of individual FSMs. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 5 / 26

16 Parallel Models II Parallel RAM (PRAM) Identical RAMs with individual IDs connected to common memory. In synch they read, compute, and store to memory. Hypercube-based machines Network of 2 k synchronous machines each identified with a binary k-tuple. Neighboring processor IDs differ in one bit. Processors swap data between neighbors, compute and repeat. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 6 / 26

17 Languages, Grammars, Machines Languages and Grammars Regular: A u or A vc where A, B are non-terminals (NTs), u, v are terminals. Context-free: A BC or A u Recursively enumerable (r.e.): a b where a has at least one NT. Recursive: r.e. languages whose complements are r.e. Languages and Machines Regular FSMs Context-free Pushdown Automata Recursively enumerable Turing machines Recursive Halting Turing machines John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 7 / 26

18 Resource Limitations Circuit size and depth Size = number of gates; depth = length of longest path. Time number of computation steps Space no. cells in RAM, log 2 Q in FSM, tapes cells on TM I/O operations number of data movements Chip area for very large integrated circuits (VLSI) Wires have width and occupy area! John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 8 / 26

19 Relationships Between Models and Tradeoffs Relationships Between Models DFSMs equivalent to NDFSMs, DFMS subset of TMs T -step DFSM (NDFSM) can be simulated by a circuit (with free inputs). T (n)-step DTM (NDTM) on inputs of length n can be simulated by a circuit (all inputs are specified). Tradeoffs Between Resources Space vs time on RAM ST = Ω(n 2 ) for convolution. Area vs time for VLSI AT 2 = Ω(m 4 ) for m m matrix multiplication. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 9 / 26

20 Problem Classification by Difficulty Computationally feasible Functions computable (languages recognizable) by some TM. Computationally infeasible Functions not computable (languages not recognizable) by any TM. Functions and languages classified by time and space Focus in theoretical CS primarily on language recognition P, NP, EXPTIME, PSPACE, NPSPACE, L, NL, NC John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 2 / 26

21 The Role of Reductions What is a reduction? Solve new problem by reducing (transforming) it to the solution of a previously solved problem. Definition Let L Σ and L 2 Σ 2. L is reducible to L 2 (L f L 2 ) if there exists f : Σ Σ 2 such that x L if and only if f (x) L 2. Definition L is recursively enumerable (r.e.) if it is TM-recognizable. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29 2 / 26

22 The Application of Reductions Assume that L f L 2 If L 2 is r.e. and f is TM-computable, then L is r.e. If L is not r.e. and f is TM-computable, then L 2 is not r.e. If L 2 is in P and f is poly-time, then L is in P. If L is not in P and f is poly-time, then L 2 is not in P. That is, L requires more than polynomial time for recognition. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, / 26

23 Languages Complete for a Class Definition A language L 2 is complete for a class C if it is the hardest language to recognize in C. Definition A language L 2 is NP-complete if L 2 is in NP and for every other language L in NP there is a poly-time f : Σ Σ 2 such that x is in L if and only if f (x) is in L 2. TSP and SAT are NP-complete. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, / 26

24 Approximation Algorithms Finding optimal solutions to NP-complete problems appears to be computationally infeasible. Seek poly-time approximation algorithms that find solutions whose performance (e.g. length of a tour for NP) is within a constant factor of optimal. Some problems do not have poly-time approximation algorithms unless P = NP. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, / 26

25 Tentative Schedule Week Models of Computation Week 2 Turing Machines, P, NP Week 3 NP-completeness, reductions Week 4 EXPTIME, P-Space, NP-Space, L, NL Week 5 Diagonalization Week 6 Circuits Week 7 Formula Size Week 8 Space-Time Tradeoffs Week 9 VLSI Model of Computation Week Parallel Computation, P vs NC Week Probability, Randomized Computation Week 2 IP, PSPACE Week 3 PCP, Hardness of Approximation, PCP-Theorem Week 4 More PCP and Hardness Results. John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, / 26

26 Course Management Six assignments Perhaps a midsemester exam A final exam John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, / 26

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity CSCI 1590 Intro to Computational Complexity Space Complexity John E. Savage Brown University February 11, 2008 John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 11,

More information

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

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite The Church-Turing Thesis CS60001: Foundations of Computing Science Professor, Dept. of Computer Sc. & Engg., Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q 0, q accept, q reject ), where

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata

More information

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity CSCI 1590 Intro to Computational Complexity Complement Classes and the Polynomial Time Hierarchy John E. Savage Brown University February 9, 2009 John E. Savage (Brown University) CSCI 1590 Intro to Computational

More information

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity CSCI 1590 Intro to Computational Complexity Randomized Computation John E. Savage Brown University April 15, 2009 John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity April 15,

More information

CS151 Complexity Theory. Lecture 1 April 3, 2017

CS151 Complexity Theory. Lecture 1 April 3, 2017 CS151 Complexity Theory Lecture 1 April 3, 2017 Complexity Theory Classify problems according to the computational resources required running time storage space parallelism randomness rounds of interaction,

More information

Complexity: Some examples

Complexity: Some examples Algorithms and Architectures III: Distributed Systems H-P Schwefel, Jens M. Pedersen Mm6 Distributed storage and access (jmp) Mm7 Introduction to security aspects (hps) Mm8 Parallel complexity (hps) Mm9

More information

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

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed

More information

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity CSCI 1590 Intro to Computational Complexity NP-Complete Languages John E. Savage Brown University February 2, 2009 John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February

More information

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP CS 301 - Lecture 29 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of

More information

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

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) 1 Deterministic Turing Machine (DTM).. B B 0 1 1 0 0 B B.. Finite Control Two-way, infinite tape, broken into

More information

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

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write

More information

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity CSCI 1590 Intro to Computational Complexity PSPACE-Complete Languages John E. Savage Brown University February 11, 2009 John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February

More information

Exam Computability and Complexity

Exam Computability and Complexity Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three

More information

INAPPROX APPROX PTAS. FPTAS Knapsack P

INAPPROX APPROX PTAS. FPTAS Knapsack P CMPSCI 61: Recall From Last Time Lecture 22 Clique TSP INAPPROX exists P approx alg for no ε < 1 VertexCover MAX SAT APPROX TSP some but not all ε< 1 PTAS all ε < 1 ETSP FPTAS Knapsack P poly in n, 1/ε

More information

Definition: Alternating time and space Game Semantics: State of machine determines who

Definition: Alternating time and space Game Semantics: State of machine determines who CMPSCI 601: Recall From Last Time Lecture Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins

More information

Definition: Alternating time and space Game Semantics: State of machine determines who

Definition: Alternating time and space Game Semantics: State of machine determines who CMPSCI 601: Recall From Last Time Lecture 3 Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins

More information

CS256 Applied Theory of Computation

CS256 Applied Theory of Computation CS256 Applied Theory of Computation Compleity Classes III John E Savage Overview Last lecture on time-bounded compleity classes Today we eamine space-bounded compleity classes We prove Savitch s Theorem,

More information

6-1 Computational Complexity

6-1 Computational Complexity 6-1 Computational Complexity 6. Computational Complexity Computational models Turing Machines Time complexity Non-determinism, witnesses, and short proofs. Complexity classes: P, NP, conp Polynomial-time

More information

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

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE Chapter 1 - Time and Space Complexity deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE 1 / 41 Deterministic Turing machines Definition 1.1 A (deterministic

More information

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

CS154, Lecture 17: conp, Oracles again, Space Complexity CS154, Lecture 17: conp, Oracles again, Space Complexity Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string

More information

Parallelism and Machine Models

Parallelism and Machine Models Parallelism and Machine Models Andrew D Smith University of New Brunswick, Fredericton Faculty of Computer Science Overview Part 1: The Parallel Computation Thesis Part 2: Parallelism of Arithmetic RAMs

More information

Introduction to Complexity Theory

Introduction to Complexity Theory Introduction to Complexity Theory Read K & S Chapter 6. Most computational problems you will face your life are solvable (decidable). We have yet to address whether a problem is easy or hard. Complexity

More information

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005 Complexity Theory Knowledge Representation and Reasoning November 2, 2005 (Knowledge Representation and Reasoning) Complexity Theory November 2, 2005 1 / 22 Outline Motivation Reminder: Basic Notions Algorithms

More information

The Role of Theory in Computer Science

The Role of Theory in Computer Science C H A P T E R The Role of Theory in Computer Science Computer science is the study of computers and programs, the collections of instructions that direct the activity of computers. Although computers are

More information

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

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harry Lewis October 22, 2013 Reading: Sipser, 3.2, 3.3. The Basic Turing Machine The Basic Turing Machine a a b a

More information

Turing Machines and Time Complexity

Turing Machines and Time Complexity Turing Machines and Time Complexity Turing Machines Turing Machines (Infinitely long) Tape of 1 s and 0 s Turing Machines (Infinitely long) Tape of 1 s and 0 s Able to read and write the tape, and move

More information

Polynomial Time Computation. Topics in Logic and Complexity Handout 2. Nondeterministic Polynomial Time. Succinct Certificates.

Polynomial Time Computation. Topics in Logic and Complexity Handout 2. Nondeterministic Polynomial Time. Succinct Certificates. 1 2 Topics in Logic and Complexity Handout 2 Anuj Dawar MPhil Advanced Computer Science, Lent 2010 Polynomial Time Computation P = TIME(n k ) k=1 The class of languages decidable in polynomial time. The

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

More information

6.045 Final Exam Solutions

6.045 Final Exam Solutions 6.045J/18.400J: Automata, Computability and Complexity Prof. Nancy Lynch, Nati Srebro 6.045 Final Exam Solutions May 18, 2004 Susan Hohenberger Name: Please write your name on each page. This exam is open

More information

The Polynomial Hierarchy

The Polynomial Hierarchy The Polynomial Hierarchy Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Motivation..synthesizing circuits is exceedingly difficulty. It is even

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits Chris Calabro January 13, 2016 1 RAM model There are many possible, roughly equivalent RAM models. Below we will define one in the fashion

More information

Theory of Computation Lecture 1. Dr. Nahla Belal

Theory of Computation Lecture 1. Dr. Nahla Belal Theory of Computation Lecture 1 Dr. Nahla Belal Book The primary textbook is: Introduction to the Theory of Computation by Michael Sipser. Grading 10%: Weekly Homework. 30%: Two quizzes and one exam. 20%:

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 13 CHAPTER 4 TURING MACHINES 1. The definition of Turing machine 2. Computing with Turing machines 3. Extensions of Turing

More information

Lecture 24: Randomized Complexity, Course Summary

Lecture 24: Randomized Complexity, Course Summary 6.045 Lecture 24: Randomized Complexity, Course Summary 1 1/4 1/16 1/4 1/4 1/32 1/16 1/32 Probabilistic TMs 1/16 A probabilistic TM M is a nondeterministic TM where: Each nondeterministic step is called

More information

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1) Time Complexity (1) CSCI 2670 Original Slides were written by Dr. Frederick W Maier Spring 2014 Time Complexity So far we ve dealt with determining whether or not a problem is decidable. But even if it

More information

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE Volume 3, No. 5, May 2012 Journal of Global Research in Computer Science REVIEW ARTICLE Available Online at www.jgrcs.info COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE Tirtharaj Dash

More information

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

Space Complexity. The space complexity of a program is how much memory it uses. Space Complexity The space complexity of a program is how much memory it uses. Measuring Space When we compute the space used by a TM, we do not count the input (think of input as readonly). We say that

More information

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

More information

Complexity Theory 112. Space Complexity

Complexity Theory 112. Space Complexity Complexity Theory 112 Space Complexity We ve already seen the definition SPACE(f(n)): the languages accepted by a machine which uses O(f(n)) tape cells on inputs of length n. Counting only work space NSPACE(f(n))

More information

Advanced topic: Space complexity

Advanced topic: Space complexity Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to

More information

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch Today: More Complexity Theory Polynomial-time reducibility, NP-completeness, and the Satisfiability (SAT) problem Topics: Introduction

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Models of Computation

Models of Computation Models of Computation Analysis of Algorithms Week 1, Lecture 2 Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Models of Computation (RAM) a) Random Access Machines

More information

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

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK Artificial Intelligence 3 Problem Complexity Prof. Dr. Jana Koehler Fall 2016 Agenda Computability and Turing Machines Tractable and Intractable Problems P vs. NP Decision Problems Optimization problems

More information

Computability Theory. CS215, Lecture 6,

Computability Theory. CS215, Lecture 6, Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

More information

Functions on languages:

Functions on languages: MA/CSSE 474 Final Exam Notation and Formulas page Name (turn this in with your exam) Unless specified otherwise, r,s,t,u,v,w,x,y,z are strings over alphabet Σ; while a, b, c, d are individual alphabet

More information

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

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine. The Class NP NP is the problems that can be solved in polynomial time by a nondeterministic machine. NP The time taken by nondeterministic TM is the length of the longest branch. The collection of all

More information

Could we potentially place A in a smaller complexity class if we consider other computational models?

Could we potentially place A in a smaller complexity class if we consider other computational models? Introduction to Complexity Theory Big O Notation Review Linear function: r(n) =O(n). Polynomial function: r(n) =2 O(1) Exponential function: r(n) =2 no(1) Logarithmic function: r(n) = O(log n) Poly-log

More information

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete CS125 Lecture 15 Fall 2016 15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete Already know SAT NP, so only need to show SAT is NP-hard. Let L be any language in NP. Let M be a NTM that decides L

More information

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT. Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008 CS 301 - Lecture 28 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

CSE 555 HW 5 SAMPLE SOLUTION. Question 1. CSE 555 HW 5 SAMPLE SOLUTION Question 1. Show that if L is PSPACE-complete, then L is NP-hard. Show that the converse is not true. If L is PSPACE-complete, then for all A PSPACE, A P L. We know SAT PSPACE

More information

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

Lecture 25: Cook s Theorem (1997) Steven Skiena.   skiena Lecture 25: Cook s Theorem (1997) Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Prove that Hamiltonian Path is NP

More information

Principles of Knowledge Representation and Reasoning

Principles of Knowledge Representation and Reasoning Principles of Knowledge Representation and Reasoning Complexity Theory Bernhard Nebel, Malte Helmert and Stefan Wölfl Albert-Ludwigs-Universität Freiburg April 29, 2008 Nebel, Helmert, Wölfl (Uni Freiburg)

More information

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS 1. [6 POINTS] For language L 1 = {0 n 1 m n, m 1, m n}, which string is in L 1? ANSWER: 0001111 is in L 1 (with n =

More information

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

MTAT Complexity Theory October 13th-14th, Lecture 6 MTAT.07.004 Complexity Theory October 13th-14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when

More information

Chapter 3: The Church-Turing Thesis

Chapter 3: The Church-Turing Thesis Chapter 3: The Church-Turing Thesis 1 Turing Machine (TM) Control... Bi-direction Read/Write Turing machine is a much more powerful model, proposed by Alan Turing in 1936. 2 Church/Turing Thesis Anything

More information

Computability and Complexity Theory

Computability and Complexity Theory Discrete Math for Bioinformatics WS 09/10:, by A Bockmayr/K Reinert, January 27, 2010, 18:39 9001 Computability and Complexity Theory Computability and complexity Computability theory What problems can

More information

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Computability and Complexity CISC462, Fall 2018, Space complexity 1 Computability and Complexity CISC462, Fall 2018, Space complexity 1 SPACE COMPLEXITY This material is covered in Chapter 8 of the textbook. For simplicity, we define the space used by a Turing machine

More information

MACHINE COMPUTING. the limitations

MACHINE COMPUTING. the limitations MACHINE COMPUTING the limitations human computing stealing brain cycles of the masses word recognition: to digitize all printed writing language education: to translate web content games with a purpose

More information

Problems, and How Computer Scientists Solve Them Manas Thakur

Problems, and How Computer Scientists Solve Them Manas Thakur Problems, and How Computer Scientists Solve Them PACE Lab, IIT Madras Content Credits Introduction to Automata Theory, Languages, and Computation, 3rd edition. Hopcroft et al. Introduction to the Theory

More information

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus

More information

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017 ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness Prof. Peter Bermel January 11, 2017 Outline Overview Definitions Computing Machines Church-Turing Thesis Polynomial Time (Class P)

More information

CSCE 551 Final Exam, Spring 2004 Answer Key

CSCE 551 Final Exam, Spring 2004 Answer Key CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is

More information

Computer Science. Questions for discussion Part II. Computer Science COMPUTER SCIENCE. Section 4.2.

Computer Science. Questions for discussion Part II. Computer Science COMPUTER SCIENCE. Section 4.2. COMPUTER SCIENCE S E D G E W I C K / W A Y N E PA R T I I : A L G O R I T H M S, T H E O R Y, A N D M A C H I N E S Computer Science Computer Science An Interdisciplinary Approach Section 4.2 ROBERT SEDGEWICK

More information

NP-Completeness. NP-Completeness 1

NP-Completeness. NP-Completeness 1 NP-Completeness x x x 2 x 2 x 3 x 3 x 4 x 4 2 22 32 3 2 23 3 33 NP-Completeness Outline and Reading P and NP ( 3.) Definition of P Definition of NP Alternate definition of NP NP-completeness ( 3.2) Definition

More information

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.   ETH Zürich (D-ITET) October, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free

More information

NP-Complete problems

NP-Complete problems NP-Complete problems NP-complete problems (NPC): A subset of NP. If any NP-complete problem can be solved in polynomial time, then every problem in NP has a polynomial time solution. NP-complete languages

More information

conp, Oracles, Space Complexity

conp, Oracles, Space Complexity conp, Oracles, Space Complexity 1 What s next? A few possibilities CS161 Design and Analysis of Algorithms CS254 Complexity Theory (next year) CS354 Topics in Circuit Complexity For your favorite course

More information

The decision problem (entscheidungsproblem), halting problem, & Turing machines. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

The decision problem (entscheidungsproblem), halting problem, & Turing machines. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ The decision problem (entscheidungsproblem), halting problem, & Turing machines CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ 1 We must not believe those, who today, with philosophical bearing and

More information

Comparison of several polynomial and exponential time complexity functions. Size n

Comparison of several polynomial and exponential time complexity functions. Size n Comparison of several polynomial and exponential time complexity functions Time complexity function n n 2 n 3 n 5 2 n 3 n Size n 10 20 30 40 50 60.00001.00002.00003.00004.00005.00006 second second second

More information

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,

More information

Theory of Computation Time Complexity

Theory of Computation Time Complexity Theory of Computation Time Complexity Bow-Yaw Wang Academia Sinica Spring 2012 Bow-Yaw Wang (Academia Sinica) Time Complexity Spring 2012 1 / 59 Time for Deciding a Language Let us consider A = {0 n 1

More information

Lecture 5: The Landscape of Complexity Classes

Lecture 5: The Landscape of Complexity Classes IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 5: The Landscape of Complexity Classes David Mix Barrington and Alexis Maciel July 21,

More information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. Beregnelighed. Jacob Aae Mikkelsen DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

Lecture 16: Time Complexity and P vs NP

Lecture 16: Time Complexity and P vs NP 6.045 Lecture 16: Time Complexity and P vs NP 1 Time-Bounded Complexity Classes Definition: TIME(t(n)) = { L there is a Turing machine M with time complexity O(t(n)) so that L = L(M) } = { L L is a language

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms Announcements Problem Set 9 due right now. Final exam this Monday, Hewlett 200 from 12:15PM- 3:15PM Please let us know immediately after lecture if you want to take the final at

More information

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death Robbie Hott www.cs.virginia.edu/~jh2jf Department of Computer Science University of Virginia

More information

CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik

CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik 1 Definition of Turing Machine A 5-tuple: T = (Q, Σ, Γ, q 0, δ), where Q: a finite set of states h: the halt state, not included

More information

Decidability (What, stuff is unsolvable?)

Decidability (What, stuff is unsolvable?) University of Georgia Fall 2014 Outline Decidability Decidable Problems for Regular Languages Decidable Problems for Context Free Languages The Halting Problem Countable and Uncountable Sets Diagonalization

More information

The Cook-Levin Theorem

The Cook-Levin Theorem An Exposition Sandip Sinha Anamay Chaturvedi Indian Institute of Science, Bangalore 14th November 14 Introduction Deciding a Language Let L {0, 1} be a language, and let M be a Turing machine. We say M

More information

Universal Turing Machine. Lecture 20

Universal Turing Machine. Lecture 20 Universal Turing Machine Lecture 20 1 Turing Machine move the head left or right by one cell read write sequentially accessed infinite memory finite memory (state) next-action look-up table Variants don

More information

MA/CSSE 474 Theory of Computation

MA/CSSE 474 Theory of Computation MA/CSSE 474 Theory of Computation CFL Hierarchy CFL Decision Problems Your Questions? Previous class days' material Reading Assignments HW 12 or 13 problems Anything else I have included some slides online

More information

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger

More information

Computability and Complexity Theory: An Introduction

Computability and Complexity Theory: An Introduction Computability and Complexity Theory: An Introduction meena@imsc.res.in http://www.imsc.res.in/ meena IMI-IISc, 20 July 2006 p. 1 Understanding Computation Kinds of questions we seek answers to: Is a given

More information

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type

More information

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total UVa - cs302: Theory of Computation Spring 2008 Final Exam Comments < 50 50 59 60 69 70 79 80 89 90 94 95-102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,

More information

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages and and Department of Computer Science and Information Systems Birkbeck, University of London ptw@dcs.bbk.ac.uk Outline and Doing and analysing problems/languages computability/solvability/decidability

More information

Circuits. Lecture 11 Uniform Circuit Complexity

Circuits. Lecture 11 Uniform Circuit Complexity Circuits Lecture 11 Uniform Circuit Complexity 1 Recall 2 Recall Non-uniform complexity 2 Recall Non-uniform complexity P/1 Decidable 2 Recall Non-uniform complexity P/1 Decidable NP P/log NP = P 2 Recall

More information

BBM402-Lecture 11: The Class NP

BBM402-Lecture 11: The Class NP BBM402-Lecture 11: The Class NP Lecturer: Lale Özkahya Resources for the presentation: http://ocw.mit.edu/courses/electrical-engineering-andcomputer-science/6-045j-automata-computability-andcomplexity-spring-2011/syllabus/

More information

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

Lecture 21: Space Complexity (The Final Exam Frontier?) 6.045 Lecture 21: Space Complexity (The Final Exam Frontier?) 1 conp NP MIN-FORMULA conp P NP FIRST-SAT TAUT P FACTORING SAT NP NP NP 2 VOTE VOTE VOTE For your favorite course on automata and complexity

More information

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions CS 6743 Lecture 15 1 Fall 2007 1 Circuit Complexity 1.1 Definitions A Boolean circuit C on n inputs x 1,..., x n is a directed acyclic graph (DAG) with n nodes of in-degree 0 (the inputs x 1,..., x n ),

More information

Lecture 1: Course Overview and Turing machine complexity

Lecture 1: Course Overview and Turing machine complexity CSE 531: Computational Complexity I Winter 2016 Lecture 1: Course Overview and Turing machine complexity January 6, 2016 Lecturer: Paul Beame Scribe: Paul Beame 1 Course Outline 1. Basic properties of

More information

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A

More information