The 0–1 law fails for monadic existential second-order logic on undirected graphs

The 0–1 law fails for monadic existential second-order logic on undirected graphs

Information Processing Letters 77 (2001) 43–48 The 0–1 law fails for monadic existential second-order logic on undirected graphs Jean-Marie Le Bars I...

108KB Sizes 0 Downloads 63 Views

Information Processing Letters 77 (2001) 43–48

The 0–1 law fails for monadic existential second-order logic on undirected graphs Jean-Marie Le Bars Informatique, GREYC, Université de Caen, Bd Maréchal Juin, 14032 Caen cedex, France Received 2 September 1999; received in revised form 4 September 2000 Communicated by L. Boasson

Abstract Our purpose is to draw the frontier line which separates logics with and without 0–1 laws for the fragments of monadic existential second-order logic (MESO for short). We establish the failure of the 0–1 law for monadic existential second-order logic on undirected graphs by giving a sentence in this logic which has no asymptotic probability. This improves a similar result by Kaufmann on a vocabulary of 4 directed binary relations. Both results require 9 first-order variables. In contrast, we conjecture that the 0–1 law holds for MESO with two first-order variables (that is MESO2 ) on undirected graphs. Our result is optimal with respect to the vocabulary. The report is self-contained.  2001 Elsevier Science B.V. All rights reserved. Keywords: Theory of Computation; Combinatorial problems; Logics

1. Introduction Let R be a vocabulary (which is a finite set of relation symbols) and P be a property on the collection of all finite structures over R. For each natural number n, we will denoted by µn (P) the fraction of finite models with domain n = {0, . . . , n − 1} for which P holds. The asymptotic probability of P denote by µ(P) is the limit of µn (P) when n → +∞, provided this limit exists. Defining µn in terms of fractions amounts to considering the uniform probability space where two structures of the same size have the same probability. The following experiment yields a random n-element structure: for any integer k, any S ∈ R of arity k and any tuple a k of k elements of n = {0, . . . , n − 1}, we E-mail address: [email protected] (J.-M. Le Bars).

choose at random (with probability 12 ) whether the tuple a k is in the relation S. A property is called almost surely true (respectively false) when its asymptotic probability is equal to 1 (respectively 0). We say that the 0–1 law holds for a logic, which is a set of formulas, if the asymptotic probability of any property which is expressible in this logic is either 0 or 1. In 1969 Glebskii, Kogan, Liogonki and Talanov [2] and independently Fagin in 1976 [1] have shown that the 0–1 law holds for firstorder logic. An existential second-order sentence over a vocabulary R is an expression ψ of the form ∃S ϕ(R ∪ S), where S is a set of relation variables and ϕ(R ∪ S) is a first-order sentence over R ∪ S. Existential secondorder logic, denoted by ESO, is the set of such expressions. The sentence ψ is said to be monadic when S is a set of unary relation variables. Similarly, MESO, monadic existential second-order logic, de-

0020-0190/01/$ – see front matter  2001 Elsevier Science B.V. All rights reserved. PII: S 0 0 2 0 - 0 1 9 0 ( 0 0 ) 0 0 1 4 9 - 6

44

J.-M. Le Bars / Information Processing Letters 77 (2001) 43–48

2 variables

> 2 variables

Undirected graphs

A 0–1 law holds (conjectured)

The 0–1 law fails (this paper)

Structures with one or several binary relations

The 0–1 law fails (Le Bars, 1998)

The 0–1 law fails (Kaufmann, 1987)

Fig. 1. The frontier line of 0–1 laws for MESO.

Fig. 2. Kaufmann’s proof.

