Abstract 1 Introduction 2 Preliminaries 3 Simplifying Multiplication Quantifiers 4 The Algebraic Characterization 5 For-Programs and Non-Lexicographic Interpretations 6 Conclusion References Appendix A Typed Monoids

Characterizing NC1 with Typed Monoids

Anuj Dawar ORCID Department of Computer Science and Technology, University of Cambridge, UK Aidan T. Evans111Corresponding Author ORCID Department of Computer Science and Technology, University of Cambridge, UK
Abstract

Krebs et al. (2007) gave a characterization of the complexity class TC0 as the class of languages recognized by a certain class of typed monoids. The notion of typed monoid was introduced to extend methods of algebraic automata theory to infinite monoids and hence characterize classes beyond the regular languages. We advance this line of work beyond TC0 by giving a characterization of NC1. This is obtained by first showing that NC1 can be defined as the languages expressible in an extension of first-order logic using only unary quantifiers over regular languages. The expressibility result is a consequence of a general result showing that finite monoid multiplication quantifiers of higher dimension can be replaced with unary quantifiers in the context of interpretations over strings, which also answers a question of Lautemann et al. (2001). We estblish this collapse result for a much more general class of interpretations using results on interpretations due to Bojańczyk et al. (2019), which may be of independent interest.

Keywords and phrases:
algebraic automata theory, circuit complexity, descriptive complexity, typed monoids, semigroups, generalized quantifiers
Funding:
Anuj Dawar: Research funded in part by UK Research and Innovation (UKRI) under the UK government’s Horizon Europe funding guarantee: grant number EP/X028259/1.
Aidan T. Evans: Researched supported by Huawei HiSilicon Studentship.
Copyright and License:
[Uncaptioned image] © Anuj Dawar and Aidan T. Evans; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Regular languages
; Theory of computation Complexity theory and logic ; Theory of computation Circuit complexity ; Theory of computation Finite Model Theory
Related Version:
Full Version: https://arxiv.org/abs/2508.11019 [8]
Editors:
C. Aiswarya, Ruta Mehta, and Subhajit Roy

1 Introduction

Much work in theoretical computer science is concerned with studying classes of formal languages, whether these are classes defined in terms of grammars and expressions, such as the class of regular or context-free languages, or whether they are complexity classes such as P and NP, defined by resource bounds on machine models. Indeed, the distinction between these is largely historical as most classes of interest admit different characterizations based on machine models, grammars, logical definability, or algebraic expressions. The class of regular languages can be characterized as the languages accepted by linear-time-bounded single-tape Turing machines [12] while P can be characterized without reference to resources as the languages recognized by multi-head two-way pushdown automata [7]. The advantage of the variety of characterizations is, of course, the fact that these bring with them different mathematical toolkits that can be brought to the study of the classes.

The class of regular languages has arguably the richest theory in this sense of diversity of characterizations. Most students of computer science learn of the equivalence of deterministic and nondeterministic finite automata, regular languages and linear grammars and many also know that the regular languages are exactly those definable in monadic second-order logic with an order predicate. Perhaps the most productive approach to the study of regular languages is via their connection to finite monoids. Every language L has a syntactic monoid, which is finite if, and only if, L is regular. Moreover, closure properties of classes of regular languages relate to natural closure properties of classes of monoids, via Eilenberg’s Correspondence Theorem [11]. Finally, we have Krohn-Rhodes theory which decomposes regular languages into elementary components; such a decomposition has found applications not only in semigroup theory but also, for example, in physics [17, Sections 4.8a, 4.10] and the modeling of biochemical reactions [17, Chapter 6, Part I]. All together, these tools give rise to algebraic automata theory – which leads to the definition of natural subclasses of the class of regular languages, to effective decision procedures for automata recognizing such classes, and to separation results.

When it comes to studying computational complexity, we are mainly interested in classes of languages richer than just the regular languages. Thus, the syntactic monoids of the languages are not necessarily finite and the extensive tools of Krohn-Rhodes theory are not available to study them. Nonetheless, some attempts have been made to extend the methods of algebraic automata theory to classes beyond the regular languages. Most significant is the work of Krebs and collaborators [2, 3, 14, 13, 6], which introduces the notion of typed monoids. The idea is to allow for languages with infinite syntactic monoids, but limit the languages they recognize by associating with the monoids a finite collection of types. This allows for the formulation of a version of Eilenberg’s Correspondence theorem associating closure properties on classes of typed monoids with corresponding closure properties of classes of languages. In particular, this implies that most complexity classes of interest can be uniquely characterized in terms of an associated class of typed monoids [3]. An explicit description of the class characterizing uniform TC0 is given in Krebs et al. [14, 13] and, furthermore, provides a decomposition of TC0 into elementary components analogous to the Krohn-Rhodes theory for regular languages. This is obtained through a general method which allows us to construct typed monoids corresponding to unary quantifiers defined from specific languages [13] (see also Theorem 11 below).

In this paper, we extend this work to obtain a characterization and decomposition of (uniform) NC1 as the class of languages recognized by the collection of typed monoids obtained as the closure under ordered strong block products of three typed monoids: the group of integers with types for positive and non-positive integers; the monoid of the natural numbers with types for the square numbers and non-square numbers; and a finite non-solvable group such as S5 with a type for each subset of the group. Full definitions of these terms follow below. Our result is obtained by first characterizing NC1 in terms of logical definability in an extension of first-order logic with only unary quantifiers. It is known that any regular language whose syntactic monoid is a non-solvable group is complete for NC1 under reductions definable in first-order logic with arithmetic predicates ((FO)[+,×]) [1]. From this, we know we can describe NC1 as the class of languages definable in an extension of (FO)[+,×] with quantifiers (of arbitrary arity) associated with the regular languages recognized by the monoid S5. We show that the family of such quantifiers associated with any finite monoid can be replaced with just the unary quantifiers. This answers a question left open in Lautemann et al. [16] and allows us to obtain the sought after algebraic characterization.

For the purpose of establishing the characterization of NC1, it suffices to consider quantifiers applied to interpretations in which tuples of elements are ordered lexicographically. However, we show that the arity collapse of quantifiers associated with finite monoids holds more generally, for any first-order definable linear orders on tuples. To show this, we leverage a characterization of first-order interpretations due to Bojańczyk et al. [5, 4].

We begin in Section 2, by covering relevant background on semigroup theory, typed monoids, and multiplication quantifiers (some of which is relegated to the appendix in the interests of space). In Section 3, we establish the technical result showing that quantifiers of higher arity over a regular language L can be defined using just unary quantifiers over the syntactic monoid of L, when the quantifiers are applied to interpretations with a lexicographic order on tuples. In Section 4, we apply this to obtain the algebraic characterization of NC1. finally, in Section 5, we establish the arity collapse for quantifiers in the context of more general interpretations. A full version of this paper with a detailed background is available on arXiv [8].

2 Preliminaries

We assume the reader is familiar with basic concepts of formal language theory, automata theory, complexity theory, and logic. We quickly review definitions we need in order to fix notation and establish conventions.

We write for the set of integers, for the set of natural numbers (including 0), and + for the set of positive integers. We write [n] for the set of integers {1,,n} and 𝕊 for the set of square integers. That is, 𝕊={x+x=y2 for some y}.

For a fixed n+ and an integer i[n], we define the n-bit one-hot encoding of i to be the binary string b{0,1}n such that bj=1 if, and only if, j=i. For any set S, we write (S) for the powerset of S.

