Spectrum Hierarchies and Subdiagonal Functions

Aaron Hunter Department of Computing Science Simon Fraser University Burnaby, Canada [email protected]

Abstract been done on the properties of the classes in Fagin’s pro- posed spectrum hierarchy. The spectrum of a first-order sentence is the of cardi- Similarly, very little is known about the classes of spec- nalities of its finite models. Relatively little is known about tra obtained by varying the number of binary relation sym- the subclasses of spectra that are obtained by looking only bols, or the number of unary relation symbols allowed in at sentences with a specific signature. In this paper, we sentences. In this paper, we will use model-theoretic tech- study natural subclasses of spectra and their closure prop- niques to explore the properties of these restricted classes erties under simple subdiagonal functions. We show that of spectra. many natural closure properties turn out to be equivalent to the collapse of potential spectrum hierarchies. We prove all 1.2. Closure Properties of our results using explicit transformations on first-order structures. Given a set of natural numbers S and a function f over the natural numbers, we write f(S) as a shorthand notation for {f(n)|n ∈ S}. We say that a class of spectra S is closed 1. Introduction under f if f(S) ∈Swhenever S ∈S. Using explicit transformations on graphs, More proves 1.1. Historical Motivation that F2 is closed under every polynomial with rational co- efficients that is assymptotically greater than the identity The spectrum of a first-order sentence φ is the set of car- function [12]. In this paper, we study closure properties un- dinalities of its finite models. Let Sp(φ) denote the spec- der functions that are assymptotically less than the identity trum of φ and let SPEC denote the set of all spectra. function. It turns out that establishing these closure proper- Let BIN1 denote the class of spectra of sentences involv- ties is more difficult. ing a single binary relation symbol. In [5], Fagin asks if every spectrum is in BIN1. Actually, Fagin restricts the sin- 1.3. Summary of Main Results gle relation to be irreflexive and symmetric, but we will al- low an arbitrary relation in this paper. Fagin also introduces In order to summarize our results, we introduce a more a potential spectrum hierarchy. Let Fk denote the class of general notation for subclasses of spectra. spectra of sentences involving relation symbols of arity at m ,...,m S ∈F k 1 S = (φ) most k. Clearly Fk ⊆Fk+1 for all k. Fagin proposes that Definition k if Sp for some sentence φ this hierarchy is strict, yet no one has been able to prove that which satisfies the following conditions: it does not collapse to the second level. 1. for each i ≤ k, φ involves at most mi relation symbols F Relatively little is known about the classes k.Partof of arity i the reason that they are not understood is because research on spectra has tended to rely heavily on the techniques 2. φ involves no other non-logical symbols. of descriptive complexity theory. Many interesting results p p,0 It will be convenient to write F2 as a shorthand for F2 . have been proved by characterizing subclasses of spectra in 1 1 We remark that BIN = F2 . terms of complexity, and then applying the results of com- We study three potential spectrum hierarchies: plexity theory [7, 8, 11]. However, no natural characteriza- 1,0 1,1 1,2 tion of Fk has been given. As a result, little research has (1) F2 ⊆F2 ⊆F2 ⊆ ...

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE 1 2 3 (2) F2 ⊆F2 ⊆F2 ⊆ ... spectra. For example, it has been shown that, if there is a spectrum whose complement is not a spectrum, then there F ⊆F ⊆F ⊆ ... (3) 2 3 4 is one in BIN1 [4]. Establishing general arithmetic closure 1 The first hierarchy is based on the number of unary relation conditions for BIN and related classes may provide a first symbols in the sentence and the second hierarchy is based step towards an improved understanding of these important on the number of binary relation symbols. The third hier- subclasses of spectra. archy is Fagin’s hierarchy, and it is based on the arity of The results that we present give arithmetic conditions for the relation symbols. The inclusions given above are trivial, the collapse of some potential spectrum hierarchies. We do but it is not clear if any of them are strict. We remark that not know of any other attempts to systematically study the (1) is the simplest spectrum hierarchy that is worth study- arithmetic closure properties of SPEC under natural subdi- ing, because it is well-known that F1 is the set of finite and agonal functions. We prove our results using simple, de- co-finite sets. finable transformations on first-order structures. This kind In this paper, we prove that the collapse of each hierar- of proof was employed in Fagin’s early work[5] and more chy is equivalent to an arithmetic closure condition on the recently this approach was explicitly studied by More[12]. lowest level. In particular, we establish the following re- sults. 2 Preliminaries • (1) collapses ⇐⇒ BIN1 is closed under n → n − 1 1 n 2.1. Definitions and Notation • (2) collapses ⇐⇒ BIN is closed under n →2 √ • (3) collapses ⇐⇒ F 2 is closed under n → n . A finite set of non-logical symbols together with an arity for each symbol will be called a vocabulary (or a signature). In the last section of the paper, we turn our attention to We will assume that all vocabularies contain only relation 1 the class BINbo introduced in [3]. This is the class of spectra symbols. Given a vocabulary L = {R1,...,Rm},anL- of sentences involving a single binary relation symbol with structure M = M,P1,...,Pm is composed of a finite 1 bounded outdegree. More precisely, S ∈ BINbo if S = set M called the universe and, for each k-ary relation sym- k Sp(φ) for some φ involving a single binary relation symbol bol Ri, a relation Pi ⊆ M called the interpretation of Ri. R and there is some k such that every model of φ assigns R Note that, by convention, M is used to denote the universe a relation with outdegree bounded by k. Although this class of the structure M. Normally, RM will denote the interpre- 1 of spectra is clearly a subset of BIN , it is not clear if it is a tation of R in the structure M. Following the conventions 1 1 strict subset. We prove that, if BIN = BINbo,thenFagin’s of set theory, we identify n with the set {0,...,n−1} when hierarchy collapses. we are specifying the universe of a structure. Throughout the paper, we will generally assume that all The notation a¯ will be used as an abbreviation for a tuple signatures are relational. We remark that some related work (a1,...,an) when the value of n is understood or unimpor- has been done on a proposed spectrum hierarchy based on tant. If φ(¯x) is a formula with free variables x¯,thenwe signatures involving only unary function symbols[3, 6]. write M|= φ[¯a] to indicate that a¯ satisfies φ(¯x) in M.The satisfaction relation is defined rigorously in [2]. 1.4. Significance of the Results For some familiar functions f, we use a natural short- hand notation for f(S). For example, if f is n → n +1, The most famous problem in the theory of spectra was then S +1denotes f(S). posed by Asser, when he asked if SPEC is closed under complement [1]. This problem has proven to be very dif- 2.2. Methodology ficult, due to a well-known characterization of SPEC in