notes the set of such expressions. One may define fragments of ESO or MESO by considering restrictions on the first-order part. From the Kolaitis–Vardi [5,6] and Pacholski–Szwast [10] papers a surprising correspondence arises: a prefix class with equality L has the finite model property (i.e., a sentence of L has a model if and only if it has a finite model) if and only if the corresponding fragment of the existential secondorder logic has a 0–1 law. In contrast, we established that this correspondence is not preserved for first-order logic with two variables and the prefix class Gödel without equality [7–9]. Kaufmann and Shelah studied in [4] the possible asymptotic probabilities for monadic second-order logic and Kaufmann has shown in [3] that there exists a MESO sentence ψ over a vocabulary of 4 binary relations and 9 first-order variables without asymptotic probability and so the 0–1 law fails for MESO. We propose two improvements. First in Section 4 we show that it is possible to change ψ into an MESO sentence ψ1 expressible over a vocabulary of only one binary relation. Then, in Section 5, we change ψ1 into an MESO sentence ψ2 over undirected graphs. Observe that all the sentences above express almost surely the same property—PARITY, the number of elements (respectively vertices) is even—on structures (respectively undirected graphs). Clearly such a property has also no asymptotic probability. Hence, the failure of monadic existential second-order logic on undirected graphs is established. We obtain the following classification with respect to the 0–1 laws for the fragments of monadic existential second-order logic according to the type of the underlying structure and the number of first-order variables.

2. Idea of the proofs Kaufmann’s idea consists in extending a linear order from a small part of the structure to the whole structure by using several times the lexicographic order. Remark 1. Since we have a linear order of the domain, it is very easy to define PARITY by adding just one unary relation variable to color elements black and white: we choose the color black for the smallest element, the color white for the successor and so on. We have an even number of elements if and only if the greater element is white. Let R be the set of four binary relation symbols R, R0 , R1 , R2 . Kaufmann essentially writes that an Rstructure of domain D has almost surely four included sets P0 ⊂ P1 ⊂ P2 ⊂ P3 = D which satisfy the requirements of Fig. 2 (defined in Section 3) which are expressible in MESO. The proof of our strengthened result essentially uses two main differences: the considered sets form a partition of the domain and the linear order of P0 that we extend is no longer the restriction of a relation of the structure but is defined by a MESO-sentence with the symmetrical binary relation E (the set of edges). An undirected graph G = hV , Ei has almost surely a partition P0 , P1 , P2 , P3 over V which satisfies (1), (2), (3) and (4) defined in Part 3 with the same relation R = R0 = R1 = R2 .

3. Kaufmann’s counterexample Kaufmann proved the following main lemma:

J.-M. Le Bars / Information Processing Letters 77 (2001) 43–48

45

y and the least member of the symmetric difference of the sets R0 -coded by x and y does not belong to the set R-coded by x. He used the same method to build a linear order over P2 and over P3 . From this Kaufmann proved that Mn satisfies almost surely the sentence Φ. More precisely, he showed that there exists almost surely a set P0 of cardinality kn such that condition (1) holds by using the following lemma:

Fig. 3. Our result.

Lemma 2. There is a first-order formula ϕ(x, y) (with free variables x and y) in a vocabulary which includes three unary relation variables P0 , P1 , P2 such that the following MESO sentence Φ is almost surely true: Φ = ∃P0 ∃P1 ∃P2 “the binary relation defined by ϕ(x, y) is a linear order of the domain”. It follows from the above remark that PARITY is almost surely definable by an MSO sentence Ψ1 . Let R be a vocabulary containing a binary relation R and M be an R-structure with domain D and A and B be subsets of D. • We say that any element b R-codes the set {a ∈ A | (a, b) ∈ R} with respect to A. • We say that B R-codes distinct subsets of A if no two elements of B R-code the same subset of A. • We say that B R-codes the power set of A if B R-codes distinct subsets of A and moreover every subset of A is R-coded by an element of B. Kaufmann studied R-structures Mn with domain n = {0, . . . , n − 1}, where R is the set of four binary relation symbols R, R0 , R1 , R2 . He considered the uniform probability space where two structures Mn have the same probability. Let kn be the greater integer kn such that n > 2kn 22 . He proved that Mn has almost surely some subsets P0 ⊂ P1 ⊂ P2 ⊂ P3 = n of kn cardinalities |P0 | = kn , |P1 | = 2kn |P2 | = 22 which satisfy the following first-order definable conditions: (1) The restriction of R to P0 is a linear order. (2) P1 R0 -codes the power set of P0 . (3) P2 R1 -codes the power set of P1 . (4) P3 R2 -codes distinct subsets of P2 . From the linear order < (encoded by R) over the set P0 , Kaufmann defined a linear order  over P1 by using the lexicographic order: x  y if and only if x 6=