The complexity classes TC0 and NC1 are classes of languages defined in terms of circuits. We are only interested in the uniform versions of these classes. Specifically, TC0 is the class of languages recognized by a uniform family of circuits of polynomial size and constant depth using And, Or, Not and Majority gates of arbitrary fan-in; and NC1 is the class of languages recognized by a uniform family of circuits of polynomial size and logarithmic depth using And, Or and Not gates of fan-in at most 2. Since gates (including majority gates) of unbounded fan-in can be simulated by circuits of logarithmic depth of fan-in 2 using just the standard Boolean basis, we have TC0NC1 and the separation of the two classes is open. The requirement of uniformity here means that the circuits of input size n are easily computed from n. It is standard to take “easily computed” to mean DLogTime-uniform, though the classes are robust under varying the definition (see [20]).

2.1 Semigroups, Monoids, and Groups

A semigroup (S,) is a set S equipped with an associative binary operation. We call a semigroup finite if S is finite. Context permitting, we may refer to a semigroup (S,) simply by its underlying set S.

A monoid (M,) is a semigroup with a distinguished element 1MM such that for all mM, 1Mm=m1M=m. We call 1M the identity or neutral element of M. A group (G,) is a monoid such that for every gG, there exists an element g1G such that gg1=g1g=1. We call g1 the inverse of g.

Note that (,+) is a group, (,+) is a monoid but not a group and (+,+) is a semigroup but not a monoid. In the first two cases, the identity element is 0. When we refer to the monoids or we assume that the operation referred to is standard addition.

For a semigroup (S,), we say that a set GS generates S if S is equal to the closure of G under ; we denote this by S=G, or, simply, G if the operation is clear from context, and call G a generating set of S. We say that S is finitely generated if there exists a finite generating set of S. All semigroups we consider are finitely generated. Note that + is generated by {1}, by {0,1} and by {1,1}.

We write U1 for the monoid ({0,1},) where the binary operation is the standard multiplication. Note that 1 is the identity element here. For any set S, we denote by S+ the set of non-empty finite strings over S and by S the set of all finite strings over S. Equipped with the concatenation operation on strings, which we denote by either or simply juxtaposition, S is a monoid and S+ is a semigroup but not a monoid. We refer to these as the free monoid and free semigroup over S, respectively. Note that S is a set of generators for S+ and S{ϵ} is a set of generators for S.

A monoid homomorphism from a monoid (S,S) to a monoid (T,T) is a function h:ST such that for all s1,s2S, h(s1Ss2)=h(s1)Th(s2) and h(1S)=1T. A congruence on a monoid (M,) is an equivalence relation on M such that for all a,b,c,dM, if ab and cd, then acbd. We denote by M/ the set of equivalence classes of on M. We denote by [a], or simply [a], the equivalence class of aM under . Any congruence gives rise to the quotient monoid of M by , namely the monoid (M/,) where for [a],[b]M/, [a][b]=[ab]. The map η:MM/ defined by η(a)=[a] is then a homomorphism, known as the canonical homomorphism of M onto M/.

2.2 Language Recognition with Monoids

Here we recall the definition of syntactic congruences and syntactic monoids.

For a language LΣ over an alphabet Σ, we define the syntactic congruence of L as the equivalence relation L on Σ such that for all x,yΣ, xLy if, and only if, for all w,vΣ, wxvL if, and only if, wyvL.

It is easily seen that this relation is a congruence on the free monoid Σ. The quotient monoid Σ/L is known as the syntactic monoid of L. More generally, we say that a monoid M recognizes a language L if there is a homomorphism h:ΣM and a set AM such that L=h1(A). It is easily seen that the syntactic monoid of L recognizes L. A language is regular if, and only if, its syntactic monoid is finite [19].

2.3 Logics and Quantifiers

We assume familiarity with the basic syntax and semantics of first-order logic. In this paper, the logic is always interpreted in finite relational structures. We generally denote structures by Fraktur letters, 𝔄, 𝔅, etc., and the corresponding universe of the structure is denoted |𝔄|, |𝔅|, etc. We are almost exclusively interested in strings over a finite alphabet. Thus, fix an alphabet Σ. A Σ-string is then a structure 𝔄 whose universe |𝔄| is linearly ordered by a binary relation < and which interprets a set of unary relation symbols (Rσ)σΣ such that for each element a|𝔄| there is a unique σΣ such that a is in the interpretation of Rσ.

More generally, let τ be any relational vocabulary consisting of a binary relation symbol < and unary relation symbols R1,,Rk. We can associate with any τ-structure in which < is a linear order a string over an alphabet of size 2k as formalized in the following definition.

Definition 1.

For τ a relational vocabulary consisting of a binary relation symbol < and unary relation symbols R1,,Rk, and 𝔄 a τ-structure with n elements that interprets the symbol < as a linear order of its universe, we define the string w𝔄 associated with 𝔄 as the string of length n over the alphabet Σk={0,1}k of size 2k so that if a is the ith element of w𝔄, then a is the k-tuple where aj=1 if, and only if, Rj holds at the ith element of 𝔄.

For example, say τ={R1,R2,R3} and 𝔄=([4],<𝔄,R1𝔄,R2𝔄,R3𝔄) where 1<2<3<4, R1𝔄={1,3}, R2𝔄={2,4}, and R3𝔄={1,2,3}. Then, the string w𝔄=(101)(011)(101)(010).

Using the above, we can associate a language with any isomorphism-closed class of structures over the vocabulary τ. We formalize this definition for future use.

Definition 2.

For τ a relational vocabulary consisting of a binary relation symbol < and unary relation symbols R1,,Rk, and 𝒜 a class of τ-structures where every structure interprets < as a linear order, we define the language L𝒜 over the alphabet Σk={0,1}k to be

L𝒜={w𝔄𝔄𝒜}.

Conversely, for any language L over the alphabet Σk, we define the class of τ-structures 𝒮L to be

𝒮L={𝔄w𝔄L}.

It is worth noting that the above operations are not inverses, in the sense that it is not the case that SL𝒜=𝒜. This is because while 𝒜 is a class of structures using k unary relation symbols, SL𝒜 is in a vocabulary using 2k unary symbols.

As the elements of a string 𝔄 are linearly ordered, we can identify them with an initial segment {1,,n} of the positive integers. In other words, we treat a string with universe {1,,n} and the standard order on these elements as a canonical representative of its isomorphism class. In addition to the order predicate, we may allow other numerical predicates to appear in formulas of our logics. These are predicates whose meaning is completely determined by the size n of the structure and the ordering of its elements. In particular, we have ternary predicates + and × for the partial addition and multiplication functions.

An insight due to Lindström allows us to define a quantifier from any isomorphism-closed class of structures (see [10]). We adopt the terminology of Ebbginhaus and Flum [9, Chapter 12] and provide a brief overview now. Consider a relational vocabulary τ={R1,,Rl}, where for each i, Ri is a relation symbol of arity ri. For any vocabulary σ and positive integer d, an interpretation of τ in σ of dimension d is a tuple of formulas I=(ϕ1(x¯1),,ϕl(x¯l)) of vocabulary σ where ϕi is associated with a tuple x¯i of variables of length |x¯i|=dri. Suppose we are given a σ-structure 𝔄 and an assignment α that takes variables to elements of 𝔄. Then let ϕi𝔄,α denote the relation of arity dri consisting of the set of tuples {a¯|𝔄|dri𝔄ϕi[α[x¯i/a¯]]}. Then, the interpretation I defines a map that takes a σ-structure 𝔄, along with an assignment α to the τ-structure I(𝔄,α) with universe |𝔄|d where the interpretation of Ri is the set ϕi𝔄,α, seen as a relation of arity ri on |𝔄|d.

