Descriptive Complexity of Deterministic Polylogarithmic Time and Space
Flavio Ferrarotti, Sen\'en Gonz\'alez, Jos\'e Mar\'ia Turull Torres,, Jan Van den Bussche, and Jonni Virtema

TL;DR
This paper introduces a logical framework that characterizes problems solvable in deterministic polylogarithmic time and space, providing new insights into the descriptive complexity of these classes.
Contribution
It presents a novel two-sorted logic capturing PolylogTime and PolylogSpace, along with a variant of random-access Turing machines for finite ordered structures.
Findings
Logic captures PolylogTime and PolylogSpace classes.
Introduces a random-access Turing machine model.
Highlights open problems in order-invariant queries.
Abstract
We propose logical characterizations of problems solvable in deterministic polylogarithmic time (PolylogTime) and polylogarithmic space (PolylogSpace). We introduce a novel two-sorted logic that separates the elements of the input domain from the bit positions needed to address these elements. We prove that the inflationary and partial fixed point vartiants of this logic capture PolylogTime and PolylogSpace, respectively. 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 a structure directly. We investigate whether an explicit predicate for the ordering of the domain is needed in our PolylogTime logic. Finally, we present the open problem of finding an exact characterization of order-invariant queries in PolylogTime.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Descriptive Complexity of Deterministic Polylogarithmic Time and Space111The research reported in this paper results from the project Higher-Order Logics and Structures supported by the Austrian Science Fund (FWF: [I2420-N31]) and the Research Foundation Flanders (FWO:[G0G6516N]).
It was further supported by the the Austrian Ministry for Transport, Innovation and Technology, the Federal Ministry of Science, Research and Economy, and the Province of Upper Austria in the frame of the COMET center SCCH.
Flavio Ferrarotti
Senén González
José María Turull Torres
Jan Van den Bussche
Jonni Virtema
Software Competence Center Hagenberg, Austria
Universidad Nacional de La Matanza, Argentina
Hasselt University, Belgium
Abstract
We propose logical characterizations of problems solvable in deterministic polylogarithmic time () and polylogarithmic space (). We introduce a novel two-sorted logic that separates the elements of the input domain from the bit positions needed to address these elements. We prove that the inflationary and partial fixed point vartiants of this logic capture and , respectively. In the course of proving that our logic indeed captures on finite ordered structures, we introduce a variant of random-access Turing machines that can access the relations and functions of a 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 of finding an exact characterization of order-invariant queries in .
††journal: Journal of Computer and System Sciences
1 Introduction
The research area known as Descriptive Complexity [1, 2, 3] 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 fixed point logic: the extensions of first-order logic with least fixed points [5, 6].
After these two seminal results, many more capturing results have been developed, and the benefits of this enterprise has been well articulated by several authors in the references given earlier, and others [7]. We just mention here the advantage of being able to specify properties of structures (e.g., data structures and 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. Well known examples are binary search in an array or search in a balanced search tree. 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 [3]. 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 fixed point 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 that defines 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 a 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 the value of , 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.
Finally, we introduce a variant of index logic with partial fixed point operators and show that it captures . This result is analogous to the classical result regarding the descriptive complexity of PSPACE, which is captured over ordered structures by first-order logic with the addition of partial fixed point operators [8]. For consistency, we define using the model of direct-access Turing machines, i.e., the variant of the random-access Turing machine that we introduce in this paper. As with , both models of computation lead to the same notion of . Moreover, we show that, in the case of , random-access to the input-tape can be replaced with sequential-access without having any impact on the complexity class. Similar to PSPACE, the nondeterministic and deterministic classes coincide. It is interesting to note that beyond the problems in nondeterministic logarithmic space, there are well known natural problems that belong to (see examples below, under related work).
A preliminary version of this paper was presented at the 26th International Workshop in Logic, Language, Information, and Computation [9]. This is an extended improved version which in addition to the full proofs of the results on deterministic polylogarithmic time reported in [9], also considers polylogarithmic space and its descriptive characterization in terms of a variant of index logic.
Related work
Many natural fixed point computations, such as transitive closure, converge after a polylogarithmic number of steps. This motivated the study in [10] of a fragment of fixed point logic with counting (FPC) that only allows polylogarithmically many iterations of the fixed point operators (polylog-FPC). They noted that on ordered structures polylog-FPC captures NC, i.e., the class of problems solvable in parallel polylogarithmic time. This holds even in the absence of counting, which on ordered structures can be simulated using fixed point operators. Moreover, an old result in [11] directly implies that polylog-FPC is strictly weaker than FPC with regards to expressive power.
It is well known that the (nondeterministic) logarithmic time hierarchy corresponds exactly to the set of first-order definable Boolean queries (see [3], Theorem 5.30). The relationship between uniform families of circuits within NC1 and nondeterministic random-access logarithmic time machines was studied in [12]. However, the study of descriptive complexity of classes of problems decidable by deterministic formal models of computation in polylogarithmic time, i.e., the central topic of this paper, has been overlooked by previous works.
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 [13, 14]. Recently, a theorem analogous to Fagin’s famous theorem [4], was proven for nondeterministic polylogarithmic time [14]. 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 quasi-polynomial size AND/OR circuits and the corresponding restricted second-order logic in [13]. Both logics capture the full alternating polylogarithmic time hierarchy, but the additional restriction in the first-order universal quantification in the second-order logic defined in [14], 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 [15] regarding the polynomial-time hierarchy. Unlike the classical results of Fagin and Stockmeyer [4, 15], the results on the descriptive complexity of nondeterministic polylogarithmic time classes only hold over ordered structures.
Up to the authors knowledge, very little is known regarding the relationship of with the main classical complexity classes (see [16] and [17]). As usual, let and denote deterministic and nondeterministic logarithmic space, respectively. Further, let denote . The following relations are known:
- (i)
, and it is unknown whether . 2. (ii)
, and it is unknown whether . 3. (iii)
Obviously: , the latter class being known as quasi-polynomial time (). 4. (iv)
For all , uniform (see [18]); hence we have that . 5. (v)
For all , let and let (see [19]). It follows that .
Some interesting natural problems in which are not known to be in follow. By item (iv) above, we get that division, exponentiation, iterated multiplication of integers [20], and integer matrix operations, such as exponentiation, computation of the determinant, rank and the characteristic polynomial (see [21] and [22] for detailed algorithms in ), are all in . Other well-known problems in the class are -colorability of graphs of bounded tree-width [23], primality, 3NF test, BCNF test for relational schemas of bounded tree-width [24, 25], and the circuit value problem of only EXOR gates [16]. Finally, in [26] an interesting family of problems is presented. It is shown that, for every , there is an algebra over matrices such that the depth straight linear formula problem over is complete under reducibility. Now, by (iv) above, these problems are in .
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
[TABLE]
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 . A finite ordered -structure is a finite structure of vocabulary , where is a binary relation symbol and is a linear order on . Every finite ordered structure has a corresponding isomorphic structure, whose domain is an initial segment of the natural numbers. Thus, we assume, as usual, that , where is the cardinality of .
In this paper, always refers to the binary logarithm of , i.e., . We write as a shorthand for . A tuple of elements is sometimes written as . We then use to denote the -th element of the tuple. Similarly, if is a finite string, we denote by the -th letter of this string.
3 Deterministic polylogarithmic time
The sequential access that Turing machines have to their tapes restrict sub-linear time computations to depend only on the first sub-linear bits of the input; there is now way to access an arbitrary bit of the input. Therefore, logarithmic time complexity classes are usually studied using models of computation that have random-access222The term random-access refers to the manner how random-access memory (RAM) is read and written. In contrast to sequential memory, the time it takes to read or write using RAM is almost independent of the physical location of the data in the memory. We want to emphasise that there is nothing random in random-access. to their input, i.e., that can access every input address directly. As this also applies to polylogarithmic time, we adopt a Turing machine model that has a random-access read-only input, similar to the logarithmic-time Turing machine in [12].
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 leftmost 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 [math], and (for blank). The position of the input-tape head is determined by the number stored in binary between the leftmost cell and the first blank cell of the address-tape (if the leftmost cell is blank, then is considered to be [math]) 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, a random-access Turing machine with work-tapes is a five-tuple . Here is a finite set of states; is the initial state. is a finite set of symbols (the alphabet of ). For simplicity, we fix . is the set of accepting final states. The transition function of is of the form . We assume that the tape head directions for “left”, for “right” and for “stay”, are not in .
Intuitively, means that, if is in the state , the input-tape head is scanning , the index-tape head is scanning , and for every the head of the -th work-tape is scanning , then the next state will be , the index-tape head will write and move in the direction indicated by , and for every the head of the -th work-tape will write and move in the direction indicated by . Situations in which the transition function is undefined indicate that the computation must stop. Observe that cannot change the contents of the input tape.
A configuration of on a fixed input is a tuple , where is the current state of , represents the current contents of the index-tape cells, and each represents the current contents of the -th work-tape cells. We do not include the contents of the input-tape cells in the configuration since they cannot be changed. Further, the position of the input-tape head is uniquely determined by the contents of the index-tape cells. The symbol (which we assume is not in ) marks the position of the corresponding tape head. By convention, the head scans the symbol immediately at the right of . All symbols in the infinite tapes not appearing in their corresponding strings are assumed to be the designated symbol for blank .
At the beginning of a computation all work-tapes are blank, except the input-tape, that contains the input string, and the index-tape that contains a [math] (meaning that the input-tape head scans the first cell of the input-tape). Thus, the initial configuration of is . A computation is a (possibly infinite) sequence of configurations which starts with the initial configuration and, for every two consecutive configurations, the latter is obtained by applying the transition function of to the former. An input string is accepted if an accepting configuration, i.e., a configuration in which the current state belongs to , is reached.
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 [math]’s in its subsequent cells right up until the input-tape head scans . It then rewrites the last [math] back to the blank symbol . 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 [math]. If then is done. If [math], it writes a and tests whether the input-tape head jumps to the cell with ; if so, it rewrites a [math], 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. ∎
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:
[TABLE]
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 its 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 [3]. Let be a vocabulary, and let with be an ordered structure of vocabulary . Note that the order on can be used to define an order for tuples of elements of as well. Each relation of is encoded as a binary string of length , where in a given position indicates that the -th tuple of is in . Likewise, each constant number is encoded as a binary string of length .
We also need to encode the functions of a structure. We view -ary functions as consisting of many -ary relations, where the -th relation indicates whether the -th bit of the value of the function 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 , and hence .
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 be a vocabulary. A direct-access Turing machine that takes -structures as an 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
[TABLE]
If corresponds to an address-tape or an ordinary work-tape, we get the form
[TABLE]
If corresponds to one of the read-only tapes, we have
[TABLE]
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 their values in in binary. 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 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.
Proof.
We will first sketch how a random-access Turing machine simulates a direct-access Turing machine on an input . Let denote the cardinality of and the length of . We dedicate a work-tape of to every tape of . In addition, for each relation , we add one extra tape that will always contain the answer to the query . We also use additional work-tapes for convenience. We then encode the initial configuration of into the tapes of :
On the 0th constant tape, write in binary. 2. 2.
On each tape for a constant , write in binary. 3. 3.
For the answer-tapes of relations , write the bit [math].
For encoding the transitions of , we will in addition need two more constructs:
- a.
Updating the answer-tapes of relations after each transition. 2. b.
Updating the answer-tapes of functions after each transition.
We now need to verify that these procedures (3. is trivial) can be performed by in polylogarithmic time with respect to .
Step 1. On a fixed vocabulary , we have , for some fixed function of the form
[TABLE]
We will find by executing a binary search between the numbers [math] and ; note that checking whether a binary representation of a number is at most , can be checked by writing the representation to the index-tape and checking whether a bit or is read from the input-tape. For each i between [math] and , can be computed in polynomial time with respect to the length of in binary, and thus in polylogarithmic time with respect to .
Step 2. The binary representation of a constant is written in the input-tape between and , where is a fixed function of the form The numbers and are obtained as in case 1. Then is written on the index tape and the next bits of the input are copied to the tape corresponding to .
Steps a. and b. These cases are are handled similar to each other and to the case 2. above. The main difference for b. is that the bits of the output are not in successive positions of the input, but the location of each bit needs to be calculated separately.
We next sketch how a direct-access Turing machine simulates a random-access Turing machine on an input . First note that approach similar to the converse direction does not work here, as we do not have enough time to directly construct the initial configuration of inside . For each work-tape of , we dedicate a work-tape of . For the index-tape of , we dedicate a work-tape of and call it the index-tape of . Moreover, we use some additional work-tapes for convenience. The idea of the simulation is that the dedicated work-tapes and the index-tape of copy exactly the behaviour of the corresponding tapes of . The additional work-tapes are used to calculate to which part of the input of the index-tape refers to. After each transition of this is checked so that the machine can update its address-tapes accordingly.
Recall that given an input structure of cardinality , the input of is of length
[TABLE]
The number written in binary on the index-tape of determines the position of the input that is read by . From (1) we obtain fixed functions on , that we use in the simulation to check which part of the input is read when the index-tape holds a particular number. For example, if the index-tape holds , we can calculate that the head of the input-tape of reads the bit answering the query: is . We can use an extra work-tape of to always store the bit that is reading from its input; the rest of the simulation is straightforward. ∎
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 [13], 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 [27].
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 sort 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** (Numerical and first-order terms).**
The only terms of sort n are the variables of sort n. For a vocabulary , the -terms of sort v are generated by the following grammar:
[TABLE]
where is a variable of sort v, is a constant symbol in , and is a function symbol in .
Definition 2** (Syntax of index logic).**
Let be a vocabulary. The formulae of index logic is generated by the following grammar:
[TABLE]
where are -terms of sort v, are variables of sort n, and are tuples of variables of sort n whose length coincides with the arity of the relation variable . Moreover, is a formula where the variable of sort v does not occur as a free variable.
We also use the standard shorthand formulae , , , and with the obvious meanings.
The concept of a valuation is the standard one 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 sort v, then .
- •
If is a variable of sort n, then .
- •
If is a relation variable with arity , then .
If is a variable and a legal value for that variable, we write to denote the valuation that maps to and agrees with for all other variables. Valuations extend to terms and tuples of terms in the usual way.
Fixed points are defined in the standard way (see [28] and [29] among others). Given an operator , a set is a fixed point of if . A set is the 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 sort n. Let be a -structure and a variable valuation. The formula gives rise to an operator defined as follows:
[TABLE]
Definition 3**.**
The formulae of are interpreted as follows:
- •
* iff .*
- •
* iff .*
- •
* iff .*
- •
* iff .*
- •
* iff in binary is , where and iff . *
- •
* iff .*
- •
* iff .*
- •
* iff and .*
- •
* iff , for some .*
- •
* iff there exists such that and .*
It immediately follows from the famous result by Gurevich and Shelah regarding the equivalence between inflationary and least fixed points [30], that an equivalent index logic can be obtained if we (1) replace by in the formation rule for the fixed point operator in Definition 2, adding the restriction that every occurrence of in is positive333This ensures that is a monotonic function and that the least fixed point 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 also be used here, since it does not increase the expressive power of the logic. Following the syntax and semantics proposed by Ebbinghaus and Flum [28], a version of index logic with simultaneous inflationary fixed point operators can be obtained by replacing the clause corresponding to in Definition 2 by the following:
- •
If is tuple of variables of sort n, and for and , we have that is also 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.
In the next two subsections, we give two worked-out examples that illustrate the power of index logic. After that, the exact characterization of its expressive power is presented in Subsection 5.3.
5.1 Finding the binary representation of a term
Let be a term of sort . In this example, we construct an index logic formula that expresses the well-known bit predicate . The predicate states that the -th bit of in binary is set. Subsequently, the sentence is valid over the class of all finite ordered structures.
Informally, for a fixed term , our implementation of 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 fixed point , where
[TABLE]
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 [math], , …, 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 about 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 \forall x\forall y\Big{(}x<y<N\to\big{(}K(x)\preceq K(y)\big{)}\Big{)}. 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
[TABLE]
Note that, we express here the condition by a first-order formula that is not an index logic formula. So, our aim is to show that is still expressible, over all sorted arrays, by a formula of index logic.
We recall the procedure for binary search [31] in the following form, using integer variables , and :
[TABLE]
We are going to express the above procedure as a simultaneous fixed point, 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 bit predicate from Section 5.1. 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 inflationary fixed point logic on the numeric sort; inflationary fixed point 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 the formula by replacing each subformula of the form by , and by .
Furthermore, we are going to apply the 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
[TABLE]
5.3 The logical characterization theorem for
The following result confirms that our logic serves our original purpose.
Theorem 2**.**
Over ordered structures, index logic captures .
Proof.
Formulas of index logic can be evaluated in polylogarithmic time
Let be a finite set of variables (of sort n, v, and relational). We stipulate a Turing machine model that has a designated work-tape for each of the variables in . The idea here is that the tape designated for a variable contains the value of that variable encoded as a binary string. We use induction on the structure of formulas to show that, for every sentence of index logic, whose variables are from the set , there exists a direct-access Turing machine that, for every ordered structure with , and every valuation , decides in time whether . Since is an arbitrary finite set, this suffices.
In the proof, variables of sort n and v are treated in a similar way as constant symbols, meaning that their value is written in binary in the first cells of their designated work-tapes. The work-tape designated to a relation variable of arity contains encoded as a binary string in its first cells, where a in the -th cell indicates that the -th tuple in the lexicographic order of is in .
We will show first, by induction on the structure of terms, that, if is term, a direct-access Turing machine, and a valuation such that, for every variable that occurs in , the value is written in binary in the designated work-tape of , then can be computed by in time . If is a variable of sort n or v, or a constant symbol, then only needs to read the first cells of the appropriate work-tape or constant-tape, respectively. If is a term of the form , we access and copy each in binary in the corresponding address-tapes of . By the induction hypothesis, this takes time each. Using additional steps the result of length will then be accessible in the value-tape of .
We will next use induction to prove our main claim. Note that, the cases for quantifiers assure that the assumptions needed for the calculation of the values of terms are met. We will show by induction that, if is a formula with variables in , a valuation, and a direct-access Turing machine, such that, for every variable that occurs free in , the value is written in binary in the designated work-tape of , then can be decided by in time .
If is an atomic formula of the form , can evaluate in polylogarithmic time by accessing the values of and in binary and then comparing their bits.
If is an atomic formula of the form , can evaluate in polylogarithmic time by simply computing the values of the terms and copying the values to the corresponding address-tapes of . By the proof for terms above, computing the values of the terms take polylogarithmic time each, and since the values have bits, also the copying can be done in polylogarithmic time.
If is an atomic formula of the form , can evaluate in polylogarithmic time by accessing the values in binary, computing the position of the tuple in the lexicographic order of in binary, and then accessing the -th cell of the work-tape which contains the encoding of of length . Computing in binary involves simple arithmetic operations on binary numbers of length bounded by , which can clearly be done in time polynomial in .
If is an atomic formula of the form , proceeds as follows. Let and let be in binary. For every , , writes in binary in the work-tape designated for the variable and checks whether iff . Since, by the induction hypothesis, this check can be done in polylogarithmic time, and can be computed in polylogarithmic time, we get that decides in polylogarithmic time as well.
If is a formula of the form , where the arity of is , let denote the related operator, , and , for each . The inflationary fixed point is reached on stage , at the latest, and thus Recall that
[TABLE]
We calculate from as follows. Note that on each stage, the value of is written in binary on the work-tape designated for . We first calculate the value of in binary on another work-tape, and then reformat the contents of the work-tape designated for to contain the value of . For , we format the work-tape designated for to contain a string of [math]s of length . In order to calculate from , we go through all -tuples in the lexicographic order. For , we write in binary on the designated work-tape for and check whether
[TABLE]
holds. By induction hypothesis, this can be checked in time . If holds and is the -th k-tuple in the lexicographic ordering, we write to the -th cell of the work-tape, where the value of is being constructed, otherwise we write [math] to this cell. Hence the computation of from can be done in time which is still . It is now clear that can be computed in time as well. Finally, determining whether is included in the fixed point is clearly computable in , for one must just calculate the position of in the lexicographic order of -tuples, and then check whether that position has a [math] or in the work-tape corresponding to .
If is a formula of the form , proceeds as follows. For each , writes in binary in the work-tape designated for and checks whether . Since, by definition, does not appear free in , it follows by the induction hypothesis that can perform each of these checks in polylogarithmic time. In parallel, writes the bit string , defined such that iff , to the work-tape designated to the variable . Let the content of this work-tape at the end of this process be in binary. can now check whether (recall that by convention, has the value in binary in one of its constant-tapes and thus this can be done in polylogarithmic time). If then . If , then checks whether , which by the induction hypothesis can also be done in polylogarithmic time.
Finally, if is a formula of the form , then for each , writes in binary to the work-tape designated for and checks whether . It follows by the induction hypothesis that can perform each of these checks in polylogarithmic time. If the test is positive for some then . The remaining cases are those corresponding to Boolean connectives and follow trivially from the induction hypothesis.
Every polylogarithmic time property can be expressed in index logic
Suppose we are given a class of ordered -structures, which can be decided by a deterministic polylogarithmic time direct-access Turing machine , that 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 . Note that, only small inputs (up to some fixed constant) may require more time than . Those finite number of small input structures can be dealt separately, for each finite structure can be easily defined by an index logic sentence. Hence, from now on, we only consider those inputs for which runs in time . Using the order relation of the ordered structure , we can define the lexicographic order for the -tuples in , and then use this order to model time and positions of the tape heads of . Note that this can be done, since the number of -tuples in is . In our proof, we use expressions of the form , where is a -tuple of variables of sort and is a single variable also of sort , with the intended 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.
Next we introduce, together with their intended meanings, the relations we use to encode the configurations of polylogarithmic time direct-access Turing machines. 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 on the cell .
We show that these relations are definable in index logic by means of a simultaneous inflationary fixed point formula. The following sentence is satisfied by a structure iff . The idea of the formula is that it uses the simultaneous fixed point operator to construct the whole computation of iteration by iteration, and states that there exists a time step in which accepts. We define the formula
[TABLE]
where
[TABLE]
[TABLE]
[TABLE]
[TABLE]
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 time steps 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 [math] and and nothing else. This number has at most bits, and hence we encode positions of address-tapes (and function value-tapes) with a single variable of sort (instead of a tuple of variables).
We will now give the idea how the formulae , , , , and are constructed from . We first describe the construction of in detail; the formulae and are constructed in a similar fashion. The rough idea behind all the formulas is the following: the formulas encode directly the initial configuration of the computation, and for a non-initial time step, how the configuration at that time step is computed from the previous configuration. The formula , for example, encodes whether the -th tape at the cell position at the time contains the symbol [math]. If is an address-tape or an ordinary work-tape, then in the initial configuration of the computation, the tape contains the blank symbol on all its cells. In this case, the formula is of the form:
[TABLE]
where list conditions under which at the following time instant, , the position of the tape will contain [math]. In the more general case, the formula has the form , where is used to encode the initial configuration related to the relation .
We will next describe the construction of . Suppose, refers to an address-tape or to an ordinary work-tape. The formula is a disjunction over all the possible reasons, for why at the time the position of tape contains the symbol [math]. There are two possibilities: (1) at the time the head of the tape was not in the position and the position of the tape contained the symbol [math], (2) at the time the head of the tape was in the position and the head wrote the symbol [math]. Below, we display a disjunct of that is due to a reason of the second kind by one possible transition . The disjunct of , which takes care of this case is obtained from the following formula by substituting with :
[TABLE]
At time , is in the state and the head of the tape is in the position reading .
At time , the tuple of values in the address-tapes of is in iff .
where denote the address-tapes corresponding to the -ary relation , and is a shorthand for , if , and a shorthand for , if .
Assume then that refers to a value-tape of a function of arity , and let refer to its address-tapes. Recall that the contents of a value-tape of a function at a time depends only on the contents of its address-tapes at the time . Below, we write using the contents of the related address-tapes at time . This is fine, for we do not introduce circularity of definitions (technically, we obtain the contents of the related address-tapes at time using the corresponding formulas that define them from the configuration of the machine at time ). Now refers to the following formula:
[TABLE]
where expresses that the bit of position of in binary is ; we showed, in Section 5.1, how the bit predicate is expressed in index logic.
The formula 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 formulae are of the form
[TABLE]
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. ∎
6 Definability in Deterministic PolylogTime
We observe here that very simple properties of structures are nondefinable in index logic. Moreover, we provide an 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 that 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 s:=\underbrace{0\dots 0}_{\text{n times}}. 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
[TABLE]
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 though.
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
[TABLE]
Proof.
We will show that the property described above cannot be decided in ; the claim then follows from Theorem 2. 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 with an input string . 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 takes at most steps.
We will next construct a subclass of that consists of exactly those structures in for which the indices in hold only the bit [math]. We present an inductive process that will in the end produce . Each step of this process produces a subclass of for which the following hold:
- a)
The structures in are --equivalent. 2. b)
There exists and
[TABLE]
Define ; clearly satisfies the properties above. For , we define to be the subclass of consisting of those structures that on time step inspects an index that holds the bit [math].444If the machine already halted on an earlier time step , we stipulate that the machine inspects on time step the same index that it inspected on time step .
Assume that a) and b) hold for , we will show that the same holds for . Proof of a): Let . By construction and by the induction hypothesis, and are --equivalent, and on step and inspect the same index that holds [math]. Thus and are --equivalent. Proof of b): It suffices to show that is nonempty; the claim then follows by construction and the property b) of . By the induction hypothesis, there is a structure . Let be the index that inspects on step . Since , there exists a structure such that the th bit of is [math]. Clearly .
Consider the class (this will be our ) and and recall that is of the form . Since , there exists two distinct indices and , , such that . Let denote the structure such that is a bit string where the th and th bits are and all other bits are [math]. Similarly, let denote the structure such that is a bit string where the th and th bits are and all other bits are [math]. Clearly the structures and are in and --equivalent. Since bounds above the length of computations of and , it follows that the outputs of the computations are identical. This is a contradiction, for and are such that should accept the first and reject the second. ∎
Theorem 3**.**
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 .
Proof.
For the sake of a contradiction, assume that is such a formula. We will derive a contradiction with Lemma 1. Without loss of generality, we may assume that the only symbols of that occur in are and , and that is a sentence (i.e., has no free variables).
We define the translation of inductively. In addition to the cases below, we also have the cases where the roles of and are swapped.
- •
For that does not include or , let .
- •
For Boolean connectives and quantifiers the translation is homomorphic.
- •
For of the form , let .
- •
For of the form , let .555By we denote some formula that is always false, e.g, .
- •
For of the form or , let .
- •
For of the form , define as
- •
For of the form , let
[TABLE]
where is a fresh variable.
If is a -structure such that and are disjoint singleton sets, we denote by the -structure with the same domain such that and . We claim that for every -structure such that and are disjoint singleton sets and and every valuation the following holds:
[TABLE]
This is a contradiction with Lemma 1. It suffices to proof the last equivalence as the first two are reformulations of our assumptions. The proof is by induction on the structure of . The cases that do not involve the constants and are immediate. Note that by assumption, and are never equal and thus the subformula is equivalent to . The case is also easy:
[TABLE]
The case for is similar:
[TABLE]
All other cases are homomorphic and thus straightforward. ∎
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.
Theorem 4**.**
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 .
Proof.
We will define the translation of inductively. Without loss of generality, we may assume that each variable that occurs in is quantified exactly once (for this purpose, we stipulate that the variable is quantified by the term ). For every variable of sort that occurs in , let denote the unique subformula such that is a subformula of for some . Note that occurs only in . We define the following shorthands for variables and of sort :
[TABLE]
where and are fresh distinct variables of sort . In the formulas above, denotes the formula that is obtained from by substituting each free occurrence of in by . The translation is defined as follows:
- •
For formulae that do not include variables of sort , the translation is the identity.
- •
For Boolean connectives and quantifiers of sort , the translation is homomorphic.
- •
For of the form , let .
- •
For of the form , let .
- •
For of the form , define .
- •
For of the form , define .
By a straightforward inductive argument it can be verified that the translation preserves equivalence. ∎
7 Index logic with partial fixed points
In this section, we introduce a variant of index logic defined in Section 5. This logic, which we denote as IL(PFP), is defined by simply replacing the inflationary fixed point operator IFP in the definition of index logic by the partial fixed point operator PFP. We stick to the standard semantics of the PFP operator. We define that
[TABLE]
where denotes the partial fixed point of the operator (see the description above Definition 3). The partial fixed point of an operator is defined as the fixed point of obtained from the sequence , where and , if such a fixed point exists. If such a fixed point does not exist, then .
It is well known that first-order logic extended with partial fixed point operators captures . As a counterpart for this result, we will show that IL(PFP) captures the complexity class polylogarithmic space (). Recall that in IL(PFP) the relation variables bounded by the PFP operators range over (tuples of) , where is the interpreting structure. Thus, the maximum number of iterations before reaching a fixed point (or concluding that it does not exist), is not exponential in the size of , as in FO(PFP). Instead, it is quasi-polynomial, i.e., of size , for some constant . This observation is, in part, the reason why IL(PFP) characterizes . Finally, by an analogous argument that proves the well-known relationship , it follows that .
7.1 The Complexity Class
Let denote the class of structures of a given signature accepted by a direct-access Turing machine . We say that if visits at most cells in each work-tape before accepting or rejecting an input structure whose domain is of size . We define the class of all languages decidable by a deterministic direct-access Turing machines in polylogarithmic space as follows:
[TABLE]
Note that it is equivalent whether we define the class by means of direct-access Turing machines or random-access Turing machines. Indeed, by Theorem 1 and by the fact that the (standard) binary encoding of a structure is of size polynomial with respect to the cardinality of its domain , the following corollary is immediate.
Corollary 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.
Moreover, in the context of , there is no need for random-access address-tape for the input; defined with random-access Turing machines coincide with defined with (standard) Turing machines that have sequential access to the input.
Proposition 2**.**
A class of finite ordered structures of some fixed vocabulary is decidable by a random-access Turing machine working in with respect to iff is decidable by a standard (sequential-access) Turing machine in with respect to , where is the size of the binary encoding of the input structure.
Proof.
We give the idea behind the proof; the proof itself is straightforward. We take as the definition of the standard (sequential-access) Turing machine the definition of the random-access Turing machine given in Section 3, except that we suppose a sequential-access read-only-head for the input tape, and remove the address-tape.
A random-access Turing machine can simulate a sequential-access Turing machine directly by using its address-tape to simulate the movement of the head of the sequential-access input-tape. In the simulation, when the head of the input-tape of is on the -th cell, the address-tape of holds the number in binary, and hence refers to the -th cell of the input. When the head of the input-tape of moves right, the machine will increase the binary number in its address-tape by one. Similarly, when the head of the input-tape of moves left, the machine will decrease the binary number in its address-tape by one. A total of bits suffices to access any bit of an input of length . Clearly increasing or decreasing a binary number of length at most by one can be done in . The rest of the simulation is straightforward.
The simulation of the other direction is a bit more complicated, as after each time the content of the address-tape of the random-access machine is updated, we need to calculate the corresponding position of the head of the input-tape of the sequential-access machine. However, this computation can be clearly done in : We use a work-tape of the sequential-access machine to mimic the address-tape of the sequential-access machine, and an additional work-tape as a binary counter. After each computation step of the random-access machine, the sequential-access machine moves the head of its input tape to its leftmost cell, formats the work-tape working as a binary counter to contain exactly the binary number that is written on the address-tape. Then the sequential-access machine moves the head of its input-tape right step-by-step simultaneously decreasing the binary counter by . Once the binary counter reaches [math], the head of the input tape is in correct position. The rest of the simulation is straightforward. ∎
Since the function is space constructible (s.c. for short) (see [16], where these functions are denoted as proper), and for any two s.c. functions their product is also s.c., we get that for any the function is s.c. Hence, by Savitch’s theorem, we obtain the following result.
Fact 1**.**
For any , it holds that . Thus, nondeterministic and deterministic coincide.
7.2 Index logic with partial fixed point operators captures
To encode a configuration of polylogarithmic size, we follow a similar strategy as in Theorem 2, i.e., in the proof of the characterization of by . The difference here is that there is no reason to encode the whole history of a computation in the fixed point. At a time step it suffices that the configuration of the machine at time step is encoded; hence, we may drop the variables , from the fixed point formula defined on page 5.3. Moreover, we make a small alteration to the Turing machines so that acceptance on an input structure will correspond to the existence of a partial fixed point.
Theorem 5**.**
Over ordered finite structures, captures .
Proof.
The direction of the proof that argues that IL(PFP) can indeed be evaluated in is straightforward. Let be an IL(PFP)-sentence, we only need to show that there exists a direct-access Turing machine working in space, for some constant , such that for every structure and valuation , it holds that iff . Note that, in an induction on the structure of , all the cases, except the case for the operator, are as in the proof of Theorem 2. Clearly if a formula can be evaluated in it can also be evaluated in . For the case of the operator (using a similar strategy as in [28]), we set a counter to , using exactly cells in a work-tape, where is the arity of the relation variable bounded by the operator. To evaluate the operator, say on a formula , will iterate evaluating , decreasing the counter in each iteration. When the counter gets to [math], checks whether the contents of the relation is equal to its contents in the following cycle, and whether the tuple given in the application belongs to it. If both answers are positive, then accepts, otherwise, it rejects. This suffices to find the fixed point (or to conclude that it does not exist), as there are many relations of arity with domain .
For the converse, let be an -tape direct-access Turing machine that works in . As in the proof of Theorem 2, we assume w.l.o.g., that (i.e., there is only one accepting state), , and . In addition to the assumptions made in the proof of Theorem 2, we assume that once the machine reaches an accepting state, it will not change its configuration any longer; that is, all of its heads stay put, and write the same symbol as the head reads. Note that the machine accepts if and only if is in the same accepting configuration during two consecutive time steps.
We build an IL(PFP)-sentence such that for every structure and valuation , it holds that iff . The formula is a derivative of that of Theorem 2 and is defined using a simultaneous PFP operator. In the formula below, denote [math]-ary relation variables that range over the values true and false. We define
[TABLE]
where
[TABLE]
[TABLE]
[TABLE]
[TABLE]
The formulae used in the PFP operator are defined in the same way as in Theorem 2; with the following two exceptions.
The formulae of the form are replaced with the analogous formulae obtained, by simply removing the variables referring to time steps. 2. 2.
Subformulas of the form are replaces with , which will be true only on the first iteration of the fixed point calculation.
Following the proof of Theorem 2, it is now easy to show that if and only if accepts . ∎
8 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 [32]. 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]
E. Grädel, P. Kolaitis, L. Libkin, M. Marx, J. Spencer, M. Vardi, Y. Venema, S. Weinstein, Finite Model Theory and Its Applications, Springer, 2007.
- [2]
Y. Gurevich, Toward logic tailored for computational complexity, in: M. Richter, et al. (Eds.), Computation and Proof Theory, Vol. 1104 of Lecture Notes in Mathematics, Springer-Verlag, 1984, pp. 175–216.
- [3]
N. Immerman, Descriptive Complexity, Springer, 1999.
- [4]
R. Fagin, Generalized first-order spectra and polynomial-time recognizable sets, in: R. Karp (Ed.), Complexity of Computation, Vol. 7 of SIAM-AMS Proceedings, Americal Mathematical Society, 1974, pp. 43–73.
- [5]
N. Immerman, Relational queries computable in polynomial time, Information and Control 68 (1986) 86–104.
- [6]
M. Vardi, The complexity of relational query languages, in: Proceedings 14th ACM Symposium on the Theory of Computing, 1982, pp. 137–146.
- [7]
S. Abiteboul, R. Hull, V. Vianu, Foundations of Databases, Addison-Wesley, 1995.
- [8]
M. Y. Vardi, The complexity of relational query languages, in: Proceedings of the 14th Annual ACM Symposium on Theory of Computing, ACM, 1982, pp. 137–146.
- [9]
F. Ferrarotti, S. González, J. M. Turull Torres, J. Van den Bussche, J. Virtema, Descriptive complexity of deterministic polylogarithmic time, in: Logic, Language, Information, and Computation - 26th International Workshop, WoLLIC 2019, Proceedings, Vol. 11541 of Lecture Notes in Computer Science, Springer, 2019, pp. 208–222.
- [10]
M. Grohe, W. Pakusa, Descriptive complexity of linear equation systems and applications to propositional proof complexity, in: 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS, IEEE Computer Society, 2017, pp. 1–12.
- [11]
N. Immerman, Number of quantifiers is better than number of tape cells, J. Comput. Syst. Sci. 22 (3) (1981) 384–406.
- [12]
D. A. Mix Barrington, N. Immerman, H. Straubing, On uniformity within NC1, J. Comput. Syst. Sci. 41 (3) (1990) 274–306.
- [13]
D. A. Mix Barrington, Quasipolynomial size circuit classes, in: Proceedings of the Seventh Annual Structure in Complexity Theory Conference, IEEE Computer Society, 1992, pp. 86–93.
- [14]
F. Ferrarotti, S. González, K. Schewe, J. M. Turull Torres, The polylog-time hierarchy captured by restricted second-order logic, in: 20th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, IEEE, 2018, pp. 133–140.
- [15]
L. Stockmeyer, The polynomial-time hierarchy, Theor. Comput. Sci. 3 (1) (1976) 1–22.
- [16]
C. Papadimitriou, Computational Complexity, Addison-Wesley, 1994.
- [17]
M. Garey, D. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979.
- [18]
A. Borodin, On relating time and space to size and depth, SIAM J. Comput. 6 (4) (1977) 733–744.
- [19]
R. Greenlaw, H. J. Hoover, W. L. Ruzzo, Limits to Parallel Computation: P-completeness Theory, Oxford University Press, 1995.
- [20]
J. H. Reif, Logarithmic depth circuits for algebraic functions, SIAM J. Comput. 15 (1) (1986) 231–242.
- [21]
G. Matera, J. M. Turull Torres, The space complexity of elimination theory: Upper bounds, in: Foundations of Computational Mathematics, Springer, 1997, pp. 267–276.
- [22]
A. Grosso, N. Herrera, G. Matera, M. E. Stefanoni, J. M. Turull Torres, An algorithm for the computation of the rank of integer matrices in polylogarithmic space, Electronic Journal of the Chilean Society of Computer Science 4 (1), 45 pages, in Spanish.
- [23]
G. Gottlob, N. Leone, F. Scarcello, Computing LOGCFL certificates, Theor. Comput. Sci. 270 (1-2) (2002) 761–777.
- [24]
G. Gottlob, R. Pichler, F. Wei, Tractable database design through bounded treewidth, in: Proceedings of the Twenty-Fifth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, ACM, 2006, pp. 124–133.
- [25]
G. Gottlob, R. Pichler, F. Wei, Tractable database design and datalog abduction through bounded treewidth, Inf. Syst. 35 (3) (2010) 278–298.
- [26]
M. Beaudry, P. McKenzie, Circuits, matrices, and nonassociative computation, J. Comput. Syst. Sci. 50 (3) (1995) 441–455.
- [27]
M. Grohe, Descriptive Complexity, Canonisation, and Definable Graph Structure Theory, Cambridge University Press, 2017.
- [28]
H.-D. Ebbinghaus, J. Flum, Finite Model Theory, 2nd Edition, Springer, 1999.
- [29]
L. Libkin, Elements of Finite Model Theory, Springer, 2004.
- [30]
Y. Gurevich, S. Shelah, Fixed-point extensions of first-order logic, Annals of Pure and Applied Logic 32 (1986) 265–280.
- [31]
D. Knuth, Sorting and Searching, 2nd Edition, Vol. 3 of The Art of Computer Programming, Addison-Wesley, 1998.
- [32]
E. Grandjean, F. Olive, Graph properties checkable in linear time in the number of vertices, J. Comput. Syst. Sci. 68 (2004) 546–597.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] E. Grädel, P. Kolaitis, L. Libkin, M. Marx, J. Spencer, M. Vardi, Y. Venema, S. Weinstein, Finite Model Theory and Its Applications, Springer, 2007.
- 2[2] Y. Gurevich, Toward logic tailored for computational complexity, in: M. Richter, et al. (Eds.), Computation and Proof Theory, Vol. 1104 of Lecture Notes in Mathematics, Springer-Verlag, 1984, pp. 175–216.
- 3[3] N. Immerman, Descriptive Complexity, Springer, 1999.
- 4[4] R. Fagin, Generalized first-order spectra and polynomial-time recognizable sets, in: R. Karp (Ed.), Complexity of Computation, Vol. 7 of SIAM-AMS Proceedings, Americal Mathematical Society, 1974, pp. 43–73.
- 5[5] N. Immerman, Relational queries computable in polynomial time, Information and Control 68 (1986) 86–104.
- 6[6] M. Vardi, The complexity of relational query languages, in: Proceedings 14th ACM Symposium on the Theory of Computing, 1982, pp. 137–146.
- 7[7] S. Abiteboul, R. Hull, V. Vianu, Foundations of Databases, Addison-Wesley, 1995.
- 8[8] M. Y. Vardi, The complexity of relational query languages, in: Proceedings of the 14th Annual ACM Symposium on Theory of Computing, ACM, 1982, pp. 137–146.