Lemma 3. Let E be a binary relation symbol and ln be a sequence of integers such that limn+→∞ ln = +∞ and n > ln2 4ln for sufficiently large n. We will denote by Nln an E-structure of cardinality ln and domain {w1 , w2 , . . . , wln } and by Sn an E-structure of domain {0, . . . , n − 1}. Sn contains almost surely a substructure Uln which is isomorphic to Nln . Proof. Without loss of generality, assume n = ln2 4ln . Let (V 1 , . . . , V ln ) be a partition of {0, . . . , n − 1} such that |V i | = ln 4ln , for i ∈ {1, . . . , ln }. The construction of Uln requires ln consecutive steps; for i = 1, . . . , ln , we search an element si of Vi such that Sn  {s1 , . . . , si } ≡ Nln  {w1 , . . . , wi }. Let i ∈ {1, . . . , ln }. Assume that the construction holds until i − 1. An element si of V − i suits for step i if (si , si ) ∈ E iff (wi wi ) ∈ E, (si , sj ) ∈ E iff (wi wj ) ∈ E and (sj , si ) ∈ E iff (wj wi ) ∈ E, for any j ∈ {1, . . . , ln }. It is realized with probability 12 ( 14 )i−1 . Hence the probability of failure at step i is less than i−1 |V i | l |V ln | 6 1 − 14 n . 1 − 12 14 The probability that our method to construct Uln fails is less than the sum of the probabilities of all the ln steps which is bounded by l |V ln | ∼ ln 1 − 14 n = ln e−4ln . Since limn→+∞ ln e−ln = 0, this construction of Un holds almost surely. 2 Since, by definition of kn , n > kn2 4kn for sufficiently large n, Kaufmann applies Lemma 3 where ln denotes kn defined above and Nkn denotes an R-structure of domain kn , where R is interpreted as a linear order and P0 denotes the domain of the substructure of the restriction of Mn over R isomorphic to Nkn .

46

J.-M. Le Bars / Information Processing Letters 77 (2001) 43–48

The proofs of conditions (2) and (3) use the following lemma, where Sn , Tn and E are respectively Pi , Pi+1 and Ri , i = 1, 2. Lemma 4. Let E be a binary relation of R and Sn and Tn be two sequences of sets such that lim Sn = +∞,

n+→∞

lim Tn = +∞,

n+→∞

|Tn | = 1. |Sn |2|Sn | Then there exists almost surely some subset of Tn which E-codes the power set of Sn . Sn ⊂ Tn ⊂ n,

lim

n→+∞

4. How to suppress useless binary relations Clearly, Kaufmann considered distinct binary relations because of the hypothesis Sn ⊂ Tn in Lemma 4. Since we have P0 ⊂ P1 ⊂ P2 ⊂ P3 = n, conditions (1)–(4) are not independent. We change Lemma 4 into Lemma 5 below (with a similar proof): Lemma 5. Let E be a binary relation of R. For any sequences Sn and Tn of disjoint subsets of n such that lim Sn = +∞,

n+→∞

lim Tn = +∞,

n+→∞