Given a class of τ-structures Q and any positive integer d, we have a quantifier Qd. In a logic with Qd, we can form formulas of the form

Qdx¯1x¯l(ϕ1,,ϕl)

whenever I=(ϕ1(x¯1),,ϕl(x¯l)) is an interpretation of dimension d. In this formula, occurrences in the subformula ϕi of variables among xi are bound. The semantics of this quantifier are given by the rule that Qdx¯1x¯l(ϕ1,,ϕl) is true in a structure 𝔄 under some assignment α of values to the free variables if the τ-structure I(𝔄,α) is in Q. We can understand Qd as the dth vectorization of the quantifier Q (see [9, Def. 12.1.6]). When d=1, we may omit the subscript. A quantifier of the form Q1 is called unary.

The standard first-order quantifiers: and can be seen as special cases of Lindström quantifiers in a vocabulary with one unary relation U. The existential quantifier consists of all structures (A,U) where UA is non-empty and the universal quantifier consists of all structures (A,U) where U=A.

We are particularly interested in interpretations I where both σ and τ are vocabularies of strings. These are also known in the literature as string-to-string transducers. (See [4] for an example of how transducers may have many representations.) Therefore, I must define an interpretation of not only each Riτ (using the formula ϕi) but also a σ-formula ϕ< defining the linear order on the universe of the τ-structure I(𝔄,α). We are particularly interested in the case where the order defined is the lexicographic order on d-tuples of |𝔄| induced by the order in 𝔄. This order is easily defined by a (quantifier-free) first-order formula, and we often omit it from the description of I.

When we consider interpretations that define a linear order other than the lexicographic order, we explicitly include the formula defining the order and thus the formula is Qdx¯y¯(ϕ<(x¯),ϕ1(y¯),,ϕl(y¯)), where the interpretation is of dimension d and so |x¯|=2d and |y¯|=d.

Finally, we now introduce some notation we use in the rest of the paper for various logics formed by combining particular choices of quantifiers and numerical predicates.

Definition 3.

For a set of quantifiers 𝔔 and numerical predicates 𝔑, we denote by (𝔔)[𝔑] the logic constructed by extending quantifier-free first-order logic with the quantifiers in 𝔔 and allowing the numerical predicates in 𝔑.

We denote by FO the set of standard first-order quantifiers: {,}.

When 𝔔 is just a singleton {Q}, we sometimes denote (𝔔)[𝔑] by (Q)[𝔑] or (Q1)[𝔑] to emphasise that it is the unary quantifier. We also write Q¯ for the collection of all vectorizations of the quantifier Q. We use similar notation for the sets of numerical predicates. We use ((𝔔)[𝔑]) to denote the languages expressible by the logic (𝔔)[𝔑].

All the logics we consider are substitution closed in the sense of [10]. This means in particular that if a quantifier Q is definable in a logic (𝔔)[𝔑], then extending the logic with the quantifier Q does not add to its expressive power. This is because we can replace occurrences of the quantifier Q by its definition, with a suitable substitution of the interpretation for the relation symbols. Hence, if Q is definable in (𝔔)[𝔑], then ((𝔔)[𝔑])=((𝔔{Q})[𝔑]).

A remark is due on our notation for numerical predicates. All structures we consider are ordered, including those defining the quantifiers. Thus the order predicate is implicitly present in the collection of numerical predicates 𝔑 and is used (implicitly) to define the interpretations to a quantifier. We sometimes write (𝔔)[] to indicate a logic in which this is the only use of the order that is allowed; by our choice of notation, the order symbol then does not appear explicitly in the syntax of the formulas.

2.4 Multiplication Quantifiers

The definition of multiplication quantifier has its origin in Barrington, Immerman, and Straubing [1, Section 5] where they were referred to as monoid quantifiers; the authors proved that the languages in NC1 are exactly those expressible by first-order logic with quantifiers whose truth-value is determined via multiplication in a finite monoid. The notion was extended by Lautemann et al. [16] to include quantifiers for the word problem over more general algebras with a binary operation. Multiplication quantifiers over a finite monoid M can be understood as generalized quantifiers corresponding to languages recognized by M, and here we define them as such. We then see how this definition matches that of multiplication quantifiers à la Barrington et al. [1, 14].

Fix a monoid M, a set BM, and a positive integer k. Let Σk denote the set {0,1}k which we think of as an alphabet of size 2k, and fix a function γ:ΣkM. We extend γ to strings in Σk inductively in the standard way: γ(ϵ)=1M and γ(wa)=γ(w)γ(a). Note that γ is a monoid homomorphism. Together these define a language

LγM,B={xΣkγ(x)B}.

We can now define a multiplication quantifier. In the following, 𝒮L denotes the class of τ structures associated with a language L in the sense of Definition 2.

Definition 4.

Let τ be a vocabulary including an order symbol < and k unary relations. For a monoid M, a set BM and a function γ:{0,1}kM, the multiplication quantifier ΓγM,B is the Lindström quantifier associated with the class of structures 𝒮LγM,B.

We also write Γd,γM,B for the vectorization of this quantifier of dimension d. If B is a singleton {s}, then we may write Γd,γM,s for short.

Recall that U1 denotes the two-element monoid {0,1} with standard multiplication. Then, it is easily seen that Γ1,γU1,0, where γ:{0,1}U1 such that γ(0)=1 and γ(1)=0, is the standard existential quantifier. The universal quantifier can be defined similarly.

Another way of describing the semantics of the multiplication quantifier (which relates it directly to the form described in Barrington et al. [1]) is as follows. For a monoid M, a set BM, a positive integer k and a function γ:{0,1}kM, consider the formula

Γd,γM,Bx¯y¯(ϕ<(x¯),ϕ1(y¯),,φk(y¯))

where |x¯|=2d and |y¯|=d; and I=(ϕ<(x¯),ϕ1(y¯),,φk(y¯)) defines an interpretation of dimension d from some vocabulary τ to a vocabulary with binary relation and k unary relations. Then, for a τ-structure 𝔄 and assignment α, we have that

𝔄Γd,γM,Bx¯y¯(ϕ<(x¯),ϕ1(y¯),,φk(y¯))[α]

if, and only if, ϕ< defines a linear order on the d-tuples of 𝔄 and

(a¯𝔄d)γ(ϕ1(a¯),,ϕk(a¯))B.

Here, multiplication is in the monoid M and, since multiplication is not necessarily commutative, the order of d-tuples is specified to be the one given by , which is defined by φ<.

As stated above, when 𝔄 is itself ordered and the order is the lexicographic order on d-tuples, we simply omit the formula ϕ<.

Definition 5.

For a monoid M, we define the following collections of quantifiers:

ΓM ={Γd,γM,BBMγ:{0,1}kM, and d,k1}
ΓdM ={Γd,γM,BBM and γ:{0,1}kM}
ΓγM ={Γd,γM,BBM, and d1}
Γd,γM ={Γd,γM,BBM}

Finally, let Γfin be the collection of all multiplication quantifiers over finite monoids.

