Descriptive Complexity of Deterministic Polylogarithmic Time

03/08/2019 ∙ by Flavio Ferrarotti, et al. ∙ Software Competence Center Hagenberg UHasselt 0

We propose a logical characterization of problems solvable in deterministic polylogarithmic time (PolylogTime). We introduce a novel, two-sorted logic that separates the elements of the input domain from the bit positions needed to address these elements. In the course of proving that our logic indeed captures PolylogTime on finite ordered structures, we introduce a variant of random-access Turing machines that can access the relations and functions of the structure directly. We investigate whether an explicit predicate for the ordering of the domain is needed in our logic. Finally, we present the open problem to understand exactly which order-invariant queries are in PolylogTime.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

The research program known as Descriptive Complexity [6, 9, 12] relates computational complexity to logic. For a complexity class of interest, one tries to come up with a natural logic such that a property of inputs can be expressed in the logic if and only if the problem of checking the property belongs to the complexity class. An exemplary result in this vein is that a family of finite structures (over some fixed finite vocabulary) is definable in existential second-order logic (ESO), if and only if the membership problem for belongs to NP [4]. We also say that ESO captures NP. The complexity class P is captured, on ordered finite structures, by a fixpoint logic: the extension of first-order logic with least-fixpoints [11, 19].

After these two seminal results, many more capturing results have been developed, and the benefits of this enterprise have been well articulated by several authors in the references given earlier, and others [1]. We just mention here the advantage of being able to specify properties of structures (data structures, databases) in a logical, declarative manner; at the same time, we are guaranteed that our computational power is well delineated.

The focus of the present paper is on computations taking deterministic polylogarithmic time, i.e., time proportional to for some arbitrary but fixed . Such computations are practically relevant and common on ordered structures. Examples are binary search in an array, search in a balanced search tree, or heapsort. Another natural example is the computation of , where , …, are numbers taken from the input structure and is a function computable in polynomial time when numbers are represented in binary.

Computations with sublinear time complexity can be formalized in terms of Turing machines with random access to the input [12]. When a family of ordered finite structures over some fixed finite vocabulary is defined by some deterministic polylogarithmic-time random-access Turing machine, we say that belongs to the complexity class . In this paper we show how this complexity class can be captured by a new logic which we call index logic.

Index logic is two-sorted; variables of the first sort range over the domain of the input structure. Variables of the second sort range over an initial segment of the natural numbers; this segment is bounded by the logarithm of the size of the input structure. Thus, the elements of the second sort represent the bit positions needed to address elements of the first sort. Index logic includes full fixpoint logic on the second sort. Quantification over the first sort, however, is heavily restricted. Specifically, a variable of the first sort can only be bound using an address, specified by a subformula defining the positions of the bits of the address that are set. This “indexing mechanism” lends index logic its name.

In the course of proving our capturing result, we consider a new variant of random-access Turing machines. In the standard variant, the entire input structure is presented as one binary string. In our new variant, the different relations and functions of the structure can be accessed directly. We will show that both variants are equivalent, in the sense that they lead to the same notion of . We note that in descriptive complexity it is common practice to work only with relational structures, as functions can be identified with their graphs. In a sublinear-time setting, however, this does not work. Indeed, let be a function and denote its graph by . If we want to know we cannot spend the linear time needed to find a such that holds. Thus, in this work, we allow structures containing functions as well as relations.

We also devote attention to gaining a detailed understanding of the expressivity of index logic. Specifically, we observe that order comparisons between quantified variables of the first sort can be expressed in terms of their addresses. For constants of the first sort that are directly given by the structure, however, we show that this is not possible. In other words, index logic without an explicit order predicate on the first sort would no longer capture for structures with constants.

Related work.

