Hedman. A First Course in Logic, 2004 (Oxford)
.pdf420 |
Finite model theory |
|
initial configuration of the T -machine as |
|
|
|
e |
|
|
i |
bi(0) = 0. |
|
l(0) = 1 |
|
|
=1 |
|
We change this initial configuration to encode G. Let n be the number of vertices in G. We code G as a sequence of 0s and 1s of length n2 (the adjacency matrix for G). The order < imposes an order on the set of ordered pairs of vertices. We change θinit to the sentence
|
e |
l(0) = 1 |
i |
bi(0) = δi, |
|
|
=1 |
where δi = 1 if the ith ordered pair of vertices share an edge and otherwise δi = 0. Again, we can replace 0 and 1 with formulas defining the first and second elements of the order. Note that it is possible that |G| = n > e in which case not all of G will be encoded. This is one of the major deficiencies of the programming language T ++.
Let Ψ0 be the sentence obtained by changing the subformula θinit inRELAT ION SϕE as we have described. Now if G |= Ψ0, then G can be viewed as the computation of Pe given the code of G as input. That is, each step of the computation is represented by a vertex of the graph. However, this computation may take more than n = |G| steps. The key to the proof, and the key to Fagin’s theorem as well, is the following elementary observation. The set of k-tuples in G has size nk. Since Pe is polynomial-time, there exists k such that this program halts in fewer than nk steps given input of size n. We modify Ψ0 so that it refers to k-tuples of vertices. Let Ψ be the SO sentence that is the result of this modification.
Theorem 10.17 (Gr¨adel) Let V be a relational vocabulary containing the binary relation <. Let S be a set of finite V-structures each of which interpret < as a linear order. A V-sentence ϕ is equivalent to a sentence of SO-Horn if and only if the ϕ-s problem is in P.
Proof One direction of this theorem is proved as Proposition 10.15. For the other direction, suppose that the ϕ-S Problem is in P. Then there exists a T program Pe that decides this problem in polynomial time. We can code programs of T in the same manner that we coded T ++ programs in Section 7.4. So we can write a sentence ϕe as in the proof of Trakhtenbrot’s theorem. Following the proof of the previous proposition, we find a sentence Ψ in SO that works. However, we want a sentence that is Horn. For this we make two observations regarding the sentence ϕe from Trakhtenbrot’s theorem. Since the structures in S are ordered, we may drop the subformula ϕ< ϕs ϕp ϕc from ϕe. The second
Finite model theory |
421 |
observation is that the sentence that remains, namely
θinit θhalt ψ1 ψ2 · · · ψL
is equivalent to a conjunction of Horn sentences. For example, θhalt is the sentence:
x((l(x) = 0 l(x) = L + 1) → s(x) = x). This is equivalent to the following conjunction of Horn sentences:
x(l(x) = 0 → s(x) = x) x(l(x) = L + 1 → s(x) = x).
Likewise, the sentences ψi are equivalent to conjunctions of Horn sentences. For example, if “(9) Add 4” occurs as the ninth line of Pe, then ψ9 is
l(x) = 9 → |
l(s(x)) = 10 b4(s(x)) = s(b4(x)) |
i |
bi(s(x)) = bi(x) . |
|
|
|
|
|
|
=4 |
|
This sentence is equivalent to
(l(x) = 9 → l(s(x)) = 10) (l(x) = 9 → b4(s(x))
= s(b4(x))) (l(x) = 9 → bi(s(x)) = bi(x)).
i=4
The theorem then follows from the fact that a conjunction of Horn sentences is equivalent to a Horn sentence.
Gr¨adel’s theorem is can be paraphrased as SO-Horn = P. We say thatSO-Horn captures the complexity class P on ordered structures. Least fixedpoint logic also captures P. This was proved independently by Immerman and Vardi.
Theorem 10.18 (Immerman–Vardi) Let V be a relational vocabulary containing the binary relation <. Let S be a set of finite V-structures each of which interpret < as a linear order. A V-sentence ϕ is equivalent to a sentence of LF P if and only if the ϕ-S problem is in P.
This theorem can be proved analogously to the proof of Gr¨adel’s theorem. We omit this proof (a proof is contained in [17]). Note that both of these theorems are restricted to ordered structures. This is a common restriction in complexity theory. Suppose we are given a graph having n vertices. There are n! ways to arrange these vertices into a linear order. So there are n! ways to input the same graph into a T -machine. Moreover, there is no known polynomial-time algorithm to determine whether or not two given graphs are the same or not. So if a program P is polynomial-time, it may produce di erent outputs when given two di erent presentations of the same graph as input. If we restrict to
422 |
Finite model theory |
ordered graphs, then we avoid this problem. Fagin’s theorem is one of the few results in descriptive complexity that is not restricted to ordered structures. This is because we can assert that there exists a linear order in SO.
Theorem 10.19 (Fagin) Let V be a relational vocabulary and let S be a set of finite V-structures. A V-sentence ϕ is equivalent to a sentence of SO if and only if the ϕ-S problem is in NP. Moreover, we may further require that the first-order part of the SO sentence is universal.
Proof One direction of this theorem is proved as Proposition 10.14. For the other direction, suppose that the ϕ-S Problem is in NP. Then there exists a
TN P program Pe that decides this problem in polynomial time. We can code programs of TN in the same manner that we coded T ++ programs. Following the proof of Proposition 10.16, we can find a SO sentence Ψ as desired.
The moreover clause is verified by inspecting the sentence Ψ. It is interesting to note that, in the nondeterministic case, the sentences ψi are not necessarilySO-Horn. For example, suppose that line (9) of Pe is the TN P command GOTO 2 or 3. Then ψ9 must express l(x) = 9 → (l(x + 1) = 2 l(x + 1) = 3) which is not a Horn sentence.
Finally, we show that P SAT is NP-complete. This was first proved by Stephen Cook in 1971.
Theorem 10.20 (Cook) P SAT is NP-complete.
Proof Suppose we have an algorithm that determines P SAT in polynomialtime. We show that, using this algorithm, we can determine any decision problem is in NP in polynomial-time. Suppose we are given a ϕ-S problem for some V- sentence ϕ and some set of finite V-structures S. If this problem is in NP, then by Fagin’s theorem, ϕ is equivalent to a formula of the form
R1i1 · · · Rkik x1 · · · xnψ(x1, . . . , xn)
where ψ(¯x) is a quantifier-free first-order formula in conjunctive prenex normal form. Suppose we are given a structure M in S an want to determine
whether or not M models the above SO sentence. Consider the conjunction
a¯ M ψ(a1, . . . , an) taken over all n-tuples of M . As in the proof of Proposition 10.15, this sentence reduces to one in which every atomic subformula has the form Rj (a1, . . . , aij ) for some j = 1, . . . , k. Since this is a quantifier-free sentence, we may view this as a formula of propositional logic. If we can determine whether or not this formula is satisfiable, then we can determine whether or not M models the above SO sentence. In this way, the ϕ-S problem is reducible to P SAT . Since this problem is an arbritrary problem in NP, P SAT is NP-complete.
Finite model theory |
423 |
The results of this section represent only a glimpse of descriptive complexity. For more on this subject both [17] and [36] are recommended.
10.4 Logic and the P = NP problem
The question of whether or not P = NP is one of the most important unanswered questions of mathematics. In this final section, we reformulate this and related questions as questions of pure logic.
To show that P = NP, it su ces to find a polynomial-time algorithm for determining whether or not a given formula of propositional logic is satisfiable. This follows from Cook’s theorem. Of course, the same is true for any NPcomplete problem. Consider the 3-Color Problem. A graph is 3-colorable if and only if it can be divided into three subsets such that no two vertices in the same set shares an edge. This property can be expressed as a sentence of SO. By Fagin’s theorem, the 3-Color Problem is in NP. In fact, this problem can be shown to be NP-complete. So if this problem is in P, then so is P SAT as is every NP problem. So to show that P = NP, it su ces to define 3-Colorability on ordered graphs using a sentence of SO-Horn (by Gr¨adel’s theorem). Likewise, to prove that NP = coNP it su ces to write one clever sentence. If there exists a sentence of SO that says that a graph is not 3-Colorable, then the 3-Color Problem is in coNP as well as NP. By the NP-completeness of this problem, this would imply that NP = coNP. Conversely, one can show that NP = coNP by playing pebble games. One must construct a 3-colorable graph M with the property that, for any k N and any expansion M of M to a finite relational vocabulary V, there exists a V-structure N such that N is not 3- colorable and M ≡k N . If one could achieve this, then one could further conclude that P = NP.
The question of NP = coNP is related to the question of whether or notSO is an extension of first-order logic. Recall the definition of such an extension from Section 9.4. The point of di culty is the Closure Property. Is SO closed under negations? Clearly, the negation of an SO sentence is equivalent to aSO sentence (where SO is defined analogously to SO). By Fagin’s theoremSO captures NP. As a corollary of this, we see that SO captures coNP. It follows that NP = coNP if and only if SO ≡ SO. Moreover, if SO ≡ SO, then every second-order sentence is equivalent to a sentence of SO. This can be shown by induction on the complexity of the second-order quantifiers usingSO ≡ SO as the base step. So the following are equivalent:
(i)NP = coNP,
(ii)SO is an extension of first-order logic (as defined in Section 9.4), and
424 |
Finite model theory |
(iii) SO is equivalent to second-order logic.
Yet another characterization is given by Asser’s Problem which relates the NP = coNP problem to the finite spectra of first-order sentences as defined in Exercise 2.3. Recall that the finite spectrum of a sentence ϕ is the set of n N such that ϕ has a model of size n. Asser’s Problem asks whether or not the set of finite spectra is closed under complements. That is, if A N is the spectrum for a sentence ϕ, then is there a sentence for which the complement of A is the spectrum? If not, then one can conclude that NP =coNP.
We leave it to the reader to verify and expand upon the claims of this section and to resolve the problems of whether or not P = NP = coNP.
Exercises
10.1.Let M4 be the structure in the vocabulary VE = {E} that interprets the binary relation E as an equivalence relation having exactly four classes each containing exactly four elements.
(a)Show that M4 ≡4 N for any VE structure N that interprets E as an equivalence relation having more than four classes each containing more than four elements.
(b)Show that M4 is not L3-equivalent to any VE -structure that does not interpret E as an equivalence relation.
10.2.Let V< = {R}. Show that there exists a VR-sentence ϕ of L3ω1ω such that M |= ϕ if and only if M is a connected graph.
10.3.Let V< = {<}. Show that there exists a V<-sentence ϕ of L3ω1ω such that M |= ϕ if and only if M interprets < as a linear order and |M | is an odd
natural number.
10.4.Let V be a relational vocabulary. Let T be a complete V-theory that is axiomatized by a set of Lk sentences. Show that V (ϕ) ≤ k for each atomic V-formula ϕ.
10.5.Let V be a finite relational vocabulary that contains the binary relation S.
Let M be a V-structure that has underlying set N and interprets S as the successor relation. Show that there exists k N such that M ≡Lkω1ω N
implies M N .
=
10.6.This exercise demonstrates that the Beth Definability theorem fails when restricted to finite structures. Let V = {<, P } and let T be the incomplete V< saying that < is a linear order and the unary relation P holds for the odd elements in the order (the first element of the order, the third, the fifth, and so forth).
Finite model theory |
425 |
(a)Show that P is implicitly defined by T in terms of {<} on finite structures. That is, show that any two expansions of a finite linear order to a model of T are isomorphic.
(b)Show that P is not explicitly defined by T in terms of {<} on finite structures. That is, there is no formula ϕ(x) in the vocabulary {<} such that M |= ϕ(x) ↔ P (x) for any finite model M of T . (Use the previous exercise.)
10.7.Show that Craig’s theorem does not hold for finite structures. That is, demonstrate a V1-sentence ϕ1 and a V2-sentence ϕ2 so that ϕ1 |=fin ϕ2 but there is no sentence in the vocabulary V1 ∩V2 for which both ϕ1 |=fin θ and θ |=fin ϕ2.
10.8.Demonstrate a first-order sentence that is not equivalent to a universal sentence but is preserved under substructures of finite models.
10.9.Let V denote the set of first-order sentences that are valid. Let Vfin denote those sentences that are finitely valid. Trakhtenbrot proved that Vfin and the complement of V are recursively inseparable sets. To prove this strengthened version of Theorem 10.12, let A and B be any recursively inseparable pair of sets (Exercise 7.24). Let S be any set of first-order sentences such that V S Vfin. Show that if S is recursive, then A and B are not recursively inseparable.
10.10.A graph G is called a tree if, for any vertices a and b of G there exists a unique path from a to b. Let M and N be finite structures in the vocabulary of graphs.
(a)Show that if Duplicator wins Cw3 (M , N ), then M is a tree if and only if N is a tree.
(b)Suppose that M is a tree. Show that Duplicator wins Cw3 (M , N ) if and only if M N .
=
(c)Suppose that M is a tree. Show that Duplicator wins Cw2 (M , N ) if and only if M N .
=
Bibliography
[1]J. T. Baldwin, Fundamentals of Stability Theory, Springer-Verlag (Perspectives in Logic), 1989.
[2]J. T. Baldwin and A. H. Lachlan, On strongly minimal sets, Journal of Symbolic Logic, vol. 36, pp. 79–96, 1971.
[3]J. Barwise, ed., Handbook of Mathematical Logic, North-Holland (Studies in Logic), 1977.
[4]G. Boolos and R. Je ery, Computability and Logic, Cambridge University Press, 1989.
[5]G. Boolos, New proof of the G¨odel Incompleteness Theorem, Notices of the American Mathematical Society, vol. 36, pp. 388–390, 1989.
[6]S. Buechler, Essential Stability Theory, Springer-Verlag (Perspectives in Logic), 1996.
[7]C. C. Chang and H. J. Keisler, Model Theory, North-Holland (Studies in Logic), 1990.
[8]N. Cutland, Computability, Cambridge University Press, 1980.
[9]R. Diestel, Graph Theory, Springer-Verlag (Graduate Texts in Mathematics), 2000.
[10]L. van den Dries, Tame Topology and o-Minimal Structures, Cambridge University Press (LMS Lecture Notes), 1998.
[11]H. D. Ebbinghaus and J. Flum, Finite Model Theory, Springer-Verlag (Perspectives in Logic), 1995.
[12]H. D. Ebbinghaus, J. Flum, and W. Thomas, Mathematical Logic, Springer-Verlag (Undergraduate Texts in Mathematics), 1989.
[13]K. G¨odel, Collected Works, vol. 1 (S. Feferman et al., eds.), Oxford University Press, 1986.
[14]J. van Heijenoort, From Frege to G¨odel: A Source Book in Mathematical Logic, 1879–1931, Harvard University Press, 1967.
[15]I. N. Herstein, Topics in Algebra, John Wiley and Sons, 1975.
[16]W. A. Hodges, Model Theory, Cambridge University Press (Encyclopedia of Mathematics), 1993.
[17]N. Immerman, Descriptive Complexity, Springer-Verlag (Texts and Monographs in Computer Science), 1999.
[18]T. Jech, Set Theory, Academic Press, 1978.
[19]G. A. Jones and J. M. Jones, Elementary Number Theory, Springer-Verlag (Springer Undergraduate Mathematics), 1998.
[20]J. A. Kalman, Automated Reasoning with Otter, Rinton Press, 2001.
[21]I. Kaplansky, Set Theory and Metric Spaces, Chelsea Publishing Co., 1977.
[22]R. Kaye, Minesweeper is NP-complete, Mathematical Intelligencer, vol. 22(2), pp. 9–15, 2000.
[23]L. Kirby and J. Paris, Accessible independence results in Peano arithmetic, Bulletin of the LMS, vol. 14, pp. 285–293, 1982.
Bibliography |
427 |
[24]F. Kirwan, Complex Algebraic Curves, Cambridge University Press (LMS Student Texts), 1992.
[25]K. Kunen, Set Theory: An Introduction to Independence Proofs, North-Holland (Studies in Logic), 1995.
[26]D. Lascar, Stability in Model Theory, Longman, 1988.
[27]P. Lindstr¨om, On model-completeness, Theoria, vol. 30, pp. 183–196, 1964.
[28]P. Lindstr¨om, On extensions of elementary logic, Theoria, vol. 35, pp. 1–11, 1969.
[29]D. Marker, Model Theory: An Introduction, Springer-Verlag (Graduate Texts in Mathematics), 2003.
[30]D. Marker, M. Messmer, and A. Pillay, Model Theory of Fields, Springer-Verlag (Lecture Notes in Logic), 1996.
[31]Y. Matiyasevich, Hilbert’s 10th Problem, MIT Press, 1993.
[32]M. Morley, Categoricity in power, Transactions of the American Mathematical Society, vol. 114, pp. 514–538, 1965.
[33]A. Nerode and R. A. Shore, Logic for Applications, Springer-Verlag (Texts and Monographs in Computer Science), 1994.
[34]S. H. Nienhuys-Cheng and R. de Wolf, Foundations of Inductive Logic Programming, Springer-Verlag (Lecture Notes in Artificial Intelligence), 1997.
[35]M. Otto, Bounded Variable Logics and Counting, Springer-Verlag (Lecture Notes in Logic), 1997.
[36]C. H. Papadimitiou, Computational Complexity, Addison-Wesley, 1994.
[37]A. Pillay, An Introduction to Stability Theory, Oxford University Press (Logic Guides), 1983.
[38]A. Pillay, Geometric Stability Theory, Oxford University Press (Logic Guides), 1996.
[39]B. Poizat, Cours de Theorie des Modeles, Nur Al-Mantiz Wal-Ma’rifah, 1985.
[40]A. Robinson, Selected Papers, vol. 1, (H. J. Keisler et al., eds.), Yale University Press, 1979.
[41]J. A. Robinson, A machine oriented logic based on the resolution principle, Journal of the ACM, vol. 12, pp. 23–41, 1965.
[42]K. A. Ross, Elementary Analysis: The Theory of Calculus, Springer-Verlag (Undergraduate Texts), 1980.
[43]S. Shelah, Classification Theory and the Number of Non-isomorphic Models, NorthHolland (Studies in Logic), 1990.
[44]S. Shelah, Cardinal Arithmetic, Oxford University Press (Logic Guides), 1994.
[45]J. Shoenfield, Mathematical Logic, Addison-Wesley, 1967.
[46]J. Shoenfield, Recursion Theory, Springer-Verlag (Lecture Notes in Logic), 1993.
[47]M. Sipser, Introduction to the Theory of Computation, PWS Publishing Co., 1997.
[48]R. I. Soare, Recursively Enumerable Sets and Degrees, Springer-Verlag (Perspectives in Logic), 1987.
[49]R. Vaught, Denumerable models of complete theories, In Infinitistic Methods. Proceedings of the Symposium on Foundations of Mathematics, pp. 303–321, Pergamon, 1961.
[50]F. O. Wagner, Simple Theories, Kluwer Academic Press, 2000.