Download presentation
Presentation is loading. Please wait.
Published byTodd French Modified over 9 years ago
1
1 Finite Model Theory Lecture 5 Turing Machines and Finite Models
2
2 Outline Trakhtenbrot’s theorem (Chapter 9.1) Fagin’s theorem (Chapter 9.2)
3
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.