The study of the expressive power of multiplication quantifiers has generally been in relation to logics which restrict the application of multiplication quantifiers to interpretations with a lexicographic order. For this purpose, we introduce a piece of notation: we write lex-(𝔔ΓM)[𝔑] to mean the fragment of the logic (𝔔ΓM)[𝔑] in which all applications of quantifiers from ΓM are to interpretations with a lexicographic order. Likewise, we write fo-(𝔔ΓM)[𝔑] to mean the fragment of the logic (𝔔ΓM)[𝔑] in which all applications of quantifiers from ΓM are to interpretations in which the order is defined by a formula of (FO)[<].

From [1, Corollary 9.1], we know that NC1 is characterized by (FO)[+,×] equipped with finite multiplication quantifiers over lexicographic orders:

Theorem 6 ([1]).

NC1=(lex-(Γfin)[+,×]).

 Remark 7.

In fact, simply adding multiplication quantifiers for some fixed finite, non-solvable monoid to (FO)[+,×] suffices. The definition of “non-solvable monoid” is not needed for our proofs here but, for example, the symmetric group of degree five, denoted S5, is a non-solvable monoid. Therefore, we know that NC1=(lex-(FOΓS5)[+,×]).

In the absence of the arithmetic predicates for addition and multiplication, the logic of multiplication quantifiers over finite monoids only allows us to define regular languages. Specifically, Barrington et al. [1, Theorem 11.1] established that the regular languages are characterized by the logic using such quantifiers with only unary interpretations.

Theorem 8 ([1]).

Reg =(lex-(Γ1fin)[<]).

Later, Lautemann et al. [16, Theorem 5.1] showed that allowing interpretations of higher dimension to the quantifiers does not increase the expressive power when order is the only numerical predicate.

Theorem 9 ([16]).

Reg =(lex-(Γfin)[<]).

In Theorem 14 we show that this is true even in the presence of other numerical predicates and, therefore, Γfin can be replaced by Γ1fin even in Theorem 6. For our intended application, we need this technical result only in the case when the quantifier in Γfin is applied to interpretations where the order defined is lexicographic, and we give the proof in this special case. However, the result holds more generally for cases in which the quantifier in Γfin is applied to interpretations where the order is defined by a (FO)[<]-formula, and this may be of independent interest so we state the more general Theorem 19.

2.5 Typed Monoids

Our results build on the theory of typed monoids as developed in the work of Krebs and collaborators [2, 3, 14, 13, 6]. We recapitulate the main definitions in Appendix A for ease of reference. In particular, we need the notions of division of typed monoids (Definition 29), syntactic typed monoid (Definition 32), and language recognition with typed monoids (Definition 27). Here, we turn to discussing the relationship between the expressive power of logics with multiplication quantifiers and typed monoids. A formal association is defined through the definition below.

Definition 10.

For a multiplication quantifier Q=ΓγM,B where γ:{0,1}kM, we define the typed quantifier monoid of Q to be the syntactic typed monoid of the language LγM,B.

We also state the formal connection between the languages expressible in a logic with a collection of quantifiers and the corresponding class of typed monoids which recognizes the exact same language. For this we need the notion of the ordered strong block product of a pair of monoids. The definition is technical and can be found in [13] and is also reproduced in the linked full version of this paper. For a set of typed monoids T, we denote by sbpc<(T) its closure under ordered strong block products.

From [13, Theorem 4.14], we then get the following relationship between logics and algebras:333The theorem in [13] is actually more general as it allows for more predicates than just order; however, for our purposes, order alone suffices.

Theorem 11.

Let 𝔔 be a collection of multiplication quantifiers and 𝐐 the set of typed quantifier monoids for quantifiers in 𝔔. Then, (lex-(𝔔1)[<])=(sbpc<(𝐐)).

Recall that the subscript in 𝔔1 means we are restricting the logic to only use the quantifiers in 𝔔 on unary interpretations and the prefix “lex-” means that the quantifiers are only applied to interpretations with a lexicographic order.

3 Simplifying Multiplication Quantifiers

To use Theorem 11 to obtain an algebraic characterization of NC1, we need to characterize this class in a logic with only unary quantifiers. Remark 7 gives us a characterization using first-order quantifiers and quantifiers in ΓS5. Our aim in this section is to show that we can eliminate the use of quantifiers of dimension higher than 1 in this logic. As a first step, we show that we can restrict ourselves to quantifiers ΓδS5,B for a fixed function δ.

Lemma 12.

For every finite monoid M, there exists a function δ:{0,1}|M|M such that for every BM and γ:{0,1}kM, and dimension d, the quantifier Γd,γM,B is definable in (Γd,δM,B)[].

Proof.

Recall that Γd,γM,B is the class of structures 𝔄 in a vocabulary τ with one 2d-ary ordering relation < and k d-ary relations R1,,Rk such that γ(w𝔄)B where w𝔄 is the 𝔄d-length string associated with 𝔄 as in Def. 1.

Let c=|M|, fix an enumeration {m1,,mc} of M. Let δ:{0,1}cM be the function where δ(w)=mi if w is the one-hot encoding of i and δ(w)=z, for some arbitrary zM, otherwise (that is, if the number of occurrences of the symbol 1 in the string w is not exactly one).

For each tM, define the formula ψt(y1,,yd) as follows:

ψt(y1,,yd):=w{0,1}k:γ(w)=t(i[k]:wi=1Ri(y1,,yd)i[k]:wi=0¬Ri(y1,,yd)).

It is easy to see that in a τ-structure 𝔄, we have 𝔄ψt[a1/y1,,ad/yd] if, and only if, the element of w𝔄 indexed by (a1,,ad) is mapped by γ to t. Thus, in particular, the formulas ψm1,,ψmc define disjoint sets that partition the universe of 𝔄. We now claim that the quantifier ΓγM,B is defined by the formula:

ΓδM,Bx1¯x2¯y1yd(x1¯<x2¯,ψm1(y1,,yd),,ψmc(y1,,yd)).

To see this, let I denote the interpretation (<,ψm1,ψmc) so that wI(𝔄) is a string over {0,1}c. By the fact that the sets defined by the formulas ψm1,,ψmc partition |𝔄| it follows that each letter of wI(𝔄) is a vector in {0,1}c with exactly one 1. Indeed, the element of wI(𝔄) indexed by (a1,,ad) is the one-hot encoding of i precisely if 𝔄ψmi[a1/y1,,ad/yd]. Since δ takes the one-hot encoding of i to mi, we have for any a1,,ad|𝔄|

δ((wI(𝔄))(a1,,ad))=mi
iff 𝔄ψi[a1/y1,,ad/yd]
iff γ((w𝔄)(a1,,ad))=mi.

Hence, δ(wI(𝔄))=γ(w𝔄) and therefore I(𝔄)Γd,δM,B if, and only if, 𝔄Γd,γM,B as required.

It then follows from Lemma 12 and the substitution property of quantifiers that the expressive power of (𝔔ΓM)[𝔑] is the same as that of (𝔔ΓδM)[𝔑]. Indeed, any application of a quantifier in ΓM can be replaced by an application of a quantifier in ΓδM of the same dimension. We next aim to show that an application of a quantifier Γd,δM,B with lexicographic order, can be replaced by d nested applications of quantifiers Γ1,δM,B

Lemma 13.

For any collection of quantifiers 𝔔 and numerical predicates 𝔑, any formula of lex-(𝔔ΓδM)[𝔑] is equivalent to one of lex-(𝔔Γ1,δM)[𝔑].

Proof.

Again, fix an enumeration M={m1,,mc} of M and recall that δ:{0,1}cM takes the one-hot encoding of i to mi.

We show, by induction on d that if we have a formula