It is well known that the (nondeterministic) logarithmic time hierarchy corresponds exactly to the set of first-order definable Boolean queries (see [12], Theorem 5.30). The relationship between uniform families of circuits within NC and nondeterministic random-access logarithmic time machines was studied in [16]. When we consider however the descriptive complexity of classes of problems decidable by deterministic formal models of computation in polylogarithmic time, i.e., the topic of this paper, it appears to have been somehow overlooked by previous works in the area. On the other hand, nondeterministic polylogarithmic time complexity classes, defined in terms of alternating random-access Turing machines and related families of circuits, have received some attention [15, 5]. Recently, a theorem analogous to Fagin’s famous theorem [4], was proven for nondeterministic polylogarithmic time [5]. For this task, a restricted second-order logic for finite structures, where second-order quantification ranges over relations of size at most polylogarithmic in the size of the structure, and where first-order universal quantification is bounded to those relations, was exploited. This latter work, is closely related to the work on constant depth quasipolynomial size AND/OR circuits and the corresponding restricted second-order logic in [15]. Both logics capture the full alternating polylogarithmic time hierarchy, but the additional restriction in the first-order univesal quantification in the second-order logic defined in [5], enables a one-to-one correspondence between the levels of the polylogarithmic time hierarchy and the prenex fragments of the logic, in the style of a result of Stockmeyer [18] regarding the polynomial-time hierarchy. Unlike the classical results of Fagin and Stockmeyer, the results on the descriptive complexity of nondeterministic polylogarithmic time classes only hold over ordered structures.

2 Preliminaries

We allow structures containing functions as well as relations and constants. Unless otherwise stated, we work with finite ordered structures of finite vocabularies. A finite structure of vocabulary , where each is an -ary relation symbol, each is a constant symbol, and each is a -ary function symbol, consists of a finite domain and interpretations for all relation, constant and function symbols in . An interpretation of a symbol is a relation , of a symbol is a value , and of a symbol is a function . By passing to an isomorphic copy, we assume that is the initial segment of natural numbers less than , where is the cardinality of .

In this paper, always refers to the binary logarithm of , i.e., . We write as a shorthand for .

3 Deterministic polylogarithmic time

The sequential access that Turing machines have to their tapes makes it impossible to do nontrivial computations in sub-linear time. Therefore, logarithmic time complexity classes are usually studied using models of computation that have random access to their input. As this also applies to the polylogarithmic complexity classes studied in this paper, we adopt a Turing machine model that has a random access read-only input, similar to the logarithmic-time Turing machine in [16].

Our concept of a random-access Turing machine is that of a multi-tape Turing machine which consists of: (1) a finite set of states, (2) a read-only random access input-tape, (3) a sequential access address-tape, and (4) one or more (but a fixed number of) sequential access work-tapes. All tapes are divided into cells, each equipped with a tape head which scans the cells, and are “semi-infinite” in the sense that they have no rightmost cell, but have a left-most cell. The tape heads of the sequential access address-tape and work-tapes can move left or right. When a head is in the leftmost cell, it is not allowed to move left. The address-tape alphabet only contains symbols , and (for blank). The position of the input-tape head is determined by the number stored in binary in between the left-most cell and the first blank cell of the address-tape (if the left-most cell is blank, then is considered to be ) as follows: If is strictly smaller than the length of the input string, then the input-tape head is in the -th cell. Otherwise, if , then the input-tape head is in the -th cell scanning the special end-marker symbol .

Formally, the transition function of a random-access TM with work tapes is of the form . We omit formal definitions of configurations and computations, which are as expected.

Example 1

Following a simple strategy, a random-access Turing machine can figure out the length of its input as well as in polylogarithmic time. In its initial step, checks whether the input-tape head scans the end-marker . If it does, then the input string is the empty string and its work is done. Otherwise, writes in the first cell of its address tape and keeps writing ’s in its subsequent cells right up until the input-tape head scans . At this point the resulting binary string in the index-tape is of length . Next, moves its address-tape head back to the first cell (i.e., to the only cell containing a at this point). From here on, repeatedly moves the index head one step to the right. Each time it checks whether the index-tape head scans a blank or a . If then is done. If , it writes a and tests whether the input-tape head jumps to the cell with ; if so, it rewrites a , otherwise, it leaves the . The binary number left on the index-tape at the end of this process is . Adding one in binary is now an easy task. ∎