|Tn | = 1, lim n→+∞ |Sn |2|Sn | there exists almost surely some subset of Tn which Ecodes the power set of Sn . Proof. It is sufficient to establish that the probability of having a subset of Sn which is not coded by any element t of Tn goes to 0 when n goes to the infinity. Let Sn0 ⊂ Sn and t ∈ Tn , we have Pr(t code Sn0 ) = 2−|Sn | . For distinct t and t 0 in Tn , the events “t codes Sn0 ” and “t 0 codes Sn0 ” are independent. Then  |T |  Pr (∀t ∈ Tn /t) does not code Sn0 6 1 − 2−|Sn | n and   Pr (∃Sn0 ⊂ Sn ∀t ∈ Tn /t) does not code Sn0 |T | = 2|Sn | 1 − 2−|Sn | n . By definition of the sequences Tn and Sn , it follows that |S | |T | ∞ |Sn | ∞ 1 − 12 n n ≈ e−|Tn |/(2 ) ≈ e−|Sn | .

We conclude by observing lim 2|Sn | e−|Sn | = 0.

n→+∞

2

It is easily seen that conditions (1)–(4) hold almost surely when P0 , P1 , P2 , P3 form a partition of n and kn check |P0 | = kn , |P1 | = 2kn , |P2 | = 22 and |P3 | = k n n − 22 − 2kn − kn . Indeed, condition (1) is clearly unchanged, conditions (2) and (3) require Lemma 2. It remains to prove that condition (4) holds almost surely. Proof. Let {d1 , d2 } be a fixed pair of distinct elements of P3 , d1 and d2 R2 -code the same subset of P2 2kn

with probability 2−|P2 | = 2−2 . The number of pairs {d1, d2 } is less than n2 and, by definition of kn , is less kn +2 . Then the probability for having a than 22(kn +1) 22 pair {d1, d2 } which R2 -codes the same subset of P2 is less than 2−2

2kn

22(kn +1) 22

kn +2

.

It is easily seen that this term goes to infinity as n goes to infinity. 2 Observe that conditions (1)–(4) are independent, so we may consider just one binary relation R by substituting R to R0 , R1 and R2 in Φ. So, from now on, R = {R}. 5. A counterexample on undirected graphs First, it is easily seen that we can replace in conditions (2)–(4) an R-structure Mn by an undirected graph Gn = hVn , Ei, where Vn is the set of vertices and E is the set of edges. Indeed, in Section 4 the ordered pairs (a, b) which are involved (and which may belong or not to R) satisfy a ∈ Pi and b ∈ Pi+1 , where i equals 0, 1 or 2 and can be replaced by the pair {a, b}. So, we only have to change condition (1). We propose condition (10 ): (10 ) The restriction of Gn to P0 satisfies an MESO sentence which allows us to define a linear order. For this, we apply the following lemma: Lemma 6. There is a sequence Hm , m > 2 of undirected graphs of cardinality m and an MESO sentence

J.-M. Le Bars / Information Processing Letters 77 (2001) 43–48

47

∃V ∃W ψ(V , W ), where V and W are unary relation variables, which defines a linear order of the vertices over these graphs.

We leave it to the reader to verify that ∃V ∃W ψ(V , W ) holds for Hm . 2

Proof. First let us define the sentence ∃V ∃W ψ(V , W ) over undirected graphs. Let v and v 0 be distinct elements of V . Let Wv and Wv 0 be the subsets of W , which are E-coded respectively by v and v 0 . The formula ∀w((W w ∧ Evw) → Ev 0 w)) expresses that Wv ⊂ Wv 0 and the formula ∃w(W w ∧ Ev 0 w ∧ ¬Evw) expresses that this inclusion is strict. Let ϕ≺ (W, v, v 0 ) denote the conjunction of these two formulae. By inverting V and W , we similarly define ϕ≺ (V , w, w0 ), for distinct elements w, w0 of W . Let ψ(V , W ) denote the conjunction of three first-order formulas: the first one expresses that (V , W ) forms a partition of the set of vertices, the second one expresses that ϕ≺ (W, v, v 0 ) defines a linear order over V and the third part expresses that ϕ≺ (V , w, w0 ) defines a linear order over W . Provided that an undirected graph satisfies ∃V ∃W ψ(V , W ), we obtain a linear order over the whole domain by choosing, for example, v ≺ w, for v ∈ V and w ∈ W . Then we exhibit an undirected bipartite graph Hm of cardinality m, for any m > 2, for which condition (10 ) holds. Suppose m = 2l, the set of vertices of Hm is divided into two sets V = {v1 , . . . , vl } and W = {w1 , . . . , wl }. Hm is bipartite, i.e., there is no edge between vertices of V and between vertices of W . We add edges between V and W as follows: v1 has adjacent to w1 , . . . , wl and more generally, vi is adjacent to w1 , . . . , wl−i+1 , for i = 1, . . . , l. Observe that this construction is symmetric, i.e., we obtain the same graph if we invert V and W . Suppose m = 2l + 1, we build Hm from H2l defined above by adding an isolated vertex vl+1 in V .