Φ:=Γd,δM,Bx1,,xd(ϕ1(x1,,xd),,ϕc(x1,,xd))

where each formula ϕi is in lex-(𝔔Γ1,δM)[𝔑], then Φ is equivalent to a formula of lex-(𝔔Γ1,δM)[𝔑]. The result then follows by induction on the structure of the formula.

The base case when d=1 is trivially true. Assume then that we have the formula Φ for d>1 and let I denote the interpretation (ϕ1(x1,,xd),,ϕc(x1,,xd)) of dimension d.

We claim that Φ is equivalent to the formula

Φ1:=Γ1,δM,Bx1(θ1(x1),,θc(x1))

where θi is the formula

θi(xi):=Γd1,δM,mix2,,xd(ϕ1(x1,,xd),,ϕc(x1,,xd)).

Thus, Φ1 is obtained by the application of ΓδM,B to an interpretation

I1:=(θ1(x1),,θc(x1))

where each formula θi is obtained as the application of a quantifier Γd1,δM,s to an interpretation defined by formulas of lex-(𝔔Γ1,δM)[𝔑]. Thus, by the inductive hypothesis, each θi is equivalent to a formula of lex-(𝔔Γ1,δM)[𝔑] and we are done.

It remains to show that Φ and Φ1 are equivalent on any structure 𝔄. To see this, fix an assignment α of values in |𝔄| to the free variables of Φ. We need to show that 𝔄Φ[α] if, and only if, 𝔄Φ1[α]. Let n be the length of 𝔄 and assume without loss of generality that the elements of |𝔄| are {1,,n} in that order.

Now, wI(𝔄,α) denotes the string associated with the structure I(𝔄,α) and note that this is a string of length nd whose elements are indexed by d-tuples of elements of 𝔄 in lexicographic order. By definition, 𝔄Φ[α] precisely if δ(wI(𝔄,α))B. We can also regard I as an interpretation of dimension d1 obtained by treating the variable x1 as a parameter. We write wI(𝔄,α[a/x1]) for the string of length nd1 that results from applying this interpretation with the assignment of a to the variable x1. Since the ordering of d-tuples in wI(𝔄,α) is lexicographic, we have

wI(𝔄,α)=wI(𝔄,α[1/x1])wI(𝔄,α[n/x1])

and thus

δ(wI(𝔄,α))=δ(wI(𝔄,α[1/x1]))δ(wI(𝔄,α[n/x1])).

Now, by definition of θi, we have 𝔄θi[α[a/x1]] if, and only if, δ(wI(𝔄,α[a/x1]))=mi. Thus, for each a|𝔄|, there is exactly one i such that 𝔄θi[α[a/x1]]. Thus, wI1(𝔄,α) is the string of length n whose ath element is the one-hot encoding of i exactly when δ(wI(𝔄,α[a/x1]))=mi. In other words, δ((wI1(𝔄,α))a)=δ(wI(𝔄,α[a/x1])). Thus,

𝔄Φ[α]
iff δ(wI(𝔄,α))B
iff δ(wI(𝔄,α[1/x1]))δ(wI(𝔄,α[n/x1]))B
iff δ((wI1(𝔄,α))1)δ((wI1(𝔄,α))n)B
iff δ(wI1(𝔄,α))B
iff 𝔄Φ1[α].

Now we are ready to state the main theorem of this section.

Theorem 14.

For every finite monoid M, there exists a function δ:{0,1}|M|M such that for any collection of quantifiers 𝔔 and any set 𝔑 of numerical predicates, every formula of lex-(𝔔ΓM)[𝔑] is equivalent to a formula of lex-(𝔔Γ1,δM)[𝔑].

Proof.

Let ϕ be any formula of lex-(𝔔ΓM)[𝔑]. By Lemma 12 we can replace all occurrences of quantifiers in ΓγM,B by their definitions using quantifiers in ΓδM,B to get a formula ϕ of lex-(𝔔ΓδM)[𝔑] equivalent to ϕ. Finally, by Lemma 13, there is a formula of lex-(𝔔Γ1,δM)[𝔑] equivalent to ϕ.

Note that for a finite monoid M, while ΓM and Γ1M are infinite sets, Γ1,δM is a finite set. Therefore, this gives us a logic characterizing NC1 which not only uses unary quantifiers but also only has a finite number of quantifiers:

Corollary 15.

There exists a δ:{0,1}kS5 such that NC1=(lex-(FOΓ1,δS5)[+,×]).

This simplifies our construction of an algebra capturing NC1.

Another consequence of Theorem 14 is Theorem 9 ([16, Theorem 5.1]). Thus, we get a proof of Theorem 9 which is purely logical, unlike the original proof which relies on the use of finite automata. Furthermore, we also resolve a question left open in Lautemann et al. [16]:

Corollary 16.

(lex-(Γfin)[+,×])=(lex-(Γ1fin)[+,×])

4 The Algebraic Characterization

Now that we have an extension of first-order logic capturing NC1 using only unary quantifiers, we are able to apply Theorem 11 to construct an algebra for it. We just need to obtain an equivalent logic using only the numerical predicate < without introducing quantifiers of higher dimension.

To do this, we follow the construction of an algebra for TC0. The majority quantifier Maj is the collection of strings over the alphabet {0,1} in which at least half of the symbols are 1. The square quantifier Sq is the collection of strings over the alphabet {0,1} in which the number of 1s is a positive square number (i.e., an element of 𝕊). In the logics we define below, we always use these quantifiers only with unary interpretations.

The following lemma displays some known results about the expressiveness of these quantifiers:

Lemma 17.
  1. (i)

    Maj is definable in lex-(Γfin)[+,×]. (cf. [1])

  2. (ii)

    The quantifiers in FO are definable in (Maj)[<]. ([15, Theorem 3.2])

  3. (iii)

    The numerical predicate + is definable in (Maj)[<]. ([15, Theorem 4.1])

  4. (iv)

    The numerical predicate × is definable in ({Maj,Sq})[<] and Sq is definable in (Maj)[<, +,×]. (cf. [18, Theorem 2.3.f] and [14, Section 2.3])

Bringing everything together, we get the following algebraic characterization of NC1:

Theorem 18.
NC1=(sbpc<({(,+,±1),(,𝕊,{0,1}),(S5,(S5),S5)})).

Proof.

Let δ:{0,1}cS5 be as defined in Lemma 12. It is easy to see that the typed quantifier monoid for Maj is (,+,±1), for Sq is (,𝕊,{0,1}), and for Γ1,δS5,s is (S5,{s},S5) for any sS5.

By Corollary 15, we have that NC1=(lex-(FOΓ1,δS5)[+,×]). Lemma 17 (ii)–(iv) allow us to define FO, +, and × in ({Maj,Sq})[<] and (i) and (iv) allow us to define Maj and Sq in lex-(FOΓ1,δS5)[+,×]. Therefore, NC1=(lex-(Γ1,δS5{Maj,Sq})[<]). Moreover, we may restrict this to just quantifiers ΓS5,A with A a singleton set, as for any AS5, the quantifier Γ1,δS5,A may be easily defined using Boolean combinations of quantifiers Γ1,δS5,s since S5 is finite. Theorem 11 then gives us the algebraic characterization of

NC1 =(sbpc<({(,+,±1),(,𝕊,{0,1})}{(S5,s,S5){s}(S5)})).