Naturally, an accepting computation is a computation ending in an accepting state. In this case the input string is accepted. The formal language accepted by a machine , denoted , is the set of strings accepted by . We say that if makes at most steps before accepting or rejecting an input string of length . We define the class of all formal languages decidable by (deterministic) random-access Turing machines in polylogarithmic time as follows:

It follows from Example 1 that a random-access Turing machine can check any numerical property that is polynomial time in the size of its input in binary. For instance, it can check whether the length of its input is even, by simply looking at the least-significant bit.

When we want to give a finite structure as an input to a random-access Turing machine, we encode it as a string, adhering to the usual conventions in descriptive complexity theory [12]. Let be a vocabulary, and let with be an ordered structure of vocabulary . Each relation of is encoded as a binary string of length , where in a given position indicates that the corresponding tuple is in . Likewise, each constant number is encoded as a binary string of length .

We can also encode the functions in a structure. We view -ary functions as consisting of -ary relations, where the -th relation indicates whether the -th bit is . Thus, each function is encoded as a binary string of length .

The encoding of the whole structure is the concatenation of the binary strings encoding its relations, constants and functions. The length of this string is , where denotes the size of the input structure . Note that , so .

4 Direct-access Turing machines

In this section we propose a new model of random-access Turing machines. In the standard model reviewed above, the entire input structure is assumed to be encoded as one binary string. In our new variant, the different relations and functions of the structure can be accessed directly. We then show that both variants are equivalent, in the sense that they lead to the same notion of . The direct-access model will then be useful to give a transparent proof of our capturing result.

Let our vocabulary . A direct-access Turing machine that takes -structures as input, is a multitape Turing machine with distinguished work-tapes, called address-tapes, distinguished read-only (function) value-tapes, distinguished read-only constant-tapes, and one or more ordinary work-tapes.

Let us define a transition function for each tape separately. These transition functions take as an input the current state of the machine, the bit read by each of the heads of the machine, and, for each relation , the answer (0 or 1) to the query . Here, denotes the number written in binary in the th distinguished tape of .

Thus, with the total number of tapes, the state transition function has the form

If corresponds to an address-tape or an ordinary work-tape, we get the form

If corresponds to one of the read-only tapes, we have

Finally we update the contents of the function value-tapes. If is the function value-tape for a function , then the content of the tape is updated to written in binary. Here, denotes the number written in binary in the th distinguished address-tape of after the execution of the above transition functions. If one of the is too large, the tape is updated to contain only blanks. Note that the head of the tape remains in place; it was moved by already.

In the initial configuration, read-only constant-tapes for the constant symbols hold the values in binary of their values in . One additional constant-tape (there are of them) holds the size of the domain of in binary. Each address-tape, each value-tape, and each ordinary work-tape holds only blanks.

Theorem 4.1

A class of finite ordered structures of some fixed vocabulary is decidable by a random-access Turing machine working in with respect to , where is the size of the binary encoding of the input structure, iff is decidable by a direct-access Turing machine in with respect to , where is the size of the domain of the input structure.

The proof, omitted due to space limitations, is based on computing precise locations in which bits can be found, and, for the other direction, on a binary search technique to compute from .

5 Index logic

In this section we introduce index logic, a new logic which over ordered finite structures captures . Our definition of index logic is inspired by the second-order logic in [15], where relation variables are restricted to valuations on the sub-domain ( being the size of the interpreting structure), as well as by the well known counting logics as defined in [8].

Given a vocabulary , for every ordered -structure , we define a corresponding set of natural numbers where . Note that , since we assume that is an initial segment of the natural numbers. This simplifies the definitions, but it is otherwise unnecessary.

Index logic is a two-sorted logic. Individual variables of the first sort v range over the domain of , while individual variables of the second sort n range over . We denote variables of sort v with , possibly with a subindex such as , and variables of type n with , also possibly with a subindex. Relation variables, denoted with uppercase letters , are always of sort n, and thus range over relations defined on .

Definition 1