(10 ) The substructure of Gn induced by P0 satisfies the MESO sentence ∃V ∃W ψ(V , W ).

Finally we change condition (1) into condition (10 ):

Lemma 4 allows us to apply Lemma 3.

6. Conclusion We have proved that the 0–1 law fails for MESO on undirected graphs. Since the 0–1 law holds for MESO on unary vocabularies, our result is optimal with respect to the vocabulary. We observe that Kaufmann’s counterexample requires 9 first-order variables and 7 quantifier alternations (and our result requires more). Is it possible to reduce these numbers? Let MESO2 be the set of MESO sentences with at most 2 firstorder variables. We showed in [7–9] that the property KERNEL has a variant denoted by KERNEL2 without asymptotic probability which is—as KERNEL— expressible by a MESO2 sentence on binary structures. Our result is optimal with respect to the number of first-order variables. It is not “a priori” possible to define a similar property by a MESO2 sentence on undirected graphs because the expressive power of this logic is very limited. So we believe that the 0–1 law holds for MESO2 on undirected graphs. Acknowledgements I would like to thank Etienne Grandjean and Michel de Rougemont for useful discussions and drafting help. References

Fig. 4. Graph H10 .

[1] R. Fagin, Probabilities on finite models, J. Symbolic Logic 41 (1976) 50–58. [2] Y.V. Glebskii, D.I. Kogan, M.I. Liogonki, V.A. Talanov, Range and degree of realizability of formulas in the restricted predicate calculus, Cybernetics 5 (1969) 142–154. [3] M. Kaufmann, Counterexample to the 0–1 law for existential monadic second-order logic, Technical Report, CLI Internal Note 32, Computational Logic Inc., December 1987. [4] M. Kaufmann, S. Shelah, On random models of finite power and monadic logic, Discrete Math. 54 (1985) 285–293.

48

J.-M. Le Bars / Information Processing Letters 77 (2001) 43–48

[5] P.G. Kolaitis, M.Y. Vardi, The decision problem for the probabilities of higher-order properties, in: Proc. 19th ACM Symp. on Theory of Computing, STOC’87, 1987, pp. 425–435. [6] P.G. Kolaitis, M.Y. Vardi, 0–1 laws and decisions problems for fragments of second-order logic, Inform. and Comput. 87 (1990) 302–338. [7] J.-M. Le Bars, Fragments of existential second-order logic without 0–1 laws, in: Proceedings of the 13th IEEE Symposium on Logic in Computer Science, 1998.

[8] J.-M. Le Bars, Probabilités Asymptotiques et Pouvoir d’Expression des Fragments de la Logique du Second Ordre, Ph.D. Thesis, University of Caen, 1998. [9] J.-M. Le Bars, Counterexamples of the 0–1 law for fragments of existential second-order logic: an overview, Bull. Symbolic Logic 9 (2000) 67–82. [10] L. Pacholski, W. Szwast, A counterexample to the 0–1 law for the class of existential second-order minimal Gödel sentences with equality, Inform. and Comput. 107 (1993) 91–103.