1 Finite Model Theory Lecture 5 Turing Machines and Finite Models.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
Lecture 24 MAS 714 Hartmut Klauck
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Finite Model Theory Lecture 10 Second Order Logic.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Computability and Complexity 10-1 Computability and Complexity Andrei Bulatov Gödel’s Incompleteness Theorem.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
Definition: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n) is the maximum.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
Lecture 7: Foundations of Query Languages Tuesday, January 23, 2001.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
1 Finite Model Theory Lecture 16 L  1  Summary and 0/1 Laws.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
Complexity Classes Karl Lieberherr. Source From riptive_complexity.html.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
Lecture 9: Query Complexity Tuesday, January 30, 2001.
Decidability.
1 Finite Model Theory Lecture 9 Logics and Complexity Classes (cont’d)
Theory of Computability
Busch Complexity Lectures: Reductions
Reductions.
Reductions Costas Busch - LSU.
Umans Complexity Theory Lectures
Intro to Theory of Computation
Introduction to Automata Theory
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Decidability of logical theories
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Finite Model Theory Lecture 2
Computability and Complexity
Finite Model Theory Lecture 6
Lecture 10: Query Complexity
Proposed in Turing’s 1936 paper
Umans Complexity Theory Lectures
Decidability of logical theories
Theory of Computability
Instructor: Aaron Roth
Presentation transcript:

1 Finite Model Theory Lecture 5 Turing Machines and Finite Models

2 Outline Trakhtenbrot’s theorem (Chapter 9.1) Fagin’s theorem (Chapter 9.2)

3 Trachtenbrot’s Theorem Definition.  is finitely satisfiable if there exists a finite model A s.t. A ²  Theorem [Trakhtenbrot] Suppose  has at least one relation symbol of arity ¸ 2. Then it is undecidable whether a sentence  is finitely satisfiable.

4 Consequence 1 Corollary. There is no recursive function f such that if  has a finite model then it has a finite model of size at most f(|  |).

5 Consequence 2 Definition. A sentence  is finitely valid, ² fin , if for all finite models A, A ²  Question: is there a complete proof system `, i.e. such that `  iff ² fin  ? Answer: NO ! [why ?]

6 Proof of Trakhtenbrot’s Theorem By reduction from the halting problem: given a Turing machine M, does it halt on the empty tape ? Given M, construct  M s.t. M halts iff  M has a finite model

7 Proof of Trakhtenbrot’s Theorem 9 A. A ²   9 C. (C is a halting computation of M) M halts:  M has a finite model: Hence a model A should stand for a computation of M

8 Proof of Trakhtenbrot’s Theorem Details: M = (Q, , , q 0, Q a ) – states Q, initial state q 0 2 Q, accepting states Q a µ Q –  = {0, 1} = tape alphabet –  = transitions What is a computation C of M ?

9 Proof of Trakhtenbrot’s Theorem The formula  M will say the following: < is a linear order T 0 (p, t) = the tape holds 0 at position p and time t T 1 (p, t) = similar H q (p, t) = the machine is in state q at time t, and the head is over position p of the tape [write  M in class]  = {<, T 0 ( ¢, ¢ ), T 1 ( ¢, ¢ ), (H q ( ¢, ¢ )) q 2 Q } A ²  M iff A represents a valid computation of M

10 Fagin’s Theorem Recall Second Order Logic, SO: –May have formulas of the form 9 R.  or 8 R. , where R is a relation symbol Every SO formula can be written in prenex form like this: where each Q i is either 9 or 8, and  is in FO [WHY ???] Q 1 R 1 … Q m R m. 

11 Fagin’s Theorem Define 9 SO to be formulas of the form: Define 8 SO to be formulas of the form: 9 R 1 … 9 R m.  8 R 1 … 8 R m. 

12 Examples Let  = {R}, i.e. a single binary relation. Finite models are graphs. Express the following in SO –The graph is connected [what 2 nd order quantifiers did we need ?] –The graph is 3-colorable –The graph has a Hamiltonean path

13 Examples 3-colorability:  = 8 x.(A(x) Ç B(x) Ç C(x))  A = 8 x. 8 y.(R(x,y) ) : (A(x) Æ A(y)))  B = 8 x. 8 y.(R(x,y) ) : (B(x) Æ B(y)))  C = 8 x. 8 y.(R(x,y) ) : (C(x) Æ C(y))) 9 A. 9 B. 9 C.(  Æ  A Æ  B Æ  C )

14 Examples Hamiltonean path:  = says that < is a total linear order  = says that if x<y are consecutive, then R(x,y) Little dirty secret of SO (actually 9 SO): we don’t need order, because we can express it ! 9 <. (  Æ  )

15 Fagin’s Theorem Theorem [Fagin] 9 SO captures precisely NP More precisely: For every  2 9 SO, the problem of checking whether A ²  is in NP For any property of models, P, s.t. checking A 2 P is in NP, there exists a formula  2 9 SO s.t. A ²  iff A 2 P

16 Fagin’s Theorem Need encodings of finite structures: Let A = (A, R 1 A, …, R p A ) where A = {a 1, …, a n } Fix an order a 1 < a 2 < … < a n where each enc(R i A ) is a string of length n k in {0,1} * [what meaning ? See book pp. 88] enc( A ) = 0 n ¢ 1 ¢ enc(R 1 A ) ¢ ¢ ¢ enc(R p A )

17 Proof 9 SO µ NP is obvious [why ?] NP µ 9 SO requires us to model a Turing Machine M running in NP with a formula  M : like in Trakhtenbrot’s theorem, with some additional complications 9 <. 9 T 0. 9 T 1 9 H q 1 … 9 H q m.  M [what are the arities of T 0, T 1, (H q ) q 2 Q ?

18 Discussion This is a characterization that does not mention computational resources ! Later, other complexity classes were captured by logics, but for all lower classes Logic need help from order. Descriptive complexity

19 Fagin’s Theorem and P  NP We have NP = 9 SO, coNP = 8 SO If we prove 9 SO  8 SO then P  NP Definition. MSO = Monadic SO (restrict quantifiers to unary relations) Definition. Monadic NP = 9 MSO; Monadic coNP = 8 MSO [give examples of NP-complete problems in monadic NP]

20 Fagin’s Theorem and P  NP Theorem Monadic NP  Monadic coNP Proof. Step 1: Graph connectivity is in 8 MSO Step 2: Graph connectivity is not in 9 MSO