Let be a vocabulary, we inductively define terms and formulae of index logic as follows:

  • Each individual variable of sort v and each constant symbol in is a term of sort v.

  • Each individual variable of sort n is a term of sort n.

  • If are terms of sort v and is a -ary function symbol in , then is a term of sort v.

  • If are terms of a same sort, then and are (atomic) formulae.

  • If are terms of sort v and is a -ary relation symbol in , then is an (atomic) formula.

  • If are terms of sort n and is a -ary relation variable, then is an (atomic) formula.

  • If is a term of sort v, is a formula and is an individual variable of sort n, then is an (atomic) formula.

  • If is tuple of terms of sort n, is tuples of variables also of sort n, is a relation variable, the lengths of and are the same and coincide with the arity of , and is a formula, then is an (atomic) formula.

  • If are formulae, then , , and are formulae.

  • If is a variable of type n and is a formula, then and are formulae.

  • If is an atomic formula of the form such that does not appear free in , and is a formula, then is a formula.

The concept of a valuation is the standard for a two-sorted logic. Thus, a valuation over a structure is any total function val from the set of all variables of index logic to values satisfying the following constraints:

  • If is a variable of type v, then .

  • If is a variable of type n, then .

  • If is a relation variable with arity , then .

Valuations extend to terms and tuples of terms in the usual way. Further, we say that a valuation is -equivalent to a valuation if for all variables other than .

Fixed points are defined in the standard way (see [2] and [14] among others). Given an operator , a set is a fixed point of if . A set is a least fixed point of if it is a fixed point and for every other fixed point of we have . We denote the least fixed point of as . The inflationary fixed point of , denoted by , is the union of all sets where and .

Let be a formula of vocabulary , where is a relation variable of arity and is a -tuple of variables of type n. Let be a -structure. The formula gives rise to an operator defined as follows:

Definition 2

The formulae of are interpreted as follows:

  • iff .

  • iff .

  • iff .

  • iff .

  • iff in binary is , where and iff for -equivalent to and .

  • iff .

  • iff .

  • iff and .

  • iff or .

  • iff there is a -equivalent to such that .

  • iff for all -equivalent to , it holds that .

  • iff there is a -equivalent to such that and .

It immediately follows from the famous result by Gurevich and Shelah regarding the equivalence between inflationary and least fixed points, that an equivalent index logic can be obtained if we (1) replace by in the formation rule for the fixed point in Definition 1, adding the restriction that every occurrence of in is positive111This ensures that is monotonous and thus that the least fixed point is guaranteed to exists, and (2) fix the interpretation iff .

Moreover, the convenient tool of simultaneous fixed points, which allows one to iterate several formulae at once, can still be used here since it does not increase the expressive power of the logic. Following the syntax and semantics proposed by Ebbinghaus and Flum [2], a version of index logic with simultaneous inflationary fixed point can be obtained by replacing the clause corresponding to in Definition 1 by the following:

  • If is tuple of terms of sort n, and for and , we have that is a tuple of variables of sort n, is a relation variable whose arity coincides with the length of , the lengths of and are the same, and is a formula, then is an atomic formula.

The interpretation is that iff belongs to the first (here ) component of the simultaneous inflationary fixed point.

Thus, we can use index logic with the operators IFP, LFP, S-IFP or S-LFP interchangeably.

The following result confirms that our logic serves our purpose.

Theorem 5.1

Over ordered structures, index logic captures .

The proof is in the Appendix; instead we give two worked-out examples illustrating the power of index logic.

5.1 Finding the binary representation of a constant

Assume a constant symbol of sort . In this example we show a formula such that the sentence is valid over all finite ordered structures. In other words, defines the binary representation of the number .

Informally, works by iterating through the bit positions from the most significant to the least significant. These bits are accumulated in a relation variable . For each we set the corresponding bit, on the condition that the resulting number does not exceed . The set bits are collected in a relation variable .

In the formal description of below, we use the following abbreviations. We use to denote the most significant bit position. Thus, formally, abbreviates . Furthermore, for a unary relation variable , we use with the obvious meaning. We also use abbreviations such as with the obvious meaning.

Now is a simultaneous fixpoint where

5.2 Binary search in an array of key values

In order to develop insight in how index logic works, we develop in detail an example showing how binary search in an array of key values can be expressed in the logic.

