1 Introduction

One of the central questions in complexity and language theory asks for the power of nondeterminism in bounded-resource computations. Traditionally, nondeterministic devices have been viewed as having as many nondeterministic guesses as time steps. The studies of this concept of unlimited nondeterminism led, for example, to the famous open \({\mathrm {LBA}}\)-problem or the unsolved question whether or not \({\mathsf {P}}\) equals \({\mathsf {NP}}\). In order to gain a better understanding of the nature of nondeterminism, in Fischer and Kintala (1979) and Kintala (1977) it has been viewed as an additional limited resource at the disposal of time or space bounded computations.

The concept of so-called self-verification at least dates back to the paper (Duris et al. 1997). It applies to automata for decision problems and makes use of stronger notions of acceptance and rejection of inputs.

A self-verifying device is a nondeterministic device whose nondeterminism is symmetric in the following sense. Each computation path can give one of the answers yes, no, or unknown. For every input word, at least one computation path must give either the answer yes or no, and the answers given must not be contradictory. So, if a computation path gives the answer yes or no, in both cases the answer is definitely correct. This justifies the notion self-verifying and is in contrast to the general case, where an answer different from yes does not allow to conclude whether or not the input belongs to the language. Here we study the computational capacity of self-verifying iterative arrays (\({\text {SVIA}}\)).

