Even i Even i - THI

Imposing an extensional uniformity condition on a non-uniform circuit complexity class C means simply intersecting C with a uniform class L. By contra...

0 downloads 261 Views 313KB Size
EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS† PIERRE MCKENZIE‡ , MICHAEL THOMAS§ , AND HERIBERT VOLLMER§ Abstract. Imposing an extensional uniformity condition on a non-uniform circuit complexity class C means simply intersecting C with a uniform class L. By contrast, the usual intensional uniformity conditions require that a resource-bounded machine be able to exhibit the circuits in the circuit family defining C. We say that (C, L) has the Uniformity Duality Property if the extensionally uniform class C ∩ L can be captured intensionally by means of adding so-called L-numerical predicates to the first-order descriptive complexity apparatus describing the connection language of the circuit family defining C. This paper exhibits positive instances and negative instances of the Uniformity Duality Property. Key words. boolean circuits, uniformity, descriptive complexity AMS subject classifications. 68Q05, 68Q15, 03B70, 68Q19

1. Introduction. A family {Cn }n≥1 of Boolean circuits is uniform if the way in which Cn+1 can differ from Cn is restricted. Generally, uniformity is imposed by requiring that some form of a resource-bounded constructor on input n be able to fully or partially describe Cn (see [9, 24, 1, 5, 16] or refer to [30] for an overview). Circuit-based language classes can then be compared with classes that are based on a finite computing mechanism such as a Turing machine. Another perspective originates from descriptive complexity [14]. Consider the set of words w ∈ {a, b}? having no b at an even position. This language is described by  the FO[<, Even] formula ¬∃i Even(i) ∧ Pb (i) . In such a first-order formula, the variables range over positions in w, a predicate Pσ for σ ∈ {a, b} holds at i iff wi = σ, and a numerical predicate, such as the obvious 1-ary Even predicate here, holds at its arguments iff these arguments fulfill the specific relation. The following viewpoint has emerged [5, 3, 7] over two decades: When a circuitbased language class is characterized using first-order descriptive complexity, the circuit uniformity conditions spring up in the logic in the form of restrictions on the set of numerical predicates allowed. As a well studied example [13, 5], FO[<, +, ×] = DLOGTIME-uniform AC0 ( non-uniform AC0 = FO[arb], where the latter class is the class of languages definable by first-order formulae entitled to arbitrary numerical predicates (we use a logic and the set of languages it captures interchangeably when this brings no confusion). In a related vein but with a different emphasis, Straubing [26] presents a beautiful account of the relationship between automata theory, formal logic and (non-uniform) circuit complexity. Straubing concludes by expressing the proven fact that AC0 ( ACC0 and the celebrated conjectures that AC0 [q] ( ACC0 and that ACC0 ( NC1 as instances of the following conjecture concerning the class REG of regular languages: Q[arb] ∩ REG = Q[reg].

(1.1)

In Straubing’s instances, Q is an appropriate set of quantifiers chosen from {∃}∪{∃(q,r) : 0 ≤ r < q} and reg is the set of regular numerical predicates, that is, the set of those † Supported

in part by DFG VO 630/6-1, by the NSERC of Canada and by the (Qu´ ebec) FQRNT. d’informatique et de recherche op´ erationnelle, Universit´ e de Montr´ eal, C.P. 6128, succ. Centre-Ville, Montr´ eal (Qu´ ebec), H3C 3J7 Canada ([email protected]) § Institut f¨ ur Theoretische Informatik, Leibniz Universit¨ at Hannover, Appelstr. 4, 30167 Hannover, Germany ({thomas,vollmer}@thi.uni-hannover.de) ‡ D´ ep.

1

2

P. MCKENZIE, M. THOMAS AND H. VOLLMER

numerical predicates of arbitrary arity definable in a formal sense by finite automata. We stress the point of view that intersecting {∃}[arb] = FO[arb] with REG to form FO[arb] ∩ REG in conjecture (1.1) amounts to imposing uniformity on the non-uniform class FO[arb]. And once again, imposing uniformity has the effect of restricting the numerical predicates: it is a proven fact that FO[arb]∩REG = FO[reg], and conjecture (1.1) expresses the hope that this phenomenon extends from {∃} to other Q, which would determine much of the internal structure of NC1 . We ask: 1. Does the duality between uniformity in a circuit-based class and numerical predicates in its logical characterization extend beyond NC1 ? 2. What would play the role of the regular numerical predicates in such a duality? 3. Could such a duality help understanding classes such as the context-free languages in AC0 ? To tackle the first question, we note that intersecting with REG is just one out of many possible ways in which one can “impose uniformity”. Indeed, if L is any uniform language class, one can replace Q[arb] ∩ REG by Q[arb] ∩ L to get another uniform subclass of Q[arb]. For example, consider any “formal language class” (in the loose terminology used by Lange when discussing language theory versus complexity theory [16]), such as the class CFL of context-free languages. Undoubtedly, CFL is a uniform class of languages. Therefore, the class Q[arb] ∩ CFL is another uniform class well worth comparing with Q[<, +] or Q[<, +, ×]. Of course, FO[arb] ∩ CFL is none other than the poorly understood class AC0 ∩ CFL, and when Q is a quantifier given by some word problem of a nonsolvable group, (FO+{Q})[arb] ∩ CFL is the poorly understood class NC1 ∩ CFL alluded to 20 years ago [12]. The present paper thus considers classes Q[arb] ∩ L for various Q and L. To explain its title, we note that the constructor-based approach defines uniform classes by specifying their properties: such definitions are intensional definitions. By contrast, viewing Q[arb] ∩ REG as a uniform class amounts to an extensional definition, namely one that selects the members of Q[arb] that will collectively form the uniform class. In this paper we set up the extensional uniformity framework and we study classes Q[arb] ∩ L for Q ⊇ {∃}. Certainly, the uniform class L will determine the class of numerical predicates we have to use when trying to capture Q[arb] ∩ L, as Straubing does for L = REG, as an intensionally uniform class. A contribution of this paper is to provide a meaningful definition for the set LN of L-numerical predicates. Informally, LN is the set of relations over the natural numbers that are definable in the sense of Straubing [26, Section III.2] by a language over a singleton alphabet drawn from L. When L is REG, the L-numerical predicates are precisely Straubing’s regular numerical predicates. Fix a set Q of monoidal or groupoidal quantifiers in the sense of [5, 30, 18]. (As prototypical examples, the reader unfamiliar with such quantifiers may think of the usual existential and universal quantifiers, or “there exist r modulo q” quantifiers [27], or of threshold quantifiers such as “there exist a majority” [5] or “there exist at least t” [23]). We propose the Uniformity Duality Property for (Q, L) as a natural generalization of conjecture (1.1): Uniformity Duality Property for (Q, L): Q[arb] ∩ L = Q[<, LN ] ∩ L. Barrington, Immerman and Straubing [5] have shown that Q[arb] equals AC0 [Q], that is, non-uniform AC0 with Q gates. Behle and Lange [7] have shown that Q[<, LN ] equals FO[<, LN ]-uniform AC0 [Q], that is, uniform AC0 [Q] where the direct connection

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

3

language of the circuit families can be described by means of the logic FO[<, LN ]. Hence the Uniformity Duality Property can be restated in circuit complexity-theoretic terms as follows: Uniformity Duality Property for (Q, L), 2nd form: AC0 [Q] ∩ L = FO[<, LN ]-uniform AC0 [Q] ∩ L. By definition, Q[arb] ∩ L ⊇ Q[<, LN ] ∩ L. The critical question is whether the reverse inclusion holds. Intuitively, the Uniformity Duality Property states that the “extensional uniformity induced by intersecting Q[arb] with L” is a strong enough restriction imposed on Q[arb] to permit expressing the uniform class using the Lnumerical predicates, or in other words: The extensional uniformity given by intersecting the non-uniform class with L coincides with the intensional uniformity condition given by first-order logic with L-numerical predicates. Further motivation for this definition of Q[<, LN ] ∩ L is as follows: 1. When constructors serve to define uniform classes, they have access to input lengths but not to the inputs themselves; a convenient logical analog to this is to use the unary alphabet languages from L as a basis for defining the extra numerical predicates. 2. If the closure properties of L differ from the closure properties of Q[arb], then Q[arb] ∩ L = Q[<, LN ] may fail trivially (this occurs for example when L = CFL and Q = {∃} since the non-context-free language {an bn cn : n ≥ 0} is easily seen to belong to Q[<, LN ] by closure under intersection of the latter); hence intersecting Q[<, LN ] with L before comparing it with Q[arb]∩L is necessary to obtain a reasonable generalization of Straubing’s conjecture for classes L that are not Boolean-closed. We now state our results, classified, loosely, as foundational observations (F) or technical statements (T). We let L be any class of languages. (F) By design, the Uniformity Duality Property for (Q, REG) is precisely Straubing’s conjecture (1.1), hence its conjectured validity holds the key to the internal structure of NC1 . (F) The Uniformity Duality Property for ({∃}, NEUTRAL) is precisely the Crane Beach Conjecture [4]; here, NEUTRAL is the class of languages L that have a neutral letter, i.e., a letter e that may be arbitrarily inserted into or deleted from words without changing membership in L. The Crane Beach conjecture, stating that any neutral letter language in AC0 = FO[arb] can be expressed in FO[<], was motivated by attempts to develop a purely automata-theoretic proof that Parity, a neutral letter language, is not in AC0 . The Crane Beach Conjecture was ultimately refuted [4], but several of its variants have been studied. Thus [4]: 1. The Uniformity Duality Property for ({∃}, NEUTRAL) fails. 2. The Uniformity Duality Property for ({∃}, NEUTRAL ∩ REG) holds. 3. The Uniformity Duality Property for ({∃}, NEUTRAL ∩ {two-letter languages}) holds. (T) Our definition for the set LN of L-numerical predicates parallels Straubing’s definition of regular numerical predicates. For kernel-closed language classes L that are closed under homomorphisms, inverse homomorphisms and intersection with a regular language, we furthermore characterize LN as the set of predicates expressible as one generalized unary L-quantifier applied to an FO[<]-formula. (Intuitively, L-numerical predicates are those predicates definable in first-order logic with one “oracle call” to a language from L.)

4

P. MCKENZIE, M. THOMAS AND H. VOLLMER

(T) We characterize the numerical predicates that surround the context-free languages: First-order combinations of CFLN suffice to capture all semilinear predicates N over N; in particular, FO[<, +] = FO[DCFLN ] = FO[BC(CFL) ], where DCFL denotes the deterministic context-free languages and BC(CFL) is the Boolean closure of CFL. N (T) We deduce that, despite the fact that FO[BC(CFL) ] contains all the semilinear relations, the Uniformity Duality Property fails for ({∃}, L) in each of the following cases: 1. L = CFL 2. L = VPL, the “visibly pushdown languages” recently introduced by [2] 3. L = Boolean closure of the deterministic context-free languages 4. L = Boolean closure of the linear context-free languages 5. L = Boolean closure of the context-free languages The crux of the justifications of these negative results is a proof that the complement of the “Immerman language”, used in disproving the Crane Beach Conjecture, is context-free. (T) At the opposite end of the spectrum, while it is clear that the Uniformity Duality Property holds for the set of all languages and any Q, we show that the Uniformity Duality Property already holds for (Q, L) whenever Q is a set of groupoidal quantifiers and L = NTIME(n)L ; thus it holds for, e.g., the rudimentary languages, DSPACE(n), CSL and PSPACE. The rest of this paper is organized as follows. Section 2 contains preliminaries. Section 3 defines the L-numerical predicates and introduces the Uniformity Duality Property formally. The context-free numerical predicates are investigated in Section 4, and the duality property for classes of context-free languages is considered in Section 5. Section 6 shows that the duality property holds when L is “large enough”. Section 7 concludes with a summary and a discussion. 2. Preliminaries. 2.1. Complexity Theory. We assume familiarity with standard notions in formal languages, automata and complexity theory. When dealing with circuit complexity classes, all references will be made to the non-uniform versions unless otherwise stated. Thus AC0 refers to the Boolean functions computed by constant-depth polynomial-size unbounded-fanin {∨, ∧, ¬}-circuits. And DLOGTIME-uniform AC0 refers to the set of those functions in AC0 computable by a circuit family having a direct connection language decidable in time O(log n) on a deterministic Turing machine (cf. [5, 30]). 2.2. First-Order Logic. Let N be the natural numbers {1, 2, 3, . . .} and let N0 = N ∪ {0}. A signature σ is a finite set of relation symbols with fixed arity and constant symbols. A σ-structure A = hU A , σ A i consists of a set U A , called the universe, and a set σ A that contains an interpretation RA ⊆ (U A )k for each k-ary relation symbol R ∈ σ. We fix the interpretations of the “standard” numerical predicates <, +, ×, etc. to their natural interpretations. By Bit we will denote the binary relation {(x, i) ∈ N2 : bit i in the binary representation of x is 1}. For logics over strings with alphabet Σ, we will use signatures extending σΣ = {Pa : a ∈ Σ} and identify w = w1 · · · wn ∈ Σ? with Aw = h{1, . . . , n}, σ Aw }i, where PaAw = {i ∈ N : wi = a} for all a ∈ Σ. We will not distinguish between a relation symbol and its interpretation, when the meaning is clear from the context. Let Q be a set of (first-order) quantifiers. We denote by Q[σ] the set of first-order formulae over σ using quantifiers from Q only. The set of all Q[σ]-formulae will be

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

5

referred to as the logic Q[σ]. In case Q = {∃} (Q = {∃} ∪ Q0 }), we will also write FO[σ] (FO+Q0 [σ], respectively). When discussing logics over strings, we will omit the relation symbols from σΣ . Say that a language L ⊆ Σ? is definable in a logic Q[σ] if there exists a Q[σ]formula ϕ such that Aw |= ϕ ⇐⇒ w ∈ L for all w ∈ Σ? , and say that a relation R ⊆ Nn is definable by a Q[σ]-formula if there exists a formula ϕ with free variables x1 , . . . , xn that defines R for all sufficiently large initial segments of N, i.e., if h{1, . . . , m}, σi |= ϕ(c1 , . . . , cn ) ⇐⇒ (c1 , . . . , cn ) ∈ R for all m ≥ cmax , where cmax = max{c1 , . . . , cn } [25, Section 3.1]. By abuse of notation, we will write L ∈ Q[σ] (or R ∈ Q[σ]) to express that a language L (a relation R, resp.) is definable by a Q[σ]-formula and use a logic and the set of languages and relations it defines interchangeably. 3. The Uniformity Duality Property. In order to generalize conjecture (1.1), we propose Definition 3.2 as a simple generalization of the regular numerical predicates defined using V-structures by Straubing [26, Section III.2]. Definition 3.1. Let Vn = {x1 , . . . , xn } be a nonempty set of variables and let Σ be a finite alphabet. A Vn -structure is a sequence w = (a1 , V1 ) · · · (am , Vm ) ∈ (Σ × P(Vn ))

?

such that a1 , . . . , am ∈ Σ and the nonempty sets among V1 , . . . , Vm form a partition of Vn (the underscore distinguishes Vn -structures from ordinary strings). Define Γn = {0} × P(Vn ). We say that a Vn -structure w is unary if w ∈ Γ?n , i.e., if a1 , . . . , an all come from the singleton alphabet {0}; in that case, we define the kernel of w, kern(w), as the maximal prefix of w that does not end with (0, ∅); to signify that xi ∈ Vci for all 1 ≤ i ≤ n, we also write kern(w) as [x1 = c1 , . . . , xn = cn ] and we let wN stand for (c1 , . . . , cn ). ? We define Strucn as the S language of all such words in Γn that are unary Vn structures and let Struc = n>0 Strucn . Any set L of unary Vn -structures naturally describes a relation over the natural numbers. Hence, a set of such L describes a set of relations, or numerical predicates, over N. Definition 3.2. Let L ⊆ Γ?n be a unary Vn -language, that is, a set of unary Vn -structures. Let LN = {wN : w ∈ L} denote the relation over Nn defined by L. Then the L-numerical predicates are defined as LN = {LN : L ∈ L and L ⊆ Struc}. We say that a language L is kernel-closed if, for every w ∈ L, kern(w) ∈ L. We further say that a language class L is kernel-closed if, for every L ∈ L there exists an L0 ∈ L such that LN = L0N and L0 is kernel-closed. Remark. A unary Vn -language L defines a unique numerical relation LN . Conversely, if two unary Vn -structures v and w define the same tuple v N = wN , then one of the two is obtained from the other by padding on the right with the letter (0, ∅), i.e., v ∈ w(0, ∅)? or w ∈ v(0, ∅)? . Hence a numerical relation R uniquely determines kern(L) = {kern(w) : w ∈ L} for any language L such that R = LN . Remark. There is a natural correspondence between unary L-numerical predicates and pointed languages (see [29, 28]): For a pointed language P , let points(P ) = {x : (w, x) ∈ P }. Then, for any class P of pointed languages over the singleton alphabet {0}, we have P N = {points(P ) : P ∈ P}. On the other hand, any V1 -language can be interpreted as a pointed language via the mapping w 7→ (w, wN ).

6

P. MCKENZIE, M. THOMAS AND H. VOLLMER

We point out the following facts, where we write ≡q r for the unary predicate {x : x ≡ r mod q}. Proposition 3.3. Let APER and NEUTRAL denote the set of aperiodic languages and the set of languages having a neutral letter respectively. Then 1. APERN = FO[<], 2. REGN = (AC0 ∩ REG)N = FO[<, {≡q r : 0 ≤ r < q}] = reg, and 3. NEUTRALN ⊆ FO[<]. Proof. For part 1, let L ∈ APER with L ⊆ Strucn . Define L0 = kern(L) · (0, ∅)? . We claim that L0 is aperiodic. To see this, note that for any language K, any monoid recognizing L also recognizes LK −1 = {v ∈ Γ?n : vu ∈ L for some u ∈ K} [22, Proposition 2.5]. Hence L[(0, ∅)? ]−1 is aperiodic. But kern(L) ⊆ L[(0, ∅)? ]−1 . So L0 equals L[(0, ∅)? ]−1 · (0, ∅)? and is indeed aperiodic. Hence there exists a formula ϕ ∈ FO[<] such that L(ϕ) = L0 [21]. Let V ψ(x1 , . . . , xn ) be obtained from ϕ by replacing each P(0,V ) (x), V ⊆ Vn , with xi ∈V x = xi ∧ V j xi ∈V / x 6= xi . Then for all w = [x1 = c1 , . . . , xn = cn ](0, ∅) and all m ≥ max{ci : 1 ≤ i ≤ n}, Aw |= ϕ ⇐⇒ h{1, . . . , m},
^  1≤i≤n

_ V ∈P(Vn ), xi ∈V

  P(0,V ) (xi ) ∧ ∀z

^

P(0,V ) (z) ↔ z = xi



 .

V ∈P(Vn ), xi ∈V

The purpose of χ(~x) is to bind the variables in ~x to their respective values in a corresponding Vn -structure: For a string w = (0, V1 ) · · · (0, Vm ) ∈ Γ?n and a tuple ~c,

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

7

Aw |= χ(~c) holds iff m ≥ max{ci : 1 ≤ i ≤ n}, w is a unary Vn -structure, and for all 1 ≤ i ≤ n, xi ∈ Vci . Similar to the preceding equivalence, we obtain ~c ∈ R ⇐⇒ ∀m ≥ cmax : h{1, . . . , m}, <, =, ~ci |= ψ(~x) ⇐⇒ ∀i : A[x1 =c1 ,...,xn =cn ](0,∅)i |= ϕ. N Let L be the unary Vn -language {w ∈ Strucn : Aw |= ϕ}. Then R = LN = L(ϕ) with ϕ ∈ FO[<]. Thus ML is finite and aperiodic and LN ∈ APERN . Part 2 follows analogously from [26, Theorems III.1.1 and III.2.1]. For Part 3, let R ∈ NEUTRALN . Then R = LN for some neutral letter language L ⊆ Strucn . Assume that the neutral letter of L is (0, ∅), otherwise L ⊆ Strucn implies that L is empty. Since we can insert or delete (0, ∅) in any word at will, L is fully determined by the (0, ∅)-free words it contains, that is, [ L= (0, ∅)? (0, V1 )(0, ∅)? (0, V2 ) · · · (0, ∅)? (0, Vk )(0, ∅)? . (V1 ,V2 ,...,Vk ) partitions Vn and (0,V1 )(0,V2 )···(0,Vk )∈L

This is a finite union of regular aperiodic languages. Hence L is regular aperiodic, and LN is in FO[<] by Part 1. Having discussed the L-numerical predicates, we can state the property expressing the dual facets of uniformity, namely, intersecting with an a priori uniform class on the one hand, and adding the corresponding numerical predicates to first-order logics on the other. Property 3.4 (Uniformity Duality for (Q,L)). Let Q be a set of quantifiers and let L be a language class. Then we say that the Uniformity Duality Property for (Q,L) holds if Q[arb] ∩ L = Q[<, LN ] ∩ L. As Q[arb] = AC0 [Q] [5] and Q[<, LN ] = FO[<, LN ]-uniform AC0 [Q] [7], the above property equivalently states that AC0 [Q] ∩ L = FO[<, LN ]-uniform AC0 [Q] ∩ L. As a consequence of Proposition 3.3 (1–2), the Uniformity Duality Property is equivalent to the instances of Straubing’s conjectures obtained by setting Q and L as we expect, for example Q ⊆ {∃} ∪ {∃(q,r) : 0 ≤ r < q} and L = REG yield exactly (1.1). Similarly, as a consequence of Proposition 3.3 (3), the Uniformity Duality Property is equivalent to the Crane Beach Conjecture if L is the set NEUTRAL of all neutral letter languages. Property 3.4 thus fails to hold when {∃} ⊆ Q ⊆ {∃} ∪ {∃(q,r) : 0 ≤ r < q} and L = NEUTRAL. For some subclasses of NEUTRAL, the Crane Beach Conjecture and thus Property 3.4 hold: consider for example the case Q = {∃} and L = REG ∩ NEUTRAL or L ⊆ FO[<, +] ∩ NEUTRAL [4]. Accordingly the Uniformity Duality Property both generalizes the conjectures of Straubing and captures the intuition underlying the Crane Beach Conjecture. Encouraged by this unification, we will take a closer look at Uniformity Duality in the case of first-order logic and context-free languages in the next section. In the rest of this section, we present an alternative characterization of LN using FO[<]-transformations and unary Lindstr¨ om quantifiers. This is further justification for our definition of L-numerical predicates. The reader unfamiliar with this topic may skip to the end of Section 3.

8

P. MCKENZIE, M. THOMAS AND H. VOLLMER

Digression: Numerical Predicates and Generalized Quantifiers. Generalized or Lindstr¨om quantifiers provide a very general yet coherent approach to extending the descriptive complexity of first-order logics [19]. Since we only deal with unary Lindstr¨ om quantifiers over strings, we will restrict our definition to this case. Definition 3.5. Let ∆ = {a1 , . . . , at } be an alphabet, ϕ1 , . . . , ϕt−1 be FO[<]formulae, each with k + 1 free variables x1 , . . . , xk , y, and let ~x abbreviate x1 , . . . , xk . Further, let Struct(σ) denote the set of finite structures A = hU A , σ A i over σ. Then ϕ1 , . . . , ϕt−1 define an FO[<]-transformation [ϕ1 (~x), . . . , ϕt−1 (~x)] : struct({<, x1 , . . . , xk }) → ∆? A A as follows: Let A ∈ struct({<, x1 , . . . , xk }), xA i = ci ∈ U , 1 ≤ i ≤ k, and s = |U |, ? then [ϕ1 (~x), . . . , ϕt−1 (~x)](A) = v1 · · · vs ∈ ∆ , where

  a1 , vi = aj ,   at ,

if A |= ϕ1 (c1 , . . . , ck , i), Vj−1 if A |= ϕj (c1 , . . . , ck , i) ∧ l=1 ¬ϕl (c1 , . . . , ck , i), 1 < j < t, Vt−1 if A |= l=1 ¬ϕl (c1 , . . . , ck , i).

A language L ⊆ ∆? and an FO[<]-transformation [ϕ1 (~x), . . . , ϕt−1 (~x)] now naturally define a (unary) Lindstr¨ om quantifier Qun L via A |= Qun x, y), . . . , ϕt−1 (~x, y)] ⇐⇒ [ϕ1 (~x), . . . , ϕt−1 (~x)](A) ∈ L. L y[ϕ1 (~ Finally, the set of relations definable by formulae Qun x, y), . . . , ϕt−1 (~x, y)], where L y[ϕ1 (~ L ∈ L and ϕ1 , . . . , ϕt−1 ∈ FO[<], will be denoted by Qun FO[<]. L The notation [ϕ1 (~x), . . . , ϕt−1 (~x)] is chosen to distinguish the variables in ~x from y; the variables in ~x are interpreted by A whereas y is utilized in the transformation. Theorem 3.6. Let L be a kernel-closed language class which is closed under homomorphisms, inverse homomorphisms and intersection with regular languages, then LN = Qun L FO[<]; that is, the L-numerical predicates correspond to the predicates definable using a unary Lindstr¨ om quantifier over L and an FO[<]-transformation. Proof. For the inclusion from left to right, consider a relation LN ⊆ Nn in LN and let Vn = {x1 , . . . , xn }. Define the FO[<]-transformation [ϕ1 (~x), . . . , ϕ2n −1 (~x)] from Nn to unary V-structures as follows. For 1 ≤ i < 2n , let ϕi ≡

^ j∈Vi

(y = xj ) ∧

^

(y 6= xj ),

j ∈V / i

where Vi denotes the ith subset of V in the natural subset ordering, and associate the letter (0, Vi ) with ϕi . Let ~c = (c1 , . . . cn ) ∈ Nn and denote by A the structure ({1, . . . , l}, σ) with l = maxi {ci } and {<, x1 , . . . , xn } ⊆ σ. Then [ϕ1 (~x), . . . , ϕ2n −1 (~x)] maps A to the unary Vn -structure v1 · · · vl . Then ~c ∈ LN =⇒ ∃j∃w = [x1 = c1 , . . . , xn = cn ] : w(0, ∅)j ∈ L =⇒ [x1 = c1 , . . . , xn = cn ] ∈ L (since L is kernel-closed) =⇒ [ϕ1 (~x), . . . , ϕ2n −1 (~x)](A) ∈ L =⇒ A |= Qun x, y), . . . , ϕ2n −1 (~x, y)], L y[ϕ1 (~ and the reverse implications hold for any unary Vn -language L.

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

9

For the opposite inclusion, let R ⊆ Nn ∩ Qun L FO[<] via the transformation [ϕ1 (~x), . . . , ϕk−1 (~x)] and the language L ⊆ ∆? ∩ L, |∆| = k. We must exhibit a unary Vn -language A ∈ L such that R = AN , i.e., R = h(kern(A)), where h : {kern(w) : w is a unary Vn -structure} → Nn [x1 = c1 , . . . , xn = cn ] 7→ (c1 , . . . , cn ). Our proof is similar to the proof of Nivat’s Theorem, see [18, Theorem 2.4]. ? Recall that Γ := {0} × P(V ). We define B ⊆ Γ × ∆ to consist of all n n n  words uv11 · · · uvll such that u = u1 · · · ul is the kernel of a unary Vn -structure and [ϕ1 (~x), . . . , ϕk−1 (~x)] maps uN to v = v1 · · · vl . Further define the length-preserving   u homomorphisms f : v 7→ u and g : uv 7→ v. Then R = (h ◦ kern ◦ f ) B ∩ g −1 (L) . We claim that B is regular. Theorem 3.6 then follows from the closure properties  of L by setting A = f B ∩ g −1 (L) . For 1 ≤ i ≤ k−1, let ϕ0i (y) be defined as ϕ0i (y) ≡ ∃x1 · · · ∃xn (ϕi (~x, y)∧ψ(~x)∧π(~x)), where ψ(~x) and π(~x) bind the variables in ~x to their respective values in a corresponding unary Vn -structure and asserts that each variable occurs exactly once; that is, ^ _ _ ψ(~x) ≡ P((0,V )) (xi ), d 1≤i≤n d∈∆ V ∈P(Vn ), xi ∈V

π(~x) ≡

^

∀z

 _

_

  P((0,V )) (z) ↔ z = xi . d

1≤i≤n

d∈∆ V ∈P(Vn ), xi ∈V

W Now let χj (z) ≡ V ∈P(Vn ) P((0,V )) (z), 1 ≤ j ≤ k, where dj is the jth letter in ∆. Then dj   ? a string uv11 · · · uvll ∈ Γn × ∆ is in B if and only if u = u1 · · · ul is the kernel of a unary Vn -structure and ∀z

 k−1 ^ i=1

ϕ0i (z) ∧

i−1 ^ l=1

   k−1 ^  ¬ϕ0l (z) ↔ χk (z) ¬ϕ0l (z) ↔ χi (z) ∧ l=1

holds on ~z = uN , where the empty conjunction is defined to be true. Concluding, B ∈ FO[<] ⊂ REG. We stress that the above result provides a logical characterization of the Lnumerical predicates for all kernel-closed classes L forming a cone, viz. a class of languages L closed under homomorphisms, inverse homomorphisms and intersection with regular languages [11]. As the closure under these operations is equivalent to the closure under rational transductions (i.e., transductions performed by finite automata [8]), we obtain: Corollary 3.7. Let L be kernel-closed and closed under rational transductions, then LN = Qun L FO[<]. 4. Characterizing the Context-Free Numerical Predicates. In order to examine whether the Uniformity Duality Property for first-order logics holds in the case of context-free languages, we first need to consider the counterpart of the regular numerical predicates, that is, CFLN . Our results in this section will relate CFLN to addition w. r. t. to first-order combinations, and are based upon a result by Ginsburg [10]. Ginsburg showed that the number of repetitions per fragment in bounded contextfree languages corresponds to a subset of the semilinear sets. For a start, note that addition is definable in DCFLN .

10

P. MCKENZIE, M. THOMAS AND H. VOLLMER

Lemma 4.1. Addition is definable in DCFLN . Proof. Let V3 = {x1 , x2 , x3 } and L+ be a unary Vn -language defining addition, that is, LN + = {(x1 , x2 , x3 ) : x1 + x2 = x3 }. Then L+ is recognized by the following deterministic PDA P = (Q, Γn , ∆, δ, q0 , ⊥, {qacc }), where Q = {q0 , qx , qy , qxy , qz , qacc }, ∆ = {⊥, 0} and δ is defined as follows: δ(q0 , (0, ∅) , γ) δ(q0 , (0, {x}) , γ) δ(q0 , (0, {y}) , γ) δ(q0 , (0, {x, y}), γ) δ(qx , (0, ∅) , γ) δ(qx , (0, {y}) , γ)

δ(qy , (0, ∅) , γ) δ(qy , (0, {x}), γ) δ(qxy , (0, ∅) , 0) δ(qxy , (0, {z}), 0) δ(qz , ε , ⊥)

= (q0 , 0γ) = (qx , 0γ) = (qy , 0γ) = (qxy , 0γ) = (qx , γ) = (qxy , γ)

= (qy , γ) = (qxy , γ) = (qxy , ε) = (qz , ε) = (qacc , ⊥)

where γ ∈ ∆. Next, we restate the result of Ginsburg in order to prepare ground for the examination of the context-free numerical predicates. In the following, let w? abbreviate {w}? and say that a language L ⊆ Σ? is bounded if there exists an n ∈ N and w1 , . . . , wn ∈ Σ+ such that L ⊆ w1? · · · wn? . Definition 4.2. A set R ⊆ Nn0 is stratified if 1. each element in R has at most two non-zero coordinates, 2. there are no integers i, j, k, l and x = (x1 , . . . , xn ), x0 = (x01 , . . . , x0n ) in R such that 1 ≤ i < j < k < l ≤ n and xi x0j xk x0l 6= 0. Moreover, a set S ⊆ Nn is said to be stratified semilinear if it is expressibleSas a finite m union set of periods; that is, S = i=1 {~ αi0 + Pni of linear sets, each with a stratified n n k · α ~ : k ∈ N }, where α ~ ∈ N , α ~ ∈ N , 1 ≤ j ≤ n , 1 ≤ i ≤ m, and each ij 0 i0 ij i 0 j=1 Pi = {~ αij : 1 ≤ j ≤ ni } is stratified. Theorem 4.3 ([10, Theorem 5.4.2]). Let Σ be an alphabet and L ⊆ w1? · · · wn? be bounded by w1 , . . . , wn ∈ Σ+ . Then L is context-free if and only if the set  E(L) = (e1 , . . . , en ) ∈ Nn0 : w1e1 . . . wnen ∈ L is a stratified semilinear set. Theorem 4.3 relates the bounded context-free languages to a strict subset of the semilinear sets. The semilinear sets are exactly those sets definable by FO[<, +]formulae. There are however sets in FO[<, +] that are undefinable in CFLN : For example, if R = {(x, 2x, 3x) : x ∈ N} was definable in CFLN then {an bn cn : n ∈ N} ∈ CFL by closure under homomorphisms and inverse homomorphisms. Hence, FO[<, +] can not be captured by CFLN alone. Yet, addition is definable in CFLN , therefore we will in the following investigate the relationship between first-order logic with addition, FO[<, +], and the Boolean closure of CFL, BC(CFL). Lemma 4.4. Let R ⊆ Nn and let R = LN for language L. Then L is bounded. Proof. Let R ⊆ Nn and L such that R = LN . Let L ⊆ Γ?n , where Vn = {x1 , . . . , xn } is a set of variables. Every unary Vn -structure w ∈ L of a given order type t belongs to the language ?

?

?

Lt = (0, ∅) (0, V1 ) (0, ∅) (0, V2 ) · · · (0, Vk ) (0, ∅) , where (V1 , V2 , . . . , Vk ) is an ordered partition of Vn . The number p of such ordered partitions depends on n; in particular, p is finite. Hence L ( L?1 L?2 · · · L?tp , where t1 , t2 , . . . , tp exhaust the possible types. Since each letter (0, Vi ) belongs to the language Q 2n+1 Q Q ? ? . V ⊆Vn (0, V ) , it follows that L ⊆ 1≤i≤p V ⊆Vn (0, V )

11

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

Lemma 4.5. All bounded context-free languages are definable in FO[<, +]. Proof. Since L is bounded, there exist w1 , . . . , wn ∈ Σ+ such that L ⊆ w1? . . . wn? . By Theorem 4.3, it holds that the set E(L) = {(e1 , . . . , en ) : w1e1 . . . wnen ∈ L} is stratified Smsemilinear. It follows Pniby semilinearity alone that, for ~e =n (e1 , . . . , en n), E(L) = i=1 {~e : ~e = α ~ i0 + j=1 k·α ~ ij , k ∈ N0 }, where α ~ i0 ∈ N , α ~ ij ∈ N0 for all 1 ≤ j ≤ ni , 1 ≤ i ≤ m. As a consequence, L is defined via the formula ϕ = ∃e1 · · · ∃en ϕw1 ,...,wn (e1 , . . . , en ) ∧ ϕlin (e1 , . . . , en ) , where ϕw1 ,...,wn (e1 , . . . , en ) checks whether the input is of the form w1e1 · · · wnen and ϕlin (e1 , . . . , en ) ≡

m  _ i=1

∃ai,1 · · · ∃ai,ni

n ^

ek = αi0k +

k=1

ni X

aij αijk



.

j=1

In particular, ϕw1e1 ...wnen ∈ FO[<, +]. Concluding, L ∈ FO[<, +]. Lemma 4.6. Let Vn = {x1 , . . . , xn } and let L be a unary Vn -language. Then L ∈ FO[<, +] implies LN ∈ FO[<, +]. Proof. Since L ∈ FO[<, +], there exists a formula ϕ ∈ FO[<, +] such that for all w = (0, V1 ) · · · (0, Vm ) ∈ Γ?n , h{1, . . . , m}, <, +, Pi |= ϕ ⇐⇒ w ∈ L, where P = {P(0,V ) : V ∈ P(Vn )} and P(0,V ) (z) is true if and only if z ∈ V , for 1 ≤ z ≤ m. Let ~y = (y1 , . . . , yn ). We construct the formula ϕ0 (~y ) from ϕ by replacing, for each V V variable z and each V ∈ P(Vn ), the predicate P(0,V ) (z) with z = y ∧ i yi ∈V yi ∈V / z 6= yi . Then h{1, . . . , m}, <, +i |= ϕ0 (~y ) ⇐⇒ h{1, . . . , m}, <, +, Pi |= ϕ. Hence the formula ϕ0 witnesses LN ∈ FO[<, +]. N Theorem 4.7. BC(CFLN ) ⊆ BC(CFL) ⊆ FO[<, +]. N N Proof. The inclusion BC(CFL ) ⊆ BC(CFL) follows from (a) the fact that for every unary Vn -language L ∈ CFL, there exists an equivalent kernel-closed unary N N N N N Vn -language L0 ∈ CFL; (b) LN 1 ∩ L2 = (L1 ∩ L2 ) and L1 ∪ L2 = (L1 ∪ L2 ) for kernelclosed languages L1 , L2 ; and (c) the observation that for a kernel-closed L ∈ CFL with R = LN , the language L0 = L(0, ∅)? ∈ CFL also verifies R = L0N , so that N R = (L0 ∩ Strucn )N ∈ BC(CFL) . N It remains to show that BC(CFL) ⊆ FO[<, +]. Denote by coCFL the set of languages whose complement is in CFL, i.e., coCFL = {L : L ∈ CFL}. Let N R ⊆ BC(CFL) ∩ Nn and Vn = {x1 , . . . , xn }. Further, let L be some unary Vn S m Tk i language such that R = LN ; w. l. o. g. L = i=1 j=1 Lij where Lij ∈ CFL ∪ coCFL. Tk i It holds that L is a unary Vn -language if and only if j=1 Lij is a unary Vn -language N for all 1 ≤ i ≤ m. Hence, we need to show that Li is FO[<, +]-definable, for any Tk i unary Vn -language Li = j=1 Lij with Lij ∈ CFL ∪ coCFL. Note that Strucn is bounded and definable in FO[<] ⊂ REG. Then Li = (Li1 ∩ Strucn )∩· · ·∩(Lik ∩Strucn ) and each (Lij ∩Strucn ), 1 ≤ j ≤ k, is bounded (Lemma 4.4). We have to distinguish the following two cases: Case 1: Lij ∈ CFL. Then Lij ∩ Strucn ∈ CFL. Thus Lemma 4.5 implies Lj ∩ Strucn ∈ FO[<, +].

12

P. MCKENZIE, M. THOMAS AND H. VOLLMER

Case 2: Lij ∈ coCFL. As Lij ∩ Strucn is bounded, it can be written as Lij ∩ Strucn = {w1e1 · · · wnen : (e1 , . . . , en ) ∈ X} for words w1 , . . . , wn and some relation X ⊆ Nn0 . Hence, Lij ∩ Strucn = Lij ∪ Strucn = (Lij ∩ Strucn ) ∪ Strucn where Lij ∩ Strucn is the intersection of a context-free language with a regular language and therefore context-free. Further note that Lij ∩ Strucn = {w1e1 · · · wnen ∈ Strucn : (e1 , . . . , en ) ∈ / X} is bounded. From Lemma 4.5 it now follows that Lij ∩ Strucn ∈ FO[<, +]. Thus, finally, Lij ∩ Strucn = (Lij ∩ Strucn ) ∪ Strucn ∈ FO[<, +]. Summarizing, Li = (Li1 ∩ Strucn ) ∩ · · · ∩ (Lik ∩ Strucn ) is definable in FO[<, +] using the conjunction of the defining formulae. Since Li is a unary Vn -language by assumption, Lemma 4.6 implies the claim. That is, the relations definable in the Boolean closure of the context-free unary N Vn -languages are captured by FO[<, +]. Hence, FO[BC(CFL) ] ⊆ FO[<, +]. Now Lemma 4.1 yields the following corollary. N Corollary 4.8. FO[DCFLN ] = FO[CFLN ] = FO[BC(CFL) ] = FO[<, +]. T N We note in particular that, for any k ∈ N, the inclusion ( k CFL) ⊆ FO[<, +] T is strict, where k CFL denotes the languages definable as the intersection of ≤ k context-free languages. This is deduced from embedding the infinite hierarchy of N context-free languages by Liu and Weiner [20] into BC(CFL) : For k > 1 and ik i1 i2 ik i1 i2 ? Σ = {ai : 1 ≤Ti ≤ k}, let T Lk := {a1 a2 · · · ak a1 a2 · · · ak : ij ∈ N for 1 ≤ j ≤ k} ⊆ Σ . Then Lk ∈ k CFL \ k−1 CFL. Now, for Rk := {(i1 , i2 , . . . , ik , i1 , i2 , . . . , ik ) : ij ∈ N N for 1 ≤ j ≤ k} ⊆ N2k , we have Rk = f (B ∩ g −1 (Lk )) , where f and g are length-preserving homomorphisms and B ∈ REG (cf. the proof of Theorem 3.6). T As k T CFL exhibitsTthe required closure properties for all k ∈ N, we conclude that Rk ∈ ( k CFL)N \ ( k−1 CFL)N and that CFLN ( · · · ( (

T

k−1

T T CFL)N ( ( k CFL)N ( · · · ( ( CFL)N ⊆ FO[<, +]. N

Unfortunately, we could neither prove nor refute FO[<, +] ⊆ BC(CFL) . The N difficulty in comparing FO[<, +] and BC(CFL) comes to some extent from the restriction on the syntactic representation of tuples in CFL; viz., context-free languages may only compare distances between variables, whereas the tuples defined by unary Vn -languages count positions from the beginning of a word. This difference matters only for language classes that are subject to similar restrictions as the context-free languages (e.g., the regular languages are not capable of counting, the context-sensitive languages have the ability to convert between these two representations). To account for this special behavior, we will render CFLN precisely in Theorem 4.9. But there is more to be taken into account. Consider, e.g., the relation R = {(x, x, x) : x ∈ N}. R is clearly definable in CFLN , yet the set E(L) is not stratified semilinear for any language L satisfying LN = R. Specifically, duplicate variables and permutations of the variables do not increase the complexity of a unary Vn -language L but affect LN . Let t be an order type of ~x = (x1 , . . . , xn ) and say that a relation R ⊆ Nn has order type t if, for all ~x ∈ R, ~x has order type t. For ~x of order type t, let ~x0 = (x01 , . . . , x0m ), m ≤ n, denote the variables in ~x with mutually distinct values and let πt denote a permutation such that x0πt (i) < x0πt (i+1) , 1 ≤ i < m. We define

13

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

functions sort : P(Nn ) → P(Nm ) and diff : P(Nn ) → P(Nn0 ) as  sort(R) = πt (~x0 ) : ~x ∈ R has order type t , i n X  o diff (R) = (xi )1≤i≤n : xj ∈R . j=1

1≤i≤n

The function sort rearranges the components of R in an ascending order and eliminates duplicates, whereas diff transforms a tuple (x1 , . . . , xn ) with x1 < x2 < · · · < xn into Pn−1 (x1 , x2 − x1 , x3 − x2 − x1 , . . . , xn − i=1 xi ), a representation more “suitable” to CFL (cf. E(L) in Theorem 4.3). Theorem 4.9. Let R ⊆ Nn . R ∈ CFLN if  and only if there exists a partition R = R1 ∪ · · · ∪ Rk such that each diff sort(Ri ) , 1 ≤ i ≤ k, is a stratified semilinear set. Proof. For the direction from left to right, let LN ∈ CFLN , LN ⊆ Nn and let t1 , . . . , tp exhaust the possible order types of ~x = (x1 , . . . , xn ). As CFL is closed under intersection with regular languages, L can be partitioned into context-free languages L = Lt1 ∪ · · · ∪ Ltp such that LN ti has order type ti , 1 ≤ i ≤ p. Fix any Lti . By design of sort, it holds x1 < x2 < · · · < xm for all  that N m (x1 , . . . , xm ) ∈ sort(LN ), hence diff sort(L ) ∈ N is defined. Since ~x has order type ti ti 0 N N ti for all ~x ∈ Lti , sort(Lti ) = (ϕ(Lti )) for a homomorphism ϕ replacing the characters N (0, V ), V 6= ∅, with appropriate (0, V 0 ). We thus obtain that sort(LN ti ) ∈ CFL . Say AN = sort(LN ti ) for the context-free unary Vn -language A, then Theorem 4.3 implies that the set E(A) is a stratified semilinear set. Consider the finite state transducer T in Figure 4.1. T defines the rational transduction ψ : Γ?n → {a1 , . . . , am , e}? , ψ(w) = (0,∅)/a1

(0,∅)/a2

(0,{x1 })/a1

(0,∅)/am

(0,{x2 })/a2

(0,{xm−1 })/am−1

(0,∅)/e

(0,{xm })/am

Figure 4.1. Transducer T

v1 · · · vs , where w = w1 · · · ws and |w| = s, is the given unary Vn -structure and, for 1 ≤ i ≤ s, 1 ≤ j ≤ m, ( aj , if wi · · · ws = (0, ∅)l (0, {xj })u for some l ∈ N0 , u ∈ Γ?n , vi = e, if w1 · · · wi (0, ∅)l = w for some l ∈ N0 .   We claim that diff sort(LN ti ) = E ψ(A) . The claim concludes the direction from left to right, since ψ(A) ∈ CFL due to the closure of CFL under rational transductions.   N Claim. Let A ∈ CFL such that AN = sort(LN ti ), then diff sort(Lti ) = E ψ(A) . To prove the claim, let Vn = {x1 , . . . , xm } and let A ∈ CFL be a unary Vn language such that AN = sort(LN c = (c1 , . . . , cm ) ∈ AN and choose ti ). Fix an arbitrary ~ N w ∈ A such that w = ~c. Then c1 < c2 < · · · < cm and w = (0, ∅)c1 −1 (0, {x1 })(0, ∅)c2 −c1 −1 (0, {x2 }) · · · (0, ∅)cm −

Pm−1 i=1

ci −1

(0, {xm })(0, ∅)d ,

14

P. MCKENZIE, M. THOMAS AND H. VOLLMER c −

where d = |w| − cm . Hence ψ(w) = ac11 ac22 −c1 · · · amm

Pm−1 i=1

ci d

e and

m−1 X o  n c1 , c2 − c1 , . . . , cm − E ψ({w}) = ci . i=1

Pm−1 On the other hand, diff({~c}) = {(c1 , c2 − c1 , . . . , cm −  i=1 ci )}. Thus, for every  N ~c ∈ sort(LN ), E ψ({~ c }) = diff ({~ c }) and diff sort(L ) = E ψ(A) . This implies ti ti the claim and concludes the direction from left to right. For the direction from right to left, it suffices to show that Ri ∈ CFLN for each 1 ≤ i ≤ k. By assumption, diff sort(Ri ) ⊆ Nm 0 is a stratified semilinear set. Thence  there exists a bounded language A ∈ CFL such that E(A) = diff sort(Ri ) . Let A w. l. o. g. be bounded by a1 , . . . , am ∈ Σ, i.e., A ⊆ a?1 · · · a?m . Define the rational transduction χ : {a1 , . . . , am }? → Γ?n as χ(w) = v 1 · · · v s , where w = w1 · · · ws , |w| = s, and, for 1 ≤ i ≤ s, 1 ≤ j ≤ m, ( (0, {xj }), if i = s and wi = aj or i < s and wi = aj 6= wi+1 , vi = (0, ∅) if i < s and wi = wi+1 . Note that (ψ ◦ χ)(w) = w for all w ∈ A. An argument analogous to the above  claim thus yields E(A) = E ψ(χ(A)) = diff (χ(A))N and sort(Ri ) = (χ(A))N . In particular, (χ(A))N ∈ CFLN . Moreover, c1 < c2 < · · · < cm for all ~c = (c1 , . . . , cm ) ∈ (χ(A))N , thus there exists a function π : {1, . . . , n} → {1, . . . , m}, n ≥ m, such that  (xπ(1) , . . . , xπ(n) ) : (x1 , . . . , xm ) ∈ (χ(A))N = Ri . Let the homomorphism φ : Γ?n → Γ?n mimic the above transformation by replacing (0, {xi }) with (0, Vi ), where Vi = {xj : 1 ≤ j ≤ n, π(j) = i}, 1 ≤ i ≤ m. Then N Ri = (φ ◦ χ)(A) ∈ CFLN . 5. The Uniformity Duality and Context-Free Languages. Due to the previous section, we may express the Uniformity Duality Property for context-free languages using Corollary 4.8 in the following more intuitive way: Let Q = {∃} and L be such that FO[LN ] = FO[<, +] (e.g., DCFL ⊆ L ⊆ BC(CFL)), then the Uniformity Duality Property for ({∃}, L) is equivalent to FO[arb] ∩ L = FO[<, +] ∩ L.

(5.1)

We will hence examine whether (5.1) holds, and see that this is not the case. For a binary word u = un−1 un−2 · · · u0 ∈ {0, 1}? , we write u b for the integer un−1 2n−1 + · · · + 2u1 + u0 . Recall the Immerman language LI ⊆ {0, 1, a}? , that is, the language consisting of all words of the form x1 a x2 a · · · a x2n , where xi ∈ {0, 1}n , x bi + 1 = x bi+1 , 1 ≤ i < 2n , and x1 = 0n , x2n = 1n . For example, 00a01a10a11 ∈ LI and 000a001a010a011a100a101a110a111 ∈ LI . We prove that despite its definition involving arithmetic, LI is simply the complement of a context-free language. Lemma 5.1. The complement LI of the Immerman language is context-free.

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

15

Proof. Let Σ = {0, 1, a}. Throughout this proof, u and v stand for binary words. Claim. Let u = un−1 un−2 · · · u0 , v = vn−1 vn−2 · · · v0 and u0 6= v0 . Then u b + 1 = vb (mod 2n )

(5.2)

iff none of the words u1 u0 v1 v0 , u2 u1 v2 v1 , . . . , un−1 un−2 vn−1 vn−2 belongs to {0010, 0011, 0100, 0111, 1001, 1000, 1110, 1101}.

(5.3)

The claim implies that the following language is context-free: A = {xuavy : x ∈ (Σ? a)? , y ∈ (aΣ? )? , |u| = |v|, u b + 1 6= vb (mod 2|u| )}. Note that A ⊂ LI . Yet A does not catch all the words in LI , but it catches all the words of the correct “form” which violate the successor condition (modulo 2|u| ). For example, A catches 00a01a11a11a, but it does not catch a nor 0a1a0a1 nor 01a10a11a00 nor 00a01a10a11a00a01 nor 00a01001a10a11. We complete the proof by expressing LI as follows: LI =

A ∪ a? ∪ Σ? a0? aΣ? ∪ Σ? a1? aΣ? ∪ S {0, 1}? 1Σ? ∪ Σ? 0{0, 1}? ∪ |u|6=|v| (Σ? a)? uav(aΣ? )? .

(5.4)

Now we prove the claim. The direction from left to right is easy: If any word ui ui−1 vi vi−1 belongs to the forbidden set (5.3) then (5.2) trivially fails. For the converse, we must prove that if no forbidden word occurs then (5.2) holds. We prove this by induction on the common length n of the words u and v. When n = 1, u0 and v0 = 6 u0 are successors modulo 2. So suppose that n ≥ 1 and that none of the forbidden words occurs in the pair (un u, vn v), where un , vn ∈ {0, 1}, u = un−1 · · · u1 u0 and v = vn−1 · · · v1 v0 and u0 6= v0 . Then by induction, u b + 1 = vb (mod 2n ). There are four cases to be treated: Case 1: un−1 = vn−1 = 0. Then no overflow into un occurs when 1 is added to u b to obtain vb. Since the forbidden words leave only un = vn as possibilities, ud d nu + 1 = v n v. Case 2: un−1 = vn−1 = 1. Analogous. Case 3: 0 = un−1 6= vn−1 = 1. Analogous. Case 4: 1 = un−1 6= vn−1 = 0. This is an interesting case. The fact that u b + 1 = vb (mod 2n ) implies that u = 1n and v = 0n . Now the forbidden words imply un = 6 vn . This means that either un u = 01n and vn v = 10n , or un u = 1n+1 and vn v = 0n+1 . In the former case, ud d nu + 1 = v n v, and in the latter case, n+1 ud d ). nu + 1 = v n v (mod 2 For a language L ⊆ Σ? , let Neutral(L) denote L supplemented with a neutral letter e ∈ / Σ, i.e., Neutral(L) consists of all words in L with possibly arbitrary repeated insertions of the neutral letter. Theorem 5.2. FO[arb] ∩ BC(CFL) ) FO[<, +] ∩ BC(CFL). Proof. From the Crane Beach Conjecture by Barrington et al. [4, Lemma 5.4], we know that Neutral(LI ) ∈ FO[arb] \ FO[<, +] . So we are done if we can show Neutral(LI ) ∈ BC(CFL). We proved in Lemma 5.1 that LI = {0, 1, a}? \ LI is context-free. Therefore Neutral(LI ) is context-free. Now, for any we ∈ {0, 1, a, e}? , let w ∈ {0, 1, a}? be the word obtained by deleting all occurrences of the neutral letter e from we . Then for any we , we ∈ Neutral(LI ) ⇐⇒ w ∈ LI ⇐⇒ w ∈ / LI ⇐⇒ we ∈ / Neutral(LI ).

16

P. MCKENZIE, M. THOMAS AND H. VOLLMER

In other words, Neutral(LI ) = {0, 1, a, e}? \ Neutral(LI ) = Neutral(LI ) and thus Neutral(LI ) ∈ BC(CFL). Theorem 5.2 implies that the Uniformity Duality Property fails for Q = {∃} and N L = BC(CFL), since FO[<, BC(CFL) ] = FO[<, +]. Yet, it even provides a witness for the failure of the duality property in the case of L = CFL, as the context-free language Neutral(LI ) lies in FO[arb]\FO[<, +]. We will state this result as a corollary further below. For now, consider the modified Immerman language RI defined as LI except that the successive binary words are alternately reversed, i.e., RI = {. . . , 000a(001)R a010a(011)R a100a(101)R a110a(111)R , . . .}. RI is the intersection of two deterministic context-free languages. Even more, the argument in Lemma 5.1 can actually be extended to prove that the complement of RI is a linear CFL. Hence, Theorem 5.3. 1. FO[arb] ∩ BC(DCFL) ) FO[<, +] ∩ BC(DCFL). 2. FO[arb] ∩ BC(LinCFL) ) FO[<, +] ∩ BC(LinCFL). Proof. For the first claim, observe that Neutral(RI ) ∈ / FO[<, +], because FO[<, +] has the Crane Beach Property and RI ∈ / REG. On the other hand, Neutral(RI ) ∈ FO[arb]; and since RI ∈ BC(DCFL), Neutral(RI ) ∈ BC(DCFL). For the second claim, RI can be expressed analogously to LI by replacing A with an appropriate set A0 in (5.4). Further, for uav ∈ Σ? with binary words u and v, the R + 1 6= v R (mod 2|u| ) can be checked by a conditions uc b (mod 2|u| ) and u b + 1 6= vc linear CFL. Since the linear context-free languages are closed under finite union, the claim follows. The role of neutral letters in the above theorems suggests taking a closer look at Neutral(CFL). As the Uniformity Duality Property for ({∃}, Neutral(CFL)) would have it, all neutral-letter context-free languages in AC0 would be regular and aperiodic. This is, however, not the case as witnessed by Neutral(LI ). Hence, Corollary 5.4. In the case of Q = {∃}, the Uniformity Duality Property fails in all of the following cases. 1. L = CFL, 2. L = BC(CFL), 3. L = BC(DCFL), 4. L = BC(LinCFL), 5. L = Neutral(CFL). Remark. The class VPL of visibly pushdown languages [2] has gained prominence recently because it shares with REG many useful properties. But despite having access to a stack, the VPL-numerical predicates coincide with REGN , for each word may only contain constantly many characters different from (0, ∅). It follows that the Uniformity Duality Property fails for VPL and first-order quantifiers: consider, e.g., L = {an bn : n > 0} ∈ FO[arb] ∩ (VPL \ REG) then L ∈ FO[arb] ∩ VPL but L∈ / FO[<, VPLN ] ∩ VPL. 6. The Duality in Higher Classes. We have seen that the context-free languages do not exhibit our conjectured Uniformity Duality. In this section we will show that the Uniformity Duality Property holds if the extensional uniformity condition imposed by intersecting with L is quite loose, in other words, if the language class L is powerful. Recall the notion of non-uniformity introduced by Karp and Lipton [15]. For x ∈ N, let |x| denote the length of the binary representation of x.

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

17

Definition 6.1. For a complexity class L, denote by L/poly the class L with polynomial advice. That is, L/poly is the class of all languages L such that, for each L, there is a polynomially-bounded function f : N → {0, 1}? with 1. |f (x)| ≤ p(x), for all x ∈ N, and 2. Lf := {hx, f (|x|)i : x ∈ L} ∈ L, where p is a polynomial depending on L. Without loss of generality, we will assume |f (x)| = |x|k for some k ∈ N. Note that, using the above notation, DLOGTIME-uniform AC0 /poly = AC0 . As we further need to make the advice strings accessible in a logic, we define the following predicates. Following [6], we say that a Lindstr¨ om quantifier QL is groupoidal, if L ∈ CFL. Definition 6.2. Let Q be any set of groupoidal quantifiers. Further, let L ∈ DLOGTIME-uniform AC0 [Q]/poly and let f be an advice function for which Lf ∈ DLOGTIME-uniform AC0 [Q]. Let r = 2kl + 1, where k and l are chosen such that the circuit family recognizing Lf in DLOGTIME-uniform AC0 [Q] has size nl and |f (x)| = |x|k . We define AdvicefL,Q ∈ FO+Q[arb] to be the ternary relation AdvicefL,Q = {(i, n, nr ) : bit i of f (n) equals 1}, and denote the set of all relations AdvicefL,Q , for L ∈ L, by AdviceL,Q . The intention of AdvicefL,Q is to encode the advice string as a numerical relation. A point in this definition that will become clear later is the third argument of the AdvicefL,Q -predicate; it will pad words in the corresponding unary Vn -language to the length of the advice string. This padding will be required for Theorem 6.4. Theorem 6.3. Let L be a language class and Q be a set of groupoidal quantifiers. Then the Uniformity Duality Property for ({∃} ∪ Q, L) holds if Bit ∈ LN and AdviceL,Q ⊆ LN . Proof. Let L be a language class that satisfies the requirements of the claim. We have to show that FO+Q[arb] ∩ L = FO+Q[<, LN ] ∩ L. The inclusion from right to left is trivial. For the other direction, let L ∈ FO+Q[arb] ∩ L. Without loss of generality, we assume L ⊆ {0, 1}? . In [5], Barrington et al. state that FO+Q[arb] = FO+Q[Bit]/poly = DLOGTIME-uniform AC0 [Q]/poly

(6.1)

for arbitrary sets Q of monoidal quantifiers, but what is needed in fact is only the existence of a neutral element. As a consequence, (6.1) holds for sets Q of groupoidal quantifiers, too. There hence exists a polynomial p(n) = nk , k ∈ N, a function f with |f (x)| = p(|x|), and a DLOGTIME-uniform AC0 [Q] circuit family {Cm }m>0 that recognizes Lf . From {Cm }m>0 , we construct a formula ϕ ∈ FO+Q[<, LN ], essentially replacing the advice input gates with the relation AdvicefL,Q . Let x1 , . . . , xn , y1 , . . . , ynk denote the input gates of circuit Cm , m > 0, where x1 · · · xn = x and y1 · · · ynk = f (|x|). First canonically transform {Cm }m>0 into a formula ϕ0 over an extended vocabulary σ that satisfies L(ϕ0 ) = L (see [5, Theorem 9.1], [26, Theorem IX.2.1] or [30, Theorem 4.73] for the construction of ϕ0 ). Let l ∈ N be such that nl is a size bound on {Cm }m>0 . Then the transformation encodes gates as l-tuples of variables over {1, . . . , n} and ensures the correct structure using additional predicate symbols Pred, Input0, Input1, Output, And, Or, Not and predicates QuantQ for the subset of oracle gates from Q used in Cm . For example, the relation Pred holds on a tuple (z1 , . . . , z2l ) iff the gate encoded by (z1 , . . . , zl ) is a predecessor

18

P. MCKENZIE, M. THOMAS AND H. VOLLMER

of (zl+1 , . . . , z2l ); and each of remaining predicates holds on a tuple (z1 , . . . , zl ) iff (z1 , . . . , zl ) encodes a gate of the corresponding type. Note that each relation in σ is definable in FO[<, LN ], because DLOGTIME ⊆ FO[Bit] ⊆ FO[<, LN ]. Next, replace the relations Input0 and Input1 corresponding to the input gates yi , 1 ≤ i ≤ nk , with the respective advice predicates from Definition 6.2, ¬AdvicefL,Q (i, n, nr )

and AdvicefL,Q (i, n, nr );

both of which are definable in LN by assumption. In the resulting formula, replace the remaining predicates other than < and Bit by their defining FO+Q[<, LN ]-formulae and eventually obtain a formula defining L ∈ FO+Q[<, LN ]. We can now give a lower bound beyond which the Uniformity Duality Property holds. Let NTIME(n)L denote the class of languages decidable in linear time by nondeterministic Turing machines with oracles from L. Theorem 6.4. Let Q be any set of groupoidal quantifiers and suppose L = NTIME(n)L . Then the Uniformity Duality Property for ({∃} ∪ Q, L) holds. Proof. Choose any L ∈ AC0 [Q] ∩ L and let f be an advice function for which f L ∈ DLOGTIME-uniform AC0 [Q]. Let k ∈ N be such that |f (x)| = |x|k and denote by {Cm }m>0 the DLOGTIME-uniform AC0 [Q] circuit family of size ≤ nl that recognizes Lf using oracle gates from Q. We have to show that the relation AdvicefL,Q can be simulated in LN in the sense that there exists a language LAdv ∈ L such that for all n ∈ N, the output of Cn+nk on input x and advice f (x) agrees with the output of Cn+nk on input x and any advice y ∈ LN Adv with |y| = |f (x)|. To this end, define the set S to consist of those stings y of the form [x1 = i, x2 = n, x3 = nr ] for some n > 0 such that for all x of length n, Cn+nk (x, y) = 1 iff x ∈ L; that is, S comprises all strings of length nr that are suitable as advice strings for the circuit Cn+nk . Due to the padding, it holds that S ∈ coNTIME(n)L = L. Next, let T be the set of strings y such that there exists a y 0 < y with |y 0 | = |y| and y 0 ∈ S. Then T can be decided in in NTIME(n)S and thus in L. Defining LAdv := S \ T as the difference of S and T , we eventually obtain a set of strings such that LAdv ∈ DTIME(n)L = L and, for all n ∈ N, LAdv ∩ {0, 1}n = {y} for the lexicographic least string y that can be used to simulate the advice. Using f LN Adv as a replacement for AdviceL,Q , the claim follows from Theorem 6.3, because L = NTIME(n)L moreover implies Bit ∈ LN . Corollary 6.5. Let Q be any set of groupoidal quantifiers. The Uniformity Duality Property holds for ({∃} ∪ Q, L) if L equals the deterministic context-sensitive languages DSPACE(n), the context-sensitive languages CSL, the rudimentary languages ( i.e., the linear time hierarchy [32]), PH, PSPACE, or the recursive languages. Proof. All of the above classes satisfy L = NTIME(n)L . 7. Conclusion. For a set Q of quantifiers and a class L of languages, we have suggested that Q[arb] ∩ L defines an (extensionally) uniform complexity class. After defining the notion of L-numerical predicates, we have proposed comparing Q[arb] ∩ L with its subclass Q[<, LN ] ∩ L, a class equivalently defined as the (intensionally) uniform circuit class FO[<, LN ]-uniform AC0 [Q] ∩ L. We have noted that the duality property, defined to hold when both classes above are equal, encompasses Straubing’s conjecture (1.1) as well as some positive and some negative instances of the Crane Beach Conjecture. We have then investigated the duality property in specific cases with Q = {∃}. We have seen that the property fails for several classes L involving the context-free

EXTENSIONAL UNIFORMITY FOR BOOLEAN CIRCUITS

19

languages. Exhibiting these failures has required new insights, such as characterizations of the context-free numerical predicates and a proof that the complement of the Immerman language is context-free, but these failures have prevented successfully tackling complexity classes such as AC0 ∩CFL. Restricting the class of allowed relations on the left hand side of the uniformity duality property from arb to a subclass might lead to further insight and provide positive examples of this modified duality property (and address, e.g., the class of context-free languages in different uniform versions of AC0 ). Methods from embedded finite model theory should find applications here. More generally, the duality property widens our perspective on the relationship between uniform circuits and descriptive complexity beyond the level of NC1 . We have noted for example that the property holds for any set of groupoidal quantifiers Q ⊇ {∃} and complexity classes L that are closed under nondeterministic linear-time Turing reductions. Restating hard questions such as conjecture (1.1) in terms of a unifying property does not make these questions go away. But the duality property raises further questions. As an example, can the duality property for various (Q, L) be shown to hold or to fail when Q includes the majority quantifier? This could help develop incisive results concerning the class TC0 . To be more precise, let us consider Q = {∃, MAJ}. The majority quantifier is a particular groupoidal (or, context-free) quantifier [18], hence it seems natural to consider the Uniformity Duality Property for ({∃, MAJ}, CFL): FO+MAJ[arb] ∩ CFL = FO+MAJ[<, +] ∩ CFL.

(7.1)

It is not hard to see that the Immerman language in fact is in FO+MAJ[<, +], hence our Theorem 5.2 that refutes (5.1), the Uniformity Duality Property for (FO, BC(CFL)), does not speak to whether (7.1) holds. (Another prominent example that refutes (5.1) is the “Wotschke language” W = {(an b)n : n ≥ 0}, again a co-context-free language [31]. Similar to the case of the Immerman language we observe that W ∈ FO+MAJ[<, +], hence W does not refute (7.1) either.) Observe that FO+MAJ[arb] = TC0 [5] and that, on the other hand, FO+MAJ[<, +] = MAJ[<] = FO[<, +]-uniform linear fan-in TC0 [17, 7]. Let us call this latter class sTC0 (for small TC0 or strict TC0 ). It is known that sTC0 ( TC0 [18]. Hence we conclude that if (7.1) holds, then in fact TC0 ∩ CFL = sTC0 ∩ CFL. In this case, if we can show that some language in the Boolean closure of the context-free languages is not in sTC0 , we have a new TC0 lower bound. Thus, to separate TC0 from a superclass it suffices to separate sTC0 from a superclass, a possibly less demanding goal. This may be another reason to look for appropriate uniform classes L such that FO+MAJ[arb] ∩ L = FO+MAJ[<, +] ∩ L. Acknowledgements. We would like to thank Klaus-J¨orn Lange (personal communication) for suggesting Lemma 5.1. We also acknowledge helpful discussions on various topics of this paper with Christoph Behle, Andreas Krebs, Klaus-J¨orn Lange and Thomas Schwentick. Finally we thank the anonymous referees for very helpful comments and for identifying two minor corrections. REFERENCES [1] E. Allender, P-uniform circuit complexity, Journal of the Association for Computing Machinery, 36 (1989), pp. 912–928. [2] R. Alur and P. Madhusudan, Visibly pushdown languages, in Proc. of the 16th Annual ACM Symposium on Theory of Computing, 2004, pp. 202–211.

20

P. MCKENZIE, M. THOMAS AND H. VOLLMER

[3] D. A. Mix Barrington and N. Immerman, Time, hardware, and uniformity, in Proceedings 9th Structure in Complexity Theory, IEEE Computer Society Press, 1994, pp. 176–185. ´rien, [4] D. A. Mix Barrington, N. Immerman, C. Lautemann, N. Schweikardt, and D. The First-order expressibility of languages with neutral letters or: The Crane Beach Conjecture, Journal of Computer and System Sciences, 70 (2005), pp. 101–127. [5] D. A. Mix Barrington, N. Immerman, and H. Straubing, On uniformity within NC1 , Journal of Computer and System Sciences, 41 (1990), pp. 274–306. ´dard, F. Lemieux, and P. McKenzie, Extensions to Barrington’s M-program model, [6] F. Be Theoretical Computer Science, 107 (1993), pp. 31–61. [7] C. Behle and K.-J. Lange, FO[<]-Uniformity, in Proceedings of the 21st Annual IEEE Conference on Computational Complexity (CCC’06), 2006, pp. 183 – 189. [8] J. Berstel, Transductions and Context-Free Languages, vol. 38 of Leitf¨ aden der angewandten Mathematik und Mechanik LAMM, Teubner, 1979. [9] A. Borodin, On relating time and space to size and depth, SIAM Journal on Computing, 6 (1977), pp. 733–744. [10] S. Ginsburg, The Mathematical Theory of Context-Free Languages, McGraw-Hill, New York, 1966. [11] S. Ginsburg, S. Greibach, and J. Hopcroft, Abstract families of languages, Memoirs of the Amer. Math. Soc., 87 (1969). [12] O. Ibarra, T. Jiang, and B. Ravikumar, Some subclasses of context-free languages in NC1 , Information Processing Letters, 29 (1988), pp. 111–117. [13] N. Immerman, Expressibility and parallel complexity, SIAM Journal on Computing, 18 (1989), pp. 625–638. [14] , Descriptive Complexity, Graduate Texts in Computer Science, Springer Verlag, New York, 1999. [15] R. Karp and R. Lipton, Turing machines that take advice, L’enseignement math´ ematique, 28 (1982), pp. 191–209. [16] K.-J. Lange, Complexity theory and formal languages, in 5th International Meeting of Young Computer Scientists, vol. 381 of Lecture Notes in Computer Science, Springer, 1989, pp. 19–36. [17] , Some results on majority quantifiers over words, 19th IEEE Conference on Computational Complexity, (2004), pp. 123–129. [18] C. Lautemann, P. McKenzie, T. Schwentick, and H. Vollmer, The descriptive complexity approach to LOGCFL, Journal of Computer and Systems Sciences, 62 (2001), pp. 629–652. ¨ m, First order predicate logic with generalized quantifiers, Theoria, 32 (1966), [19] P. Lindstro pp. 186–195. [20] L. Liu and P. Weiner, An infinite hierarchy of intersections of context-free languages, Mathematical Systems Theory, 7 (1973), pp. 185–192. [21] R. McNaughton and S. Papert, Counter-Free Automata, MIT Press, 1971. ´ Pin, Vari´ [22] J.-E. et´ es de langages formels, Masson, 1984. [23] Matthias Ruhl, Counting and addition cannot express deterministic transitive closure, in Proceedings of 14th IEEE Symposium on Logic in Computer Science, 1999, pp. 326–334. [24] W. L. Ruzzo, On uniform circuit complexity, Journal of Computer and Systems Sciences, 21 (1981), pp. 365–383. [25] N. Schweikardt, Arithmetic, first-order logic, and counting quantifiers, ACM Transactions on Computational Logic, 6 (2005), pp. 634–671. [26] H. Straubing, Finite Automata, Formal Logic, and Circuit Complexity, Birkh¨ auser, Boston, 1994. ´rien, and W. Thomas, Regular languages defined with generalized [27] H. Straubing, D. The quantifiers, in Proceedings 15th International Colloquium on Automata, Languages and Programming, vol. 317, Berlin Heidelberg, 1988, Springer Verlag, pp. 561–575. ´rien, Logic meets algebra: the case of regular languages, Logical [28] Pascal Tesson and Denis The Methods in Computer Science, 3 (2007), pp. 1–37. ´rien and T. Wilke, Nesting until and since in linear temporal logic, Theory of Comput. [29] D. The Systems, 37 (2003), pp. 111–131. [30] H. Vollmer, Introduction to Circuit Complexity – A Uniform Approach, Texts in Theoretical Computer Science, Springer Verlag, 1999. [31] D. Wotschke, The Boolean closure of the deterministic and nondeterministic context-free languages, in 3. GI Jahrestagung, vol. 1 of Lecture Notes in Computer Science, Springer, 1973, pp. 113–121. [32] C. Wrathall, Rudimentary predicates and relative computation, SIAM Journal on Computing, 7 (1978), pp. 194–209.