We represent the data structure as an ordered structure over the vocabulary consisting of a unary function , a constant symbol , a constant symbol , and a binary relation . The domain of is an initial segment of the natural numbers. The constant indicates the length of the array; the domain elements , , …, represent the cells of the array. The remaining domain elements represent key values. Each array cell holds a key value; the assignment of key values to array cells is given by the function .

The simplicity of the above abstraction gives rise to two peculiarities, which, however, pose no problems. First, the array cells belong to the range of the function . Thus, array cells are allowed to play a double role as key values. Second, the function is total, so it is also defined on the domain elements that are not array cells. We will simply ignore on that part of the domain.

We still need to discuss and . We assume to be a total order, used to compare key values. So can be different from the built-in order . For the binary search procedure to work, the array needs to be sorted, i.e., must satisfy . Finally, the constant is the test value. Specifically, we are going to exhibit an index logic formula that expresses that is a key value stored in the array. In other words, we want to express the condition

Note that we express here condition by a first-order formula that is not an index formula. So, our aim is to show that is still expressible, over all sorted arrays, by an index formula.

We recall the procedure for binary search [13] in the following form, using integer variables , and : while do if then else od if return ‘found’ else return ‘not found’

We are going express the above procedure as a simultaneous fixpoint, using binary relation variables and and a unary relation variable . We collect the iteration numbers in , thus counting until the logarithm of the size of the structure. Relation variables and are used to store the values, in binary representation, of the integer variables and during all iterations. Specifically, for each , the value of the term will be the value of the integer variable before the th iteration of the while loop (and similarly for ).

In the formal expression of below, we use the formula from Section 5.1, with playing the role of . We also assume the following formulas:

  • A formula that expresses, for unary relation variables and and a numeric variable , that the bit is set in the binary representation of , where and are the numbers represented in binary by and .

  • A formula , expressing that the bit is set in the binary representation of , where is the number represented in binary by .

These formulas surely exist because index logic includes full fixpoint logic on the numeric sort; fixpoint logic captures PTIME on the numeric sort; and computing the average, or subtracting one, are PTIME operations on binary numbers.

We are going to apply the formula where and are given by and . So, formally, below, we use for the formula obtained from formula by replacing each subformula of the form by , and by .

Furthermore, we are going to apply formula where is given by . So, formally, will denote the formula obtained from by replacing each subformula of the form by .

A last abbreviation we will use is , which will denote the formula .

Now is expressed by , where

6 Definability in Deterministic PolylogTime

We will observe here that very simple properties of structures are nondefinable in index logic. Moreover we answer to a fundamental question on the primitivity of the built-in order predicate (on terms of sort ) in our logic. Indeed, we are working with ordered structures, and variables of sort can only be introduced by binding them to an index term. Index terms are based on sets of bit positions which can be compared as binary numbers. Hence it is plausible to suggest that the built-in order predicate can be removed from our logic without losing expressive power. We prove, however, that this does not work in the presence of constant or function symbols in the vocabulary.

Proposition 1

Assume the vocabulary includes a unary relation symbol . Checking emptiness (or non-emptiness) of in a given structure is not computable in .

Proof

We will show that emptiness is not computable in . For a contradiction, assume that it is. Consider first-order structures over the vocabulary , where is a unary relation symbol. Let be some Turing machine that decides in , given a -structure , whether is empty. Let be a polylogarithmic function that bounds the running time of . Let be a natural number such that .

Let be the -structure with domain , where . The encoding of to the Turing machine is the sequence . Note that the running time of with input is strictly less than . This means that there must exist an index of that was not read in the computation . Define

Clearly the output of the computations and are identical, which is a contradiction since is an encoding of a -structure where the interpretation of is a singleton. ∎

The technique of the above proof can be adapted to prove a plethora of undefinability results, e.g., it can be shown that -regularity of directed graphs cannot be decided in , for any fixed .

We can develop this technique further to show that the order predicate on terms of sort is a primitive in the logic. The proof of the following lemma is quite a bit more complicated and given in the Appendix.

Lemma 1

