We ve studied the main models and concepts of the theory of computation:

Similar documents
Parallel Computation: Many computations at once, we measure parallel time and amount of hardware. (time measure, hardware measure)

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Prove, where is known to be NP-complete. The following problems are NP-Complete:

Umans Complexity Theory Lectures

CS 151 Complexity Theory Spring Final Solutions. L i NL i NC 2i P.

CS 125 Section #10 Midterm 2 Review 11/5/14

Reflection in the Chomsky Hierarchy

Lecture 6: Arithmetic and Threshold Circuits

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

Efficiently Reasoning about Programs

1. [5 points each] True or False. If the question is currently open, write O or Open.

Expressive Power and Abstraction in Essence

Reasoning about Reachability at Tom Rep s 60th Birthday Celebration

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

CSE 20 DISCRETE MATH. Fall

Computability, Cantor s diagonalization, Russell s Paradox, Gödel s s Incompleteness, Turing Halting Problem.

Exercises Computational Complexity

Inductive Synthesis. Neil Immerman. joint work with Shachar Itzhaky, Sumit Gulwani, and Mooly Sagiv

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Greedy Algorithms 1 {K(S) K(S) C} For large values of d, brute force search is not feasible because there are 2 d {1,..., d}.

NP-Completeness. Algorithms

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.

NP-Complete Reductions 2

Discrete Mathematics Lecture 4. Harper Langston New York University

Examples of P vs NP: More Problems

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

Theorem 2.9: nearest addition algorithm

Partha Sarathi Mandal

Computer Sciences Department

Copyright 2000, Kevin Wayne 1

CS154, Lecture 18: PCPs, Hardness of Approximation, Approximation-Preserving Reductions, Interactive Proofs, Zero-Knowledge, Cold Fusion, Peace in

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Computability Theory

The Relational Model

More on Polynomial Time and Space

NP-complete Reductions

Lecture 1. 1 Notation

Theory of Computation

DISCRETE MATHEMATICS

Introduction to Algorithms. Lecture 24. Prof. Patrick Jaillet

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

CSE 20 DISCRETE MATH. Winter

Boolean Functions (Formulas) and Propositional Logic

Theory of Computation, Homework 3 Sample Solution

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

CMPSCI611: The SUBSET-SUM Problem Lecture 18

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

9.1 Cook-Levin Theorem

1 Definition of Reduction

Final Course Review. Reading: Chapters 1-9

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS

Treewidth and graph minors

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

Computation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer

A Retrospective on Datalog 1.0

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

introduction to Programming in C Department of Computer Science and Engineering Lecture No. #40 Recursion Linear Recursion

Natural Numbers. We will use natural numbers to illustrate several ideas that will apply to Haskell data types in general.

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

AXIOMS FOR THE INTEGERS

Notes for Lecture 24

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

Computation Club: Gödel s theorem

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

Reductions and Satisfiability

Chapter Summary. Mathematical Induction Recursive Definitions Structural Induction Recursive Algorithms

Material from Recitation 1

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

8.1 Polynomial-Time Reductions

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

CHAPTER 4. COMPUTABILITY AND DECIDABILITY

SAT-CNF Is N P-complete

1 Elementary number theory

6.045 Final Exam. Name: Please write your name on each page. This exam is open book, open notes.

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

Ambiguous Grammars and Compactification

Fixed Parameter Algorithms

Introductory logic and sets for Computer scientists

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d

To illustrate what is intended the following are three write ups by students. Diagonalization

Chapter 10 Part 1: Reduction

Approximation Algorithms

LOGIC AND DISCRETE MATHEMATICS

P and NP (Millenium problem)

Today. Types of graphs. Complete Graphs. Trees. Hypercubes.

Reference Sheet for CO142.2 Discrete Mathematics II

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

Reductions. Linear Time Reductions. Desiderata. Reduction. Desiderata. Classify problems according to their computational requirements.

COMP4418 Knowledge Representation and Reasoning