Because (S5,s,S5)(S5,(S5),S5) for all {s}(S5), we lose no expressive power by replacing all elements of the form (S5,s,S5) with (S5,(S5),S5). We neither gain expressive power because ((S5,(S5),S5))RegNC1. Therefore, we have our final characterization:

NC1=(sbpc<({(,+,±1),(,𝕊,{0,1}),(S5,(S5),S5)})).

5 For-Programs and Non-Lexicographic Interpretations

The proof of Lemma 13 relies crucially on the fact that we only allow lexicographic ordering of tuples in our interpretations. This is sufficient for the algebraic characterization in Section 4. However, in this section, we prove a more general version: we prove that even when interpretations are allowed to use any first-order definable ordering of tuples, we can replace multiplication quantifiers of higher arity by unary quantifiers. To do so, we rely on the work of Bojańczyk et al. [5], which characterizes first-order definable orders in terms of d-enumerators and for-programs which we review below. These are combined with techniques introduced in the proof of Theorem 14 to prove the following:

Theorem 19.

Let 𝔔 be any collection of quantifiers and 𝔑 any collection of numerical predicates. Then, (fo-(𝔔Γfin)[𝔑])=(lex-(𝔔Γ1fin)[𝔑{<}]).

As we noted in Section 2, we always assume that the collection 𝔑 of numerical predicates contains the order relation <, except in the case where it is empty. Thus, the statement of the theorem notes that in translating our formulas to use unary quantifiers, we may need to introduce the order symbol if 𝔑=. From the theorem, we then get the immediate corollaries.

Corollary 20.

NC1=(fo-(Γfin)[+,×]).

Corollary 21.

Reg =(fo-(Γfin)[<]).

Before going into the proof, we first introduce for-programs. As the definition of d-enumerators and for-programs in general are relatively intuitive, we keep the definition brief and a more detailed treatment may be found in [5, 4]. A first-order d-enumerator is a for-program which takes a structure 𝔄=(A,<,τ𝔄) over vocabulary τ, as input and outputs an enumeration of all the d-tuples of A. The program consists of a nesting of for-loops with a body:

(1)

Here the ith loop iterates the variable yi over the domain A and pi determines whether the iteration is in increasing order (pi=first..last) or decreasing order (pi=last..first), according to the order <.

The body consists of a sequence of if-statements

(2)

Here θ1,,θl are (FO)[<]-formulas over the vocabulary τ, specifying mutually exlusive conditions, so that for each assignment of values to the variables y1,,yd at most one of them is satisfied. Note that which formula is satisfied may depend on the assignment α of values to free variables other than y1,,yd. We only consider programs which produce, over the course of the iteration, all tuples in Ad, with each tuple being output exactly once. For a string 𝔄 and assignment α, we write P(𝔄,α) to mean the output of the program P when run on the string 𝔄 with assignment α.

From Bojańczyk et al. [5, Theorem 12], we know the following fact:

Lemma 22 ([5]).

For every (FO)[<] definable linear order on d-tuples, defined by a formula ϕ< over a vocabulary τ of unary predicates, there exists a first-order d-enumerator P such that for every τ-structure 𝔄=(A,<,τ𝔄), P on input 𝔄 enumerates the elements of Ad in the order defined by ϕ<.

We now use this to prove Theorem 19. We first use Lemma 22 to transform a formula of (𝔔Γfin)[𝔑] into one in which all applications of quantifiers in Γfin use interpretations using a generalized lexicographic order, and then use the techniques introduced in Section 3 to transform this to a formula using only unary quantifiers.

Definition 23.

Given a set A with a linear order < on its elements and d, a linear order on Ad is called a generalized lexicographic order if there is a sequence dir{l,r}d such that ab if, and only if, for the least i for which aibi, we have ai<bi if diri=l and ai>bi if diri=r.

Note that the standard lexicographic order is a generalized lexicographic order with dir=ld.

Proof of Theorem 19.

Let 𝔔 be any collection of quantifiers and 𝔑 any collection of numerical predicates. Let M={m1,,mc} be a finite monoid, BM, γ:{0,1}kM, and ϕ< a (FO)[<]-formula over a vocabulary τ which defines a linear ordering on d-tuples. Let ϕ1,,ϕk be fo-(𝔔Γfin)[𝔑]-formulas over τ giving an interpretation I=(ϕ<,ϕ1,,ϕk) of dimension d. We want to show that for

Φ:=Γd,γM,Bx¯y¯(ϕ<(x¯),ϕ1(y¯),,ϕk(y¯))[α],

there is an equivalent formula in lex-(𝔔Γ1fin)[𝔑{<}]. We first prove by induction on the nesting of multiplication quantifiers that Φ is equivalent to a formula in which all applications of quantifiers in Γfin are to interpretations in which the order defined is a generalized lexicographic order. Note that formulas (e.g., ϕ<) defining the order in interpretations are in (FO)[<] and, thus, by assumption do not have nested multiplication quantifiers.

For the base case, say we have a formula which uses no multiplication quantifiers; then, we are done as this is a formula of lex-(𝔔Γ1fin)[𝔑{<}]. For the inductive step, assume that ϕ1,,ϕk are formulas of fo-(𝔔Γ1fin)[𝔑{<}] in which all orders are generalized lexicographical orders.

By Lemma 22, we have a first-order d-enumerator P which enumerates the elements of Ad in the order defined by ϕ< on any τ-structure 𝔄. P has the form specified in (1) and (2). Recall that in this for-program we have l if-statements. Now, let Φ be the formula

Φ:=Γd,δM,Bx¯y1yd(ξ<(x¯), ξ1(y1,,yd),,ξc(y1,,yd),
ξc+1(y1,,yd),,ξ2c(y1,,yd),
,
ξ(l1)c+1(y1,,yd),,ξlc(y1,,yd))

where δ:{0,1}lcM is such that for a word w=w1wlc{0,1}lc, δ(w)=mi if there exists a j where 0j<l such that the substring wjc+1w(j+1)c is equal to the one-hot encoding of i and all other characters in w are 0. In other words, partitioning w into l consecutive c-length substrings, we map w to mi if one of these substrings is the one-hot encoding of i and all others are simply strings of 0s. All other elements of the domain are mapped to the identity of M. Moreover, for 0j<l and 1jc, ξjc+j(y1,,yd) is the formula θj(y1,,yd)ψmj(yi1j,,yidj) where i1j,,idj are defined as they are in the for-program P, and ψmj is as defined in Lemma 12; therefore, ξjc+j is satisfied if both θj(y1,,yd) is and the element of M indexed by (yi1j,,yidj) equals mj. Lastly, ξ< is the generalized lexicographic order given by the vector dir{l,r}d with diri=l if pi=first..last and diri=r if pd=last..first. We now prove that 𝔄Γd,γM,Bx¯y¯(ϕ<(x¯),ϕ1(y¯),,ϕk(y¯))[α] iff 𝔄Φ[α].

Let 1M denote the identity of M and f𝔄,α:Ad{ϵ}M be the function defined by

f𝔄,α(a1,,ad)=γ(ϕ1𝔄,α[a1,,ad],,ϕk𝔄,α[a1,,ad])

for (a1,,ad)Ad and f𝔄,α(ϵ)=1M. and let g𝔄,α:AdAd{ϵ} be the function defined by the body of the for-program P where if no output is produced, g𝔄,α(a1,,ad)=0d; thus,