Let and be unary relation symbols. There does not exist an index logic formula such that for all -structures such that and are disjoint singleton sets and , respectively, it holds that

Theorem 6.1

Let and be constant symbols in a vocabulary . There does not exist an index logic formula that does not use the order predicate on terms of sort and that is equivalent with the formula .

The proof, by contradiction, shows that a formula as stated in the theorem would contradict the above Lemma. We give the translation in the Appendix.

We conclude this section by affirming that, on purely relational vocabularies, the order predicate on sort is redundant. The intuition for this result was given in the beginning of this section and we omit the formal proof.

Theorem 6.2

Let be a vocabulary without constant or function symbols. For every sentence of index logic of vocabulary there exists an equivalent sentence that does not use the order predicate on terms of sort .

7 Discussion

An interesting open question concerns order-invariant queries. Indeed, while index logic is defined to work on ordered structures, it is natural to try to understand which queries about ordered structures that are actually invariant of the order, are computable in PolylogTime. Results of the kind given by Proposition 1 already suggest that very little may be possible. Then again, any polynomial-time numerical property of the size of the domain is clearly computable. We would love to have a logical characterization of the order-invariant queries computable in PolylogTime.

Another natural direction is to get rid of Turing machines altogether and work with a RAM model working directly on structures, as proposed by Grandjean and Olive [7]. Plausibly by restricting their model to numbers bounded in value by a polynomial in (the size of the structure), we would get an equivalent PolylogTime complexity notion.

In this vein, we would like to note that extending index logic with numeric variables that can hold values up to a polynomial in , with arbitrary polynomial-time functions on these, would be useful syntactic sugar that would, however, not increase the expressive power.

References

  • [1] Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley (1995)
  • [2] Ebbinghaus, H.D., Flum, J.: Finite Model Theory. Springer, second edn. (1999)
  • [3] Fagin, R.: Contributions to Model Theory of Finite Structures. Ph.D. thesis, U. C. Berkeley (1973)
  • [4] Fagin, R.: Generalized first-order spectra and polynomial-time recognizable sets. In: Karp, R. (ed.) Complexity of Computation, SIAM-AMS Proceedings, vol. 7, pp. 43–73 (1974)
  • [5] Ferrarotti, F., González, S., Schewe, K.D., Turull Torres, J.M.: The polylog-time hierarchy captured by restricted second-order logic. In: Post-Proceedings of the 20th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (To appear). IEEE Computer Society (2019)
  • [6] Grädel, E., Kolaitis, P., Libkin, L., Marx, M., Spencer, J., Vardi, M., Venema, Y., Weinstein, S.: Finite Model Theory and Its Applications. Springer (2007)
  • [7] Grandjean, E., Olive, F.: Graph properties checkable in linear time in the number of vertices. J. Comput. Syst. Sci. 68, 546–597 (2004)
  • [8] Grohe, M.: Descriptive Complexity, Canonisation, and Definable Graph Structure Theory. Lecture Notes in Logic, Cambridge University Press (2017).
  • [9] Gurevich, Y.: Toward logic tailored for computational complexity. In: Richter, M., et al. (eds.) Computation and Proof Theory, Lecture Notes in Mathematics, vol. 1104, pp. 175–216. Springer-Verlag (1984)
  • [10] Gurevich, Y., Shelah, S.: Fixed-point extensions of first-order logic. Ann. Pure Appl. Logic 32, 265–280 (1986).
  • [11] Immerman, N.: Relational queries computable in polynomial time. Information and Control 68, 86–104 (1986)
  • [12] Immerman, N.: Descriptive Complexity. Springer (1999)
  • [13] Knuth, D.: Sorting and Searching, The Art of Computer Programming, vol. 3. Addison-Wesley, second edn. (1998)
  • [14] Libkin, L.: Elements of Finite Model Theory. Springer (2004)
  • [15] Mix Barrington, D.A.: Quasipolynomial size circuit classes. In: Proceedings of the Seventh Annual Structure in Complexity Theory Conference, Boston, Massachusetts, USA, June 22-25, 1992. pp. 86–93. IEEE Computer Society (1992).
  • [16] Mix Barrington, D.A., Immerman, N., Straubing, H.: On uniformity within NC. J. Comput. Syst. Sci. 41(3), 274–306 (1990)
  • [17] Ramakrishnan, R., Gehrke, J.: Database Management Systems. McGraw-Hill, Inc., New York, NY, USA, 3 edn. (2003)
  • [18] Stockmeyer, L.J.: The polynomial-time hierarchy. Theor. Comput. Sci. 3(1), 1–22 (1976)
  • [19]

    Vardi, M.: The complexity of relational query languages. In: Proceedings 14th ACM Symposium on the Theory of Computing. pp. 137–146 (1982)