Posets, graphs and algebras: a case study for the fine-grained complexity of CSP s

Jaykov Foukzon. Israel Institute of Technology, Haifa, Israel.

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

CSC Discrete Math I, Spring Sets

Outline. Language Hierarchy

CMPSCI611: Approximating SET-COVER Lecture 21

Transcription:

CMPSCI 601: Summary & Conclusions Lecture 27 We ve studied the main models and concepts of the theory of computation: Computability: what can be computed in principle Logic: how can we express our requirements Complexity: what can be computed in practice Concrete Problem Mathematical Model 1

CMPSCI601: Models of Computation Lecture 27 How is the input organized? What computational operations are allowed? Do we have internal memory, and how much? An answer to these questions gives us a formal model of computation. Some Formal Models of Computation: Boolean: Formal Language Theory: First-Order Logic: Recursive Function Theory: Abstract RAM: (as in an algorithms course) 2

Boolean Computation: Data Type: Booleans, true or false, 0 or 1 Operations: AND, OR (inclusive), NOT, can define more Variables: Inputs, others Expressions:, etc. Straight-Line Program: y_1 = NOT x_1; y_2 = y_1 OR x_2; y_3 = x_3 AND x_4; y_4 = y_2 AND y_3; y_5 = y_2 OR x_1; return NOT y_5; A straight-line program is equivalent to a boolean circuit, about which more later. Each line of the program (gate of the circuit) has a truth value that is a function of the input variables. Given a function of the inputs (a property), we will consider among other things how long a program is needed to compute it in this way. 3

Boolean Logic: Chapters 1-8 of [BE] dealt with propositional or boolean logic. The main topics were: Syntax and semantics for boolean expressions Rules for proving that an expression is a tautology or that one expression follows logically from another A formal proof system encapsulating these rules and implemented as interactive software, included with the book The basics of boolean logic should have been review, but formal proof may not have been. We studied the system from the book and software starting on HW#2. We then considered two important properties of the system: Soundness: everything provable is true Completeness: everything true is provable Here everything refers only to statements that can be made within the system. 4

First-Order Logic: We can think of a sequence of boolean variables as a single object, a function from the set to. Thus for any number in the range, is the boolean variable we used to call. is also called a unary relation, a property that each number in the range either has or doesn t have. We can also have binary, ternary, or -ary relations. For example, in a directed graph where the vertices are named we have a binary relation, where the boolean is iff there is an edge from to. 5

More First-Order Logic: A first-order structure, roughly speaking, is a universe of base objects and a set of relations over them. If one of these relations is the input, we can use first-order logic to define properties of the input. For example the first-order sentence is true for the graph with edge relation has out-degree at least one. iff every vertex In Chapters 9-13 of [BE] we saw syntax and semantics for first-order logic, a set of proof rules for it, and software that lets you play with structures consisting of sets of blocks of different types on a grid. We proved (using later chapters of [BE]) that this proof system is also sound and complete. 6

Recursive Function Theory: Bits can be used to represent numbers (by which I generally mean non-negative integers in binary). General computations may be coded as functions from numbers (or tuples of numbers) to numbers. Kleene s recursive function theory defines a set of general recursive functions by induction. There are base functions and rules for creating new functions from old ones. It turns out that general recursive corresponds to algorithmically computable. (This is a theorem, not a definition.) 7

Primitive Recursion and Bloop An important subset of the partial recursive functions is the primitive recursive functions. We will define these in terms of a simple programming language called Bloop. (My Bloop is based on the language of the same name in Hofstadter s Gödel, Escher, Bach but has a different syntax.) Variables represent numbers (non-negative integers). They are declared and initialized to 0 when they first appear. Statements of Bloop consist of: assignment statements x =... the increment operator ++ function declarations and calls (call-by-value, no recursion) bounded loops for (x) B, where x is a variable and B is a block of code in which x is not modified. This code executes B exactly x times. A function is primitive recursive iff it can be implemented by a Bloop program. 8