Self-verifying finite automata have been introduced and studied in Duris et al. (1997) and Hromkovic and Schnitger (2001, (2003) mainly in connection with randomized Las Vegas computations. Descriptional complexity issues for self-verifying finite automata have been studied in Jirásková and Pighizzini (2011). In particular, the conversion of self-verifying finite automata to deterministic finite automata from a state complexity point of view is solved there. The main results are matching upper and lower bounds growing like \(3^{n/3}\) for the costs, in terms of the number of states, of such simulations.

Another question that motivates the concept of self-verification is as follows. Given a language such that also its complement belongs to the same family, the description of which of both is more economic (Ilie et al. 2000)? For example, in Jirásková (2005) it is shown that a nondeterministic finite automaton can require \(2^n\) states to accept the complement of a language accepted by an n-state nondeterministic finite automaton. So, a representation of the complement by the n-state automaton together with a bit that says that actually the complement of the language accepted is meant is much more economic.

The computational and descriptional complexity of self-verifying pushdown automata has been studied in Fernau et al. (2017). Self-verifying cellular automata have recently been introduced in Kutrib and Worsch (2020), where it turned out that realtime self-verifying one-way cellular automata (\({\text {SVOCA}}\)) are strictly more powerful than realtime deterministic one-way cellular automata, since they can accept non-semilinear unary languages. Moreover, \({\text {SVOCA}}\)s as well as their two-way variant can strongly be sped-up from lineartime to realtime and they are even capable to simulate any lineartime computation of deterministic two-way cellular automata in realtime. Closure properties of the family of languages accepted by realtime \({\text {SVOCA}}\)s are considered as well, where the closure under concatenation, iteration (Kleene star), and non-erasing homomorphisms are left open. Furthermore, decidability problems are studied.

The paper is organized as follows. In Sect. 2 we present the basic notation and the definitions of self-verifying iterative arrays as well as an introductory example. In general, the symmetric conditions for acceptance/rejection of self-verifying devices imply immediately the effective closures of the language families accepted under complementation. In Sect. 3 this observation is turned in a characterization. Moreover, the strong speed-up by a multiplicative constant is derived for any time-computable time complexity. In Sect. 4 we explore the computational capacity of realtime \({\text {SVIA}}\)s. In particular, its is shown that even realtime \({\text {SVIA}}\)s are as powerful as lineartime self-verifying cellular automata and vice versa. So they are strictly more powerful than deterministic iterative arrays. By mutual simulations of iterative arrays and cellular automata it turns out that, in fact, the sequential input mode of iterative arrays and the parallel input mode of cellular automata as well as realtime and lineartime all lead to the same language family for nondeterministic devices and for self-verifying devices. This is certainly not true for larger time complexities, since cellular automata obey a linear space bound where iterative arrays are semi-infinite.

Several closure properties of the family of languages accepted by realtime \({\text {SVIA}}\)s are inherited from the results on realtime \({\text {SVOCA}}\)s. Moreover, the open property under concatenation can be shown in terms of iterative arrays in Sect. 5. Finally, decidability problems are considered in Sect. 6. In particular, by a reduction of the emptiness problem it is shown that the property of being self-verifying is non-semidecidable.

2 Preliminaries and definitions

We denote the non-negative integers by \({\mathbb {N}}\). Let \(\varSigma \) denote a finite set of letters. Then we write \(\varSigma ^*\) for the set of all finite words (strings) consisting of letters from \(\varSigma \). The empty word is denoted by \(\lambda \), and \(\varSigma ^+=\varSigma ^* {\setminus } \{\lambda \}\). For the reversal of a word w we write \(w^R\) and |w| denotes its length. A subset of \(\varSigma ^*\) is called a language over \(\varSigma \). In general, we use \(\subseteq \) for inclusions and \(\subset \) for strict inclusions.

A one-dimensional iterative array is a linear, semi-infinite array of finite state machines (sometimes called cells) that are identical except for the leftmost one. All but the leftmost cells are connected to their both nearest neighbors, respectively (see Fig. 1). For convenience we identify the cells by their coordinates, that is, by non-negative integers. The leftmost cell is distinguished. This so-called communication cell is connected to its right neighbor and, additionally, to the input supply which feeds the input sequentially. We assume that once the whole input is consumed an end-of-input symbol is supplied permanently. At the outset of a computation all cells are in the so-called quiescent state. The cells work synchronously at discrete time steps. Here we assume that the communication cell is a nondeterministic finite automaton while all the other cells are deterministic ones (cf. Buchholz et al. 2003). Although this is a very restricted case, for easier writing we call such devices nondeterministic.

More formally, a nondeterministic iterative array (\({\text {NIA}}\), for short) is a system \(M=\langle S, \varSigma , F_+, s_0, {\mathord {\vartriangleleft }}, \delta _{nd}, \delta _{d}\rangle \), where S is the finite, nonempty set of cell states, \(\varSigma \) is the finite, nonempty set of input symbols, \(F_+\subseteq S\) is the set of accepting states, \(s_0\in S\) is the quiescent state, \({\mathord {\vartriangleleft }}\notin \varSigma \) is the end-of-input symbol, \(\delta _{nd}:(\varSigma \cup \{\mathord {\vartriangleleft }\}) \times S\times S \rightarrow (2^{S}{\setminus }\emptyset )\) is the nondeterministic local transition function for the communication cell, \(\delta _d:S\times S\times S \rightarrow S\) is the deterministic local transition function for non-communication cells satisfying \(\delta _d(s_0,s_0,s_0)=s_0\).

Fig. 1
figure 1

Initial configuration of an iterative array

A configuration of M at time \(t\ge 0\) is a pair \((w_t,c_t)\), where \(w_t \in \varSigma ^*\) is the remaining input sequence and \(c_t:{\mathbb {N}} \rightarrow S\) is a mapping that maps the single cells to their current states. The initial configuration \((w_0,c_0)\) is defined by the given input \(w_0\in \varSigma ^*\) and the mapping \(c_0(i)=s_0\), \(i\ge 0\). Subsequent configurations are computed by the global transition function \(\varDelta \) that is induced by \(\delta _d\) and \(\delta _{nd}\) as follows: Let \((w_t,c_t)\), \(t\ge 0\), be a configuration. Then the set of its possible successor configurations \((w_{t+1},c_{t+1})\) is defined as follows:

$$\begin{aligned} (w_{t+1},c_{t+1}) \in \varDelta ((w_t,c_t)) \iff \left\{ \begin{array}{l} c_{t+1}(0) \in \delta _{nd}(a,c_t(0),c_t(1))\\ c_{t+1}(i) = \delta _d(c_t(i-1),c_t(i),c_t(i+1))\\ \end{array} \right. \end{aligned}$$

for all \(i\ge 1\), where \(a=\mathord {\vartriangleleft }\), \(w_{t+1}=\lambda \) if \(w_t=\lambda \), and \(a=a_1\), \(w_{t+1}=a_2a_3\cdots a_n\) if \(w_t=a_1a_2\cdots a_n\).

An input w is accepted by an \({\text {NIA}}\) M if at some time step during the course of at least one computation for w the communication cell enters an accepting state. The language accepted by M is denoted by \(L(M)= \{\,w\in \varSigma ^*\mid w \text { is accepted by } M\,\}\). Let \(t:{\mathbb {N}}\rightarrow {\mathbb {N}}\), \(t(n)\ge n+1\) be a mapping. If for each \(w\in L(M)\) there is an accepting computation with at most t(|w|) time steps, then M and L(M) are said to be of time complexity t.

In general, the family of all languages which are accepted by some type of device X with time complexity t is denoted by \({{\mathscr{L}}_{\!t}} (X)\). If t is the function \(n+1\), acceptance is said to be in realtime. Since for nontrivial computations an iterative array has to read at least one end-of-input symbol, realtime has to be defined as \((n+1)\)-time. We write \({{\mathscr {L}}_{\!rt}}(X)\) for realtime and \({{\mathscr {L}}_{\!lt}}(X)\) for lineartime.

Now we turn to self-verifying iterative arrays (\({\text {SVIA}}\)). Basically, an \({\text {SVIA}}\) is an \({\text {NIA}}\), but the definition of acceptance is different. There are now three disjoint sets of states representing answers yes, no, and neutral. Moreover, for every input word, at least one computation path must give either the answer yes or no, and the answers given must not be contradictory. In order to implement the three possible answers the state set is partitioned into three disjoint subsets \(S=F_{+} {\mathbin {\dot{\cup}}} F_{-} {\mathbin {\dot{\cup}}} F_{0}\), where \(F_+\) is the set of accepting states, \(F_-\) is the set of rejecting states, and \(F_0=S {\setminus} (F_+\cup F_-)\) is referred to as the set of neutral states. We specify \(F_+\) and \(F_-\) in place of the set \(F_+\) in the definition of \({\text {SVIA}}\)s. Let \(M=\langle S, \varSigma , F_+, F_-, s_0, {\mathord {\vartriangleleft }}, \delta _{nd}, \delta _{d}\rangle \) be an \({\text {SVIA}}\). For each input word \(w\in \varSigma ^*\), let \(S_w\) denote the set of states entered by the communication cell during any computation on w, that is, \(S_w=\{\, s\in S \mid s\in \left( \varDelta ^{[t]}(w,c_0)\right) (0), \text { for some } t\ge 0\,\}\), where \(\varDelta ^{[t]}\) denotes the t-fold composition of \(\varDelta \), in other words, the set of configurations reachable in t time steps. For the “self-verifying property” it is required that for each \(w\in \varSigma ^*\), \(S_w \cap F_+\) is empty if and only if \(S_w\cap F_-\) is nonempty. So, similarly as for acceptance, an input w is rejected by an \({\text {SVIA}}\) if at some time step during the course of at least one computation on w the communication cell enters a rejecting state. Note that by the self-verifying property every input is either accepted or rejected. If all \(w\in L(M)\) are accepted and all \(w\notin L(M)\) are rejected after at most t(|w|) time steps, then the self-verifying iterative array M is said to be of time complexity t.

In the sequel we will often utilize the possibility of iterative arrays to simulate the data structures pushdown stores (stacks) (Buchholz and Kutrib 1997; Čulik and Yu 1984), queues, and rings (Kutrib 2008) without any loss of time. Here a ring is a queue that can write and erase at the same time. For pushdown stores the communication cell simulates the top of the store, for queues it simulates the front, and for rings the front and the end of the store.

For the sake of completeness, we recall exemplarily the principle of a pushdown store simulation from Kutrib (2008). It suffices to use three additional racks for the simulation. Let the three pushdown registers of each cell be numbered one, two, and three from top to bottom, and suppose that the third register is connected to the first register of the right neighbor. The content of the pushdown store is identified by scanning the registers in their natural ordering beginning in the communication cell, whereby empty registers are ignored. The pushdown store dynamics of the transition function is defined such that each cell prefers to have only the first two registers filled. The third register is used as a buffer. In order to reach that charge it obeys the following rules (cf. Fig. 2).

  1. 1.

    If all three registers of its left (upper) neighbor are filled, it takes over the symbol from the third register of the neighbor and stores it in its first register. The old contents of the first and second registers are shifted to the second and third register.

  2. 2.

    If the second register of its left neighbor is free, it erases its own first register. Observe that the erased symbol is taken over by the left neighbor. In addition, the cell stores the content of its second register into its first one, if the second one is filled. Otherwise, it takes the symbol of the first register of its right neighbor, if this register is filled.

  3. 3.

    Possibly more than one of these actions are superimposed.

Fig. 2
figure 2

Principle of a pushdown store simulation. Subfigures are in row-major order

We illustrate the definitions with an example.

Example 1

The nondeterministic context-free language \(\{\, w\in \{a,b\}^* \mid w=w^R\,\}\) is accepted by the \({\text {SVIA}}\) \(M=\langle S, \{a,b\}, F_+, F_-, s_0, {\mathord {\vartriangleleft }}, \delta _{nd}, \delta _{d}\rangle \). The basic idea is to simulate a stack whose top is the communication cell.

So, we set \(S=(\{s_0,s_1,s_2,s_3,s_+,s_-\}\times S_{pd}) \cup \{s_0\} \cup {\hat{S}}_{pd}\) with \(F_+=\{s_+\}\times S_{pd}\) and \(F_-=\{s_-\}\times S_{pd}\). Here \(S_{pd}\) are the register contents used by the communication cell to manage the top entries of the stack, while \({\hat{S}}_{pd}\) are the non-quiescent states of all but the communication cell, that realize the stack. So, the transition function \(\delta _{d}\) just realizes the interior of the stack and is omitted here.

The idea of the construction of \(\delta _{nd}\) is summarized in the following table and described below. See Fig. 3 for a transition diagram of the communication cell. Since we did not make \(S_{pd}\) explicit in detail and since the state of the right neighbor of the communicating cell is only needed for updating its part of the stack, the right neighbor state is left out in the table and the figure. The current state of the communication cell is indicated as \((s_i,y\ldots )\) or \((s_i,\bot )\) meaning that at the top of the stack is a symbol \(y\in \{a,b\}\) or the stack is empty. A transition to \(xy\ldots \) means that x has been pushed onto, and a transition to \(\cdot \!\cdot \!\cdot \) means that y has been popped from the stack.

$$\begin{aligned}{}\begin{array}[t]{rlcll} (1) &\delta _{nd}(\mathord {\vartriangleleft },(s_0,\bot ),\_) &\ni & (s_+,\bot ) & \text {accept}\, \lambda \\ (2) & \delta _{nd}(a,(s_0,\bot ),\_) &\ni & (s_1, a) & \text {push first symbol } \,a\\ (3) & \delta _{nd}(b,(s_0,\bot ),\_) &\ni & (s_1, b) & \text {push first symbol}\, b\\ (4) & \delta _{nd}(a,(s_1,y \cdots ),\_) &\ni & (s_1, ay \cdots ) & \text {in}\, s_1 \text {continue pushing input symbols}\\ (5) & \delta _{nd}(b,(s_1,y \cdots ),\_) &\ni & (s_1, by \cdots ) & \text {in}\, s_1 \text {continue pushing input symbols}\\ (6) & \delta _{nd}(a,(s_1,y \cdots ),\_) &\ni & (s_2, y \cdots ) & \text {switch to}\, s_2, \text {dropping symbol}\, a\\ (7) & \delta _{nd}(b,(s_1,y \cdots ),\_) &\ni & (s_2, y \cdots ) & \text {switch to}\, s_2, \text {dropping symbol} \,b\\ (8) & \delta _{nd}(a,(s_1,y \cdots ),\_) &\ni & (s_2, ay \cdots ) & \text {switch to}\, s_2, \text {without dropping}\, a\\ (9) & \delta _{nd}(b,(s_1,y \cdots ),\_) &\ni & (s_2, by \cdots ) & \text {switch to}\, s_2, \text {without dropping} \,b \\ (10) & \delta _{nd}(a,(s_2,a \cdots ),\_) &\ni & (s_2, \cdots ) & \text {continue in}\, s_2 \text { for matching symbol} \,a\\ (11) & \delta _{nd}(b,(s_2,b \cdots ),\_) &\ni & (s_2, \cdots ) & \text {continue in}\, s_2 \text { for matching symbol}\, b\\ (12) & \delta _{nd}(a,(s_2,b \cdots ),\_) &\ni & (s_3, \cdots ) & \text {switch to}\, s_3 \text { if mismatch}\\ (13) & \delta _{nd}(b,(s_2,a \cdots ),\_) &\ni & (s_3, \cdots ) & \text {switch to}\, s_3 \text { if mismatch}\\ (14) & \delta _{nd}(a,(s_3,y \cdots ),\_) &\ni & (s_3, \cdots ) & \text {drop remaining input symbols}\\ (15) & \delta _{nd}(b,(s_3,y \cdots ),\_) &\ni & (s_3, \cdots ) & \text {drop remaining input symbols}\\ (16) & \delta _{nd}(\mathord {\vartriangleleft }, (s_2,\bot ),\_) &\ni & (s_+,\bot ) & \text {accept if everything matched}\\ (17) & \delta _{nd}(\mathord {\vartriangleleft }, (s_3,\bot ),\_) &\ni & (s_-,\bot ) & \text {reject since there was a mismatch}\\ \end{array} \end{aligned}$$
Fig. 3
figure 3

Transition diagram of the communication cell of an \({\text {SVIA}}\) accepting the language \(\{\, w\in \{a,b\}^* \mid w=w^R\,\}\). Edges corresponding to transitions \(\delta _{nd}(x,(s, y), \_)\) are labeled xy in the first line, and by the corresponding operation on the pushdown store in the second line. Here, \(x\in \{a,b\}\) and \(x,{\bar{x}}\) means ab or ba

The communication cell enters the accepting state if it is in the quiescent state while reading the end-of-input symbol, that is, if the input is the empty word (Transition 1). If the input is non-empty, the communication cell enters state \(s_1\) (in its first state register) which is used to read and push the symbols of the first part of the input (Transitions 2–5). Then by Transitions 6–9 it is guessed whether the length of the input is odd or even and whether the center of the input is reached. If the guess is odd then the sole symbol without matching mate at the center is simply read without pushing it (Transitions 6–7). If the guess is even then the last symbol of the left part has to be matched and is pushed (Transitions 8–9). Now, state \(s_2\) is entered.

Once in state \(s_2\), the \({\text {SVIA}}\) M compares the pushdown contents with the remaining input by Transitions 10 and 11. If a mate is not matching, state \(s_3\) is entered (Transitions 12 and 13). Once in state \(s_3\), the remaining input is further read, whereby one symbol is popped in each step (Transitions 14 and 15).

Consider the point in time after M is in state \(s_2\) for the first time and let v denote the part of the input that has been pushed to the stack at that time and let u denote the part of the input that still has not been read. Then the input is vxu if the length of the input has been guessed to be odd, and the input is vu if the length of the input has been guessed to be even. If the communication cell switched from \(s_1\) to \(s_2\) “at the right time and in the right way”, that is \(|u|=|v|\), then it will for the first time see input \(\mathord {\vartriangleleft }\) and the empty stack \(\bot \) simultaneously. In this situation, M knows that the guess was correct and it can accept (Transition 16) or reject (Transition 17).

If the communication cell switched from \(s_1\) to \(s_2\) “at the wrong time or in a wrong way”, that is \(|u|\not =|v|\), then it cannot decide whether the input is a palindrome. This can be recognized by M since either all input symbols have been consumed but the stack is not empty or the stack is empty but not all input symbols have been consumed. In this case the computation blocks in one of the states from \(\{s_1,s_2,s_3\}\) which are neutral states.

So, the communication cell comes to a decision yes or no if and only if it has guessed the center of the input correctly. Moreover, the answer is correct.

3 Structural properties and speed-up

Though we are mainly interested in fast computations, that is, realtime and lineartime computations, we allowed general time complexities in the definition of the devices (see Kutrib (2009) for a discussion of this general treatment of time complexity functions). However, it seems to be reasonable to consider only time complexities t that allow the communication cell to recognize the time step t(n). Such functions are said to be time-computable. For example, the function \(t(n)=n+1\) is trivially a time-computable time complexity for \({\text {IA}}\)s.

Other examples are time complexities \(\lfloor \frac{y}{x}\cdot n\rfloor \), for any positive integers \(x<y\), polynomials \(t(n)=n^k\), and exponential time complexities \(t(n)=k^n\), for any integer \(k\ge 2\). More details can be found in Mazoyer and Terrier (1999).

In general, the symmetric conditions for acceptance/rejection of self-verifying devices imply immediately the effective closures of the language families accepted under complementation. In order to turn this observation in a characterization, we first give evidence that self-verifying iterative arrays are in fact a generalization of deterministic iterative arrays. The proof of a corresponding result for cellular automata (Kutrib and Worsch 2020) applies here almost literally.

Lemma 2

Any deterministic iterative array with a time-computable time complexity t can effectively be converted into an equivalent self-verifying iterative array with the same time complexity t.

The proper inclusion \({{\mathscr {L}}_{\!rt}}({\text {IA}})\subset {{\mathscr {L}}_{\!rt}}({\text {NIA}})\) is well known (Buchholz et al. 2003). So, nondeterminism strengthens the computational capacity of iterative arrays. On the other hand, it is an open problem whether the family \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\) is closed under complementation. Therefore, the question whether the family \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) is properly included in \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\), or whether both families coincide, is of natural interest. Next we turn to relate it to the open complementation closure of \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\).