g𝔄,α(a1,,ad)={(ai1j,,aidj)if j such that 𝔄θj(a1,,ad)ϵo.w.

Let f𝔄,α:(Ad)M and g𝔄,α:(Ad)(Ad) be the monoid homomorphisms induced by the functions f𝔄,α and g𝔄,α, respectively, in the natural way.

Let 𝔄 be an arbitrary τ-structure and α an arbitrary variable assignment with assignments for at least all free variables in each ϕi with the exception of y¯i. By definition of multiplication quantifiers, we get that 𝔄Γd,γM,Bx¯y¯(ϕ<(x¯),ϕ1(y¯),,ϕk(y¯))[α] iff γ(wI(𝔄,α))B.

By construction of f𝔄,α and because P provides the order by which Γd,γM,B is evaluated, it is easy to see that γ(wI(𝔄,α))B iff f𝔄,α(P(𝔄,α))B.

Let t1,,t|A|d denote the ordering of d-tuples of A as defined by ξ<. Because the output of P is an enumeration of Ad in the ordering defined by ϕ<, and g𝔄,α outputs the empty string ϵ during an iteration of its for-loops only when P outputs nothing at that iteration, it follows that

f𝔄,α(g𝔄,α(t1tAd))=f𝔄,α(P(𝔄,α))

and, thus, f𝔄,α(g𝔄,α(t1tAd))B iff f𝔄,α(P(𝔄,α))B.

Let I=(ξ<,ξ1,,ξlc). We now want to show that

δ(wI(𝔄,α))B iff f𝔄,α(g𝔄,α(t1tAd))B.

To do so, we prove that δ((wI(𝔄,α))a)=f𝔄,α(g𝔄,α(ta)) for every 0a|A|d. Let a be arbitrary. Then, u=(wI(𝔄,α))a is either 0lc or a one-hot encoding of some b[lc]. If u=0lc, then δ(u)=1M and no θj is satisfied. Thus, g𝔄,α(ta)=ϵ and f𝔄,α(ϵ)=1M by construction. If u is a one-hot encoding of some b[lc], then some θj is satisfied and,

δ(u)=m=γ(ϕ1𝔄,α[ai1j,,aidj],,ϕk𝔄,α[ai1j,,aidj])=f𝔄,α(ai1j,,aidj)

by definition of δ and the construction of each ξi. By the construction of g𝔄,α and f𝔄,α, we also get immediately that g𝔄,α(ta)=(ai1j,,aidj) and, thus, f𝔄,α(g𝔄,α(ta))=m. Thus, δ(wI(𝔄,α))B iff f𝔄,α(g𝔄,α(t1t|A|d))B.

Then, by definition, we have that 𝔄Φ[α] iff δ(wI(𝔄,α))B.

Therefore, all together, we have that

𝔄Γd,γM,Bx¯y¯(ϕ<(x¯),ϕ1(y¯),,ϕk(y¯))[α]
iff γ(wI(𝔄,α))B
iff f𝔄,α(P(𝔄,α))B
iff f𝔄,α(g𝔄,α(t1tAd))B
iff δ(wI(𝔄,α))B
iff 𝔄Φ′′[α].

This concludes the inductive step. Therefore, for any formula Φ, we have an equivalent formula Φ which uses only uses multiplication quantifiers using a generalized lexicographic order.

To see that we can construct a formula equivalent to Φ using only unary quantifiers, we use the technique used in the proof of Lemma 13 with a minor modification to account for generalized lexicographic order. In the proof of Lemma 13, a quantifier Γd,γM,B of dimension d is replaced by a sequence of d nested unary quantifiers over the same monoid M. To account for the order ξ<, which defines a generalized lexicographic order with dir{l,r,}d, we define the ith quantifier in the sequence as before if diri=l and replace the monoid (M,) with (M,R) where mRm:=mm for all m,mM if diri=r. The proof follows exactly along the lines of the proof of Lemma 13.

All together, we have an equivalent formula to Φ, and, thus, Φ, which only uses unary quantifiers, completing the proof.

6 Conclusion

In this work, we constructed a class of typed monoids exactly recognizing NC1. To do so, we proved results regarding the expressive power of logics with quantifiers defined over finite monoids. Specifically, we established that the expressive power is not changed by restricting the dimension of the interpretations on which the quantifiers act, regardless of which numerical predicates are available.

Therefore, we were able to provide a logic characterizing NC1 which only uses unary quantifiers and use this logic to construct an algebraic characterization of NC1. This result marks the second circuit complexity class to be characterized in a such a way, with the first being TC0 [14], and provides a decomposition theorem in the style of Krohn-Rhodes for NC1.

An interesting future direction would be to construct similar algebraic characterization of other complexity classes beyond NC1. It seems this would require the development of new algebraic tools. In particular, the block product is a key tool used to characterize first-order quantification and more generally quantification over interpretations of dimension one. To extend the work to other complexity classes, it would be worthwhile investigating other product constructions that might similarly relate to quantification on interpretations of higher dimension as well as higher-order quantifiers.

Moreover, we extended the work of Barrington et al. [1] and Lautemann et al. [16] by studying the expressive power of multiplication quantifiers when applied to interpretations using other than the standard lexicographic order. We showed that over strings the expressive power of logics equipped with finite multiplication quantifiers is not changed by loosening the restriction to permitting any first-order definable linear order. A natural next step would be to investigate the expressive power when other linear orders are permitted. For example, by extending the Domination Lemma of Bojańczyk et al. [5] to monadic second-order logic (MSO[<]), one would be able to show that permitting the application of multiplication quantifiers to interpretations with an MSO[<]-definable order does not change the expressive power. This would result in the interesting consequence that

Reg=(lex-(Γ1fin)[<])=((Γfin)[<]).

References

  • [1] David A Mix Barrington, Neil Immerman, and Howard Straubing. On uniformity within NC1. Journal of Computer and System Sciences, 41(3):274–306, 1990.
  • [2] Christoph Behle, Andreas Krebs, and Mark Mercer. Linear circuits, two-variable logic and weakly blocked monoids. In International Symposium on Mathematical Foundations of Computer Science, pages 147–158. Springer, 2007. doi:10.1007/978-3-540-74456-6_15.
  • [3] Christoph Behle, Andreas Krebs, and Stephanie Reifferscheid. Typed monoids–An Eilenberg-like theorem for non regular languages. In Algebraic Informatics: 4th International Conference, CAI 2011, Linz, Austria, June 21-24, 2011. Proceedings 4, pages 97–114. Springer, 2011. doi:10.1007/978-3-642-21493-6_6.
  • [4] Mikolaj Bojańczyk. Transducers of polynomial growth. In Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 1–27, 2022.
  • [5] Mikolaj Bojańczyk, Sandra Kiefer, and Nathan Lhote. String-to-string interpretations with polynomial-size output. In 46th International Colloquium on Automata, Languages, and Programming (ICALP 2019), volume 132, page 106. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.ICALP.2019.106.
  • [6] Antonio Cano, Jesus Cantero, and Ana Martínez-Pastor. A positive extension of Eilenberg’s variety theorem for non-regular languages. Applicable Algebra in Engineering, Communication and Computing, 32(5):553–573, 2021. doi:10.1007/S00200-020-00414-2.
  • [7] Stephen A Cook. Characterizations of Pushdown Machines in Terms of Time-Bounded Computers. Journal of the ACM (JACM), 18(1):4–18, 1971. doi:10.1145/321623.321625.
  • [8] Anuj Dawar and Aidan T Evans. Characterizing NC1 with typed monoids. arXiv preprint arXiv:2508.11019, 2025. doi:10.48550/arXiv.2508.11019.
  • [9] H-D. Ebbinghaus and J. Flum. Finite Model Theory. Springer, 2nd edition, 1999.
  • [10] Heinz-Dieter Ebbinghaus. Extended logics: The general framework. In Jon Barwise and Solomon Feferman, editors, Model-Theoretic Logics, pages 25–76. Springer-Verlag, New York, 1985.
  • [11] Samuel Eilenberg. Automata, Languages, and Machines (Vol. B). Academic Press, 1976.
  • [12] Fred C Hennie. One-tape, off-line turing machine computations. Information and Control, 8(6):553–578, 1965. doi:10.1016/S0019-9958(65)90399-2.
  • [13] Andreas Krebs. Typed Semigroups, Majority Logic, and Threshold Circuits. PhD thesis, Tübingen, Univ., Diss., 2008, 2008.
  • [14] Andreas Krebs, Klaus-Jörn Lange, and Stephanie Reifferscheid. Characterizing TC0 in terms of infinite groups. Theory of Computing Systems, 40(4):303–325, 2007. doi:10.1007/S00224-006-1310-2.
  • [15] Klaus-Jörn Lange. Some results on majority quantifiers over words. In Proceedings. 19th IEEE Annual Conference on Computational Complexity, 2004., pages 123–129. IEEE, 2004. doi:10.1109/CCC.2004.1313817.
  • [16] Clemens Lautemann, Pierre McKenzie, Thomas Schwentick, and Heribert Vollmer. The descriptive complexity approach to LOGCFL. Journal of Computer and System Sciences, 62(4):629–652, 2001. doi:10.1006/JCSS.2000.1742.
  • [17] John L Rhodes. Applications of Automata Theory and Algebra: Via the Mathematical Theory of Complexity to Biology, Physics, Psychology, Philosophy, and Games. World Scientific, 2010.
  • [18] Nicole Schweikardt. On the Expressive Power of First-order Logic with Built in Predicates. Logos-Verlag, 2002.
  • [19] Howard Straubing. Finite Automata, Formal Logic, and Circuit Complexity. Birkhäuser, 1994.
  • [20] Heribert Vollmer. Introduction to Circuit Complexity: A Uniform Approach. Springer Science & Business Media, 1999.

Appendix A Typed Monoids

In this section, we review the definitions and results from [3, 13] on typed monoids, their relationship to languages and corresponding characterizations of complexity classes.

A typed monoid is a monoid equipped with a collection of types, which form a Boolean algebra, and a set of units. We only deal with concrete Boolean algebras, given as collections of subsets of a fixed universe.

Definition 24 (Boolean Algebra).

A Boolean algebra over a set S is a set B(S) such that ,SB and B is closed under union, intersection, and complementation. If B is finite, we call it a finite Boolean algebra.

We call and S the trivial elements (or in some contexts, the trivial types) of B.

A homomorphism between Boolean algebras is defined as standard. That is, if B1 and B2 are Boolean algebras over sets S and T, respectively, then we call h:B1B2 a homomorphism if h()=, h(S)=T, and for all s1,s2B1, h(s1s2)=h(s1)h(s2), h(s1s2)=h(s1)h(s2), and h(sC)=(h(s))C. Now we are ready to define typed monoids.

Definition 25 (Typed Monoid).

Let M be a monoid, G a Boolean algebra over M, and E a finite subset of M. We call the tuple T=(M,G,E) a typed monoid over M and the elements of G types and the elements of E units. We call M the base monoid of T. If M is a group, then we may also call T a typed group.

When G={,A,MA,M} for some AM, we abbreviate T as (M,A,E), i.e., the Boolean algebra is signified by an element, or elements, which generates it – in this case, A.

We say that a typed monoid (M,G,E) is finite if M is.

We also need a notion of morphism between typed monoids.

Definition 26.

A typed monoid homomorphism h from (S,G,E) to (T,H,F) is a triple (h1,h2,h3) where h1:ST is a monoid homomorphism, h2:GH is a homomorphism of Boolean algebras, and h3:EF is a mapping of sets such that the following conditions hold:

  1. (i)

    For all AG, h1(A)=h2(A)h1(S).

  2. (ii)

    For all eE, h1(e)=h3(e).

Note that h3 is redundant in the definition as it is completely determined by h1. We retain it as part of the definition for consistency with [3, 13].

To motivate the definitions, recall that a language LΣ is recognized by a monoid M if there is a homomorphism h:ΣM and a set BM such that L=h1(B). When the monoid M is infinite, the languages recognized form a rather rich collection and we aim to restrict this in two ways. First, B cannot be an arbitrary set but must be an element of the algebra of types. Secondly, the homomorphism h must map the letters in Σ to units of the typed monoid. Formally, we have the following definition.

Definition 27.

A typed monoid T=(M,G,E) recognizes a language LΣ if there exists a typed monoid homomorphism from (Σ,L,Σ) to T. We let (T) denote the set of languages recognized by T.

When the base monoid of a typed monoid is finite, we recover the classical definition of a recognition. Hence, the languages recognized by finite typed monoids are necessarily regular.

Proposition 28.

If T is a finite typed monoid, then (T)Reg.

We can now state the definitions of the key relationships between typed monoids.

Definition 29.

Let (S,G,E) and (T,H,F) be typed monoids.

  • A typed monoid homomorphism h=(h1,h2,h3):(S,G,E)(T,H,F) is injective (surjective, or bijective) if all of h1, h2, and h3 are.

  • (S,G,E) is a typed submonoid (or, simply, “submonoid” when context is obvious) of (T,H,F), denoted (S,G,E)(T,H,F), if there exists an injective typed monoid homomorphism h:(S,G,E)(T,H,F).

  • (S,G,E) divides (T,H,F), denoted (S,G,E)(T,H,F), if there exists a surjective typed monoid homomorphism from a submonoid of (T,H,F) to (S,G,E).

These have the expected properties.

Proposition 30 ([3]).

Let T1, T2, and T3 be typed monoids.

  • Typed monoid homomorphisms are closed under composition.

  • Division is transitive: if T1T2 and T2T3, then T1T3.

  • If T1T2, then (T1)(T2).

We can formulate the notion of the syntactic typed monoid of a language L as an extension of the syntactic monoid of L with a minimal collection of types and units necessary.

Definition 31.

Let T=(M,G,E) be a typed monoid. A congruence over M is a typed congruence over T if for every AG and s1,s2M, if s1s2 and s1A, then s2A.

For a typed congruence over T, let

A/ ={[x]xA} where AM
G/ ={A/AG}
E/ ={[x]xE}.

Then, T/:=(M/,G/,E/) is the typed quotient monoid of T by .

Let T denote the typed congruence on T such that for s1,s2S, s1Ts2 if, and only if, for all x,yS and AG, xs1yA if, and only if, xs2yA. We then refer to the quotient monoid T/T as the minimal reduced monoid of T.

Recall that L is the syntactic congruence of L, defined in Section 2.2.

Definition 32.

For a language LΣ, the syntactic typed monoid of L, denoted syn(L), is the typed monoid (Σ,L,Σ)/L.

We also get the canonical typed monoid homomorphism, ηL:(Σ,L,Σ)syn(L) induced by the syntactic homomorphism of L.

It also turns out that we can give a purely structural characterization of those typed monoids that are syntactic monoids.

Proposition 33 ([13]).

A typed monoid is the syntactic monoid of a language if, and only if, it is reduced, generated by its units, and has four or two types.

In case it has just two types, then it only recognizes the empty language or the language of all strings.