terms of complexity theory. Given a set of natural numbers Typically, we will start with a vocabulary L1 and a func- S Sˆ , there is a corresponding language over the alphabet tion f. Given an L1-spectrum S, we will be interested in { , } 0 1 that contains the binary representation of every ele- proving that f(S) is the spectrum of a sentence in some tar- S S ∈ ment of . It has been shown that SPEC if and only get vocabulary L2. For example, we might be interested in Sˆ if is accepted in exponential time by a non-deterministic proving that, if S is an {R}-spectrum, then S +1is also an Turing machine [4, 9]. Hence, if Asser’s problem has a neg- {R}-spectrum. The prototypical question we are interested ative solution, it follows by a straightforward argument that in can be stated as follows: P = NP. This fact has motivated a great deal of research on spectra. (*) Given an L1-spectrum S and a function f Understanding BIN1 and the hierarchies we have out- whose domain includes S, does it follow lined in this section is important for our understanding of that f(S) is an L2-spectrum?

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE If L1 = L2, then we are simply asking if the class of L1- 3 Extra Unary relations spectra is closed under the function f. Our proofs will be constructive. Starting with an arbitrary L1-sentence φ, We now turn to our proposed spectrum hierarchy based ∗ ∗ we will contruct an L2-sentence φ such that Sp(φ )= on a single binary relation and an arbitrary number of unary f φ 1,p 1,p+1 (Sp( )). We outline the procedure in detail below. relations. Clearly, for any p, F2 ⊆F2 . In this sec- Our methods will be similar to those used in [3] and [12]. tion, we prove that determining whether or not this hierar- 1 1 Suppose we are given vocabularies L1, L2 and a function f. chy collapses to BIN is equivalent to determining if BIN We want to show that f(S) is an L2-spectrum whenever S is closed under n → n − 1. is an L1-spectrum. Inuitively, we would like to proceed as Our first theorem states that, if S is an L-spectrum for follows. some L involving k binary relation symbols, then S − 1 is an (L∪{U1,...,U2k})-spectrum, where each Ui is a ∗ (a) construct an injection M →M from L1-structures new unary relation symbol. As an illustration, we prove this ∗ to L2-structures such that |M | = f(|M|). theorem in some detail; for subsequent results, we normally provide a simple sketch of the proof. ∗ (b) construct an injection ψ → ψ from L1-sentences to S ∈Fk,p S − ∈Fk,p+2k L2-sentences that syntactically captures the transfor- Theorem 1 If 2 ,then 1 2 . mation on structures Proof We prove the theorem for k =1and p =0;the proof extends easily to the general case. Let S = Sp(φ) (c) prove that M|= ψ if and only if M∗ |= ψ∗ for every where φ involves only one binary relation symbol R. L1-sentence ψ and every L1-structure M. M ∗ Given M = n, R , we construct M = M∗ M∗ M∗ M∗ n − 1,P ,U1 ,U2 ,whereP is binary and If we could establish (c), then we would have accomplished M∗ M∗ U ,U are unary. For all a, b < n − 1,let our goal. Note that (c) requires us to prove a result for all 1 2 sentences of the vocabulary L. In order to prove a result P M∗ ab ⇐⇒ RMab for all sentences, we typically need to use induction and M∗ M U1 a ⇐⇒ R a(n − 1) prove the result more generally for all formulas. Hence, ∗ U M a ⇐⇒ RM n − a. although the procedure outlined above captures the intuitive 2 ( 1) idea of our proofs, in practice we need to use a slightly more Observe that, given M∗ and (a, b) ∈ n × n such that either complicated procedure. a = n−1 b = n−1 L L f or , it is possible to determine whether or Let 1, 2 be vocabularies and let be a function on the not (a, b) ∈ RM. However, there is no way of determining natural numbers. In order to give an affirmative answer to from M∗ whether or not (n − 1,n− 1) ∈ RM. the sample query (*) above, we would procede as follows. t Given a t-tuple a¯ =(a1,...,at) ∈ n ,letv(¯a)= t (v(a1),...,v(at)) denote the unique t-tuple in {0, 1} such 1. let φ be an arbitrary L1-sentence that v(ai)=1if and only if ai = n − 1.Letψ(¯x) be {R} v a ∗ an -formula. Relative to (¯), there is a natural trans- 2. construct an injection M →M from L1-structures ψ0 x ψ x {P, U ,U } ∗ lation v(¯a)(¯) of (¯) into the vocabulary 1 2 . to L2-structures such that |M | = f(|M|). 0 Intuitively, we want ψv(¯a)(¯x) to be a formula that is satis- ∗ ∗ ∗ fied by a¯ in M if and only if ψ(¯x) is satisfied by a¯ in M. 3. construct an injection (ψ(¯x), a¯) → (ψa¯ (¯y), a¯ ) which For example, if v(ai)=1and v(aj) < 0, then one step in takes an L1 formula and a tuple of elements of M and ∗ the translation would be to replace all occurrences of Rxixj returns a formula of L2 and a tuple of elements of M . ∗ with the formula U2xj, because M is constructed so that M∗ M ∗ ∗ ∗ U2 aj if and only if R (n − 1)(aj). The only prob- 4. prove that M|= ψ[¯a] if and only if M |= ψa¯[¯a ], lem is that there is no appropriate replacement for Rxixj for every L1-formula ψ(¯x),everyL1-structure M and when v(ai)=v(aj)=1. However, if we assume that every tuple a¯ of elements of M. M R (n − 1)(n − 1), then all occurrences of Rxixj can sim- ∗ ply be replaced by xi = xi in this case. 5. prove that Sp(φ )=f(Sp(φ)). t Let u¯ =(u1,...,ut) ∈{0, 1} . Define the formula 0 ψu¯(¯x) recursively as follows: Although this procedure may seem complex in the abstract, it is a natural technique for proving the results that we want 1. If ψ(¯x) is xi = xj for some i, j, 1 ≤ i, j ≤ t: to prove. In practice, we will see that the transformations • u u ψ0 x x x on structures are intuitive, and the proofs basically fall out If i = j =0,then u¯(¯) is i = j. 0 of these constructions. • If ui = uj =1,thenψu¯(¯x) is xi = xi.

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE 0 • If ui = uj,thenψu¯(¯x) is xi = xi. that Proposition 1 holds for θ(¯x, xt+1). M| ∃x θ a 2. If ψ(¯x) is Rxixj for some i, j, 1 ≤ i, j ≤ t: =( t+1 )[¯] ⇐⇒ for some c1 and not RM(n − 1)(n − 1). For every {R}-formula ψ(¯x), every M t t Proposition 1 Let M = n, R where n>1 and a¯ ∈ n and every ¯b ∈ (n − 1) such that ai = bi whenever M R (n − 1)(n − 1). For every {R}-formula ψ(¯x), every ai

