Languages of Words of Low Automatic Complexity Are Hard to Compute
Abstract
The automatic complexity of a finite word (string) is an analogue for finite automata of Sipser’s distinguishing complexity (1983) and was introduced by Shallit and Wang (2001). For a finite alphabet of at least two elements, we consider the non-deterministic automatic complexity given by exactly – yet not necessarily uniquely – accepting automata: a word has exact non-deterministic automatic complexity if there exists a non-deterministic automaton of states which accepts while rejecting every other word of the same length as , and no automaton of fewer states has this property. Importantly, and in contrast to the classical notion, the witnessing automaton may have multiple paths of computation accepting . We denote this measure of complexity by , and study a class of languages of low -complexity defined as , which is parameterised by rationals (generalising a class of sets first studied by Kjos-Hanssen). We show that for every , this class is neither context-free nor recognisable by certain Boolean circuits. In the process, we answer an open question of Kjos-Hanssen quantifying the complexity of in terms of Boolean circuits, and also prove the Shannon effect for .
Keywords and phrases:
Automatic complexity, automata theory, formal languages, Boolean circuits, Shannon effectFunding:
Bjørn Kjos-Hanssen: This work was partially supported by a grant from the Simons Foundation (#704836 to Bjørn Kjos-Hanssen).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Grammars and context-free languages ; Theory of computation Regular languagesAcknowledgements:
Parts of this work have appeared in the first author’s Bachelor’s thesis submitted to the National University of Singapore.Editors:
C. Aiswarya, Ruta Mehta, and Subhajit RoySeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Automatic complexity is a notion of complexity of finite words (strings) determined by witnessing automata, first introduced by Shallit and Wang in [35] as a Turing computable alternative to Kolmogorov complexity. It is an analogue for finite automata of Sipser’s distinguishing complexity [37]. Classically, the automatic complexity of a word over a finite alphabet refers to the cardinality – counted in number of states333A version of automatic complexity counting the number of transitions has been studied by Serna [32]; see also Shallit and Breitbart [34]. – of the smallest deterministic finite automaton which accepts and rejects every other word of the same length as [35]. The notion as well as variations of it have proven interesting for multiple reasons. For instance, since automatic complexity is Turing computable, it can be used in the study of computational complexity: the computational complexity of sets of binary words of low automatic complexity has helped prove missing relationships in the Complexity Zoo [1] (see [20, Theorem 39] for an example). Further, the detailed investigation of words in terms of their automatic complexity [17, 16] has shed light on computable notions of randomness, which are unavailable from the viewpoint of Kolmogorov complexity [21, 40, 28].
In this paper, we study a weakening of a variation of automatic complexity due to Hyde [12], and show that it generates classes of words too complicated to be captured by pushdown automata, nor by certain classes of constant-depth Boolean circuits – both of which are notably computationally more powerful than finite automata. This provides further evidence towards the conjecture that automatic complexity is hard to compute (see e.g. [15]).
1.1 Technical Background
Fix a finite alphabet of at least two elements. In usual Kleene notation, we denote by the set of all finite words of elements from . We denote the empty string by , and the set of non-empty words by . By an automaton we always mean a non-deterministic finite automaton, unless otherwise stated. We do not allow -transitions.
Definition 1.
Let . An automaton exactly accepts if accepts , and whenever both and then rejects .
The pumping lemma shows that this definition is maximally restrictive on the number of words accepted by the witnessing automaton; trying to strengthen the definition by asking for outright uniqueness of the accepted word only leads to trivialities.
Definition 2.
The automatic complexity of is given by
For a reference on contemporary automatic complexity, see e.g. the recent [19]. The subscript stands for “deterministic”, indicating that is determined by the smallest DFA. By definition, it is clear that is well-defined, and even computable (for every , there are only finitely many DFAs, and each can be simulated in finite time). However – similar to the unnatural properties of plain compared to prefix-free Kolmogorov complexity – the measure has the following properties, which may render it undesirable as a natural measure of complexity of words. These were first described in [13]:
-
1.
is not invariant under natural transformations on strings, such as reversals. For instance, Hyde and Kjos-Hanssen have verified computationally that .
-
2.
The DFA witnessing often appears unnatural, in the sense that determinism requires to be total: in many cases, an automaton non-“deterministically” witnessing needs to be augmented by an extra state to which every non-accepting path leads.
To overcome these obstacles, Hyde introduced automatic complexity witnessed by the smallest non-deterministic finite automaton (NFA) [12].
Definition 3.
Let . An automaton uniquely accepts if exactly accepts and there is only one path in which accepts .
Clearly, every DFA which exactly accepts also uniquely accepts . For NFAs, however, this is not the case. An NFA uniquely accepts if and only if the NFA exactly accepts and the NFA is unambiguous on . Though Hyde [12] required the NFA to be unambiguous on , she noted that the complexity based on NFAs is much more flexible and many words have a smaller complexity in her version than if only DFAs are considered. This led her to:
Definition 4.
Let . The unique non-deterministic automatic complexity of is given by
Remark 5.
We note that this notion is usually called “non-deterministic automatic complexity”. As we study an ostensibly weaker notion below, we emphasise the additional strength of the notion defined in Definition 4 by adding the attribute “unique”.
While it is well-known that NFAs and DFAs recognise exactly the same class of languages – the regular languages (see e.g. [33, 14] for a comprehensive background on automata theory) – the respective notions of automatic complexity differ. The following properties of have been derived by Hyde and Kjos-Hanssen alongside co-authors, and others. Let denote both the minimal automaton witnessing and the directed graph representing it.
Building upon Hyde’s work from [12], in the present paper we study more closely the notion of automatic complexity induced by a weaker class of machines: the class of exactly but not necessarily uniquely accepting automata.
Definition 7.
Let . The non-deterministic automatic complexity of is
Since every NFA which uniquely accepts also exactly accepts , we have . Whether equality holds is still open (Question 48). In [20], Kjos-Hanssen investigated the complexity of certain languages induced by in terms of more complicated models of computation, e.g. pushdown automata. In particular, he showed:
Theorem 8.
-
1.
is not context-free.
-
2.
cannot be recognised by constant-depth circuits with semi-unbounded fan-in, using Boolean - and -gates.
Results of this type motivate this paper: we investigate the impact of exactness on the behaviour of automatic complexity, which we describe via theorems akin to Theorem 8.
1.2 Our Theorems and the Structure of This Paper
We investigate the complexity of as a function in terms of the complexity of the language of -complicated words. Explicitly, we investigate the following class of languages first defined444In [20, Def. 17], Kjos-Hanssen has considered the complementary decision problem, given by . We note that our class is more general. by Kjos-Hanssen [20], and prove results on their complexities.
Definition 9.
For , define
In Section 2, we isolate complexity results on the -sets which follow from a fine-grained investigation of its elements. For instance, in Proposition 17 we isolate an upper bound of the Kolmogorov complexity of words in . This gives a small-to-large result – a theorem about elements which provides information about sets – in the form of Corollary 19, which shows that the cardinality of is in . This observation also yields a proof of the Shannon effect for :
Theorem 22.
Let . For almost every we have
In Section 3, we show that pushdown automata are not powerful enough to characterise -complicated words, which the following theorems show.
Theorem 34.
For every , the language is not context-free.
Theorem 35.
For every , the language is not context-free.
In Section 4, we consider the complexity of in terms of Boolean circuits. To do so, we use two classical types of Boolean circuits – , defined in Section 4.1, and , defined in Section 4.2 – and apply a counting argument to prove:
Theorem 39.
Let and . Then and .
Theorem 46.
Let and for some prime . Then and .
As a special case, we show that is not -recognisable, answering a question of Kjos-Hanssen [20, p. 351]. Omitted proofs as well as a partial generalisation to alphabets of non-prime cardinality can be found in the related full version of this paper [4].
In Section 5, we conclude this paper by giving a few open questions.
2 Combinatorial Properties of
In this section, we derive combinatorial properties of which are needed in the sequel, particularly to prove Theorem 34. Fix . Firstly, we show that satisfies a strong closure property: any word can be extended to some word for which .
Proposition 10.
Suppose . If then .
Proof.
Let and suppose . Now build an NFA as follows: there are states , with being both the start and unique accepting state. Transitions are given by for and . It is readily seen that this automaton witnesses , as needed. While the previous proposition employs repetition of words to push the non-deterministic automatic complexity down, in the following lemma we show that spacing out bits of information achieves the same effect. W.l.o.g., assume . For notation, if then define the (Hamming) weight of by .
Lemma 11 (Gap Lemma).
For every there exists such that if and then .
Note that, in the statement above, depends on , which we fixed at the beginning of this section. Before we give the proof, we need the following number-theoretical lemma, called Bertrand’s postulate (for a proof see e.g. [29]). Let denote the set of prime numbers.
Lemma 12 (Bertrand’s postulate).
If then is non-empty.
Proof of Lemma 11.
Fix . For each , we define a finite sequence of primes by as follows: put and
Since , Bertrand’s Postulate shows that this is well-defined. Now, let
Bertrand’s postulate alongside a short calculation implies , and so
which proves that . This also shows that, in the limit, . Similarly, and hence, again in the limit, . For with , write for some . Given our fixed , we now choose sufficiently large so that we may assume the following (write ):
-
for .
-
for .
Now, write where . Since we must have ; otherwise, , a contradiction. Hence, consider the automaton in Figure 1.
We show that is as required. First, by definition, accepts . To show exactness, suppose and that accepts . If , assume w.l.o.g. that traverses the -loop fewer than -many times. Since , must go through the remaining loops more often to make up for the -deficit. However, the equation has no integer solution, since divides the right-hand side yet not . Thus, cannot accept , as needed. Finally, recall that . Thus, for large enough, inspection of the automaton shows that for every , and so . As a consequence of our proof, we also obtain the following (we thank the anonymous reviewer for pointing this out).
Corollary 13.
For every and every there exists such that if and then .
Our next result studies the small-scale structure of words in . We say is a factor of if there exist for which ; we write . If or then is a proper factor of ; we write . Call a non-empty word a square if there exists for which ; we write .
Proposition 14.
Let and . There exists a proper factor of length for which there are with and . Further, .
Note that if then the conclusion of Proposition 14 yields a square. To prove the general case of Proposition 14, we again need a classical auxiliary result, in this case due to Lyndon and Schützenberger [27].
Theorem 15 (The First Lyndon-Schützenberger-Theorem).
Suppose . Then if and only if there exists and for which and .
Note that the First Lyndon-Schützenberger-Theorem characterises bordered words555For more on bordered words, see e.g. [30]. A more general characterisation is given by the Second Lyndon-Schützenberger-Theorem 18. – those which have a non-trivial decomposition of the form – as those generated by powers of a common word . This will be important in the proof of Proposition 14. We also require the following combinatorial lemma.
Lemma 16.
Suppose for some . Assume , and let be the witnessing automaton with accepting run . Then
Proof.
Consider the list of states . Since , we have . In particular, . Hence, by the pigeonhole principle, there exist at least indices at which some state is visited a third time. We now prove Proposition 14. Call triples as provided by Lemma 16 loop triples (for ). Before we give the proof of Proposition 14, we introduce the following notation: write . For instance, if , then .
Proof of Proposition 14.
Let be as assumed, and suppose is the run of which accepts . Observe that if is a loop triple for (by Lemma 16 there are at least many), then the witnessing NFA has completed at least two loops by the time it has read the word . There are two cases.
-
1.
There exists a loop triple for which .
Assume w.l.o.g. that and write . Since is a loop triple, , and thus also accepts the word . Since exactly accepts , we have , and so Theorem 15 implies and for some and . Since , the decomposition of trivialises into a product of copies of :As , we are done.
-
2.
For all loop triples we have .
By Lemma 16, there exist indices for which there exist such that is a loop triple. Since every loop in a loop triple has length at most , the pigeonhole principle gives an such that there exist at least such indices at which a loop of length was just completed (hence, we only focus on the second loops in each loop triple). Let this set of indices be given in ascending order, denoted by , with associated loops , each of length .We show that and must be disjoint, i.e. share no states along their traversals in . Let be the origin state of the loop . By definition, is the second loop in the loop triple . Suppose is the first loop at so that is a loop triple at . Then, if we read letters along the loops at state , then we could concatenate those loops with to obtain a loop triple, one of whose lengths exceeds , which contradicts the assumption of this case. Therefore, at state , we can only read at most letters of the factors contained in , before moving on to a different state, never to return. However, by construction, for every we know that appears in , and thus we must read at least letters throughout all loops . Since , we have ; hence, the first and last loops and must be disjoint. Thus, where and . By exact acceptance of , we have
since . Therefore, , and thus, with , we have . To show that has the desired length, note that must contain the set ; the loop , since it is the first loop in , can only contain . Since , we have
We now apply Proposition 14 to go even finer: instead of studying the complexity of , we classify the complexity of words in , using plain Kolmogorov complexity. Fix an alphabet of cardinality , and let denote the plain Kolmogorov complexity on words in :
where is a universal Turing machine on the -element alphabet. For details on Kolmogorov complexity, see e.g. [5].
Proposition 17.
If , then
Its proof – which is included in the full version [4] – requires an extension of Theorem 15, which gives a sufficient and necessary criterion for the decomposition of words with same prefix and suffix. As it will be useful to us in the sequel outside of the proof of Proposition 17, we state it right here in the version of [33].
Theorem 18 (The Second Lyndon-Schützenberger-Theorem).
Let . Then iff there exist , and such that , , and .
With as before, note that the function which maps to its -witness is an injection. Hence, Proposition 17 immediately yields the following bound on .
Corollary 19.
The set has cardinality in .
From Corollary 19, we now deduce the Shannon effect for . Originally conjectured by Shannon [36] and proven (and named) by Lupanov for Boolean functions [25, 26], the Shannon effect says that most strings are of almost maximal complexity. We give a definition due to Wegener [45].
Definition 20.
Let . We say that almost all have property if
Definition 21.
Let be a complexity measure defined on . For , let . Then has the Shannon effect if for almost all we have
By exhibiting upper and lower bounds of complexity for all words, it is readily seen that (plain and prefix-free) Kolmogorov complexity satisfy the Shannon effect [21, 41, 42, 23, 22], as do [35] and [12, 18]. The cardinality argument of Corollary 19 shows:
Theorem 22.
satisfies the Shannon effect.
Proof.
Fix for some small . Since (Lemma 6), identifying a suitable lower bound suffices. By Corollary 19, for -many words we have . Hence, for almost all (as per Definition 20) ,
and so is sufficiently close to 1/2 for typical large .
3 Is Not Context-Free
Fix and suppose w.l.o.g. that . In this section, we demonstrate that cannot be generated by a context-free grammar (CFG); hence, is not context-free. To this end, we first define the concept of a rich CFG. We then prove that if a CFG generates , it must be rich. Finally, we show that any rich CFG generates words of arbitrarily high complexity, which contradicts the fact that the CFG generates .
We provide the required definitions. (For more details, see e.g. [33].) A context-free grammar (CFG) is a tuple where:
-
is the set of terminal symbols.
-
is the set of non-terminal symbols.
-
is the start symbol.
-
is a finite set of productions.
We also insist that , and we define the set of symbols by . Elements of are called sentential forms. Productions in are pairs where and . We denote such a production by .
The derivation relation is defined as follows: if then if and for some , and there exists a production in . The transitive and reflexive closure of is denoted by .
A language that is recognisable by a CFG is called a context-free language (CFL).
Definition 23.
A CFG has no useless nonterminals if:
-
1.
each nonterminal is reachable from the starting symbol; and
-
2.
a terminal string can be derived from each nonterminal.
Definition 24.
Let be a CFG. A nonterminal is a rich nonterminal if for some words we have and as well as:
-
1.
if then ; and
-
2.
if then .
A rich CFG has a rich nonterminal but no useless nonterminals. A rich CFL is generated by a rich CFG.
Our motivation for rich CFGs follows from Theorem 15, however, we note here that, in style, our richness characterisation is similar to classical results by Ginsburg [9, Theorem 5.5.1], who characterised boundedness of CFLs via syntactical properties of grammars. Our syntactical notion of richness, similarly, characterises the complexity of generated languages, in our case . The equivalence in Theorem 15 implies that a rich non-terminal can construct words which do not collapse to repeating copies of a common factor . This is needed in Section 3.2, where we construct high-complexity words.
3.1 Only Rich CFGs Can Generate
We require the following normal form theorem due to Greibach [10] (see [11, p. 277] for a modern exposition).
Theorem 25 (Greibach Normal Form Theorem).
Every CFG with no -productions can be expressed in Greibach Normal Form: all its production rules are of the form where and is a finite word of nonterminals.
The following corollary is immediate.
Corollary 26.
Every CFL omitting is generated by a CFG in Greibach Normal Form.
Our main result in this subsection is the following.
Theorem 27.
If is generated by a context-free grammar , then is rich.
Proof.
By our results in the previous section, is non-empty; further, by definition, . So, by Corollary 26, there exists a CFG in Greibach Normal Form which generates . We show that must be rich by a counting argument on the number of nonterminals of . Let denote the number of nonterminals in . Define
| for . |
By Proposition 10, for every there exists for which . Similarly, for each there exists for which the derivation tree of has a branch which contains some nonterminal at least times. Let be sufficiently large to satisfy these requirements for all simultaneously. By the pigeonhole principle, there exist such that some nonterminal appears at least times in some branch of the derivation tree of each of and .
Consider such a sufficiently long branch of the derivation tree of , in which we choose to expand at the end. Since is in Greibach Normal Form, the derivation is of the form
from which can be derived in at least expansions of . Observe that each , since is in Greibach Normal Form. Consider the number of expansions of in terms of blocks such that each block has cardinality . By assumption, . Let be the derivation of from the expansions in block . There are two cases:
-
1.
For some , with and666This is a consequence of the observation immediately following Theorem 25. .
-
2.
For all , with . Then, with .
Since these two cases apply to all and , two of them must share the same case above. W.l.o.g. assume both and fall into case 2 (the argument for case 1 is similar). Hence, (from the derivation of ) and (from the derivation of ) where . By definition, contain zeroes, while contain zeroes among the first letters. It is now seen from the First Lyndon-Schützenberger-Theorem that and . Hence, is a rich nonterminal.
3.2 Every Rich CFG Generates High-Complexity Words
In this section, we prove that every rich CFG generates words of arbitrarily high complexity relative to its length. In particular, there exists a word for which for every . This contradicts the fact that any rich CFG can generate for any , since any satisfies . We also isolate the following technical proposition.
Proposition 28.
Suppose with . Then the following set is infinite:
Proving Proposition 28 takes a few technical lemmas on the behaviour of non-commuting strings in formal languages. Denote the set of factors of by . For convenience, we now fix some and a pair for which .
Lemma 29.
Proof.
We give the argument for ; the other parts are similar. Assume that ; thus write for some . Note that . Since we cannot have , and thus . But now, by periodicity of , we must have . Thus . Therefore, , from which it follows that , contradicting the fact that . To motivate the next lemma, we provide the definition of string homomorphisms.
Definition 30.
A function is a string homomorphism if for all we have .
Observe that every such string homomorphism is uniquely defined by its action on the alphabet. Define a string homomorphism given by
With this string homomorphism fixed, the following lemma is immediate from Lemma 29.
Lemma 31.
To give a proof of Proposition 28, we first code words as follows. For every , let be the lexicographical concatenation of all positive integers which, coded in binary, have length ; each is then followed by a . For instance, . We consider the images of these words under , and collect some immediate properties of the and the below, whose proofs are readily deduced, hence omitted.
Lemma 32.
Let .
-
1.
-
2.
-
3.
for sufficiently large .
To prove Proposition 28, we show that for large enough , every substring of of length at least must contain two copies of ; since the word between any two copies of is unique within , the proposition is proven.
Proof of Proposition 28.
Fix sufficiently large so as to satisfy Item 3, and consider the word . By construction and the choice of , if and then contains two copies of . By definition, ; on the other hand, Lemma 31 shows that cannot be a factor of any with . Hence, must be a factor of some occurring in . We show that the copies of in and in overlap perfectly. Consider the word contained in . This bordered word is in fact a proper square, which can seen by a case analysis on . Write
| for some | ||||
| where | ||||
| where |
and note that this renaming implies , and that
There are four cases describing ; using Theorems 15 and 18, each will lead to a contradiction.
-
1.
: Since , this case implies . Further, , and so . By comparing lengths, it is easily seen that , and so , a contradiction.
-
2.
: Since , by comparing initial segments it is readily seen that in this case , contradicting Lemma 29.
-
3.
or : Since , we have . So, if , then again by comparing initial segments it is readily seen that , contradicting Lemma 29.
-
4.
: Here, . Since for some , Lemma 29 gives a contradiction.
Hence, the copies of appearing in are exactly those appearing in . But now, if is of length at least , then it contains a factor of the form where . Each such appears only once in , by construction. Thus, for large enough , the word is as required, and thus the set is infinite.
Theorem 33.
If is a rich CFG, then generates a word such that for every .
For notation, if , let denote the reverse of . Further, if satisfy and both such that and overlap at , then call its union, written as . We use Proposition 28.
Proof.
Let be a rich CFG with rich nonterminal and witnesses for which and and . Define and . Now define string homomorphisms by:
Now, fix any for which
| () |
By repeated application of the generation rules in , it is readily seen that for any , the word of the following form is generated by :
We show that, for sufficiently large , the word has large non-deterministic automatic complexity. Choose large enough so that , and let . Since we may choose freely, we may also impose that
| () |
Now, let whose length is in be the first occurrence of a word in of the form for words . Below, we show that this is only possible if .
By choosing wisely, we may assume that is even. Further, it will be convenient to distinguish the words which make up the left-hand and right-hand squares of ; hence, write so that and , and .
We show that ; the case that is similar. Note that, otherwise, we may choose large enough so that intersects , and in particular, we may enforce that this intersection has length at least . By construction and the fact that , the word must appear twice in , which contradicts Proposition 28.777See in particular the proof of Proposition 28 to note that can be generated by sets of the form , and by a similar argument, by those of the form .
Thus, and imply that is a factor of the union . By a counting argument, it is seen that either or . If – the other case is similar – then also . But this is impossible by Proposition 28 and since by . Therefore, we have arrived at a contradiction: we can only have if . But now, the contrapositive of Proposition 14 shows that for every . Since is generated by , the result is proven. Theorem 33 and Theorem 27 combined imply our main result of this section:
Theorem 34.
For every , the language is not context-free.
A language is CFL-immune if it contains no infinite context-free language as a subset. We note here that cannot be CFL-immune, since for every letter , the regular language is contained in (modulo finitely many words, depending on ), and each of its words has constant complexity. However, the following holds:
Theorem 35.
For every , the language is CFL-immune.
For the proof, we direct the reader to [4]. Since for all words , Theorem 35 also implies:
Corollary 36.
For every , is CFL-immune.
We conjecture that recognising can be done via a linearly bounded automaton.
4 Cannot Be Recognised by Certain Constant-Depth Circuits
In this section, we expand on our work in Section 3 by investigating the complexity of further. Instead of considering pushdown automata, in this section we consider constant-depth circuits. We show that two types of circuits cannot recognise either, which is analogous to Theorem 34 for pushdown automata.
Fix and fix . We first provide the definitions of two types of constant depth circuits explicitly – the class in Section 4.1, and in Section 4.2 – and then show that neither can recognise , nor its complement.
4.1 The Circuit Class
Suppose . A language is -recognisable if it is recognised by a polynomial-size, -depth, uniform888Requiring uniformity is debatable; see e.g. [20, Remark 29]. semi-unbounded fan-in circuit (a circuit is semi-unbounded if it has unbounded fan-in-, bounded fan-in-, and admits negative literals but no other negations [3]; cf. [44, 20]). Of these classes of particular interest is , since it is the class of languages which are log-space reducible to context-free languages [43, 44]. More generally, enjoys the following relationship with the classical classes and :
| for all . |
Just like and , the class is also closed under complements [3, Corollary 15].
Here, we consider the class . Contrary to the classes above, is not closed under complementation [3]. Note that -circuits have constant depth; hence, the -recognisable languages can be characterised by formulas in a simple propositional language, as expressed in Lemma 38. We give a formal definition of due to Kjos-Hanssen [20].
Definition 37.
A language is -recognisable if there exists a family of Boolean circuits which recognises and which satisfies the following:
-
1.
Each is defined over the basic set and accepts negative literals.
-
2.
The family has constant depth.
-
3.
Each has unbounded fan-in- and bounded fan-in-.
-
4.
Each accepts words of length .
Note that, for the classes with , the size of the circuit must be polynomial in . However, this requirement is redundant for (cf. [20, Remark 30]). An important characterisation of -recognisable languages follows (cf. [20] and [3, p. 560]).
Lemma 38.
A language is -recognisable iff there exists such that: for every and every there exist and a Boolean formula for which is a conjunction of at most literals, and
Using this lemma, which can be deduced from the distributive properties of propositional languages, we conclude:
Theorem 39.
Let and . Then and .
Proof.
The proof uses a counting argument using Lemma 38. First, suppose , witnessed by a sequence of formulas and a constant . Consider . Since mentions at most variables, the circuit accepts every word which agrees on these variables. Hence, accepts at least words. Yet the order of is , by Corollary 19, which contradicts the fact that recognises .
Now, suppose , again accepted by with constant . Separate the positive from the negative literals in ; there are at most such positive literals. Thus, for any word , if for all such positive literals, and everywhere else, then accepts . But for large enough , such is in by Lemma 11, which contradicts the fact that recognises .
4.2 The Circuit Class
In this section, we consider the class , whose definition differs from that of only in the choice of base set. Let denote the operation. As before, fix .
Definition 40.
A language is -recognisable if there exists a family of Boolean circuits which recognises and which satisfies the following:
-
1.
Each is defined over the basic set and accepts negative literals.
-
2.
The family has constant depth.
-
3.
Each has unbounded fan-in- and bounded fan-in-.
-
4.
Each accepts words of length .
From this definition and the following observation, we can investigate languages larger than binary. Recall that in the previous subsection, we focussed solely on the two-element alphabet . This was forced by the fact that Boolean expressions have trouble expressing Boolean operations on non-binary languages (e.g. what does evaluate to?). This can be remedied in the class for some languages, courtesy of the operator .
It is readily seen that is isomorphic to the field of two elements . (Studying Boolean circuits in terms of the arithmetic of goes back to Gál and Wigderson [8]. We also mention here similarities to the work of Razborov-Smolensky [31, 39, 38].) To extend this equivalence beyond binary alphabets, take the field for some prime . By interpreting as mod , we extend -recognisability to alphabets of prime cardinality. Below, we give a natural characterisation of -recognisability in terms of propositional formulas, similar to that in Lemma 38.999For a classical definition of in terms of the complexity of Boolean circuits see e.g. [20, Section 4].
Definition 41.
Let for some . Then is -recognisable if there exists such that: for every and every there exists and a formula for which is a conjunction of at most literals and
Remark 42.
Observe that there is a subtle difference between and in the case . An circuit accepts a word if any term in the disjunction of holds. On the contrary, in , the disjunction is interpreted as addition modulo , and hence, is accepted only if the number of terms in the disjunction of is odd. Also, note that Definition 41 requires a real-world formalism in which gates are able to carry out addition and multiplication modulo as a primitive. This assumption is not needed when , as such Boolean circuits can be modelled using and , as mentioned.
For completeness, we mention here that (see [3]), while (inverting a polynomial in a finite field requires only a constant number of layers; we use this fact in the proof of Theorem 46). Further, [20, Theorem 39].
Below, we prove the following complexity characterisation of alphabets of prime cardinality.
Theorem 46.
Let for some . Then and .
By translating prime-cardinality-alphabets into finite fields, we may use the tools of field theory. In this section, we collect facts about finite fields which we require to prove Theorem 46.
Lemma 43.
Let be a finite field.
-
1.
By prime decomposition, has prime characteristic.
-
2.
has order for some . [7, 33.2, 33.10]
-
3.
If has order then has characteristic . [6, Sec. 14.3]
-
4.
For every and , there is one field up to isomorphism of order [7, 33.12]. This field has a subfield of order , the prime subfield.
-
5.
All functions from to itself are polynomial functions. [7, Exercises 22: 31.c.]
-
6.
If has order and then for all . In particular, , since the multiplicative subgroup of has order . [6, p. 550]
If and , let denote the (unique up to isomorphism) field of order .
Lemma 44.
Suppose is linear, i.e. and for all and . Then there exist for which . In fact, every linear function from to arises in this way.
For a proof and related details on field traces, see for instance [24, Theorem 2.24] and [24, Chapter 2.3]. In fact, their proof shows that there exists one for which . We now give a characterisation of in terms of finite fields and their operations. This characterisation is akin to that of in Lemma 38 in terms of propositional formulas.
Proposition 45.
Let be a linear isomorphism of vector spaces over , and suppose is -recognisable. Then there exists a family of polynomials with for which
and for which there exists such that for all we have .
For the proof, we direct the reader to [4]. We now combine the field-theoretic tools above to prove the main theorem of this section. Recall that denotes the set of primes.
Theorem 46.
Let and . Then and .
Proof.
Suppose some circuit recognises . By Proposition 45, there exists a family of polynomials and for which if and only if and . So, the number of roots of – and, hence, the number of words not in – is bounded above by , so the cardinality of is in , contradicting Corollary 19.
For , note that the circuit can be augmented by a constant number of layers to flip the output of for any (note that ). If then use Lemma 43 Item 6 to see that ; thus , and so the polynomial satisfies . As is fixed, can be computed by a constant-depth circuit, which we may append to any -circuit recognising to recognise . Since the former does not exist, neither does the latter.
5 Open Questions
In this paper, we proved multiple results on the complexity of the measure via the proxy family of sets . In particular, we showed that is complicated from the viewpoint of pushdown automata (Theorems 34 and 35 and Corollary 36), and even certain Boolean circuits cannot recognise , nor its complement (Theorems 39 and 46). We also proved the Shannon effect for (Theorem 22). Pressing open questions pertain to refining these results on – and, ultimately, to understanding the measure even better.
In Section 4.2, and in Theorem 46 in particular, we considered alphabets of prime cardinality; however, our proof uses a non-standard definition of . We wonder:
Question 47.
Do the results from Theorem 46 apply to arbitrary alphabets using the definition of given in Definition 40?
Finally, it is clear by definition that for all , for any finite alphabet . This allows the extension of certain results from to . For instance, we note here that Theorems 33, 35, and 39 also apply to since . However, whether the equality holds in general remains the cardinal open question to fully understand the impact of exactness in Definition 7 compared to Definition 4.
Question 48.
Let . Does there exist for which ?
Broadly, it is our hope that a better understanding of , via proxies such as the sets or otherwise, will lead to a better understanding of , and (non-deterministic) automatic complexity in general. Similar to the comparison between regular languages being characterised by both NFAs and DFAs, a proof of would simplify computing the non-deterministic automatic complexity while preserving its naturalness as a measure of complexity. Conversely, would show that non-deterministic automatic complexity is dependent on the actual computation path, which would also be of philosophical interest.
References
- [1] Scott Aaronson. Complexity Zoo, 2025. URL: https://complexityzoo.net/Complexity_Zoo [cited 18 Apr 2025].
- [2] Achilles A. Beros, Bjørn Kjos-Hanssen, and Daylan Kaui Yogi. Planar digraphs for automatic complexity. In Theory and applications of models of computation, volume 11436 of Lecture Notes in Comput. Sci., pages 59–73. Springer, Cham, 2019. doi:10.1007/978-3-030-14812-6_5.
- [3] Allan Borodin, Stephen A. Cook, Patrick W. Dymond, Walter L. Ruzzo, and Martin Tompa. Two applications of inductive counting for complementation problems. SIAM J. Comput., 18(3):559–578, 1989. doi:10.1137/0218038.
- [4] Joey Chen, Bjørn Kjos-Hanssen, Ivan Koswara, Linus Richter, and Frank Stephan. Languages of Words of Low Automatic Complexity Are Hard to Compute, 2025. arXiv:2510.07696.
- [5] Rodney G. Downey and Denis R. Hirschfeldt. Algorithmic randomness and complexity. Theory and Applications of Computability. Springer, New York, 2010. doi:10.1007/978-0-387-68441-3.
- [6] David S. Dummit and Richard M. Foote. Abstract algebra. John Wiley & Sons, Inc., Hoboken, NJ, third edition, 2004.
- [7] John B Fraleigh. A first course in abstract algebra. Pearson Education, Philadelphia, PA, 7th edition, 2003.
- [8] Anna Gál and Avi Wigderson. Boolean complexity classes vs. their arithmetic analogs. Random Struct. Algorithms, 9(1-2):99–111, 1996. doi:10.1002/(sici)1098-2418(199608/09)9:1/2<99::aid-rsa7>3.3.co;2-o.
- [9] Seymour Ginsburg. The mathematical theory of context-free languages. McGraw-Hill Book Co., New York-London-Sydney, 1966.
- [10] Sheila A. Greibach. A New Normal-Form Theorem for Context-Free Phrase Structure Grammars. J. ACM, 12(1):42–52, January 1965. doi:10.1145/321250.321254.
- [11] John E Hopcroft, Rajeev Motwani, and Jeffrey D Ullman. Introduction to automata theory, languages, and computation. Pearson, Upper Saddle River, NJ, 3 edition, June 2006.
- [12] Kayleigh Hyde. Nondeterminstic Finite State Complexity. Master’s thesis, University of Hawai’i at Mānoa, 2013. URL: http://hdl.handle.net/10125/29507.
- [13] Kayleigh K. Hyde and Bjørn Kjos-Hanssen. Nondeterministic automatic complexity of overlap-free and almost square-free words. Electron. J. Combin., 22(3):Paper 3.22, 18, 2015. doi:10.37236/4851.
- [14] Bakhadyr Khoussainov and Anil Nerode. Automata theory and its applications, volume 21 of Progress in Computer Science and Applied Logic. Birkhäuser Boston, Inc., Boston, MA, 2001. doi:10.1007/978-1-4612-0171-7.
- [15] Bjørn Kjos-Hanssen. On the complexity of automatic complexity. Theory Comput. Syst., 61(4):1427–1439, 2017. doi:10.1007/s00224-017-9795-4.
- [16] Bjørn Kjos-Hanssen. Automatic complexity of shift register sequences. Discrete Mathematics, 341(9):2409–2417, 2018. doi:10.1016/j.disc.2018.05.015.
- [17] Bjørn Kjos-Hanssen. Automatic complexity of Fibonacci and Tribonacci words. Discrete Applied Mathematics, 289:446–454, 2021. doi:10.1016/j.dam.2020.10.014.
- [18] Bjørn Kjos-Hanssen. An incompressibility theorem for automatic complexity. Forum Math. Sigma, 9:e62, 7, 2021. doi:10.1017/fms.2021.58.
- [19] Bjørn Kjos-Hanssen. Automatic complexity—a computable measure of irregularity, volume 12 of De Gruyter Series in Logic and its Applications. De Gruyter, Berlin, [2024] ©2024. doi:10.1515/9783110774870.
- [20] Bjørn Kjos-Hanssen. Maximal automatic complexity and context-free languages. In Aspects of computation and automata theory with applications, volume 42 of Lect. Notes Ser. Inst. Math. Sci. Natl. Univ. Singap., pages 335–352. World Sci. Publ., Hackensack, NJ, [2024] ©2024. doi:10.1142/9789811278631_0013.
- [21] A. N. Kolmogorov. Three approaches to the definition of the concept “quantity of information”. Problemy Peredači Informacii, 1(vyp. 1):3–11, 1965. URL: https://www.mathnet.ru/eng/ppi68.
- [22] L. A. Levin. Laws of Information Conservation (Nongrowth) and Aspects of the Foundation of Probability Theory. Problems Inform. Transmission, 10(3):206–210, 1974. URL: https://www.mathnet.ru/eng/ppi1039.
- [23] Leonid A. Levin. Some theorems on the algorithmic approach to probability theory and information theory: (1971 dissertation directed by a.n. kolmogorov). Annals of Pure and Applied Logic, 162(3):224–235, 2010. Special Issue: Dedicated to Nikolai Alexandrovich Shanin on the occasion of his 90th birthday. doi:10.1016/j.apal.2010.09.007.
- [24] Rudolf Lidl and Harald Niederreiter. Finite fields, volume 20 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, Cambridge, second edition, 1997. With a foreword by P. M. Cohn. doi:10.1017/CBO9780511525926.
- [25] O. B. Lupanov. The synthesis of contact circuits. Dokl. Akad. Nauk SSSR (N.S.), 119:23–26, 1958.
- [26] O. B. Lupanov. The schemes of functional elements with delays. Problemy Kibernet., (23):43–81, 303, 1970.
- [27] R. C. Lyndon and M. P. Schützenberger. The equation in a free group. Michigan Math. J., 9:289–298, 1962. URL: http://projecteuclid.org/euclid.mmj/1028998766.
- [28] Per Martin-Löf. The definition of random sequences. Information and Control, 9:602–619, 1966. doi:10.1016/S0019-9958(66)80018-9.
- [29] Jaban Meher and M. Ram Murty. Ramanujan’s proof of Bertrand’s postulate. Amer. Math. Monthly, 120(7):650–653, 2013. doi:10.4169/amer.math.monthly.120.07.650.
- [30] Jakub Radoszewski, Wojciech Rytter, and Tomasz Waleń. Faster Algorithms for Ranking/Unranking Bordered and Unbordered Words. In Zsuzsanna Lipták, Edleno Moura, Karina Figueroa, and Ricardo Baeza-Yates, editors, String Processing and Information Retrieval, pages 257–271, Cham, 2025. Springer Nature Switzerland. doi:10.1007/978-3-031-72200-4_20.
- [31] A. A. Razborov. Lower bounds on the size of bounded depth circuits over a complete basis with logical addition. Mathematical notes of the Academy of Sciences of the USSR, 41(4):333–338, April 1987. doi:10.1007/BF01137685.
- [32] Maria José Serna. Asymptotical behaviour of some non-uniform measures. RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications, 23(3):281–293, 1989. doi:10.1051/ita/1989230302811.
- [33] Jeffrey Shallit. A Second Course in Formal Languages and Automata Theory. Cambridge University Press, USA, first edition, 2008. doi:10.1017/CBO9780511808876.
- [34] Jeffrey Shallit and Yuri Breitbart. Automaticity I: Properties of a Measure of Descriptional Complexity. Journal of Computer and System Sciences, 53(1):10–25, 1996. doi:10.1006/jcss.1996.0046.
- [35] Jeffrey Shallit and Ming-Wei Wang. Automatic complexity of strings. J. Autom. Lang. Comb., 6(4):537–554, 2001. 2nd Workshop on Descriptional Complexity of Automata, Grammars and Related Structures (London, ON, 2000). doi:10.25596/jalc-2001-537.
- [36] Claude. E. Shannon. The synthesis of two-terminal switching circuits. The Bell System Technical Journal, 28(1):59–98, 1949. doi:10.1002/j.1538-7305.1949.tb03624.x.
- [37] Michael Sipser. A complexity theoretic approach to randomness. In Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, STOC ’83, pages 330–335, New York, NY, USA, 1983. Association for Computing Machinery. doi:10.1145/800061.808762.
- [38] R. Smolensky. Algebraic methods in the theory of lower bounds for boolean circuit complexity. In Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, STOC ’87, pages 77–82, New York, NY, USA, 1987. Association for Computing Machinery. doi:10.1145/28395.28404.
- [39] R. Smolensky. On representations by low-degree polynomials. In Proceedings of 1993 IEEE 34th Annual Foundations of Computer Science, pages 130–138, 1993. doi:10.1109/SFCS.1993.366874.
- [40] Ray J Solomonoff. A preliminary report on a general theory of inductive inference, February 1960. URL: https://raysolomonoff.com/publications/z138.pdf.
- [41] Ray J Solomonoff. A formal theory of inductive inference. Part I. Information and control, 7(1):1–22, 1964. doi:10.1016/S0019-9958(64)90223-2.
- [42] Ray J Solomonoff. A formal theory of inductive inference. Part II. Information and control, 7(2):224–254, 1964. doi:10.1016/S0019-9958(64)90131-7.
- [43] I. H. Sudborough. On the tape complexity of deterministic context-free languages. J. Assoc. Comput. Mach., 25(3):405–414, 1978. doi:10.1145/322077.322083.
- [44] H. Venkateswaran. Properties that characterize LOGCFL. J. Comput. System Sci., 43(2):380–404, 1991. doi:10.1016/0022-0000(91)90020-6.
- [45] I. Wegener. The Complexity of Boolean Functions. Wiley Teubner on Applicable Theory in Computer Science. Wiley, 1987.