Appendix 0.A Appendix

Proof (Proof of Theorem 5.1)

One direction of the proof argues that index logic can indeed be evaluated in PolylogTime; we omit this direction due to space limitations.

For the converse, suppose we are given a class of -structures which can be decided by a deterministic polylogarithmic time direct-access Turing machine which has tapes, including ordinary work-tapes, address-tapes, (function) value-tapes and constant-tapes. We assume, w.l.o.g., that (i.e., there is only one accepting state), , and .

Let run in time . With the order relation , we can clearly define the lexicographical order on -tuples of sort , and then use the order to model time and positions of the tape heads of . In our proof we use expressions of the form , where is a -tuple of terms of sort and is a single term also of sort , meaning that is the -th tuple in the order . This is clearly expressible in index logic since it is a polynomial time property on the sort. Consider:

  • A -ary relation for every state such that holds iff is in state at time .

  • -ary relations for every tape such that holds iff at the time the cell of the tape contains the symbol .

  • -ary relations for every tape such that holds iff at the time the head of the tape is in the cell .

We show that these relations are definable in index logic by means of a simultaneous inflationary fixed point formula. Then the following sentence is satisfied by a structure iff .

where

Note that here and denote -tuples of variables of sort .

The formula builds the required relations , , , and (for ) in stages, where the -th stage represents the configuration at times up to . The subformulae , , , and define , , , and , respectively.

To simplify the presentation of the subformulae and w.l.o.g., we assume that, in every non-initial state of a computation, each address-tape contains a single binary number between and and nothing else.

The subformulae are of the form:

where list conditions under which at the following time instant, , the position of the tape will contain .

Suppose, refers to an address-tape or to an ordinary work-tape and that , the subformulae of which takes care of this case is the following:


                           , where denote the address-tapes corresponding to relation (of arity ).

In case refers to a value-tape of a function of arity , the corresponding subformulae of only depend of the contents at time of the address-tapes corresponding to . In this case we write:

                
                
where means that bit of in binary is , which can clearly be expressed using the same strategy than in our example for finding the binary representation of a constant (see Section 5.1).

Given , it is trivial to write and .

The subformula is of the form and other ’s are of the form , where list conditions under which will enter state at the next time instant, .

Finally, the subformulae are of the form

where list conditions under which at the following time instant, , the head of the tape will be in the position .

We omit writing the remaining subformulae, since it is an easy but tedious task. It is also not difficult to see that in the -th stage of the simultaneous inflationary fixed point computation, the relations , and encode the configuration of for times , which completes our proof.∎

Proof (Proof of Lemma 1)

We will show that the property described above cannot be decided in ; the claim then follows from Theorem 5.1. For a contradiction, suppose that the property can be decided in , and let and be the related random-access Turing machine and polylogarithmic function, respectively, such that, for all -structures that satisfy the conditions of the claim, decides the property in at most steps. Let be a natural number such that .

Consider a computation of . We say that an index is inspected in the computation, if at some point during the computation is written in the index tape in binary. Let denote the set of inspected indices of the computation of and denote the set of inspected indices during the first steps of the computation. We say that and are --equivalent if the lengths of and are equal and , for each . We say that and are --equivalent whenever and are. Note that if two structures and are --equivalent, then the computations and are at the same configuration after steps of computation. Hence if and are M--equivalent, then outputs of and are identical.

Let be the class of all -structures of domain for which and are disjoint singleton sets. The encodings of these structures are bit strings of the form , where exactly one and one , , is . The computation of