∗ 0 ¯ We remark that the constructions outlined above define M|= ψ[¯a] ⇐⇒ M |= ψv(¯a)[b]. mappings on sentences that do not rely on any particular φ0 ∨φ1 S − In each stage of the induction, assume that ψ(¯x) is an {R}- tuple of elements. We now prove that Sp( )= 1. t t Suppose that n ∈ S − 1, so there exists M = n + formula, a¯ ∈ n , ¯b ∈ (n − 1) and ai = bi whenever ai < ,RM M| φ RMnn n − 1. 1 such that = . By Proposition 1, if then M∗ |= φ0. Otherwise, by Proposition 2, M∗ |= φ1. Suppose ψ(¯x) is xi = xj.Ifai,aj

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE Proof We sketch the case k =1, p =0. 4 Number of Binary Relation Symbols In this case, we simply want to reverse the tranforma- tion on structures from the previous proof. We start with an In this section we are concerned with the hypothetical {R, U ,U } 1 2 -structure, and we would like to encode it in an spectrum hierarchy generated by looking at classes of spec- {R} -structure with one additional element. This is straight- tra of sentences involving k binary relation symbols, for R forward: the interpretation of on the addional element each k ∈ ω. The following definition extends the notation U U can be used to pick out the interpretations of 1 and 2 in introduced in the introduction. the original model. The simple transformation on structures in this case Definition Let σ be a first-order sentence. S ∈ leads directly to a simple translation on formulas. As an mk,...,m1 Fk [σ] if S = Sp(σ ∧ φ) for some sentence φ which intermediate step we introduce a constant symbol for the satisfies the following conditions: additional element c. We translate {R, U1,U2}-formulas by relativizing all quantifiers to the set of elements other than 1. φ may involve any of the non-logical symbols in σ c, we replace U1x with Rxc, and we replace U2x with Rcx. Given this translation, we can prove our desired result by a 2. for each i ≤ k, φ involves at most mi relation symbols simple induction.  of arity i other than the relation symbols in σ φ By combining Theorems 1 and 2, we get a nice bicondi- 3. involves no other non-logical symbols. tional relationship: We think of these as relativized spectrum classes. k,p+2k k,p S ∈F2 ⇐⇒ S +1∈F2 . (1) For the rest of this section, let Ω denote the following sentence: This result is particularly satisfying because the classes involved are both natural spectrum classes that are con- ∀x∃y [(Qxy ∨ Qyx) structed by simply placing restrictions on the vocabulary of ∧¬ Qxy ∧ Qyx the sentences that define them. In the following sections, we ( ) need to have a slightly more complicated condition defining ∧∀z = y(¬Qxz ∧¬Qzx)]. some of the spectrum classes which we discuss. As a simple consequence of (1), we get a corresponding Notice that Ω is true in a structure M just in case the rela- M result for the function n → n + l for any l. tion Q divides the universe into |M|/2 ordered pairs such k,p+2kl k,p that every element of M is in exactly one pair. Corollary 1 S ∈F if and only if S + l ∈F . 2 2 There are two principal results in this section. The first Proof Immediate.  result is the following:

k,0 4k,0 We are now in a position to prove a theorem that relates S ∈F2 [Ω] ⇐⇒ S/2 ∈F2 . (2) the closure of BIN1 under n → n − 1 with the collapse of the spectrum hierarchy based on the number of extra unary We obtain this result by mapping models of Ω with size 2n relation symbols. to structures with size n where each element of the smaller structure intuitively represents an ordered pair of elements Theorem 3 The following are equivalent: from the larger structure. 1 1. BIN is closed under n → n − 1 The second principal result gives a closure property that 1 1 1,2 is equivalent to the collapse to BIN of the hierarchy on F2 2. BIN = F2 based on the number of relation symbols. For any rational ∞ 1 1,i number q,letq denote the least integer greater than or 3. BIN = F2 1 n equal to q.WeprovethatBIN is closed under n →2 if i=0 1 and only if BIN = F2. Proof (1 ⇒ 3) Assume BIN1 is closed under n → n − 1. Let l ∈ ω and let φ involve one binary relation symbol and k,0 4k,0 Theorem 4 If S ∈F2 [Ω],thenS/2 ∈F2 . 2l unary relation symbols. By Corollary 1, Sp(φ)+l ∈ 1 BIN . Now apply the hypothesis l times to the set Sp(φ)+l S 1 Proof We remark that, if satisfies the premise of the to get Sp(φ) ∈ BIN . theorem, then every element of S is even. Hence S/2 will (3 ⇒ 2) Immediate. 1 be a well-defined set of natural numbers. (2 ⇒ 1) Assume the hypothesis and suppose S ∈ BIN . We consider the case when k =1, because the S − ∈F1,2 S − ∈ 1.  By Theorem 1, 1 2 . Therefore 1 BIN proof is essentially the same for higher values of k.Let S = Sp(Ω ∧ φ) for some {Q, R}-sentence φ.Given

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE M = 2m, QM,RM , define the structure M∗ = M M∗ M∗ M∗ M∗ Q ,F1 ,F2 ,F3 ,F4 by:

M∗ M n {m : n ≤ m<2n} F1 (a, b)(c, d) ⇐⇒ R ac ' $ ' $ M∗ M s s F2 (a, b)(c, d) ⇐⇒ R bc n−1 ......  2n−1 M∗ M F3 (a, b)(c, d) ⇐⇒ R ad M∗ M n− ...... s  s n− F4 (a, b)(c, d) ⇐⇒ R bd. 2 ..... 2 2 ...... ∗ . ... . Note that the universe of M is the subset of 2m × 2m ...... which is the interpretation of the relation symbol Q in M...... In order to complete the proof, we need to create a trans- ...... lation from {Q, R}-formulas to {F1,F2,F3,F4}-formulas...... Intuitively, it is clear that this is possible. The idea is sim- ...... ply to use the Fi relation symbols to give a component-wise ...... ss 1 ..... n+1 ...... R ...... translation of . We omit the details of the translation, be- .... &...... % ......  ...... cause they are somewhat long for the present work...... s...... s...... 0 ......  ...... n & % We now state a useful corollary. In the proof, we use the standard notation φψ(x) to denote the relativization of φ under ψ(x). n Corollary 2 F2 is closed under n →2 .

Proof Let S = Sp(φ) ∈F2. Notice that Sp(Ω) = {2n : Figure 1. n ∈ ω}.LetU be a new unary relation symbol and consider the sentence Ω ∧ (φ ∨ (∃!yUy ∧ φ¬Ux)). The spectrum of We remark that, using our methods, it does not seem to be this sentence is k,0 possible to prove this result if the class F2 [Ω] is replaced F k,0 T = {2n : n ∈ ω}∩{n : n ∈ S or n − 1 ∈ S} by 2 . The following corollary is immediate. Observe that T ∈F2[Ω], so by Theorem 4, T/2 ∈F2.But S ∈F4k,0 S ∈Fk+1,0 S/2 = T/2,soS/2 ∈F2.  Corollary 3 If 2 ,then2 2 . We would like to use this corollary to relate the closure of We prove the converse of Theorem 4. 1 n BIN under n →2 with the collapse of the spectrum 4k,0 k,0 Theorem 5 If S ∈F2 ,then2S ∈F2 [Ω]. hierarchy based on the number of binary relations. We need one more tool. Proof Consider the case where k =1.GivenM = M M M M 2,0 1 n, F1 ,F2 ,F3 ,F4 , we construct a new structure S ∈F S ∈ ∗ ∗ ∗ Lemma 1 If 2 ,then2 BIN . M∗ = 2n, QM ,RM . The binary relation QM is M∗ {(a, a+n):a

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE relation RM on the element n. However, as indicated in Figure 1, the element 0 is the only element from the left n side that is related to . This means that 0 is syntactically ...... s s ...... s ..... s ...... definable, and it can be used to encode the behaviour of ...... M ...... R at n. In the interest of space, we omit the details of the ...... s ...... ss.....  ...... proof...... A more general version of Lemma 1 would say that ...... 1 k,0 ...... kS ∈ BIN whenever S ∈F . We have not proved ...... 2 ...... s ..... this general version because the combination of the existing ...... lemma with Theorem 5 gives a stronger result in the sense ...... s ...... k p

In [5], Fagin suggests that, for every k, Fk  Fk+1 but To prove this result, we use the fact that every model of Λ is he is unable to prove it for any k>1. In this section, isomorphic to a structure with universe n × n in which the we consider some arithmetic relationships between differ- usual coordinatization is definable. ent levels of Fagin’s proposed spectrum hierarchy. There is a natural bijection between binary structures To prove the first result of this section, we need to define with universe n × n and quaternary structures with universe asentenceΛ in the vocabulary of two binary relation sym- n. By formalizing this intuitive observation, we can prove bols F1 and F2.WedefineΛ in such a way that M|=Λif our desired result. and only if the following conditions hold: k,0,0,0 2 k,0 Theorem 7 If S ∈F4 ,thenS ∈F2 [Λ]. 2 1. for each (a, b) ∈{a : F1aa} , there is a unique point k S φ m ∈ M such that F1am and F2bm Proof We prove the case =1.Let = Sp( ), where φ involves one quaternary relation symbol R. Given m ∈ M a, b ∈{a M ∗ M∗ M∗ M∗ 2. for each , there is a unique pair ( ) : M = n, R ,defineM = n × n, F1 ,F2 ,P 2 F1aa} such that F1am and F2bm. as follows: Λ M∗ Let denote the following sentence: F1 (a, b)(c, d) ⇐⇒ a = b = c M∗ ∀w∃!x∃!y( F1xx ∧ F1yy ∧ F1xw ∧ F2yw F2 (a, b)(c, d) ⇐⇒ a = b = d ∗ ∧∀z((F1xz ∧ F2yz) → w = z)) P M (a, b)(c, d) ⇐⇒ RMabcd. ∧∀x∀y ((F1xx ∧ F1yy) →∃!z(F1xz ∧ F2yz M∗ ∧∀u∀v((F1uz ∧ F2vz)→(u = x ∧ v = y)). Note that {a : F1 aa} = {(a, a):a

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE ∗ The formula ψ (¯x) is the conjunction of Λ with the formula 4. replace F2xy with x1 = x2 ∧ x1 = y2 ψ1(¯x) that we define presently. Let ψ1(¯x) be obtained from 5. replace Pxy with Rx1x2y1y2. ψ(¯x) by relativizing all the quantifiers to the set {a : F1aa} and by replacing all occurrences of Rwxyz with the follow- The details of the proof fall directly out of this construction. ing:  ∃u∃v F ww ∧ F xx ∧ F yy ∧ F zz ( 1 1 1 1 We remark that the basic idea for the proof of Theorem k ∧F1wu ∧ F2xu ∧ F1yv ∧ F2zv ∧ Puv). 8isusedbyFagintoprovethat{n : n ∈ S}∈SPEC whenever S ∈ SPEC [5]. By combining Theorems 7 and 8, It is now possible to prove (3) by a straightforward induc- we get the following relationship: tion on ψ(¯x). ∗ 2 S ∈Fk,0,0,0 ⇐⇒ S2 ∈Fk,0 . The last step√ is to show that Sp(φ )=S . Suppose 4 2 [Λ] n ∈ S2.Since n ∈ S, it follows immediately from (3) that n ∈ Sp(φ∗). We now formulate a more general version of this relation- ∗ ship. Suppose that n√∈ Sp(√φ ).SinceΛ is a conjunct of φ, A A A Consider the sentence Λ. Intuitively, Λ asserts that there there exists A = n × n, F1 ,F2 ,P such that A|= φ∗ is a definable 1-1 correspondence between the universe and and, the following conditions hold: 2 the set {a : F1aa} .Letp ∈ ω and, for each i ≤ p, A p 1. {(a, b):F1 (a, b)} = {(a, a):a

Clearly A = M∗, so it follows from (3) that M|= φ. Proof The proof of the ‘if’ part is an easy generalization √ 2 Therefore n = n ∈ S2.  of the proof of Theorem 7 and the proof of the ‘only if’ part is an easy generalization of the proof of Theorem 8.  FaginprovesaresultsimilartoTheorem7in[5].In p particular, Fagin uses model-theoretic techniques to prove Corollary 4 If S ∈Fp2 then S ∈Fp. k 1 that S ∈ BIN whenever S ∈Fk. Under the premise of  Theorem 7, Fagin’s result allows us to conclude that S4 ∈ Proof Immediate. BIN1. Hence, although our result requires more relation symbols in the target vocabulary, it uses a smaller power to We conclude this section with an observation that relates the collapse of Fagin’s arity hierarchy to an arithmetic clo- bring the spectrum into F2 . We now prove the converse of Theorem 7. sure property. √ √ k,0 k,0,0,0 Theorem 10 F2 is closed under n → n if and only if Theorem 8 If S ∈F2 [Λ],then S ∈F4 . F2 = SPEC. Proof Once again, we prove only the case k =1. Proof Suppose F2 = SPEC. Recall that, if we identify Suppose that S = Sp(Λ ∧ φ) where φ involves F1,F2, natural numbers with their representations in binary, then and P . Note that, whenever A|=Λ, it must be the case that 2 M M M SPEC is the class of languages accepted in exponential time |A| = n for some n.GivenM = n×n, F1 ,F2 ,P , ∗ by a non-deterministic Turing machine. Since this complex- define M∗ = n, RM as follows: √ ity class is closed under√n → n , it follows that SPEC M∗ M n → n F R abcd ⇐⇒ P (a, b)(c, d) is closed√ under . Hence, 2 is closed under n → n . √ Let ψ be an arbitrary {F1,F2,P}-formula. The formula Suppose that F2 is closed under n → n .Let ∗ ψ is obtained by making the following changes to ψ: S ∈ SPEC. Clearly there exists m such that S ∈F2m . 2m By applying Corollary 4 m times, S ∈F2. By the hy- ∃x ∃x ∃x 1. replace with 1 2 pothesis applied m times, S ∈F2. 

2. replace x = y with x1 = y1 ∧ x2 = y2 This theorem is also an easy consequence of Fagin’s 3. replace F1xy with x1 = x2 ∧ x1 = y1 work in [5].

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE 6 Binary Relations with Bounded Outdegree where <◦ is the restriction of < and R(a,b) is the binary relation {(c, d):R(a, b)(c, d)}.LetA1,...,AN be an Let R be a binary relation symbol. Recall from the intro- enumeration of pairwise non-isomorphic ordered directed 1 k duction that BINbo is the class of spectra of {R}-sentences graphs of cardinality at most 2 such that every isomor- where {R} has bounded outdegree. In [3], it is shown phism type is represented. For each i ≤ N,letAi = 1 n ,Q ,< < n that BINbo is the class of spectra of sentences involving i i i where i is the usual order on i.Define at most unary function symbols, but no relation is known A1,...,AN on n as follows: 1 1 between BINbo and the class BIN except for the trivial in- 1 1 Aiab ⇐⇒ A i ∈ I(a,b). clusion BINbo ⊆ BIN . In this section, we prove that, if 1 1 BIN = BINbo, then Fagin’s arity hierarchy collapses. For each i ≤ N,letλAi (x, y) be a formula over {<} 1 2 Ai | λA a, b Qiab Theorem 11 If S ∈ BINbo,then{n : n ∈ S}∈F3. such that = i [ ] if and only if . Given an {R}-formula ψ,letψ∗ be the formula which is obtained 1 ˆ 2 Proof Suppose S ∈ BINbo and let S = S ∩{n : n ∈ ω}. from ψ by performing the following steps: It follows from results in [3] and [10] that {n2 : n ∈ ω} is in 1 1 2 • replace each occurrence of ∃x with ∃x1∃x2 BINbo.SothereisasetSˆ ∈ BINbo such that Sˆ ⊆{n : n ∈ 2 2 ω} and {n : n ∈ Sˆ}∈F3 if and only if {n : n ∈ S}∈ • x y x y ∧x 2 replace each occurrence of = with 1 = 1 2 = F3 S ⊆{n : n ∈ ω} . Therefore, we can assume that , y2 because otherwise we can simply use the set Sˆ. Suppose S = Sp(φ) where φ involves one binary rela- • replace each occurrence of Rxy with tion symbol R with outdegree bounded by k. To simplify N the notation in this proof, we will use the same symbol to Tx1x2y1 ∧ Tx1x2y2 ∧ (Ajx1x2 ∧ λA (y1,y2)). denote a relation symbol and its interpretation. We feel that j j=1 this will not create confusion. Let M = n × n, R be an arbitrary structure where R By a simple induction, one can show that, for any formula is binary with outdegree k. We construct a new structure ∗ ψ(¯x), M = n, <, T, A1,...,AN ,whereT is ternary, < is the ω i ≤ N A usual linear order on , and, for each , i is binary. M|= ψ[(a1,a2),...,(a2p−1,a2p)] The way in which the value N is determined will be clear ∗ ∗ ⇐⇒ M |= ψ [a1,...,a2p]. below. Define T as follows: We omit the details of the induction. It is straightforward to show that there is a sentence α Tabc ⇐⇒ R(a, b)(c, d) or R(a, b)(d, c), for some d ∈ n whose models are, up to isomorphism, the structures M∗ Hence, with each (a, b) ∈ n × n, T associates the set as M runs through all structures of the form n × n, R . of coordinates that occur in some pair (c, d) such that The sentence α will be the conjunction of a number of sen- R(a, b)(c, d). Note that the set of pairs (c, d) such that tences. For example, one conjunct will assert that the re- R(a, b)(c, d) can not be recovered from T alone. lations A1,...,AN partition the ordered pairs of elements The relations A1,...,AN are defined in such a way that of the universe; another will assert that T links each pair of from (a, b) it is possible to recover all pairs (c, d) such that elements of the universe to at most 2k points. Let φ1 be the ∗ R(a, b)(c, d). There are three key points: conjunction of α with φ . 2 We show that Sp(φ1)={n : n ∈ S}. Suppose m ∈ R k |{c Tabc}| ≤ k 1. since has outdegree , : 2 {n : n2 ∈ S}.SothereisanM = m × m, R such that ∗ ∗ 2. up to isomorphism, there are less than 22k+1 ordered M|= φ. By the induction, it follows that M |= φ .Itis ∗ directed graphs on sets of size at most 2k clear from the construction that M |= φ1. Suppose that m ∈ Sp(φ1), so there exists A with |A| = ∗ ∼ ∗ 3. from {c : Tabc} and the isomorphism type I(a,b) of m such that A|= φ ∧ α.SinceA|= α, A = M for some the ordered directed graph on {c : Tabc} with edge M = m × m, R . By the induction, M|= φ and, hence, set {(c, d):R(a, b)(c, d)}, it is possible to recover all m2 ∈ Sp(φ).  pairs (c, d) such that R(a, b)(c, d). Notice that there is no obvious way in which the method The relation symbols A1,...,AN tell us what I(a,b) is for each pair (a, b). used to prove Theorem 11 can be extended to the un- In more detail, define bounded outdegree case. As a consequence of Theorem 11, we get another suffi- (a,b) ◦ ∼ I(a,b) = {c : Tabc},R ,< / = cient condition for the collapse of Fagin’s hierarchy

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE 1 Theorem 12 If BINbo = F2,then(∀k ≥ 3) Fk = F3. complexity theoretic argument to prove that there is a strict hierarchy of spectrum classes based on the number of uni- 1 Proof Assume BINbo = F2 and suppose S ∈F4.By versal quantifiers allowed in the sentence. It would be nice 2 1 2 2 Theorem 7, S ∈F2 = BINbo.Since{n : n ∈ S } = S, to give a semantic proof of this result. Another result worth it follows from Theorem 11 that S ∈F3. Hence F4 ⊆F3. revisiting is Fagin’s proof that SPEC is not closed under It is easy to see that F3 ⊆F4 and, therefore, F3 = F4. log2 [4]. We are currently preparing a paper that provides a In [5], Fagin proves that, if Fp = Fp+1 for some p,then new semantic proof of this result. Fp = Fk for all k ≥ p. This completes the proof.  In this paper, we have taken the position that the natu- ral way to study spectra is from the perspective of model We can prove a similar result involving only the classes theory. This is the position taken by More [12], and it con- 1 1 BIN and BINbo, but we need the following lemma. stitutes a return to the historical roots of Asser’s problem. However, in order to make any significant progress on the 1 1 1 Lemma 2 F2 = BINbo if and only if BIN = BINbo. long-standing open problems in the theory of spectra, we 1 1 1 need to develop more sophisticated tools. Proof If F2 = BINbo, then clearly BIN = BINbo. 1 1 Conversely, assume BIN = BINbo.LetF2,bo be the ob- vious restriction of F2. By looking at the proof of Theorem References n 4, it is clear that F2,bo is closed under n →2 .More- over, using techniques employed in [3] it can be showen that [1] G. Asser. Das rep¨asentantenproblem in pr¨adikatenkalk¨ul der 1 1 n ersten stufe mit identit¨at. Zeitrschrift f¨ur math. Logik Grund- F2,bo = BINbo. Hence BINbo is closed under n →2 . 1 lagen, 1:252–263, 1955. It follows by our assumption that BIN is closed under [2] C. Chang and H. Keisler. Model Theory. Elsevier, Amster- n →n 1 F 2 and, therefore, BIN = 2 by Theorem 6. There- dam: North-Holland, 1973. 1 fore BINbo = F2.  [3] A. Durand and S. Ranaivoson. First-order spectra with one binary predicate. Theoretical Computer Science, 160:305–

1 1 320, 1996. Theorem 13 If BINbo = BIN ,then(∀k ≥ 3) Fk = F3. [4] R. Fagin. Generalized first-order spectra and polynomial time recognizable sets. In R. Karp, editor, Complexity of  Proof Immediate. Computation, pages 43–73. American Mathematical Soci- ety, Providence, R.I., 1974. [5] R. Fagin. A spectrum hierarchy. Zeitschrift f¨ur math. Logik 7. Conclusion Grundlagen, 21:123–134, 1975. [6] R. Fagin, A. Durand, and B. Loescher. Spectra with only 1 unary function symbols. In M. Nielsen and W. Thomas, ed- In [12], More asks if BIN is closed under any subdi- itors, Annual Conference of the European Association for agonal function. Our results show that More’s problem is Computer Science Logic (CSL’97), volume 1414 of Lec- harder than it first appears. Determing if any spectrum is ture Notes in Computer Science, pages 189–202. Springer- outside BIN1 has proven to be very difficult, and we have Verlag, 1998. shown that proving closure under many natural subdiagonal [7] E. Grandjean. Universal quantifiers and time complexity functions is equally difficult. Hence, although we have not of random access machines. Mathematical Systems Theory, solved More’s problem, we have given some evidence that 18:171–187, 1985. [8] E. Grandjean. First-order spectra with one variable. Journal finding a solution may be quite a challenge. of Computer and System Sciences, 40:136–153, 1990. There are some natural questions that arise from the re- [9] N. Jones and A. Selman. Turing machines and the spectra sults we present. First of all, two of our results may not be 1,2 1 of first-order formulas with equality. Journal of Symbolic best possible. In Theorem 3, it is shown that F2 = BIN Logic, 39:139–150, 1974. 1 if and only if BIN is closed under n → n − 1.Itisnatu- [10] B. Loescher. One unary function says less than two in exis- 1,2 1,1 ral to ask whether or not F2 can be replaced by F2 .In tential second order logic. Information Processing Letters, §6, we give a condition which implies that Fagin’s hierarchy 61:69–75, 1997. collapses to F3. This result would be more satisfying if it [11] J. Lynch. Complexity classes and theories of finite models. Mathematical Systems Theory, 15:127–144, 1982. could be modified to get a collapse to F2. [12] M. More. Investigation of binary spectra by explicit polyno- In order to develop more powerful model-theoretic tech- mial transformations of graphs. Theoretical Computer Sci- niques, it would be valuable to revisit some established re- ence, 124:221–272, 1994. sults in the theory of spectra. For example, Grandjean uses a

Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science (LICS’03) 1043-6871/03 $17.00 © 2003 IEEE