Relations Among The Models: Let s look at a single problem. Given input bits, we want to know whether exactly two of them are ones. This question can be posed in each of our models: Boolean: There are various ways to build an SLP or circuit, which we explored on HW#1. Finite-State Machine: Sweep the input string leftto-right, remembering whether we ve seen zero, one, two, or more than two ones. First-Order Logic: Numerical Input: Is the input the sum of two distinct powers of two? On HW#1 you wrote a Bloop program to decide this. Abstract RAM: The problem probably defaults to one of the others once we decide on our data representation. 9

CMPSCI 601: Regular Sets Lecture 27 Kleene s Theorem: Let be any language. Then the following are equivalent: 1., for some DFA. 2., for some NFA without transitions 3., for some NFA. 4., for some regular expression. Myhill-Nerode Theorem: The language is regular iff has a finite number of equivalence classes. Furthermore, this number of equivalence classes is equal to the number of states in the minimum-state DFA that accepts. Pumping Lemma for Regular Sets: Let be a DFA. Let. Let s.t.. Then s.t. the following all hold:, and! " 10

CMPSCI 601: CFL s Lecture 27 Closure Theorem for Context Free Languages: Let be context-free languages, let be a regular language, and let! and! be homomorphisms. Then the following languages are context-free: 1. 2. 3. 4. 5. CFL Pumping Lemma: Let be a CFL. Then there is a constant, depending only on such that if and, then there exist strings such that, and,,, and for all N,! 11

CMPSCI 601: Recursive Sets Lecture 27 A (partial) function is recursive iff it is computed by some TM. Let or N. is a recursive set iff the function is a (total) recursive function, where if otherwise is a recursively enumerable set ( is r.e.) iff the function is a (partial) recursive function, where if otherwise Theorem: Recursive = r.e. co-r.e. 12

Define the primitive recursive functions to be the smallest class of functions that contains the Initial functions:, and, and is closed under Composition, and is closed under Primitive Recursion,, Define the general recursive functions to be the smallest class of functions that contains the Initial functions, and is closed under Composition, and is closed under Primitive Recursion, and is closed under Unbounded Mimimalization Theorem: [Kleene] COMP is a primitive recursive predicate. Theorem: A (partial) function is recursive iff it is general recursive. 13

Cantor s Theorem: N is not countable! Proof: Suppose it were. Let N N. Define the diagonal set, Thus for some N. Therefore, N is not countable! 0 1 1 1 0 0 1 0 0........... 14

CMPSCI 601: Uses of Diagonalization Lecture 27 Theorem: is not r.e. Know how to prove this! Hierarchy Theorems: Let be a well behaved function, and one of DSPACE, NSPACE, DTIME, NTIME. If is sufficiently smaller than then is strictly contained in. sufficiently smaller than means DSPACE NSPACE NTIME DTIME Hence P! " #%$, L PSPACE. But these are the only separations of classes we know! (Except at the p.r. and above level, and for REG and CFL). 15

Theorem: The busy beaver function is eventually larger than any total, recursive function. Theorem: Let N. T.F.A.E. 1. is the domain of a partial, recursive function. 2. or is the range of a total, recursive function. 3. is the range of a partial, recursive function. 4., some where 16

CMPSCI 601: Logic Lecture 27 Definitions of Formula, Structure, and Truth Fitch Proof Rules Propositional (12): Intro and Elim rules for,,,,, and. Equality (2): Intro and Elim for. Quantifier (4): Intro and Elim for and. FO-THEOREMS FO-VALID 17

Soundness Theorem: If then. FO-THEOREMS FO-VALID Completeness Theorem: If then. FO-THEOREMS FO-VALID Corollary: FO-THEOREMS FO-VALID Compactness Theorem: If every finite subset of has a model, then has a model. Gödel s Incompleteness Theorem: Theory N (true arithmetic) is not r.e. and thus not axiomatizable. (If is an r.e. set of axioms that are all true in N, then there exists a formula in Theory N that is not provable from.) 18