Proposition 3

Let t be a time-computable time complexity. The family of languages \(L\in {\mathscr {L}}_{\!t}({\text {NIA}})\), such that the complement \({\overline{L}}\) belongs to \({\mathscr {L}}_{\!t}({\text {NIA}})\) as well, coincides with the family \({\mathscr {L}}_{\!t}({\text {SVIA}})\).

Proof

Given a t-time \({\text {SVIA}}\) M, it is straightforward to construct an \({\text {NIA}}\) that accepts the complement of L(M) with the same time complexity t.

Conversely, let \(M_1\) be an \({\text {NIA}}\) accepting L and \(M_2\) be an \({\text {NIA}}\) accepting \({\overline{L}}\) with time complexity t. Now a t-time self-verifying iterative array M simulates \(M_1\) and \(M_2\) on different tracks, that is, it uses the same two channel technique of  Dyer (1980) and Smith (1972).

Then it remains to define the set of accepting states as \(F_+=\{\, (s,s')\mid s\in F_1\,\}\) and the set of rejecting states as \(F_-=\{\, (s,s')\mid s'\in F_2\,\}\), where \(F_1\) is the set of accepting states of \(M_1\) and \(F_2\) is the set of accepting states of \(M_2\). \(\square \)

Proposition 3 implies that \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) is properly included in \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\) if and only if \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\) is not closed under complementation; otherwise both families coincide.

