Concatenation Operations and Restricted Variants of Two-Dimensional Automata
aa r X i v : . [ c s . F L ] A ug Concatenation Operations and Restricted Variants ofTwo-Dimensional Automata
Taylor J. Smith a Kai Salomaa a August 26, 2020
Abstract
A two-dimensional automaton operates on arrays of symbols. While a standard(four-way) two-dimensional automaton can move its input head in four directions,restricted two-dimensional automata are only permitted to move their input heads inthree or two directions; these models are called three-way and two-way two-dimensionalautomata, respectively.In two dimensions, we may extend the notion of concatenation in multiple ways,depending on the words to be concatenated. We may row-concatenate (resp., column-concatenate) a pair of two-dimensional words when they have the same number ofcolumns (resp., rows). In addition, the diagonal concatenation operation combines twowords at their lower-right and upper-left corners, and is not dimension-dependent.In this paper, we investigate closure properties of restricted models of two-dimensionalautomata under various concatenation operations. We give non-closure results for two-way two-dimensional automata under row and column concatenation in both the de-terministic and nondeterministic cases. We further give positive closure results for thesame concatenation operations on unary nondeterministic two-way two-dimensionalautomata. Finally, we study closure properties of diagonal concatenation on both two-and three-way two-dimensional automata.
Key words and phrases: closure properties, concatenation, three-way automata, two-dimensional automata, two-way automata
MSC2020 classes:
The two-dimensional automaton model, introduced by Blum and Hewitt [2], is a general-ization of the well-known one-dimensional (string) automaton model. A two-dimensionalautomaton takes as input an array or matrix of symbols from some alphabet Σ, and the a School of Computing, Queen’s University, Kingston, Ontario, Canada. Email: { tsmith,ksalomaa } @cs.queensu.ca . DFA-4W 2NFA-4W 2DFA-3W 2NFA-3W 2DFA-2W 2NFA-2W
Row ( ⊖ ) ✗ ✗ ✗ ✓ ✗ ✗ / ✓ † Column ( ȅ ) ✗ ✗ ✗ ✗ ✗ ✗ / ✓ † Diagonal ( ⊘ ) ? ? ✗ ? ✗ ✓ Table 1: Closure results for concatenation on two-dimensional automaton models. Closureis denoted by ✓ and nonclosure is denoted by ✗ . New closure results presented in this paperare circled. Closure results marked with a † apply in the unary case.input head of the automaton moves in four directions: upward, downward, leftward, andrightward.If we restrict the input head movement of a two-dimensional automaton, then we obtaina variant of the model that is weaker in terms of recognition power, but also easier to reasonabout. If we prevent the input head from moving upward, then we obtain a three-way two-dimensional automaton. If we prevent both upward and leftward moves, then we obtain atwo-way two-dimensional automaton. The three-way two-dimensional automaton model wasintroduced by Rosenfeld [9]. The two-way two-dimensional automaton model was introducedby Anselmo et al. [1] and formalized by Dong and Jin [3].We can generalize many language operations from one dimension to two dimensions, andmost of these operations have been studied in the past; for a review of previous work, seethe surveys by Inoue and Takanami [5] or by the first author [10]. In this paper, we focuson the language operation of concatenation. In two dimensions, we may concatenate wordseither by joining rows or by joining columns. In either case, the relevant dimension of thewords being concatenated must be equal (e.g., two words being concatenated column-wisemust have the same number of rows).Four-way two-dimensional automata are not closed under either row or column concate-nation [6]. Three-way two-dimensional automata are not closed under column concatenation,but nondeterministic three-way two-dimensional automata are closed under row concatena-tion [4]. A selection of known closure results is summarized in Table 1.In this paper, we investigate the closure of restricted two-dimensional automaton modelsunder various concatenation operations. We give the first closure results for concatenationof languages recognized by two-way two-dimensional automata, showing that the model isnot closed under row or column concatenation in the general alphabet case, while it is closedunder both operations in the unary nondeterministic case. After defining a third method ofconcatenation known as “diagonal concatenation”, we show that nondeterministic two-waytwo-dimensional automata are closed under this operation, while this closure is lost in thedeterministic case. Finally, we prove that deterministic three-way two-dimensional automataare also not closed under diagonal concatenation. A two-dimensional word consists of a finite array, or rectangle, of cells each labelled by asymbol from a finite alphabet Σ. Precisely speaking, for m, n ≥
1, an m × n two-dimensionalword is a map from { , . . . , m } × { , . . . , n } to Σ. When a two-dimensional word is written2n an input tape, the cells around the two-dimensional word are labelled with a specialboundary marker Σ; more generally, we may consider all cells outside of the bounds ofan input word to contain boundary markers (see Kari and Salo [8], particularly Sections 2and 4).A two-dimensional automaton has a finite state control that is capable of moving itsinput head in four directions within an input word: up, down, left, and right. We denotethese directions by U , D , L , and R , respectively. Definition 1 (Two-dimensional automaton) . A two-dimensional automaton is a tuple( Q, Σ , δ, q , q accept ), where Q is a finite set of states, Σ is the input alphabet (with Σacting as a boundary symbol), δ : ( Q \{ q accept } ) × (Σ ∪{ } ) → Q ×{ U, D, L, R } is the partialtransition function, and q , q accept ∈ Q are the initial and accepting states, respectively.The computation of a two-dimensional automaton begins in the top-left corner (i.e., atcell (1 , q , and the automaton halts and accepts whenit reaches the accepting state q accept .We can modify the deterministic model given in Definition 1 to be nondeterministic bychanging the transition function to map to 2 Q ×{ U,D,L,R } instead of Q × { U, D, L, R } . Wedenote the deterministic and nondeterministic two-dimensional automaton models by and , respectively, where indicates that the automaton has four directionsof movement.By restricting the movement of the input head to move in fewer than four directions,we obtain the aforementioned restricted variants of the two-dimensional automaton model.If we prohibit upward movements, then we get a three-way two-dimensional automaton. Ifwe prohibit both upward and leftward movements, then we get a two-way two-dimensionalautomaton. Definition 2 (Three-way/two-way two-dimensional automaton) . A three-way (resp., two-way) two-dimensional automaton is a tuple ( Q, Σ , δ, q , q accept ) as in Definition 1, where thetransition function δ is restricted to use only the directions { D, L, R } (resp., the directions { D, R } ).We denote three-way two-dimensional automata by / , and we denotetwo-way two-dimensional automata by / . Note that three-way two-dimensional automata are unable to move their input head back into a word upon leavingthe bottom edge of the word, while two-way two-dimensional automata are unable to do thesame upon leaving either the bottom or right edge of the word. Thus, if a three-way (resp.,two-way) two-dimensional automaton makes a downward (resp., downward or rightward)move and reads a boundary symbol, it can only read boundary symbols for the remainderof its computation. In two dimensions, we may consider the notions of row and column concatenation. Therow (resp., column) concatenation of two-dimensional words w and v , denoted w ⊖ v (resp., w ȅ v ), is the word produced by adjoining the last row (resp., column) of w to the first row3 ⊖ v = w , · · · w ,n w m, · · · w m,n v , · · · v ,n v m ′ , · · · v m ′ ,n w ȅ v = w , · · · w ,n v , · · · v ,n ′ w m, · · · w m,n v m, · · · v m,n ′ v . If w and v are of dimension m × n and m ′ × n ′ respectively, then therow and column concatenations of these words are defined only when n = n ′ or m = m ′ ,respectively.We may similarly define the row or column concatenation of two languages A and B as A ◦ B = { a ◦ b | a ∈ A and b ∈ B } , where ◦ ∈ {⊖ , ȅ } .Figure 1 illustrates the row and column concatenations of two words. As we noted in the introduction, basic closure results about concatenation are known forboth four-way and three-way two-dimensional automata, and the only positive closure resultapplies to row concatenation over nondeterministic three-way two-dimensional automata.Unfortunately, for the two-way two-dimensional automaton model, we do not have closurefor either row or column concatenation in the general alphabet case. Here, we state theresult for the row concatenation operation on nondeterministic two-way two-dimensionalautomata.
Theorem 3.
Nondeterministic two-way two-dimensional automata over a general alphabetare not closed under row concatenation.Proof.
Define a language L as the set of two-dimensional words over the alphabet Σ = { , } where the first row of each word consists only of the symbol . The language L can berecognized by a two-way two-dimensional automaton whose input head scans the first rowof the input word.Suppose there exists a nondeterministic two-way two-dimensional automaton A thatrecognizes the language L ⊖ L . Then A accepts an input word w of dimension 2 × . Clearly, w ∈ L ⊖ L . However, the accepting computation of A on w cannot visit all four symbols in the word, and thus A necessarily also accepts another2 × v that contains one occurrence of the symbol in a cell not visited duringthe accepting computation. Since v L ⊖ L , this is a contradiction.The preceding theorem can easily be adapted to work in the deterministic case, andwe can similarly prove non-closure for column concatenation over two-way two-dimensionalautomata. 4ltogether, the previous results show that general-alphabet languages recognized by adeterministic two-way two-dimensional automaton may be concatenated either row-wise orcolumn-wise to produce a language not recognized even by a nondeterministic two-way two-dimensional automaton. As a consequence of the closure of nondeterministic three-way two-dimensional automata un-der row concatenation, we also know that unary nondeterministic three-way two-dimensionalautomata are closed under this operation. Aside from this fact, not much is known aboutclosure of concatenation for unary two-dimensional automaton models. In this section, weobtain new closure results for row and column concatenation for unary nondeterministictwo-way two-dimensional automata.
Remark.
Anselmo et al. [1] previously studied properties of the two-way two-dimensionalautomaton model over a unary alphabet; however, their model differs from the one consideredin this paper. See Section 4.1 for more details.Before we proceed, we require one further definition. We say that an automaton is“immediately BR-accepting”, or “IBR-accepting”, if, upon reading a boundary marker onthe bottom or right border of the word, the automaton immediately halts and accepts if q accept is reachable from its current state. Lemma 4.
Given a two-way two-dimensional automaton M , there exists an equivalent IBR-accepting two-way two-dimensional automaton M ′ .Proof. If M reads a boundary marker at the bottom or right border of its input word, thenthe input head of M can only read boundary markers for the remainder of its computation.After reading a boundary marker in state q i , say, we can decide whether q accept is reachablefrom q i via some sequence of transitions on an arbitrary number of boundary markers.Thus, we may take M ′ to be the same as M apart from its transition upon reading thefirst boundary marker, which we modify to transition to q accept in the positive case or leaveundefined in the negative case.Using the notion of an IBR-accepting automaton, we obtain the main result of the section. Theorem 5.
Nondeterministic two-way two-dimensional automata over a unary alphabetare closed under row concatenation.Proof.
Let A and B be unary nondeterministic two-way two-dimensional automata recogniz-ing languages A and B , respectively. Assume both A and B are IBR-accepting, and let theaccepting computations of A and B be denoted by C A and C B , respectively. We constructanother unary nondeterministic two-way two-dimensional automaton M to recognize thelanguage A ⊖ B . The automaton M first makes a nondeterministic choice of which “types”of computation correspond to C A and C B , and then interleaves both computations. Thecases for each “type” of computation are as follows:1. C A accepts at the bottom border and C B accepts at the right border;5 iC A Input word for A (2)col. iC B Input word for B Figure 2: Illustration of Case 1 computation. The simulation of C A accepts at (1). Thecomputation of M will begin its second phase at (2) in the input word consisting of the rowconcatenation of input words for A and B .2. C A accepts at the right border and C B accepts at the bottom border;3. (a) C A accepts at the bottom border in column i and C B accepts at the bottom borderin column j < i ;(b) C A accepts at the bottom border in column i and C B accepts at the bottom borderin column k ≥ i ;4. C A and C B both accept at the right border.Depending on the guessed “types” of the computations C A and C B , the computation of M proceeds in one of the following ways: Case 1.
The computation of M is divided into two phases. In the first phase, M simulatesthe computations of A and B in the following order:(i) M simulates all possible downward moves of A by moving the input head and changingthe state of A ;(ii) M simulates all possible downward moves of B by moving the input head and changingthe state of B ;(iii) when A and B both make a rightward move, M simulates the move and changes thestate of both A and B .Note that, after completing steps (i) and (ii), at least one rightward move must occur in step(iii). After M completes step (iii), it continues from step (i).When M simulates downward moves of the input head of A in step (i), it may nonde-terministically guess that the input head of A has encountered a boundary symbol at thebottom border of the input word. If A is in an accepting state at that point, then M beginsthe second phase of its computation.In the second phase, M simulates only the computation of B . If B enters an acceptingstate when M encounters the right border, then M accepts.Assume that C A accepts at the bottom border in column i of its input word. At the pointwhen the first phase of the computation ends, the input head of M will be at the position6 A Input wordfor A C B Input wordfor B (3)col. j C A Input wordfor A C B Input wordfor B Figure 3: Illustration of Case 3a computation. The left figure depicts the row concatenation,while the right figure depicts the “swapped” computation. When the simulation of C B accepts, the computation of M will begin its second phase at (3).corresponding to where C B first enters column i . (See Figure 2.) Although M performsits computation on the concatenated input, C B performs its computation only on the inputword to B . Case 2.
The first phase of the computation of M proceeds in the same manner as in thefirst phase of Case 1. However, in this case, since there may be an unknown number of rowsbeneath the row in which A accepts, the input head of M need not be at the bottom borderwhen B accepts at the bottom border.Thus, during step (ii), M may nondeterministically guess that the input head of B hasencountered a boundary symbol at the bottom border of the input word. Since B is IBR-accepting, we may assume B transitions immediately to its accepting state. At this point, M begins the second phase of its computation.In the second phase, M simulates only the computation of A . If A enters an acceptingstate when M encounters the right border, then M accepts. Case 3a.
We proceed in a similar manner as for Case 1, but we modify the first phase ofthe computation of M by swapping steps (i) and (ii). Thus, in the first phase, M simulatesthe computations of A and B in the following order:(i ′ ) M simulates all possible downward moves of B by moving the input head and changingthe state of B ;(ii ′ ) M simulates all possible downward moves of A by moving the input head and changingthe state of A ;(iii ′ ) when A and B both make a rightward move, M simulates the move and changes thestate of both A and B . Note that step (iii ′ ) of Case 3a is identical to step (iii) of Case 1. B is performed before the computation of A , allowingus to swap the first two steps of the first phase.During step (i ′ ), M may nondeterministically guess that the input head of B has encoun-tered a boundary symbol at the bottom border of the input word. Since B is IBR-accepting,we may assume B transitions immediately to its accepting state. At this point, M beginsthe second phase of its computation. (See Figure 3.)In the second phase, M simulates only the computation of A . If A enters an acceptingstate when M encounters the bottom border, then M accepts.The logic behind determining the input head position after switching from simulating C B to C A is similar to the explanation given for Case 1. Case 3b.
Analogous to the proof for Case 1.
Case 4.
Since both C A and C B accept at the right border of their input words, there maybe an unknown number of rows beneath the rows in which A and B accept. Therefore, thecomputation of M need only verify that its input word contains a sufficient number of rowsto allow simulation of C A and C B .The computation of M proceeds in the same order as the steps outlined in the first phaseof Case 1. If, during step (iii), the input head of M encounters a boundary marker whenboth A and B are in accepting states, then M accepts.Closure under column concatenation follows by interchanging downward and rightwardinput head moves. Corollary 6.
Nondeterministic two-way two-dimensional automata over a unary alphabetare closed under column concatenation.
Anselmo et al. [1] introduced a new operation for unary two-dimensional words called “di-agonal concatenation”. Given unary two-dimensional words w and v of dimension m × n and m ′ × n ′ respectively, the diagonal concatenation of those words, denoted w ⊘ v , is atwo-dimensional word of dimension ( m + m ′ ) × ( n + n ′ ) where w is in the “top-left corner”and v is in the “bottom-right corner”.In this section, we extend the diagonal concatenation operation to words over a generalalphabet. In this case, the diagonal concatenation of two words w and v , defined as before,produces a two-dimensional language consisting of words of dimension ( m + m ′ ) × ( n + n ′ )where w is in the top-left corner, v is in the bottom-right corner, and words x ∈ Σ m × n ′ and y ∈ Σ m ′ × n are placed in the “top-right” and “bottom-left” corners of w ⊘ v , respectively. Thediagonal concatenation language is formed by adding to these corners all possible words x and y over Σ. An example word from such a language is depicted in Figure 4. We may definethe diagonal concatenation of two languages A and B in a similar manner as for row andcolumn concatenation: the top-left corner contains only words from A , and the bottom-rightcorner contains only words from B . 8 ⊘ v = w , · · · w ,n x , · · · x ,n ′ w m, · · · w m,n x m, · · · x m,n ′ y , · · · y ,n v , · · · v ,n ′ y m ′ , · · · y m ′ ,n v m ′ , · · · v m ′ ,n ′ Remark.
Note that an automaton recognizing w ⊘ v only needs to read the contents of the top-left and bottom-right corners to determine whether a word is in the diagonal concatenationlanguage. Thus, we may add any symbols from Σ to the top-right and bottom-left corners toensure the resulting word is a contiguous rectangle. If an automaton recognizes the diagonalconcatenation language as defined earlier, where all possible words x and y are placed in thetop-right and bottom-left corners, respectively, then it will recognize any word with w and v in the appropriate locations, as desired.Before we present the main results, we will prove a small result about diagonal concate-nation where individual words are separated by additional boundary markers. As one mightexpect, if an automaton is able to determine where one word ends and another word begins,then closure follows easily. Theorem 7.
All two-dimensional automaton models are closed under diagonal concatenationwhere words are separated by boundary markers.Proof.
Suppose we are given a pair of two-dimensional automata A and B recognizing lan-guages A and B , respectively. We may construct a new automaton C to recognize thediagonal concatenation language A ⊘ B in the following way.Convert A to an IBR-accepting automaton, denoted A ′ . Then, simulate the computationof A ′ with C . If A ′ accepts at the bottom border of the input word, then the input headof C moves downward once and moves rightward until it crosses a boundary symbol andencounters an alphabet symbol. Otherwise, if A ′ accepts at the right border, then the inputhead of C moves rightward once and moves downward until it crosses a boundary symboland encounters an alphabet symbol. In either case, C proceeds to simulate the computationof B , and in all cases, C can be made to be of the same type as both A and B . For the two-way two-dimensional automaton model, the input head is able to recognize whenit reaches the bottom or right border of its input word. However, since the input head cannotmove upward or leftward, it cannot leave the border once it moves onto a boundary symbol.If the input head makes further moves upon reaching the border, it can only read boundarysymbols until the automaton halts.Anselmo et al. [1] state that their definition of a two-way two-dimensional automaton isequivalent to a two-tape one-dimensional automaton whose input heads only move rightward.9his suggests that their model can detect when it has reached not only one, but both of itsinput word’s bottom and right borders, giving it more recognition power than our model,which is only able to determine when it has reached either the bottom or right border ofits input word, but not both simultaneously. In terms of boundary symbols, the model ofAnselmo et al. is akin to placing a distinguished boundary symbol at the bottom-right cornerof the border of the input word.Using our two-way model, where all boundary symbols are identical, we obtain the fol-lowing closure result for diagonal concatenation.
Theorem 8.
Nondeterministic two-way two-dimensional automata over a general alphabetare closed under diagonal concatenation.Proof.
Suppose we are given two nondeterministic two-way two-dimensional automata A and B recognizing languages A and B , respectively. We may construct a new automaton C to recognize the language A ⊘ B in the following way.Begin by converting A to an IBR-accepting automaton, denoted A ′ . Then, simulatethe computation of A ′ with C , but modify the transition function so that the simulationperformed by C accepts if and only if A ′ would accept upon reading a boundary marker. Inthis way, C is pretending to read a boundary marker that would surround a word from A ,but that does not appear within words from A ⊘ B .At this stage in the computation, the input head of C will have made either a downwardmove or a rightward move, depending on whether A ′ accepts its input word at the bottomborder or the right border, respectively. If the input head of C previously made a downwardmove, then the input head will move rightward some nondeterministically-selected number ofsymbols. If the input head of C previously made a rightward move, then the input head willmove downward in a similar fashion. In either case, C begins to simulate the computationof B after these nondeterministic moves.Evidently, the power of nondeterminism is crucial for the automaton C to recognizediagonally-concatenated words. Indeed, if we remove nondeterminism, then we also loseclosure. Theorem 9.
Deterministic two-way two-dimensional automata over a general alphabet arenot closed under diagonal concatenation.Proof.
Define a language L as the set of two-dimensional words over the alphabet Σ = { , } where the top-left symbol of each word is . A two-dimensional automaton can recognizethis language by immediately reading the symbol at the initial position of its input head.Suppose there exists a deterministic two-way two-dimensional automaton A that recog-nizes the language L ⊘ L . Any accepting computation of A must visit at least two occurrencesof the symbol , corresponding to the top-left symbols in both words of the concatenation.Consider the computation of A on an input word w of dimension 3 ×
3, where the top-leftsymbol of w is and all other symbols are . Clearly, w L ⊘ L , so the computation of A will reject. However, since A is a two-way two-dimensional automaton, the input headcannot visit all symbols in the bottom-right 2 × w . Thus, we may change anunvisited symbol from to to obtain a word w ′ that belongs to L ⊘ L , but is not acceptedby A . 10 .2 Three-Way Two-Dimensional Automata Given the result of Theorem 9, we should expect not to obtain a positive closure resultfor deterministic three-way two-dimensional automata. However, unlike Theorem 9, we areconsidering three directions of movement, and so we cannot assert that the input head ofour automaton is incapable of reading all symbols within the input word. (Indeed, the inputhead of a three-way two-dimensional automaton may read all symbols via a left-to-rightsweeping motion.) Thus, we require a different approach.Under certain conditions, a two-way one-dimensional automaton N can simulate thecomputation of a three-way two-dimensional automaton M on a particular row of its inputword. Moreover, as we will see, the number of states of N depends linearly on the numberof states of M .Here, we construct a diagonal concatenation language A ⊘ B , where A and B are languagesrecognized by deterministic three-way two-dimensional automata A and B , and then we showthat there exists no two-way one-dimensional automaton C with enough states to simulatethe computation of A and B together on the diagonal concatenation language.To arrive at the main result, we first require two technical lemmas. Lemma 10.
Let M be a deterministic three-way two-dimensional automaton with n states.Consider the computation of M on an input word over the alphabet Σ = { , } , where row i consists entirely of s.If the input head of M visits the first or last symbol of row i and moves downward to row i + 1 , then this move happens at distance at most n + 1 from one of the boundary markers.Proof. If M enters row i in the first or last column and moves downward immediately after,then the result follows. If M enters row i , visits the first or last symbol of the row, andmakes fewer than n leftward/rightward moves before moving downward, then the result alsofollows.Since M must visit either the first or last symbol of row i , it can make at most n movesleftward/rightward without entering a loop. If M does not move downward to row i + 1within the first n leftward/rightward moves, then it will be forced to move leftward/rightwardin a loop until it reaches the other end of row i .Therefore, a downward move may only occur within distance n from the first or lastsymbols of the row, and thus may only occur within distance n + 1 from one of the boundarymarkers.Given a deterministic three-way two-dimensional automaton M , consider the computa-tion of M on row i of its input word. We say that a two-way one-dimensional automaton N correctly simulates the computation of M on row i if, given row i as input, N accepts ifand only if M moves downward from row i . Lemma 11.
Suppose that a deterministic three-way two-dimensional automaton M has n states, and that M enters row i of its input word at distance at most n + 1 from one of theboundary markers. Then there exists a deterministic two-way one-dimensional automaton N with at most n + 3 states that correctly simulates the computation of M on row i . roof. By our assumption, M begins its computation at distance at most n + 1 from oneof the boundary markers of row i . On the other hand, N begins its computation at theleftmost position of its input.We require at most n + 2 states to move the input head of N to the initial position ofthe input head of M after it enters row i ; n + 1 states are used to count the number ofmoves made by N , and one state is required to move the input head of N rightward if M entered row i at one of the rightmost n + 1 positions. At this point, N directly simulatesthe computation of M using n states. Once M follows a transition with a downward move, N enters a designated accepting state. Altogether, this construction for N requires at most2 n + 3 states.Kapoutsis [7] proved that, given a deterministic two-way one-dimensional automatonwith n states, we may convert it to an equivalent deterministic one-way one-dimensionalautomaton with h ( n ) = n ( n n − ( n − n ) states. We will use this value h ( n ) in the proofof the main result: given languages A and B that are recognized by deterministic three-waytwo-dimensional automata, the language A ⊘ B need not be recognized by the same model. Theorem 12.
Deterministic three-way two-dimensional automata over a general alphabetare not closed under diagonal concatenation.Proof.
Let Σ = { , } . Let A be the language of 1 × n ′ two-dimensional words where n ′ ≥ s. Let B be the language of 3 × n ′′ two-dimensionalwords where n ′′ ≥ s, apart from the top-left cornersymbol of each word, which is .Suppose there exists a deterministic three-way two-dimensional automaton C with n states recognizing the language A ⊘ B . Each word in A ⊘ B consists of exactly four rows.Since C can remember the number of rows it visited, we may assume without loss of generalitythat, when C moves downward from row 4, it accepts. Any moves to a rejecting state aresimulated by “stay-in-place” moves.Let k = h (2 n + 3) + 1. Consider the set of two-dimensional words X where each wordhas dimension 4 × k , the first row of each word consists entirely of s, the second row isof the form k k − , the third row consists entirely of s, and the fourth row is of the form { , } k . Evidently, given a word w ∈ X , we also have that w ∈ A ⊘ B if and only if the last k symbols of row 4 are all .Consider any accepting computation of C on a word w ∈ X . During this computation, C must visit the last symbol of the third row. Otherwise, we could change the last symbol ofthe third row to , and C would accept a word not belonging to A ⊘ B .Since C visits the last symbol of the third row, by Lemma 10, we know that the inputhead must subsequently enter the fourth row at distance at most n + 1 from the rightmostboundary marker. Then, by Lemma 11, there exists a deterministic two-way one-dimensionalautomaton D with 2 n + 3 states that correctly simulates the computation of C on the fourthrow. We may convert D to an equivalent one-way one-dimensional automaton D ′ with h (2 n + 3) states. From here, D ′ must check that each of the rightmost k = h (2 n + 3) + 1symbols in the fourth row is . But, since D ′ has k − h (2 n + 3) states and the fourthrow consists of 2 k symbols, D ′ is unable to count up to the k th symbol in order to determinewhere the latter k symbols in that row begin.12 Conclusion
In this paper, we considered closure properties of various concatenation operations on two-dimensional automata. We showed that two-way two-dimensional automata over a generalalphabet are not closed under either row or column concatenation. For a unary alphabet,on the other hand, we showed that nondeterministic two-way two-dimensional automata areclosed under both row and column concatenation. We further showed that nondeterministictwo-way two-dimensional automata over a general alphabet are closed under diagonal con-catenation, while neither deterministic two-way nor deterministic three-way two-dimensionalautomata are closed.There remain some open problems related to two-dimensional concatenation. Most clo-sure results for concatenation assume the use of a general alphabet. Studying concate-nation for unary two-dimensional automaton models in particular could prove interesting.Furthermore, nothing is yet known about the closure of diagonal concatenation on four-way two-dimensional automata. Lastly, we conjecture that nondeterministic three-way two-dimensional automata over a general alphabet are not closed under diagonal concatenation.However, showing this would require essentially a different proof than that given for Theo-rem 12.
References [1] Marcella Anselmo, Dora Giammarresi, and Maria Madonia. New operations and reg-ular expressions for two-dimensional languages over one-letter alphabet.
TheoreticalComputer Science , 340(2):408–431, 2005.[2] Manuel Blum and Carl Hewitt. Automata on a 2-dimensional tape. In R. E. Miller,editor,
Proceedings of the 8th Annual Symposium on Switching and Automata Theory(SWAT 1967) , pages 155–160, 1967.[3] Jing Dong and Wenbing Jin. Comparison of two-way two-dimensional finite automataand three-way two-dimensional finite automata. In X. Yang, editor,
Proceedings of the2nd International Conference on Computer Science and Service System (CSSS 2012) ,pages 1904–1906, 2012.[4] Katsushi Inoue and Itsuo Takanami. Closure properties of three-way and four-waytape-bounded two-dimensional Turing machines.
Information Sciences , 18(3):247–265,1979.[5] Katsushi Inoue and Itsuo Takanami. A survey of two-dimensional automata theory.
Information Sciences , 55(1–3):99–121, 1991.[6] Katsushi Inoue, Itsuo Takanami, and Akira Nakamura. A note on two-dimensional finiteautomata.
Information Processing Letters , 7(1):49–52, 1978.[7] Christos Kapoutsis. Removing bidirectionality from nondeterministic finite automata.In J. J¸edrzejowicz and A. Szepietowski, editors,
Proceedings of the 30th International ymposium on Mathematical Foundations of Computer Science (MFCS 2005) , volume3618 of Lecture Notes in Computer Science , pages 544–555, Berlin Heidelberg, 2005.Springer-Verlag.[8] Jarkko Kari and Ville Salo. A survey on picture-walking automata. In W. Kuich andG. Rahonis, editors,
Algebraic Foundations in Computer Science: Essays Dedicated toSymeon Bozapalidis on the Occasion of His Retirement , volume 7020 of
Lecture Notesin Computer Science , pages 183–213, Berlin Heidelberg, 2011. Springer-Verlag.[9] Azriel Rosenfeld.