CMPSCI 601: Complexity Classes Lecture 27 Theorem: For DTIME NTIME DSPACE DSPACE DTIME, Savitch s Theorem: For, NSPACE ATIME DSPACE Immerman-Szelepcsényi Theorem: For, NSPACE co-nspace 19

CMPSCI 601: Reductions Lecture 27 Definition: means there exists L such that for any, iff. This is also called a logspace many-one reduction. Theorem: Let be one of the following complexity classes: L, NL, P, NP, co-np, PSPACE, EXPTIME, Primitive-Recursive, RECURSIVE, r.e., co-r.e. Suppose. If Then All these complexity classes are closed downward under reductions. Lower Bounds: If is hard then is hard. Upper Bounds: If is easy then is easy. 20

CMPSCI 601: Complete Problems Lecture 27 Complete for NL: NFA, 2-SAT Complete for P: SAT, REACH REACH, EMPTY-DFA, EMPTY- CVP, MCVP, EMPTY-CFL, Horn- Complete for NP: TSP, SAT, 3-SAT, 3-COLOR, CLIQUE, Subset Sum, Knapsack Complete for PSPACE: QSAT, GEOGRAPHY, SUCCINCT-REACH, REG-EXP- Complete for r.e.:, HALT,, FO-VALID Complete for co-r.e.:, CFL, EMPTY, FO-SAT 21

CMPSCI 601: Descriptive Complexity Lecture 27 Theorem: r.e. co-r.e. FO N FO N PH SO NP SO P SO -Horn AC CRAM LH FO One can understand the complexity of a problem as the richness of a logical language that is needed to describe the problem. 22

CMPSCI 601: Alternation Lecture 27 Theorem: For ATIME ASPACE, and for, DSPACE DTIME Corollary: In particular, ASPACE ATIME ASPACE P PSPACE EXPTIME 23

CMPSCI 601: Circuit Complexity Lecture 27 depth parallel time width hardware number of gates computational work sequential time Theorem: For all, CRAM AC AC ThC NC L NL sac AC ThC NC sac.... AC ThC NC sac.... NC NC NC NC NC P NP 24

Alternation/Circuit Theorem: Log-space ATM s with: time give NC ( ) alternations give AC ( ) Alternating TM s are one good way to design uniform families of circuits. We used this method to prove sac. First-order logic gives us another way to design uniform families of circuits. We ve used this to construct AC circuits by showing a problem to be in FO. We need uniformity definitions on our circuit classes to relate them to ordinary classes. For example, poly-size circuit families compute languages in P only if they are at least P-uniform. 25

Theorem: PRIME and Factoring are in NP co-np. (PRIME is now in P as well.) Theorem: [Solovay-Strassen, Miller] PRIME BPP Fact: REACH BPL NP Interactive Proofs P BPP MA AM AM[poly] = IP = PSPACE = BP(NP) Fact: PCP[ ] = NP 26

CMPSCI 601: Optimization Lecture 27 is an optimization problem iff For each instance, is the set of feasible solutions Each has a cost Z For minimization problems, OPT For maximization problems, OPT Let be an algorithm s.t. on any instance, is an -approximation algorithm iff for all, OPT OPT 27

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/ε 28

co-r.e. complete FO A (N) co-r.e. Arithmetic Hierarchy FO(N) Recursive r.e. FO E r.e. complete (N) Primitive Recursive EXPTIME PSPACE co-np complete SO A Polynomial-Time Hierarchy co-np NP SO U NP co-np SO E NP complete "truly feasible" NC P SO-Horn FO NC 2 log(cfl) NSPACE[log n] DSPACE[log n] Regular Logarithmic-Time Hierarchy SAC 1 NC AC 1 ThC 0 0 29

CMPSCI 601: Where s the Catch? Lecture 27 Why are the following so hard to prove? P NP P PSPACE ThC NP BPP P We do know a lot about computation. Reductions and complete problems are a key tool. So is the equivalence of apparently different models and methods. Yet much remains unknown. 30