While iterative arrays fetch their input sequentially through the communication cell, so-called cellular automata obey a parallel input mode. In a preinitial step their cells fetch an input symbol. That is, there are as many cells as input symbols. So, a deterministic two-way cellular automaton (\({\text {CA}}\)) is a linear array of identical deterministic finite automata which are numbered \(1,2,\dots ,n\). Except for border cells the state transition depends on the current state of a cell itself and those of its both nearest neighbors. Border cells receive a boundary symbol \(\texttt {\#}\) on their free input lines. In a one-way cellular automaton (\({\text {OCA}}\)) the next state of each cell only depends on the state of the cell itself and the state of its immediate neighbor to the right. An input w is accepted by a cellular automaton if at some time step during some computation the leftmost cell enters an accepting state. For cellular automata, realtime is defined to be \(t(n) =n\). Cellular automata whose first state transitions are nondeterministic and whose further transitions are deterministic (\({\text {NCA}}\), \({\text {NOCA}}\)) are studied in Buchholz et al. (2002). Cellular automata that have the self-verifying property (\({\text {SVCA}}\), \({\text {SVOCA}}\)) are considered in Kutrib and Worsch (2020).

It is well known that deterministic (one-way) cellular automata and deterministic iterative arrays can be sped-up from \((n+t(n))\)-time to \((n+\frac{t(n)}{k})\)-time, for any integer \(k>0\) (Bucher and Čulik 1984; Ibarra and Jiang 1987; Ibarra et al. 1985; Ibarra and Palis 1985). Thus, lineartime is close to realtime. However, for deterministic one-way cellular automata and iterative arrays, lineartime is strictly more powerful than realtime. The problem is still open for deterministic two-way cellular automata. Concerning nondeterministic cellular automata, the results in Buchholz et al. (2002) show that, in fact, one-way or two-way information flow and realtime or lineartime do not make a difference, that is, the family of languages accepted by realtime \({\text {NOCA}}\)s coincides with the family of languages accepted by lineartime \({\text {NCA}}\)s. However, to our knowledge, these properties and relations are not known for iterative arrays. In order to study them, next, we turn to strong speed-up results for self-verifying iterative arrays.

Theorem 4

Let \(k \ge 1\) be a constant and t be a time complexity. Then the families \({\mathscr {L}}_{{\!k}\cdot t}({\text {SVIA}})\) and \({\mathscr{L}}_{\!t}({\text {SVIA}})\) coincide.

Proof

A given \((k\cdot t)\)-time \({\text {SVIA}}\) M is simulated by a t-time \({\text {SVIA}}\) \(M'\) as follows. Basically, \(M'\) performs two tasks in parallel on different tracks.

For the first task, assume that the input is fed to the communication cell of \(M'\) in k-symbol blocks, that is, k input symbols in each step. Then each k cells of \(M'\) are grouped together into one cell. In this well-known way the iterative array \(M'\) can simulate k steps of M in one step. That is, this task of \(M'\) has time complexity t and the self-verifying property, since M has time complexity \(k\cdot t\) and the self-verifying property.

The second task of \(M'\) is to make the assumption for the first task true. To this end, it simulates a ring store whose front (and end) is the communication cell. Now the communication cell starts to guess k input symbols in every step. These symbols are fed to the first task. Additionally, the communication step guesses when the end-of-input symbol appears. From that time step on no further input symbols are guessed. In order to verify that the guesses are correct, the k symbols are entered at the end of the ring store respectively. In each step, the symbol at the front of the ring is removed and compared with the actual input symbol. If both match, the guessed symbol is correct, otherwise it is not. In case of a mismatch or a wrongly guessed number of input symbols the second task remains in a neutral state. If it has guessed the input correctly, it enters a positive state.

Finally, \(M'\) accepts if and only if the second task guesses the input correctly and the first task accepts. That is, if the actual input is accepted by M. The iterative array \(M'\) rejects if and only if the second task guesses the input correctly and the first task rejects. That is, if the actual input is rejected by M. So, \(M'\) has the self-verifying property. \(\square \)

In particular, we conclude:

Corollary 5

The families \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) and \({{\mathscr {L}}_{\!lt}}({\text {SVIA}})\) coincide.

4 Computational capacity

The first question in connection with the computational capacity of realtime \({\text {SVIA}}\) is the impact of the (restricted) nondeterminism. Does it increase the capacity? More precisely, we are interested in the question whether the computing power of realtime \({\text {SVIA}}\) is strictly stronger than that of realtime \({\text {IA}}\).

Example 1 shows that the mirror language is accepted by a realtime \({\text {SVIA}}\). However, by using a completely different algorithm the language is accepted by some deterministic realtime \({\text {IA}}\) as well (Cole 1969). So, it cannot be used as a witness for the strictness of the inclusion \({{\mathscr {L}}_{\!rt}}({\text {IA}})\subset {{\mathscr {L}}_{\!rt}}({\text {SVIA}})\). Nevertheless, the strictness follows from a more general result below and is stated in Proposition 11.

The context-free languages form another important language family. The possibility to simulate a pushdown store whose top is simulated by the self-verifying communication cell suggests to compare the family \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) with the family of context-free languages. In Fernau et al. (2017) self-verifying pushdown automata are considered which accept a strict sub-family of the context-free languages. The simulation of a self-verifying pushdown automaton by a realtime \({\text {SVIA}}\) is straightforward. On the other hand, even deterministic realtime iterative arrays accept non-context-free languages, for example the “copy language” \(\{\, ww\mid w\in \{a,b\}^*\,\}\) (Cole 1969).

Corollary 6

The family of languages accepted by self-verifying pushdown automata is strictly included in the family \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\).

In order to discuss further comparisons we now turn to results that show the strong computational capacity of realtime \({\text {SVIA}}\)s. First, we turn to nondeterministic devices and show that sequential or parallel input mode induce the same computational capacity as long as the time complexity is linearly bounded.

Lemma 7

The family \({{\mathscr {L}}_{\!lt}}({\text {NIA}})\) is included in \({{\mathscr {L}}_{\!lt}}({\text {NCA}})\).

Proof

Let M be some lineartime \({\text {NIA}}\) with state set S and set of input symbols \(\varSigma \). By the known speed-up results we can safely assume that M accepts in 2n-time. Now we construct an equivalent 2n-time \({\text {NCA}}\) \(M'\) as follows (see Fig. 4).

Since M works in 2n-time, no more than 2n cells of the array are used (n denotes the length of the input). So, each of the n cells of \(M'\) simulates two cells of M. In particular, the leftmost cell of \(M'\) simulates the communication cell of M together with the first deterministic cell of M. Cell \(2\le i\le n\) of \(M'\) simulates cells \(2(i-1)\) and \(2(i-1)+1\) of M (which are initially quiescent).

Fig. 4
figure 4

Simulation of a lineartime (2n-time) \({\text {NIA}}\) (left) by a lineartime (2n-time) \({\text {NCA}}\) (right)

Basically, \(M'\) uses three tracks after the first time step. On the first track the input is successively shifted to the left to feed the simulated communication cell of M, where \(\texttt {\#}\) symbols are appended at the right. On the third track, the cells of M are simulated, that is, each cell of \(M'\) provides two registers on the third track. Also on the second track each cell of \(M'\) is split into two registers. During the first time step, all cells on the second track nondeterministically compute two mappings from the finite set of mappings \((\varSigma \cup \{\mathord {\vartriangleleft }\}) \times S\times S \rightarrow S\) and store them into their two registers. These are the first 2n guesses of the communication cell of M. The leftmost cell of \(M'\) additionally applies the first of its guessed mappings to its actual input symbol and the states \(s_0\) and \(s_0\) in order to determine the new state of the communication cell of M.

In subsequent transitions, the guessed mappings are successively shifted to the left, register by register. The leftmost cell of \(M'\) deterministically simulates the nondeterministic behavior of the communication cell of M by applying the next mapping to the current local configuration. When the leftmost cell received the border symbol \(\texttt {\#}\) in the nth step it simulates further steps of the communication cell of M on the end-of-input symbol \(\mathord {\vartriangleleft }\). In all but the left register of the leftmost cell \(M'\) simulates the deterministic transitions of M.

In this way, \(M'\) accepts if and only if M accepts. \(\square \)

Lemma 7 gives an upper bound for languages accepted by lineartime \({\text {NIA}}\)s. It shows that a sequential input mode and one nondeterministic cell can be traded for parallel input mode and all cells nondeterministic once only. In fact, it will turn out that the upper bound is sharp.

Lemma 8

The family \({{\mathscr {L}}_{\!lt}}({\text {NCA}})\) is included in \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\).

Proof

The possibility to speed-up \({\text {NCA}}\)s by a constant factor is shown in Buchholz et al. (2002). That is, \({{\mathscr {L}}_{\!lt}}({\text {NCA}})={{\mathscr {L}}_{\!rt}}({\text {NCA}})\). So, given some realtime \({\text {NCA}}\) M with state set S and set of input symbols \(\varSigma \), we construct an equivalent realtime \({\text {NIA}}\) \(M'\) as follows. Basically, \(M'\) works in three phases. First it guesses and generates a configuration that represents the fourfold packed initial configuration of M. Then this packed part is synchronized. Finally, the synchronized cells simulate M whereby four steps are simulated in one step. The phases are depicted in Fig. 5. In parallel, the guesses are verified.

Fig. 5
figure 5

Simulation phases

Phase 1 Let n denote the length of the input. In the following we assume that \(n+1\) is a multiple of four. The generalization of the simulation to the other cases is a straightforward adaption.

So, during the first \(\frac{n+1}{4}\) time steps the communication cell of \(M'\) guesses four input symbols in every step. Additionally, the communication cell guesses a mapping \((\varSigma \cup \{\texttt {\#}\})\times \{a\}\times (\varSigma \cup \{\texttt {\#}\})\rightarrow S\) for each (guessed) input symbol \(a\in \varSigma \). These mappings are used for the simulation of the nondeterministic first transitions of the cells of M. The blocks of four input symbols together with the corresponding mappings are shifted to the right such that each of the leftmost \(\frac{n+1}{4}\) cells gets one block of symbols and mappings. When the communication cell guesses the end-of-input symbol the first phase ends.

In order to verify that the guesses are correct, the four symbols are entered at the end of a ring store respectively. In each step, the symbol at the front of the ring is removed and compared with the actual input symbol. If both match, the guessed symbol is correct, otherwise it is not. In case of a mismatch or a wrongly guessed number of input symbols the computation blocks in a neutral state.

Phase 2 At time step \(\frac{n+1}{4}+1\) the communication cell initiates an FSSP synchronization of the leftmost \(\frac{n}{4}\) cells. The blocks of four input symbols together with the corresponding mappings arrive at their destination cells \(0\le i\le \frac{n+1}{4}-1\) at time \(2i+1\). The initial signal for the FSSP arrives at cell i at time \(\frac{n+1}{4}+1 +i > 2i+1\). So, each cell starts Phase 2 after finishing Phase 1. Altogether, Phase 2 is finished when all cells are synchronized at time \(\frac{n+1}{4}+1+2 \cdot \frac{n+1}{4}-2 =3\cdot \frac{n+1}{4}-1\).

Phase 3 Due to the compressed representation, \(M'\) can simulate M with fourfold speed. In order to simulate the nondeterministic transitions which the cells of M perform during the first time step, the cells of \(M'\) apply the nondeterministically guessed mappings to their local configurations. Thus, \(M'\) simulates the nth step of M at time step \(3\cdot \frac{n+1}{4}-1 +\frac{n+1}{4} =n\).

Since the verification of the guessed input takes \(n+1\) time steps, we conclude that the total time complexity of \(M'\) is \(t(n)=n+1\), that is realtime.

Finally, \(M'\) accepts if and only if the input has been guessed correctly and M accepts. So, we have \(L(M')=L(M)\). \(\square \)

Lemmas 7 and 8 reveal \({{\mathscr {L}}_{\!lt}}({\text {NIA}}) \subseteq {{\mathscr {L}}_{\!lt}}({\text {NCA}}) \subseteq {{\mathscr {L}}_{\!rt}}({\text {NIA}})\). Together with the trivial inclusion \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\subseteq {{\mathscr {L}}_{\!lt}}({\text {NIA}})\) and the results in Buchholz et al. (2002), we obtain the equality of the next theorem.

Theorem 9

\({{\mathscr {L}}_{\!rt}}({\text {NIA}}) = {{\mathscr {L}}_{\!lt}}({\text {NIA}}) = {{\mathscr {L}}_{\!lt}}({\text {NCA}}) = {{\mathscr {L}}_{\!rt}}({\text {NCA}}) = {{\mathscr {L}}_{\!rt}}({\text {NOCA}})={{\mathscr {L}}_{\!lt}}({\text {NOCA}})\).

Since the linear functions \(t(n)\ge n\) are time computable by one-way cellular automata as well as by iterative arrays, Proposition 3 and a similar proposition for cellular automata from Kutrib and Worsch (2020) can be used to build the bridge from nondeterministic to self-verifying devices.

Theorem 10

\({{\mathscr {L}}_{\!rt}}({\text {SVIA}}) = {{\mathscr {L}}_{\!lt}}({\text {SVIA}}) = {{\mathscr {L}}_{\!lt}}({\text {SVCA}}) = {{\mathscr {L}}_{\!rt}}({\text {SVCA}}) = {{\mathscr {L}}_{\!rt}}({\text {SVOCA}})={{\mathscr {L}}_{\!lt}}({\text {SVOCA}})\).

Proof

By Theorem 9, all language families \({{\mathscr {L}}_{\!rt}}({\text {NIA}})\), \({{\mathscr {L}}_{\!lt}}({\text {NIA}})\), \({{\mathscr {L}}_{\!lt}}({\text {NCA}})\), \({{\mathscr {L}}_{\!rt}}({\text {NCA}})\), \({{\mathscr {L}}_{\!rt}}({\text {NOCA}})\), and \({{\mathscr {L}}_{\!lt}}({\text {NOCA}})\) coincide. So, all families consisting of the complements of the languages from the original families coincide as well. Now Proposition 3 and a similar proposition for cellular automata from Kutrib and Worsch (2020) imply that all language families \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\), \({{\mathscr {L}}_{\!lt}}({\text {SVIA}})\), \({{\mathscr {L}}_{\!lt}}({\text {SVCA}})\), \({{\mathscr {L}}_{\!rt}}({\text {SVCA}})\), \({{\mathscr {L}}_{\!rt}}({\text {SVOCA}})\), and \({{\mathscr {L}}_{\!lt}}({\text {SVOCA}})\) are identical. \(\square \)

In particular, now we can deduce that even the restricted nondeterminism gained in considering a self-verifying communication cell strictly increases the computational capacity of realtime iterative arrays. That is, the inclusion \({{\mathscr {L}}_{\!rt}}({\text {IA}}) \subset {{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) is strict.

Proposition 11

The family \({{\mathscr {L}}_{\!rt}}({\text {IA}})\) is strictly included in \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\).

Proof

The relations \({{\mathscr {L}}_{\!rt}}({\text {IA}})\subset {{\mathscr {L}}_{\!lt}}({\text {IA}}) = {{\mathscr {L}}_{\!lt}}({\text {CA}})\) are known (see, for example, Kutrib 2009). Since \({{\mathscr {L}}_{\!lt}}({\text {IA}})\subseteq {{\mathscr {L}}_{\!lt}}({\text {SVIA}})={{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) the assertion follows. \(\square \)

Theorem 10 shows that a sequential input mode and one nondeterministic cell can be traded for parallel input mode and all cells nondeterministic once only, and vice versa. To this end, it does not matter whether the computations are in realtime or lineartime. But what about the world beyond lineartime? Are self-verifying arrays stronger than deterministic ones? Or weaker than nondeterministic ones? The open question of the strictness of one of the inclusions

$$\begin{aligned} {{\mathscr {L}}_{\!lt}}({\text {IA}})= {{\mathscr {L}}_{\!lt}}({\text {CA}}) \subseteq {{\mathscr {L}}_{\!rt}}({\text {SVCA}}) \subseteq {\mathscr {L}}\!({\text {SVCA}}) \subseteq {\mathscr {L}}\!({\text {NCA}}) \end{aligned}$$

is strongly related to famous open problems in complexity theory (see Kutrib 2015). Note that at the top of this hierarchy are devices that may have an exponential time complexity (due to the space bound).

5 Closure of the realtime self-verifying language family under concatenation

The closure properties of the family \({{\mathscr {L}}_{\!rt}}({\text {SVOCA}})\) have been investigated in Kutrib and Worsch (2020). By Theorem 10 we know that these are the closure properties of the identical language family \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\). It is known that the family is closed under the Boolean operations and reversal. In particular, the closure under reversal is of crucial importance. It is an open problem for \({{\mathscr {L}}_{\!rt}}({\text {CA}})\) and, equivalently, for \({{\mathscr {L}}_{\!lt}}({\text {OCA}})\). Moreover, it is linked with the open closure property under concatenation for the same family and, hence, with the question whether lineartime \({\text {CA}}\)s are more powerful than realtime \({\text {CA}}\)s. It is known that the family \({{\mathscr {L}}_{\!rt}}({\text {IA}})\) is not closed under reversal, while the family \({{\mathscr {L}}_{\!lt}}({\text {IA}})\) is closed.

Concerning the operations homomorphism and inverse homomorphism, the closure of \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) under inverse homomorphism and the non-closure under homomorphisms is known.

The question whether the family \({{\mathscr {L}}_{\!rt}}({\text {SVOCA}})\) is closed under concatenation is stated as an open problem in Kutrib and Worsch (2020). Here we can solve the problem in terms of self-verifying iterative arrays.

Proposition 12

The family of languages accepted by realtime \({\text {SVIA}}\) is closed under concatenation.

Proof

Let \(L_1, L_2 \in {{\mathscr {L}}_{\!rt}}({\text {SVIA}})\). If the empty word belongs to \(L_1\) then language \(L_2\) belongs to the concatenation and vice versa. Since the family of languages accepted by realtime \({\text {SVIA}}\) is closed under union, it remains to consider languages \(L_1, L_2 \in {{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) that do not contain the empty word. Let \(M_1\) and \(M_2\) be realtime \({\text {SVIA}}\) that accept \(L_1\) and \(L_2\). Since the family \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) is closed under reversal, there is a realtime \({\text {SVIA}}\) \(M^R_2\) that accepts the reversal \(L_2^R\) of \(L_2\).

A realtime \({\text {SVIA}}\) M that accepts the concatenation \(L_1\cdot L_2\) works as follows. First we describe two tasks that are performed by M in parallel.

Basically, the first task is to read the input and to simulate \(M_1\). In addition, the input is stored into a ring whose front is the communication cell. Moreover, in any simulation step, M tests whether it would accept or reject the input prefix read so far by checking if it would accept or reject when the next input symbol were the end-of-input symbol \(\mathord {\vartriangleleft }\). If the current input prefix is accepted or rejected, the input symbol stored into the ring is marked suitably.

The second task is to guess the reversal of the input symbol by symbol. The guessed reversal is stored into a pushdown store whose top is the communication cell. Additionally, the realtime \({\text {SVIA}}\) \(M^R_2\) is simulated on the guessed input. Similarly as for the first task, if the current prefix of the guessed input would be accepted or rejected, the guessed input symbol stored into the pushdown store is marked suitably.

Let \(x_1x_2\cdots x_n\) be the actual input. It is stored in the ring when the end-of-input symbol appears. At that time, let \(y_1y_2\cdots y_n\) be the content of the pushdown store (from top to bottom). Clearly, M has guessed the reversal of the input correctly if and only if \(x_1x_2\cdots x_n=y_1y_2\cdots y_n\). So, after having read the end-of-input symbol, the \({\text {SVIA}}\) M verifies the guessed reversal of the input by successively removing symbols from the ring and pushdown store and testing whether they match. If M detects any mismatch it blocks in a neutral state.

Now, assume that the reversal of the input has been guessed correctly.

Additionally, while verifying the guesses by successively scanning the ring and the pushdown store, the \({\text {SVIA}}\) M tests whether for some \(1\le i\le n-1\) input symbol \(x_i\) is marked by the simulation of \(M_1\) and symbol \(y_{i+1}\) is marked by the simulation of \(M^R_2\).

Case 1 \(x_1\cdots x_n\in L_1L_2\), say \(x_1\cdots x_i\in L_1\). Then there are computations by \(M_1\) accepting \(x_1\cdots x_i\) and by \(M^R_2\) accepting

$$\begin{aligned} y_n y_{n-1}\cdots y_{i+1}=x_n x_{n-1}\cdots x_{i+1} =( x_{i+1}\cdots x_n)^R. \end{aligned}$$

Having M accept an input if and only if \(x_i\) is marked by \(M_1\) and symbol \(y_{i+1}\) is marked by \(M^R_2\) makes M accept all words in \(L_1L_2\). In detail, if input symbol \(x_i\) is marked accepting by the simulation of \(M_1\) the word \(x_1x_2\cdots x_i\) belongs to the language \(L_1\). If input symbol \(y_{i+1}\) is marked accepting by the simulation of \(M^R_2\), the word \(y_n y_{n-1}\cdots y_{i+1}=x_n x_{n-1}\cdots x_{i+1}\) belongs to the language \(L^R_2\) and, thus, \(x_{i+1}x_{i+2}\cdots x_n\) belongs to the language \(L_2\). So, the input \(x_1x_2\cdots x_n\) belongs to the concatenation \(L_1\cdot L_2\). In this way, M can accept any input from \(L_1\cdot L_2\) and only inputs from the concatenation \(L_1\cdot L_2\).

Case 2 \(x_1\cdots x_n\notin L_1L_2\). In this case for each i either \(x_1\cdots x_i\notin L_1\) or \(x_n\cdots x_{i+1}\notin L^R_2\) or both. That means that for each i there are computations by \(M_1\) and \(M^R_2\) for the respective inputs such that at least one of both rejects. Hence, there will be a computation of M which correctly explicitly rejects an input, if for any two adjacent cells always at least one of them is marked rejecting. In detail, if the test finds neither two adjacent cells marked accepting, nor two adjacent cells that are marked accepting and unmarked, nor two adjacent cells unmarked the communication cell enters a rejecting state. In this case, no matter between which two adjacent symbols one assumes the cut between first and second factor, M has explicitly rejected at least one of them. Clearly, in this case the input cannot belong to the concatenation. On the other hand, if some input does not belong to the concatenation, then there is always a computation of M that results in such a marking. So, M rejects any input that does not belong to \(L_1\cdot L_2\) and only inputs that do not belong to \(L_1\cdot L_2\). In any other case, the leftmost cell remains in a neutral state.

For the computation on input of length n the \({\text {SVIA}}\) M takes \(n+1\) steps to read (and guess) the input for the tasks, and further \(n+1\) steps to verify the guesses and test the markings. So, M works in lineartime which can be sped-up to realtime. \(\square \)

The closure properties of \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})\) with respect to iteration (Kleene star) and non-erasing homomorphisms are still open problems. They are settled for nondeterministic devices since, basically, for iteration it is sufficient to guess the positions in the input at which words are concatenated, and for non-erasing homomorphism it is sufficient to guess the pre-image of the input. However, self-verifying devices have to reject explicitly if the input does not belong to the language. Intuitively, this means that they have to ‘know’ that all possible guesses either do not lead to accepting computations or are ‘wrong.’ The closure properties are summarized in Table 1.

Table 1 Closure properties of the language family \({{\mathscr {L}}_{\!rt}}({\text {SVIA}})={{\mathscr {L}}_{\!lt}}({\text {SVCA}})\) in comparison with the families \({{\mathscr {L}}_{\!rt}}({\text {IA}})\), \({{\mathscr {L}}_{\!lt}}({\text {IA}})={{\mathscr {L}}_{\!lt}}({\text {CA}})\), and \({{\mathscr {L}}_{\!rt}}({\text {OCA}})\), where \(h_\lambda \) denotes \(\lambda \)-free homomorphisms

6 Decidability questions

First we note that the membership problem is obviously decidable for \({\text {SVIA}}\)s obeying a time-computable time complexity.

On the other hand, in Kutrib (2009) it is observed that for any language family that effectively contains \({{\mathscr {L}}_{\!rt}}({\text {IA}})\), the problems emptiness, universality, finiteness, infiniteness, regularity, and context-freeness are not semidecidable. Since we know \( {{\mathscr {L}}_{\!rt}}({\text {IA}})\subset {{\mathscr {L}}_{\!lt}}({\text {IA}})\subseteq {{\mathscr {L}}_{\!lt}}({\text {SVIA}})={{\mathscr {L}}_{\!rt}}({\text {SVIA}}) \) we derive the next corollary.

Corollary 13

The problems emptiness, universality, finiteness, infiniteness, inclusion, equivalence, regularity, and context-freeness are not semidecidable for realtime \({\text {IA}}\)s and thus for realtime \({\text {SVIA}}\)s.

In Kutrib and Worsch (2020) it is shown that the problem to decide whether a given realtime one-way cellular automaton is self-verifying or not is undecidable. Unfortunately, the result has no direct implications for the same question for iterative arrays. However, the undecidability for cellular automata is shown by a reduction of the emptiness problem. We turn to prove the undecidability for iterative arrays as well. Moreover, we use a reduction of the emptiness and universality problem, but the reduction itself is different. Since general iterative arrays do not have neutral or rejecting states (only accepting and non-accepting states), there is no partitioning of the state set. So, the decidability can be asked for a given fixed partitioning or for the existence of a partitioning. We first consider the latter question.

Theorem 14

Given a realtime (non)deterministic iterative array M with state set S and accepting states \(F_+\), it is not semidecidable whether there exists \(F_- \subseteq (S\setminus F_+)\) such that M is an \({\text {SVIA}}\) with respect to the sets \(F_+\) and \(F_-\).

Proof

Let \(M_0=\langle S, \varSigma , F_+, s_0, \mathord {\vartriangleleft }, \delta _{nd}, \delta _{d}\rangle \) be an arbitrary realtime \({\text {IA}}\). We safely may assume that a cell which has left the quiescent state will never enter the quiescent state again. This behavior can be implemented by adding a new state that plays the role of the quiescent state. If necessary, the new state can be entered instead of \(s_0\).

We modify \(M_0\) to \(M_1=\langle S', \varSigma ', F'_+, s_0, \mathord {\vartriangleleft }, \delta '_{nd}, \delta '_{d}\rangle \) by adding a new input symbol \(\texttt {\$}\) and two new states \(p_+\) and \(p_0\). So, we set \(S'=S\cup \{p_+,p_0\}\), \(\varSigma '=\varSigma \cup \{\texttt {\$}\}\), and \(F'_+=F_+\cup \{p_+\}\). The intention is that a \(\texttt {\$}\) in the input causes the \({\text {IA}}\) to simulate a step on the end-of-input symbol \(\mathord {\vartriangleleft }\) (in restricted form) and to reinitialize the computation by letting the cells enter the quiescent state again (which is impossible in \(M_0\)). Therefore, the transition function \(\delta '_{nd}\) is basically \(\delta _{nd}\) extended by transitions for the input symbol \(\texttt {\$}\) and the states \(p_+\) and \(p_0\). When a \(\texttt {\$}\) appears in the input, the communication cell enters state \(p_+\) if it could enter an accepting state on the end-of-input symbol \(\mathord {\vartriangleleft }\). For all \(s_1,s_2\in S\),

$$\begin{aligned} \delta '_{nd}(\texttt {\$}, s_1, s_2)=\{p_+\} \text { if } \delta _{nd}(\mathord {\vartriangleleft }, s_1,s_2)\cap F_+\ne \emptyset . \end{aligned}$$

Otherwise, it enters state \(p_0\): \( \delta '_{nd}(\texttt {\$}, s_1, s_2)=\{p_0\} \text { if } \delta _{nd}(\mathord {\vartriangleleft }, s_1,s_2)\cap F_+ =\emptyset . \) In state \(p_+\) or \(p_0\) the computation continues as it would from the very beginning. For \(p\in \{p_+,p_0\}\), all \(a\in \varSigma '\cup \{\mathord {\vartriangleleft }\}\), and all \(s\in S'\), \( \delta '_{nd}(a, p, s)= \delta '_{nd}(a, s_0,s_0). \) In order to implement the reinitialization of the other cells, recall that \(\delta _d\) drives no non-quiescent cell into the quiescent state. So, we can utilize the quiescent state as a signal sent by the communication cell. The signal causes the reinitialization of the cells passed through. So, the transition function \(\delta '_{d}\) is basically \(\delta _{d}\) extended as follows. For \(p\in \{p_+,p_0\}\) and all \(s_1,s_2\in S\),

$$\begin{aligned} \delta '_d(p,s_1,s_2)= s_0,\quad \delta '_d(s_0,s_1,s_2)= s_0,\quad \delta '_d(s_1,s_0,s_2)= \delta (s_1,s_0,s_0). \end{aligned}$$

Therefore, \(L(M_1)\) consists of all concatenations of \(\texttt {\$}\) separated words \(u_i\) such that at least one \(u_i\) is in \(L(M_0)\). In particular \(L(M_1) \cap \varSigma ^*=L(M_0)\).

We claim that there exists \(F'_- \subseteq (S'\setminus F_+')\) such that the iterative array \(M_2= \langle S', \varSigma ', F'_+, F'_-, s_0, \mathord {\vartriangleleft }, \delta '_{nd}, \delta '_{d}\rangle \) is self-verifying if and only if \(L(M_0)\) is empty or coincides with \(\varSigma ^*\). Observe that \(L(M_2)=L(M_1)\) because both have the same set of accepting states.

If \(L(M_0)\) is empty then \(L(M_1)\) is empty. Therefore, the communication cell will never enter an accepting state from \(F'_+\). So, we safely may set \(F'_- = (S'\setminus F_+')\) and obtain that \(M_2\) is self-verifying. Similarly, if \(L(M_0)=\varSigma ^*\) then \(L(M_1)={\varSigma '}^*\), and we safely may set \(F'_-=\emptyset \) to obtain a self-verifying \({\text {IA}}\).

Now assume that \(L(M_0)\) and, thus, \(L(M_2)\) neither be empty nor contain all words over the input alphabet. Then there exists some \(u\in L(M_0)\) and some \(v\notin L(M_0)\). We consider the computation of \(M_2\) on input \(u\texttt {\$}v\). Since \(M_0\) accepts u, the \({\text {IA}}\) \(M_2\) enters an accepting state while processing the input prefix \(u\texttt {\$}\) (its computation is a simulation of \(M_0\) on \(u\mathord {\vartriangleleft }\)). Then the computation of \(M_2\) is reinitialized and continues with a simulation of \(M_0\) on input v. Since \(v\notin L(M_0)\), in this phase, \(M_2\) cannot accept v. However, since it already was in an accepting state and its overall answer is already yes, \(M_2\) cannot enter a contradictory rejecting state in this phase. This implies that the communication cell of \(M_2\) on input v will only assume neutral states and, thus, neither accept nor reject v. That is, \(M_2\) is not self-verifying and the claim follows.

From the construction of \(M_2\) and the claim we conclude that the semidecidability of the problem in question implies the semidecidability of the emptiness or universality problem for realtime \({\text {IA}}\)s contradicting Corollary 13. \(\square \)

What about the undecidability if we provide a partitioning of its state set? Can we test if this partitioning makes the \({\text {IA}}\) self-verifying? The answer is no, since for a given realtime iterative array with accepting state set \(F_+\) there are only finitely many partitions induced by setting \(F_- \subseteq (S\setminus F_+)\). All these could be tested in parallel. Now the problem in question can be semidecided if the test is successful for at least one partitioning.

Corollary 15

Given a realtime (non)deterministic iterative array M with state set S and partitioning \(S=F_{+} {\dot{\cup}}F_{-}{\dot{\cup}}F_{0}\), it is not semidecidable whether M is an \({\text {SVIA}}\) with respect to the partitioning.

By Lemma 2, any deterministic iterative with a time-computable time complexity can effectively be made self-verifying. But it is non-semidecidable whether it already is self-verifying. This non-semi-decidability carries immediately over to nondeterministic iterative arrays. However, it is an open problem whether any nondeterministic iterative with a time-computable time complexity can effectively be made self-verifying. In fact, it is an open problem whether the family of languages accepted by realtime nondeterministic iterative arrays is closed under complementation or not.