Graph Reachability and Pebble Automata over Infinite Alphabets

Size: px
Start display at page:

Download "Graph Reachability and Pebble Automata over Infinite Alphabets"

Transcription

1 Graph Reachability and Pebble Automata over Infinite Alphabets Tony Tan Department of Computer Science Technion Israel Institute of Technology Haifa 32000, Israel Abstract We study the graph reachability problem as a language over an infinite alphabet. Namely, we view a word of even length a 0 b 0 a n b n over an infinite alphabet as a directed graph with the vertices a 0, b 0,..., a n, b n and the edges (a 0, b 0 ),..., (a n, b n ). We prove that for any positive integer k, k pebbles are sufficient for recognizing the existence of a path of length 2 k 1 from the vertex a 0 to the vertex b n, but are not sufficient for recognizing the existence of a path of length 2 k+1 2 from the vertex a 0 to the vertex b n. Based on this result, we establish a number of relations among some classes of languages over infinite alphabets. 1 Introduction In this paper we continue the study of pebble automata introduced in [4]. In short, pebble automata (PA) are finite state automata with a finite number of pebbles. The pebbles are placed on/lifted from the input word in the stack discipline first in last out and are intended to mark positions in the input word. One pebble can only mark one position and the last pebble placed serves as the head of the automaton. The automaton moves from one state to another depending on the current label and the equality tests among data values in the positions and the positions themselves currently marked by the pebbles. 1

2 It turns out that PA languages possess a very nice logical property: closure under all boolean operations. In fact, looking at the stack discipline imposed on the placement of the pebbles, one can rightly conclude that PA is a kind of extension of first order logic for word structure. Indeed, to simulate a first order sentence of quantifier rank k, a pebble automaton with k pebbles suffices: one pebble for each quantifier depth. In this paper we are trying to extend the study of PA to the realm of graphs. This is done by viewing a word of even length a 0 b 0 a n b n over an infinite alphabet as a directed graph with the symbols a 0, b 0,..., a n, b n as the vertices and the edges (a 0, b 0 ),..., (a n, b n ). With regards to reachability, we prove that PA behaves similarly to the classical result for first order logic: For any positive integer k, k pebbles are sufficient for recognizing the existence of a path of length 2 k 1 from the vertex a 0 to the vertex b n, but are not sufficient for recognizing the existence of a path of length 2 k+1 2 from the vertex a 0 to the vertex b n. This result can be easily translated to logic over graphs to establish a well known fact that to express a path of length 2 k in first order sentence, a quantifier rank k is necessary and sufficient. See [7]. Furthermore, this result, we believe, may contribute to the technical aspect of reasoning on languages over infinite alphabets as shown in this paper. For example, we establish the following relationships among the classes of languages over infinite alphabets which were previously unknown. 1. The strict hierarchy of the PA languages based on the number of pebbles. 2. The separation of monadic second order logic from the PA languages. 3. The separation of the one-way deterministic RA languages from the PA languages. Although the emptiness problem for PA, in general, is undecidable, we believe the technique introduced in this paper can be useful in general for the study of languages over infinite alphabets. For example, in [8] a similar technique is used to obtain definability result for Linear Temporal Logic augmented with one register freeze quantifier, a class of languages over infinite alphabets with decidable satisfaction problem. Related results. As we mention earlier, there is an analogy between our result with the well known quantifier lower bounds for (s, t)-reachability 2

3 which states that (s, t)-reachability in graphs is expressible in a first order sentence of quantifier rank k if and only if the distance from s to t is less than or equal to 2 k. See, for example, [9]. However, as far as the author can see, this classical result does not imply our result here. For one thing, PA is already strictly stronger than firstorder logic. See Proposition 4. For example, PA can easily check whether the length of the an input w is divisible by 4, thus, checking whether the number of edges is even. However, such property cannot be express in firstorder logic. In fact, as described in [7] every first order logic on graphs can be appropriately embedded into a first-order logic for languages over infinite alphabet. With a bit modification to the PA model, our result here can be translated to obtain the quantifier lower bound for (s, t)-reachability. Another result related to our result in this paper is the famous theorem of Fagin, Stockmeyer and Vardi that directed (s, t)-reachability is in monadic conp, but not in monadic NP [2]. To the best of our knowledge, this result has no connection with the result in this paper. One reason is that no bound of quantifier rank is established there. Furthermore, the logic introduced in [7] behaves differently from the standard logic for graphs. In [7] the domain is the edges, not the vertices. In such logic, (s, t)-reachability can be expressed in monadic NP when the domain is the edges. See Proposition 3 in [7]. This paper is organized as follows. In Section 2 we review two models of computations for words over infinite alphabet: monadic second-order logic MSO and pebble automata (PA). Section 3 is the core of the paper in which we present all our results (whose complete proofs can be found in Appendix A). Finally, in Section 4 we discuss how to adjust our results/proofs presented in Section 3 to both the stronger and weaker versions of PA: the alternating one-way PA and weak PA, respectively. The proofs of the results in this sections are presented in Appendices B and C. 2 Models of computations In Section 2.1 we recall the definition of pebble automata from [4], and in Section 2.2 we recall the logical framework for languages over infinite alphabets. We shall use the following notation: D is a fixed infinite alphabet not 3

4 containing the left-end marker or the right-end marker. The input word to the automaton is of the form w, where w D. Symbols of D are denoted by low case letters a, b, c, etc., possibly indexed, and words over D are denoted by low case letters u, v, w, etc., possibly indexed. The set of symbols occurring in w is denoted by [w]. 2.1 Pebble automata Definition 1 (See [4, Definition 2.3]) A non-deterministic (two-way) k-pebble automaton, (in short k-pa) over D is a system A = Q, q 0, F, µ whose components are defined as follows. Q, q 0 Q and F Q are a finite set of states, the initial state, and the set of final states, respectively; and µ is a finite set of transitions of the form α β such that α is of the form (i, a, P, V, q) or (i, P, V, q), where i {1,..., k}, a D {, }, P, V {i + 1,..., k}, and β is of the form (q, act), where q Q and act {left, right, place-pebble, lift-pebble}. A symbol a D which occurs in a transition (p, a, P, V ) β µ is called a constant symbol. We denote by Θ A the set of all constant symbols of A. Remark 2 Note the pebble numbering that differs from that in [4]. In the above definition we adopt the pebble numbering from [1] in which the pebbles placed on the input word are numbered from k to i and not from 1 to i as in. [4]. The reason for this reverse numbering is that it allows us to view the computation between placing and lifting pebble i as a computation of an (i 1) pebble automaton. This approach will be convenient in proofs by induction on the number of pebbles already placed on the input word. Given a word w = a 1 a n D, a configuration of A on w is a triple [i, q, θ], where i {1,..., k}, q Q and θ : {i, i+1,..., k} {0, 1,..., n, n+ 1}. The function θ defines the position of the pebbles and is called the pebble assignment. 1 The initial configuration is γ 0 = [k, q 0, θ 0 ], where θ 0 (k) = 0 is 1 The symbols in the positions 0 and n + 1 are and, respectively. 4

5 the initial pebble assignment. A configuration [i, q, θ] with q F is called an accepting configuration. A transition (i, a, P, V, p) β applies to a configuration [j, q, θ], if (1) i = j and p = q, (2) V = {l > i : a θ(l) = a θ(i) }, (3) P = {l > i : θ(l) = θ(i)}, and (4) a θ(i) = a. A transition (i, P, V, q) β applies to a configuration [j, q, θ], if conditions (1) (3) above hold and no transition of µ of the form (i, a, P, V, q) β applies to [j, q, θ]. We define the transition relation A as follows: [i, q, θ] A [i, q, θ ], if there is a transition α (p, act) µ that applies to [i, q, θ] such that q = p, for all j < i, θ (j) = θ(j), and - if act = left, then i = i and θ (i) = θ(i) 1, - if act = right, then i = i and θ (i) = θ(i) + 1, - if act = lift-pebble, then i = i + 1, - if act = place-pebble, then i = i 1, θ (i 1) = 0 and θ (i) = θ(i). As usual, we denote the transitive closure of A by A. When the automaton A is clear from the context, we shall omit the subscript A. For 1 i k, an i-configuration is a configuration of the form [i, q, θ], i.e., a configuration in in which the head pebble is pebble i. An i-run is a run from an i-configuration to an i-configuration in which pebble (i + 1) is never lifted. A word w D is accepted by A, if γ 0 γ, for some accepting configuration γ of A on the input w. The language L(A) consists of all words accepted by A. The automaton A is deterministic, if there is exactly one transition that applies to each configuration. If act {right, lift-pebble, place-pebble} for all transitions, then the automaton is one-way. It turns out that PA languages are quite robust. Namely, nondeterminism and two-wayness do not increase the expressive power, see Theorem 3 below. 5

6 Theorem 3 ([4, Theorem 4.6]) For each k 1, all versions of k-pebble automata: non-deterministic two-way, deterministic two-way, non-deterministic one-way and deterministic one-way, have the same recognition power. In view of Theorems 3, we shall always assume that pebble automata under consideration are deterministic and one way. Next, we define the hierarchy of languages accepted by PA. For k 1, PA k is the set of all languages accepted by k-pa, and PA is the set of all PA languages. 2 That is, PA = k 1 PA k. 2.2 Logic Formally, a word w = a 1 a n is represented by the logical structure with domain {1,..., n}; the natural ordering < on the domain with its induced successor +1; and the function val : {1,..., n} D, where val(i) = a i for each i = 1,..., n. The atomic formulas in this logic is of the form x < y, y = x + 1, val(x) = val(y), or val(x) = a for a D. The first-order logic FO is obtained by closing the atomic formulas under the propositional connectives and first-order quantification over {1,..., n}. The second-order formulas MSO are obtained by adding quantification over unary predicates on {1,..., n}. A sentence ϕ defines the set of words L(ϕ) = {w : w = ϕ}. If L = L(ϕ) for some sentence ϕ, then we say that the sentence ϕ expresses the language L. We use the same notation FO and MSO to denote the languages expressible by sentences in FO and MSO, respectively. That is, FO = {L(ϕ) : ϕ is an FO sentence} and MSO = {L(ϕ) : ϕ is an MSO sentence}. Proposition 4 FO D PA. More specifically, let ϕ FO D with quantifier rank k. Then, L(ϕ) PA k. 2 Note that we use the same notation, whose meaning, however, will be always clear from the context. 6

7 Proof. First, we note that PA k is closed under boolean operations. Let ϕ = Qx k ψ(x k ) where Q {, } and ψ(x k ) is of quantifier rank k 1. The proof is by straightforward induction on k. A k-pa A iterates pebble k through all possible positions in the input word. On each iteration, the automaton A recursively calls a (k 1)-PA A that accepts the language L(ψ(x k )), treating the position of pebble k as the assignment value for x k. - If Q =, then A accepts if and only if A accepts on all iterations. - If Q =, then A accepts if and only if A accepts on at least one iteration. We end this section with Theorem 5 below which states that all languages accepted by pebble automaton can be expressed by an MSO sentence. Theorem 5 ([4, Theorem 4.2]) PA MSO. Actually Theorem 4.2 in [4] states a stronger result: all languages accepted by alternating two-way PA can be expressed by an MSO sentence. However, we will postpone our discussion of alternating PA to Section 4. 3 Words of D as Graphs Let w = a 0 b 0 a n b n D be a word of even length. The word w induces a directed graph G w = (V w, E w ) whose the set of vertexes is V w = {a 0, b 0,..., a n, b n }, that is, the symbols that appear in w, and the set of edges is E w = {(a 0, b 0 ),..., (a n, b n )}. With such view, we will use the term graph when referring to an even length word. We also write s w = a 0 and t w = b n to denote the first and the last symbol in w, respectively. For convenience, we consider only the words w in which s w and t w occur only once. We need the following basic graph terminology. Let a and b be vertexes in a graph G. A path of length m from a to b is a sequence of m edges in G: (a i1, b i1 ),..., (a im, b im ) such that a i1 = a, b im = b and for each j = 1,..., m 1, b ij = a ij+1. The distance from a to b is the length of a minimal path from a to b in G. If there is no path from a to b in G, then we set the distance be. We define the following reachability languages. For m 1, R m = {w : the distance from s w to t w in G w is m} 7

8 and R = m=1,2,... R m Remark 6 When processing an input word w, an automaton A can remember by its state whether its head pebble is currently at an odd-number or even-number position in w. 3 Therefore, we shall always assume that the input word w is of even length (which also naturally fits the subject of this appear). In addition, unless indicated otherwise, we always denote an input word w by a 0 b 0 a n b n. That is, the odd-position symbols are denoted by a i s and the even-position symbols by b i s. Again, we remind the reader again that in k-pa the pebbles placed on the input word are numbered from k to i, see Remark 2. Proposition 7 For each k = 1, 2,..., R 2 k 1 PA k. Proof. The proof of this proposition is the standard implementation of Savitch s algorithm for (s-t)-reachability [5]. It is by induction on k. For the basis, we prove that R 3 PA 2. On input word w = a 0 b 0 a n b n, a 2-PA A 2 acts as follows. - Pebble 2 iterates through all a i. - On each iteration, the automaton uses pebbles 1 to check whether b 0 = a i. - If b 0 = a i, the automaton moves pebble 2 to the right to read b i, and check whether b i = a n. Now, we prove the induction step. On input word w = a 0 b 0 a n b n, a k-pa A k acts as follows. - Pebble k iterates through all a i. - On each iteration, the automaton recursively uses pebbles (k 1),..., 1 to check whether there is a path from a 0 to a i. That is, A k makes a recursive call of A k 1. 3 We count that the leftmost symbol of w is in position 1. 8

9 - If such path exists, the automaton lifts all pebbles 1,..., (k 1); moves pebble k to the right to read b i, and recursively uses pebbles k 1,..., 1) to check whether there is a path from b i to b n. That is, A k makes a recursive call of A k 1 one more time. A k accepts w if there is an index i such that there are a path from a 0 to a i and a path from b i to b n. It is straightforward to show that R 2 k 1 PA k. Lemma 8 below is the backbone of most of the results presented in this paper. Its proof is quite long. Therefore, we only sketch it in Section 3.1. A complete proof of the lemma can be found in Appendix A. Let n k = 2 k+1 2, k = 1, 2,.... Lemma 8 Let A be a k-pebble automaton such that L(A) R. Then R nk L(A). 4 Intuitively, the proof is as follows. We will show that for every k-pa A, there exists w R nk R nk 1 such that A cannot recognize a path from s w to t w. The proof is by induction on k. The basis, k = 1, is relatively trivial to demonstrate as 1 pebble is not even capable of comparing data values. Let A be a k-pa and let A k 1 be (k 1)-PA subautomaton of A. By the induction hypothesis, there exists w R nk R nk 1 such that A k 1 cannot recognize a path from s w to t w. The induction step is as follows. Let w be a data word isomorphic to w such that [w] [w ] =. We define the data word u such that where u = w }{{} a 1 a 2 }{{} a 2 a 3 }{{} w ; v 1 v 2 v 3 v 1, v 2, v 3 depend on the number of states of A; a 1 = t w ; a 3 = s w ; a 2, a 3 / [w] [w ]. 4 In fact, a similar result holds for alternating one-way k-pa, see Lemma 16. Therefore, Theorems 11 and 12 below extend onto alternating one-way pebble automata as well. 9

10 It is obvious that u R nk R nk 1. We claim that A cannot recognize a path from s u to t u. The proof is roughly as follows. When pebble k is above wv 1 a 1 a 2, by the induction hypothesis, the subautomaton A k 1 cannot recognize the path from s w to t w, thus, the path from s u to t u. When pebble k is above v 2 a 2 a 3 v 3 w, by the induction hypothesis, the subautomaton A k 1 cannot recognize the path from s w to t w, thus, the path from s u to t u. Therefore, the automaton cannot recognize the path from s u to t u. We want to notify the reader here that the stack discipline of the pebbles is very crucial in the application of the induction hypothesis. Pebble k is fixed on its current position once we start using the other (k 1) pebbles, and cannot be moved unless all the other (k 1) pebbles are lifted. Corollary 9 R nk / PA k. Proof. The corollary immediately follows from the lemma, because R k R. Corollary 10 R / PA. Proof. Assume to the contrary that R = L(A) for a k-pa A. Then, R nk L(A), which contradicts Lemma 8. The following theorem establishes the proper hierarchy of the PA languages. Theorem 11 For each k = 1, 2,..., PA k PA k+1. Proof. By Proposition 7, R 2 k+1 1 PA k+1. Suppose R 2 k+1 1 PA k. Let A be a k-pa that accepts R 2 1. k+1 Then, L(A) R and by Lemma 8, R 2 k+1 2 L(A). But this is a contradiction since L(A) = R 2 k+1 1 R 2 2. k+1 Another consequence of Lemma 8 is that the inclusion of PA in MSO provided by Theorem 5 is proper. 10

11 Theorem 12 PA MSO. Proof. Without loss of generality, we may assume that MSO contains two constant symbols, min and max, which denote minimum and the maximum elements of the domain, respectively. 5 Then the language R can be expressed in MSO as follows. There exist unary predicates S odd and P such that S odd is the set of all odd elements in the domain where min S odd and max S odd. sen- The predicate P satisfies the conjunction of the following FO tences: P S odd and min P and max 1 P, for all x P {max 1}, there exists exactly one y P such that val(x + 1) = val(y), and for all x P {min}, there exists exactly one y P such that val(y + 1) = val(x). Now, the theorem follows from Corollary 10. Next, we define a restricted version of the reachability languages. Recall that [w] denotes the set of symbols occurring in w. For a positive integer m 1, the language R + m consists of all words of the form where c 0 c 1 }{{} c 1 c 2 }{{} c 2 c 3 c m 3 c m 2 }{{} c m 2 c m 1 }{{} c m 1 c m u 1 u 2 u m 2 u m 1 c 0,..., c m D, and c i c i+1, for all i = 0,..., m 1; u 1,..., u m 1 D and each of u 1,..., u m 1 is of even length; for each i = 1,..., m 1, c i [u i ]. 5 For a word w = a 1 a n, the minimum and the maximum elements are 1 and n, respectively, whereas not 0 and n + 1 are reserved for the endmarkers and. 11

12 The language R + is defined as R + = m=1,2,... R + m. In some sense, we can compare the relation between R and R +, like the relation between nondeterministic and deterministic transitive closure logic. Remark 13 Actually, in the proof of Lemma 8 we show that for every k-pa A, there exist graphs G R + n k and G R + such that either A accepts both G and G, or rejects both of them are not. Therefore, R + PA. In fact, R + is not accepted by alternating one-way PA either. The following theorem answers the problem left open in [4, 6]: can twoway deterministic FMA be simulated by pebble automata. 6 Theorem 14 The language R + is accepted by one-way deterministic FMA, but is not accepted by pebble automata. Proof. Note that R + is accepted by a two register one-way deterministic FMA. On input word w = a 0 b 0 a n b n, the automaton stores b 0 in the first register and then moves right (using the second register to scan the input symbols) until it finds a vertex a i1 = b 0. If it finds one, then it stores b i1 in register 1 and moves right again until it finds another vertex a i2 = b i1. It repeats the process until either of the following holds. - a n is the same as the content of the register 1, or, - it cannot find a vertex currently stored in the first register. In the former case, th automaton accepts the input graph, and in the latter case does not. However, by Remark 13, R + is not a PA language. 7 6 See [3, Definition 1] for the formal definition of FMA. 7 As before, a similar separation result holds for alternating one-way PA as well. 12

13 3.1 Sketch of the Proof of Lemma 8 Recall that for i = 1, 2,..., n i = 2 i+1 2. An equivalent recursive definition is n 1 = 2, and n i+1 = 2n i + 2, for i 2. Let m > 1 be a positive integer. We define G i,m to be the set of graphs G of the following form: G = c 0 c 1 d {z} 0 d 1 c {z} 1 c 2 d {z} 1 d 2 c ni 2c ni 1 {z} v 1 w 1 v 2 v ni 1 d ni 2d ni 1 {z} c ni 1c ni (1) w ni 1 where the strings v 1, w 1,..., v ni 1, w ni 1 are defined as follows. For each j = 1,..., n i 1, - v j = e j,1 e j+1,1 e j,m 1 e j+1,m 1 ; - w j = f j,1 f j+1,1 f j,m 1 f j+1,m 1 ; and - the symbols {c 0,..., c ni, d 0,..., d ni 1} {e i,j, f i,j : 1 i n i 1, 1 j m 1} are pairwise different. Remark 15 Note that G i,m R ni. We just put u j = v j d j 1 d j w j, j = 1,..., n i 1. Figure 3.1 illustrates the real graph represented by an element of G k,m. Let G be the graph depicted in 1. We define the graph G as G = c 0 c 1 }{{} d 0 d 1 }{{} c 1 c 2 }{{} d 1 d 2 c ni 2c ni 1 }{{} v 1 w 1 v 2 v ni 1 d ni 2d ni 1 (2) That is, the graph G is G without the suffix w ni 1c ni 1c ni. Obviously, this graph is not in R. Let G i,m = {G : G i,m }. We claim that for each k-pa A, there exists an positive integer m such that A cannot distinguish between G and G, where G G k,m. 8 The proof is by induction on k and in the remainder of this section we will sketch it for the case of k = 3. 9 Note that in this case, n 3 = By cannot distinguish we mean that the automaton finishes its computations on both G and G in the same state. This notion will be precisely explained in Appendix A. 9 The complete proof is presented in Appendix A. 13

14 c 0 c 1 c 2 c 3 c nk 3 c nk 2 c nk 1 c nk e 1,1 e 2,1 e 3,1 e e 4,1 nk 3,1 e nk 2,1 e nk 1,1 e 1,2 e 2,2 e 3,2 e 4,2 e nk 3,2 e nk 2,2 e nk 1,2. e. 1,m 1 e 2,m 1 e 3,m 1 e 4,m 1 e nk 3,m 1 e nk 2,m 1 e nk 1,m 1 d 0 d 1 d 2 d 3 d nk 3 d nk 2 d nk 1 f 1,1 f 2,1 f 3,1 f f 4,1 nk 3,1 f nk 2,1 f nk 1,1 f 1,2 f 2,2 f 3,2 f 4,2 f nk 3,2 f nk 2,2 f nk 1,2. f. 1,m 1 f 2,m 1 f 3,m 1 f 4,m 1 f nk 3,m 1 f nk 2,m 1 f nk 1,m 1 The twisted arrow represents the order in which the edges are written in G G k,m. Figure 1: The graph induced by G G k,m. Let A = Q, q 0, µ, F be a 3-PA. We can assume that A is one-way and deterministic, and that µ does not contain transitions of the form (i, a, P, V, q) (q, act), i.e., Θ A =. Recall that, pebbles are placed on the input word in the order from 3 to 1, see Remark 2. We normalize the behavior of each pebble as follows. The automaton A can enters into a final state only after pebble 3 reaches the right-end marker and for each i = 2, 1 the following holds. Immediately after pebble (i + 1) moves right, pebble i is placed; pebble i is lifted only when it reaches the right end of the input; and 14

15 immediately after pebble i is lifted, pebble (i + 1) moves right. We shall need one more bit of notation. Let β i be defined by the following recursion: β 1 = Q and, for i 2, β i = Q 2 ((β i 1 )!) Q. Note that β j divides β i, whenever j i. Let m = β 4, 10 and let G and G be as follows. G = c 0 c 1 d 0 d 1 c 1 c 2 c 12 c 13 d 12 d 13 c 13 c 14 G = c 0 c 1 d 0 d 1 c 1 c 2 c 12 c 13 d 12 d 13 where G G 3,m. Note that for each i = 0,..., 8, we can partition G and G as follows, where +6 comes from i 2 = 6. G = u G {}}{{}}{{}}{ c 0 c 1 d 0 d 1 c i c i+1 d i d i+1 d i+4 d i+5 c i+5 c i+6 d 12 d 13 c 13 c 14 u G = c 0 c 1 d 0 d 1 c }{{} i c i+1 d i d i+1 d i+4 d i+5 c i+5c i+6 d 12d 13 }{{}}{{} u G u where G G 2,m, G G 2,m and u is isomorphic to u. Now (for the induction hypothesis) we assume that in the 2-runs of A on G and G, if (1) pebble 3 is not inside G and is not inside G, (2) both G and G do not contain the symbol under pebble 3, and (3) pebble 2 enters the patterns G and G in the same state, 11 then pebble 2 exits G and G in the same state; and prove (for the induction step) the following claim. Claim 1 The automaton A finishes the computation on both G and G in the same state. 10 Here the number 4 comes from the number of pebbles (3) plus 1, and in the general proof it will be β i Of course, by entering a pattern we mean arriving at its fist symbol. 15

16 Proof. (Sketch) We divide the graph G into three parts: A, B and C, and divide the graph G into two parts: D and E, as illustrated below. v 1 v 7 w 7 v 8 v 13 w 13 {}}{{}}{{}}{{}}{{}}{{}}{ G = c 0 c 1 d 0 d 1 c 6 c 7 d }{{} 6 d 7 c }{{} 7 c 8 d 7 d 8 c 12 c 13 d 12 d 13 c 13 c }{{ 14 } A B C v 1 v 7 w 7 v 8 v 13 {}}{{}}{{}}{{}}{{}}{ G = c 0 c 1 d 0 d 1 c 6 c 7 d }{{} 6 d 7 c 7 c 8 d 7 d 8 c 12 c 13 d 12 d }{{ 13 } D E The proof of the claim is divided into three stages according to the above division. Stage 1: We show that pebble 3 exits section A (in the run of A on G) in the same state as it exits section D (in the run of A on G). Recall that pebble 3 is the first pebble being placed on the input. First, note that there exist suffixes G 1 of G and G 1 of G, such that G 1 G 2,m and [A] [G 1 ] = [D] [G 1 ] =, as depicted in Figure 2 below. G = A G 1 {}}{{}}{ c 0 c 1 c 6 c 7 d 6 d 7 c 7 c 8 d 7 d 8 c 8 c 9 d 8 d 9 d 12 d 13 c 13 c 14 Pebble 3 is above A and D Since pebble 2 enters G 1 and G 1, it exits G 1 and G 1 in the same state G = c 0 c 1 c 6 c 7 d 6 d 7 c 7 c 8 d 7 d 8 c 8 c 9 d 8 d 9 d 12 d 13 }{{}}{{} D Figure 2: When pebble 3 is above A and D, we apply the induction hypothesis, according to which pebble 2 exits G 1 and G 1 in the same state. Since A starts the computation in the initial state q 0, pebble 3 reads the symbol c 0 in G in the same state (i.e., q 0 ) as it reads the symbol c 0 in G. Therefore, after pebble 2 is placed, it enters G 1 in the run of A on G in the same state as it enters G 1 in the run of A on G. Furthermore, since [A] [G 1 ] = [D] [G 1 ] =, the symbol under pebble 3 (i.e., c 0 ) is not in G 1 and G 1. By the induction hypothesis, pebble 2 exits G 1 and G 1 in the same state. Thus, when pebble 3 moves right, it reads c 1 in the run on G in the same 16 G 1

17 state as it reads c 1 in the run on G. This scenario repeats until pebble 3 exists sections A and D. Therefore, pebble 3 exits section A in the same state as it exits section D. Stage 2: We show that in the run of A on G pebble 3 enters and exits section B in the same state. At this stage we show that the behavior of pebble 3 when scanning v 7 d 6 d 7 w 7 c 7 c 8 is periodic. Namely, there exists an integer 1 p β 3 such that on every other 2p moves (to the right), pebble 3 enters the same state. We call such number p an interval of pebble 3. The proof of the existence of the interval p is by induction on the number of pebbles. In fact, we show that for i = 1, 2, 3, the number β i is the largest possible interval of pebble i and β i+1 is a multiple of all possible intervals of pebble i. Since the length of the section B = d 6 d 7 w 7 is 2m, pebble 3 enters and exists this section in the same state. The complete proof of this stage is presented in Appendix A.1. Stage 3: Pebble 3 exits section C (in the run of A on G) in the same state as it exits section E (in the run of A on G). First, note that there exist prefixes G 2 of G and G 2 of G such that G 2 G 2,m and [C] [G 2 ] = [E] [G 2 ] =, see Figure 3 below. Let G 3 be the suffix of G such that G = G 2 G 3 and G 4 be the suffix of G such that G = G 2 G 4. Then the graphs G 3 and G 4 are isomorphic. z } { G 2 C z } { z } { G = c 0 c 1 d 0 d 1 d 4 d 5 c 5 c 6 d 5 d 6 c 6 c 7 d 6 d 7 c 7 c 8 d 7 d 8 d 12 d 13 c 13 c 14 G 3 Since pebble 2 enters G 2 and G 2, it exits G 2 and G 2 in the same state Pebble 3 is above C and E G = c 0 c 1 d 0 d 1 d 4 d 5 c 5 c 6 d 5 d 6 c 6 c 7 d 6 d 7 c 7 c 8 d 7 d 8 d 12 d 13 {z } {z } G 2 {z E } G 4 Figure 3: When pebble 3 is above C and E, we apply the induction hypothesis, according to which pebble 2 exits G 2 and G 2 in the same state. By Stages 1 and 2, pebble 3 enters section C (in the run of A on G) in 17

18 the same state as it enters section E (in the run of A on G). Thus, pebble 3 reads the symbol c 7 in section C in the same state as it reads the symbol d 6 in section E. Therefore, pebble 2 enters G 2 and G 2 in the same state. In addition, since [C] [G 2 ] = [E] [G 2 ] =, the symbol under pebble 3 does not occur in either of G 2 or G 2. Thus, by the induction hypothesis, pebble 2 exits G 2 and G 2 in the same state. Next, the graphs G 3 and G 4 are isomorphic and the length of the pattern between G 2 and the first symbol of C (the position of pebble 3 in the run of A on G) equals to the length of the pattern between G 2 and the first symbol of E (the position of pebble 3 in the run of A on G). Thus, the computation of pebble 2 inside G 3 (in the run of A on G) is the same as its computation inside G 4 (in the run of A on G). Therefore, pebble 3 exits G 3 in the same state as it exits G 4. That is, pebble 3 moves right and reads c 8 in C in the same state as it moves right and reads d 7 in E. This scenario repeats until pebble 3 finishes scanning sections C and E. Thus, pebble 3 exits section C (in the run of A on G) in the same state as it exits section E (in the run of A on G). This completes the sketch of the proof of our claim that A finishes the computation on both G and G in the same state. 4 Alternating PA and weak PA Alternating PA As we have mentioned in the introduction, all the results of Section 3 extend onto the case of alternating one-way PA. (See Appendix B for the formal definition.) Let APA k = {L : L is accepted by an alternating one-way k-pa} and APA = k 1 APA k Lemma 16, whose proof is presented in Appendix B, is the extension of Lemma 8 onto alternating one-way PA. Lemma 16 Let A be an alternating one-way k-pebble automaton such that L(A) R. Then R nk L(A). 18

19 Each of the clauses of Theorem 17 below is easy consequence of the lemma. Theorem For each k = 1, 2,..., APA k APA k APA MSO. 3. The language R + is accepted by one-way deterministic FMA, but is not accepted by alternating one-way pebble automata. Weak PA There is another analogue of our results to another, but weaker, version of pebble automata. In the model defined in Section 2, the new pebble is placed in the beginning of the input word. An alternative would be to place the new pebble at the position of the most recent one. The model defined this way is usually referred as weak PA. Formally, it is defined by setting θ (i 1) = θ(i) (and keeping θ (i) = θ(i)) in the case of act = place-pebble of the definition of the transition relation (Definition 1). Obviously, twoway weak PA is just as expressive as two-way strong PA. However, one-way deterministic weak k-pa is weaker than strong k-pa. For example, R 2 k 1 is not a weak k-pa language, See Lemma 18 below. Furthermore, alternating, nondeterministic and deterministic weak k-pa have the same recognition power. See [8]. Let wpa k = {L : L is accepted by a weak k-pa} and wpa = k 1 wpa k Lemma 18 For each k = 1, 2,..., R k wpa k, but R k+1 / wpa k. The proof of the lemma is presented in Appendix C. Lemma 18 implies the strict hierarchy for wpa languages. Theorem 19 For each k = 1, 2,..., wpa k wpa k+1. 19

20 Acknowledgment The author would like to thank Michael Kaminski for all helpful discussions without which this paper would not exist, for pointing out that the original example of the author is, actually, the reachability problem in graphs, and for his comments on the first version of this paper. References [1] Mikolaj Bojanczyk, Mathias Samuelides, Thomas Schwentick, and Luc Segoufin. Expressive power of pebble automata. In Part I of the Proceedings of Automata, Languages and Programming, 33rd International Colloquium, ICALP 2006, Venice, Italy, July 10-14, 2006, volume 4051 of Lecture Notes in Computer Science, pages Springer, [2] Ronald Fagin, Larry J. Stockmeyer, and Moshe Y. Vardi. On monadic np vs. monadic co-np. Information and Computation, 120(1):78 92, [3] Michael Kaminski and Nissim Francez. Finite-memory automata. Theoretical Computer Science, 134(2): , [4] Frank Neven, Thomas Schwentick, and Victor Vianu. Finite state machines for strings over infinite alphabets. ACM Transactions on Computational Logic, 5(3): , [5] Walter J. Savitch. Relationships between nondeterministic and deterministic tape complexities. Journal of Computer and System Sciences, 4(2): , [6] Luc Segoufin. Automata and logics for words and trees over an infinite alphabet. In Proceedings of the 20th International Workshop/15th Annual Conference of the EACSL Computer Science Logic, CSL 2006, Szeged, Hungary September 25-29, 2006, pages 41 57, [7] Tony Tan. Logic for graph edges and pebble automata over infinite alphabets. Technical report, Department of Computer Science, Technion Israel Institute of Technology, Can be found in 20

21 [8] Tony Tan. On pebble automata for data languages with decidable emptiness problem. Technical report, Department of Computer Science, Technion Israel Institute of Technology, Can be found in [9] György Turán. On the definability of properties of finite graphs. Discrete Mathematics, 49(3): , A Proof of Lemma 8 In this appendix contains the proof of Lemma 8 that we outlined in Section 3.1. Namely, in Section A.1 we present the formalization of Stage 2 of the proof, whereas the proofs of Stages 1 and 3 are presented in Section A.2. Recall that A = Q, q 0, F, µ is a strong k-pa that accepts the language R nk. By Theorem 3, we may assume that A is deterministic and one-way. We also assume that Θ A =. Recall that, pebbles are placed on the input word in the order from k to 1, see Remark 2. By adding some extra states, we can normalize the behavior of each pebble i, i = k 1,..., 2, 1, as follows. After pebble (i + 1) moves right, pebble i is immediately placed (at the left endmarker ); pebble i is lifted only when it reaches the right-end marker of the input; and immediately after pebble i is lifted, pebble (i + 1) moves right. Furthermore, only pebble k can enter a final state and it may do so only after it reads the right-end marker of the input. Also, instead of writing the automaton A enters state q with pebble i as the head pebble, we shall write only pebble i enters the state q. That is, each pebble is actually viewed as an automaton itself. We start some terminology which we shall need for the proof. Recall that [w] denotes the set of symbols that occur in the word w. Let γ = [i, q, θ] be an i-configuration of A on the word w = c 1 c n. For j = i,..., k, we denote by val θ,w (j) = c θ(j), i.e. the symbol under pebble j with respect to the assignment θ on the word w. 21

22 Let γ = [i, q, θ] be an i-configuration on a word uvw. For i j k, we say that pebble j is outside the infix v, if it is not located above v and val θ,uvw (j) / [v]. The configuration γ is outside the infix v, if all pebbles from i to k are outside v. Let ρ : D D be a 1-1 mapping. The mapping ρ It induces an automorphism on D, also denoted by ρ, that is defined as follows. If w = c 1 c n D, then ρ(w) = ρ(c 1 ) ρ(c n ). Let w 1, w 2 D. We say that w 1 is isomorphic to w 2, denoted by w 1 = w2, if there exists a 1-1 mapping ρ : D D such that w 1 = ρ(w 2 ). Note that if w 1 = w2, then w 1 L(A) if and only if w 2 L(A). (Recall that we assume the automaton A does not have constant symbols in its description, i.e. Θ A =.) Definition 20 Let u 1, u 2 D. We say that u 1 and u 2 are A-equivalent, if A finishes the computation on both inputs u 1 and u 2 in the same state. Let uvw D and γ = [i, q, θ] be an i-configuration of A on uvw. We shall use the following notation. q(γ) = q and θ(γ) = θ. Let γ be outside v. The pebble assignment θ modulo v is a pebble assignment θ on uw, written as θ = θ mod v, where for all j = i,..., k, { θ(j) if 1 θ(j) u θ (j) = θ(j) v if u + v + 1 θ(j) u + v + w Recall that for 1 i k, an i-configuration is a configuration [i, q, θ] in which the head pebble is pebble i. An i-run is a run from an i-configuration to an i-configuration in which pebble (i+1) is never lifted. Let j < i. A j-run yielded from an i-configuration γ is a j-run that starts with an j-configuration γ where γ is the first j-configuration such that γ γ. Let w D and γ be an i-configuration of A on w. Let v be a prefix of w. We define R γ,j (w, v) to be the state of pebble j in which it exits v in the j-run of A on w yielded from γ. 22

23 A.1 Stage 2 of the Proof of Lemma 8 Recall that A = Q, q 0, µ, F is a strong k-pa, β 1 = Q, and for i 2, ) Q β i+1 = Q ((β 2 i )! Let m = β k+1 (fixed until the end of this appendix) and let G G k,m. Let i < k and let G i G i,m be an infix of G: for some w 1, w 2 D. Let G = w 1 G i w 2 (3) G i = G i 1 }{{} d n(i 1) 1d n(i 1) }{{} c c n(i 1) n (i 1)+1 v n(i 1) w n(i 1) }{{} v n(i 1) +1 d n(i 1) d n(i 1) +1 }{{} w n(i 1) +1 c n(i 1) +1c n(i 1) +2 }{{} v n(i 1) +2 where G i 1, G i 1 G i 1,m. We call the string v n(i 1) +1d n(i 1) d n(i 1) +1w n(i 1) +1 the middle section of the graph G i. For example, if G 1 = c 0 c 1 }{{} d 0 d 1 }{{} G 1,m v 1 w 1 d n(i 1) +1d n(i 1) +2 }{{} G i 1 w n(i 1) +1 then middle section of G 1 is v 1 d 0 d 1 w 1. Let γ be an (i + 1)-configuration on G outside G i. We are going to prove that in the i-run of A yielded from γ pebble i enters the symbols d n(i 1) d n(i 1) +1 and c n(i 1) +1c n(i 1) +2 in the same state. For what follows it will be convenient to rename the symbols in the middle section and c n(i 1) +1c n(i 1) +2 }{{} v n(i 1) +1 d n(i 1) d n(i 1) +1 }{{} c n(i 1) +1c n(i 1) +2 w n(i 1) +1 23

24 of G i as x 1 y 1 x m 1 y m 1 }{{} v n(i 1) +1 x m y m }{{} d n(i 1) d n(i 1) +1 x m+1 y m+1 x 2m 1 y 2m 1 }{{} w n(i 1) +1 x 2m y 2m }{{} c n(i 1) +1c n(i 1) +2 (4) where for j = 1,..., m 1, x j = e n(i 1) +1,j and y j = e n(i 1) +2,j; x m = d n(i 1) and y m = d n(i 1) +1; for j = m + 1,..., 2m 1, x j = f n(i 1) +1,j and y j = f n(i 1) +2,j; x 2m = c n(i 1) +1 and y 2m = c n(i 1) +2; see the notation in the beginning of Section 3.1. Recall that the symbols {x 1, y 1,..., x 2m 1, y 2m 1 } = [ v n(i 1) +1 d n(i 1) d n(i 1) +1 w n(i 1) +1 ] are pairwise different and neither of them occurs in either G i 1 or G i 1. The following proposition implies that pebble i enters the patterns d n(i 1) d n(i 1) +1 and c n(i 1) +1c n(i 1) +2 in the same state, as explained below. Proposition 21 Let G G k,m, G i G i,m, and let γ be an (i+1)-configuration outside G i. Let (q j 1, q j 2), j = 1,..., 2m, be a pair of states, where q j 1 is the state in which pebble i enters x j in the i-run of A yielded from γ, and q j 2 is the state in which pebble i enters y j in the i-run of A yielded from γ. Then, there exist two positive integers p, m 0 β i such that p β i+1 and for all j, j such that m 0 < j, j < 2m the following holds. If j j (mod p), then (q1, j q2) j = (q j 1, q j 2 ). This proposition states is that after every 2p moves to the right pebble i repeats its states. That is, (q1, j q2) j = (q j+p 1, q j+p 2 ). The repetition starts from an index m 0 < β i and the repetition period is p that divides β i+1 = m. Since the number of symbols between x m and x 2m is a factor of m, it follows that pebble i enters x m and x 2m in the same state. 24

25 We precede the proof of Proposition 21 with a brief note on the number of different repetition of states. Since γ is outside G i, the pebble assignment θ becomes irrelevant after pebbles i, (i 1),..., 1 enter G i. That is, the values p and m 0 depend only on the states q i, q i 1,..., q 1 in which pebbles i, i 1,..., 1 enter G i. Since the number of states of A is finite, there are only finitely many possible repetition of states. Each repetition of states has its own values of p and m 0, and we call the pair (p, m 0 ) a period of states. We will use the letter φ, possibly indexed, to denote a period of states. The components of φ = (p, m 0 ) are denoted by p(φ) = p and m 0 (φ) = m 0. The value p(φ) is called the interval of φ. Proof. (of Proposition 21) The proof is by induction on i. The base case: i = 1. Then, let x m+1 y m+1 x 2m 1 y 2m 1 c 1 c 2 u 2. G = u 1 G 1 u 2 = u 1 c 0 c 1 x 1 y 1 x m 1 y m 1 x m y }{{ m } d 0 d 1 for some u 1, u 2 D and G 1 G 1,m. Let γ be a 2-configuration outside G 1. By definition, none of the symbols seen by pebbles 2,..., k occur in G 1. Therefore, in the 1-run of A, starting at x 1 pebble 1 only moves (right) by the means of transitions of the form (1, q,, ) (q, right). Since A is deterministic and the number of states is finite, starting from some moment m 0 Q, the same sequence of transitions repeats itself. The length of such sequence p is Q, and, since β 2 = Q 2 (( Q )!) Q, it follows that have p β 2. That is, the desired period is (p, m 0 ). The repetition of states which pebble 1 eventually enters depends on the state of pebble 1 in which it enters G 1. Therefore, there are at most Q possible periods of states for pebble 1. The induction hypothesis: Let G i 1 G i 1,m be an infix of G where G = u 1 G i 1 u 2 for some u 1, u 2 D. Then, for every i-configuration γ outside G i 1, in the (i 1)-run of A on G yielded from γ pebble (i 1) enters into a period of 25

26 states when scanning the middle section of G i 1. Furthermore, there are at most Q such periods of states. The induction step: Let G i G i,m be an infix of G where for some u 1, u 2 D. Let G = u 1 G i u 2 (5) G i = G i 1 d n(i 1) 1d n(i 1) c n(i 1) c n(i 1) +1 d n(i 1) d n(i 1) +1 c n(i 1) +1c n(i 1) +2 d n(i 1) +1d n(i 1) +2 G i 1 where G i 1, G i 1 G i 1,m, and let x 1 y 1 x 2m 1 y 2m 1 be the middle section of G i, x 1y 1 x 2m 1y 2m 1 be the middle section of G i 1, and x 1y 1 x 2m 1y 2m 1 be the middle section of G i 1. By the induction hypothesis, when all pebbles i, i + 1,..., k are outside G i 1 and G i 1, pebble (i 1) enters into a period of states when scanning the middle sections x 1y 1 x 2my 2m and x 1y 1 x 2my 2m of G i 1 and G i 1, respectively. Let φ 1,..., φ l be all periods of states of pebble (i 1) in both x 1y 1 x 2my 2m and x 1y 1 x 2my 2m. We contend that there is a pair of positive integers (h, h ) such that 1. 1 h < h m, 2. h h mod p(φ 1 ),..., p(φ l ), and 3. (q h 1, q h 2 ) = (q h 1, q h 2 ). Indeed, let M be the least common multiple of p(φ 1 ),..., p(φ l ). Consider the sequence of pairs of states (q1 1+iM, q2 1+iM ), i = 0,..., Q 2. Since l Q ( Q, and 1 p(φ 1 ),..., p(φ l ) β i 1, M (β i 1 )!) implying Q 2 M β i. Therefore, for some i, j = 0,..., Q 2, i < j, (q 1+iM 1, q 1+iM 2 ) = (q 1+jM 1, q 1+jM 2 ), which proves our contention (with h = 1 + im and h = 1 + jm. Let (h, h ) be the pair satisfying conditions 1 3 above that is the smallest with respect to the lexicographic order of {1,..., 2m} {1,..., 2m}. 26

27 We claim that the desired period of states is (p, m 0 ), where p = h h and m 0 = h as stated below. Claim For all j, j m, if j j mod p, then (q1, j q2) j = (q j 1, q j 2 ). Obviously, it suffices to prove the claim for the case of j = j + p, which we shall do by induction on j. The base case j = h and j = h is immediate, because (q1 h, q2 h ) = (q1 h, q2 h ) by our choice of h and h, and for the induction step we assume and shall prove (q j 1 1, q j 1 2 ) = (q j 1+p 1, q j 1+p 2 ) (q j 1, q j 2) = (q j+p 1, q j+p 2 ). For the proof of q j 1 = q j+p 1 we shall need the following notation. In the (i 1)-run of A when pebble i is above y j 1, let (s 1, s 2, s 3, s 4, s 5 ) be the 5-tuple of states of pebble (i 1) that is defined as follows. s 1 is the state of pebble (i 1) in which it is placed on the input string (at the left-end marker symbol ). s 2 is the state of pebble (i 1) in which it arrives at the symbol x j 1. s 3 is the state of pebble (i 1) in which it arrives at the symbol x j 1. s 4 is the state of pebble (i 1) in which it exits symbol x 2m 1, i.e., in which it arrives at x 2m s 5 is the state of pebble (i 1) in which it arrives at the right-end marker. Similarly, in the (i 1)-run of A when pebble i is above y j+p 1, let (s 1, s 2, s 3, s 4, s 5) be the 5-tuple of states of pebble i 1 such that s 1 is the state of pebble (i 1) in which it is placed on the input string (at the left-end marker symbol ). s 2 is the state of pebble (i 1) in which it arrives at the symbol x j 1. s 3 is the state of pebble (i 1) in which it arrives at the symbol x j 1. s 4 is the state of pebble (i 1) in which it exits symbol x 2m 1, i.e., in which it arrives at x 2m 27

28 s 5 is the state of pebble (i 1) in which it arrives at the right-end marker. s 1 s 2 s 3 s 4 s 5 x j 1 y j 1 x j 1 x 2m 1 p p s 1 s 2 x j+p 1 y j+p 1 s 3 x j+p 1 s 4 x 2m 1 s 5 Figure 4: Positions of x j 1, y j 1, x j 1 and x j+p 1, y j+p 1, x j+p 1. Note the words x j 1... y j 1... x j 1 and x j+p 1... y j+p 1... x j+p 1 are isomorphic. Recall that p 0 mod p(φ 1 ), p(φ 2 ), where φ 1 is the period of pebble (i 1) on x 1y 1 x 2m 1y 2m 1, and φ 2 is the period of pebble (i 1) on x 1y 1 x 2m 1y 2m 1. For the proof of that q j 1 = q j+p 1 it suffices to show that (s 1, s 2, s 3, s 4, s 5 ) = (s 1, s 2, s 3, s 4, s 5), which is done as follows. Since q j 1 1 = q j+p 1 1, s 1 = s 1 is immediate. By the induction hypothesis, pebble (i 1) enters into a period of states when reading the middle section x 1y 1 x 2m 1y 2m 1 of G i 1. Since s 1 = s 1, pebble (i 1) enters the same period of states, say φ, in both cases: when pebble i is above y j 1 and when it is above y j+p 1. Since p(φ) divides p, s 2 = s 2 follows. The equality s 3 = s 3, will follow, if we show that for each l = 1,..., x j 1 y j 1 x j 1 (= x j+p 1 y j+p 1 x j+p 1 ), pebble (i 1) arrives at position l in x j 1 y j 1 x j 1 in the same state as it arrives at position l in x j+p 1 y j+p 1 x j+p 1. 28

29 By the induction hypothesis of Proposition 21, when pebbles 1,..., (i 2) run on the input word they enter periods of states in their respective middle sections in both G i 1 and G i 1. Note that each position in x j+p 1 y j+p 1 x j+p 1 is a shift to the right by p of the corresponding position in x j 1 y j 1 x j 1. Since p is a factor of all intervals of pebbles 1,..., (i 2), these pebbles enter the infix x j+p 1 y j+p 1 x j+p 1 (i.e., enter x j+p 1) in the same state as they enter the infix x j 1 y j 1 x j 1 (i.e., enter x j 1). In addition, since x j+p 1 y j+p 1 x j+p 1 and x j 1 y j 1 x j 1 are isomorphic, and γ is outside G i (see the statement of Proposition 21), all pebbles 1,..., (i 2) behave the same on x j+p 1 y j+p 1 x j+p 1 and x j 1 y j 1 x j 1. Thus, they all exit both strings in the same state. After this, each of the pebbles 1,..., (i 2) continues its computation and enter a period of states in their respective middle section of G i 1. Again, since p is a factor of all intervals of pebbles 1,..., (i 2), each of the pebbles exits its respective middle sections in G i 1 in the same state. Therefore, in both cases, all pebbles 1,..., (i 2) reach the right-end marker in the same state. Consequently, pebble (i 1) is in the same state in the respective positions in x j 1 y j 1 x j 1 and x j+p 1 y j+p 1 x j+p 1, s 3 = s 3 follows. By the induction hypothesis, pebble (i 1) enters a period of states when scanning the middle section x 1y 1 x 2m 1y 2m 1 of G i 1, and since s 3 = s 3, it enters the same period of states, say φ, in both cases when pebble i is above y j 1 and when it is above y j+p 1. Since p(φ) divides p, we have s 4 = s 4. Finally, s 5 = s 5 follows from s 4 = s 4. The proof of q j 2 = q j+p 2 is similar (and is omitted). This completes the proof of the claim and the whole proposition. A.2 Proof of Lemma 8 In this section we formalize the sketch of the proof of Lemma 8 from Section 3.1. Recall that A is a strong k-pa that accepts R nk. For m = β k+1 29

30 (defined in Section A.1) we are going to show that for all G G k,m, the graphs G and G are A-equivalent. We start with the following remark. Remark 22 Let G G k,m, where G = c 0 c 1 d 0 d 1 c 1 c 2 c nk 2c nk 1 d nk 2d nk 1 c nk 1c nk G = c 0 c 1 d 0 d 1 c 1 c 2 c nk 2c nk 1 d nk 2d nk 1 Then, for any i = 1,..., k, for any infix G i G i,m of G, there exists an infix G i of G such that G = G = u u z } { z } { c 0 c 1 d 0 d 1 c 1 c 2 G i c n c n +1 d n d n +1 c nk 1c nk u u z } { z } { c 0 c 1 d 0 d 1 c 1 c 2 G i d n 1d n c n c n +1 d nk 2d nk 1 and u = u. Also, if i > 1, then [u] [u ] = [u] [u ] =. We observe next that for any G i G i,m the following. a) There exists a prefix G i 1 and w 1, w 2 D such that of G i G i = G i 1 w 1 G i = G i 1 w 2 w 1 = w2, and [G i 1 ] [u ] = [G i 1 ] [u ] =. It is illustrated as follows. For some 0 j n k n i, G i = G i 1 {}}{ c j c j+1 d j d j+1 d j+ni 1 2d j+ni 1 1 c j+ni 1 1c j+ni 1 w 1 {}}{ d j+ni 1 1d j+ni 1 d j+ni 2d j+ni 1 c j+ni 1c j+ni G i = G i 1 {}}{ c j c j+1 d j d j+1 d j+ni 1 2d j+ni 1 1 w 2 {}}{ c j+ni 1 1c j+ni 1 d j+ni 1 1d j+ni 1 d j+ni 2d j+ni 1 30

31 b) There exists a suffix G i 1 and w D such that of G i G i = wg i 1 G i = wg i 1 and [G i 1] [u] = [G i 1] [u] =. It is illustrated as follows. For some 0 j n k n i, G i = w {}}{ c j c j+1 d j d j+1 d j+ni n i 1 1d j+ni n i 1 G i 1 {}}{ c j+ni n i 1 c j+ni n i 1 +1 d j+ni 2d j+ni 1 c j+ni 1c j+ni G i = w {}}{ c j c j+1 d j d j+1 d j+ni n i 1 1d j+ni n i 1 G i 1 {}}{ c j+ni n i 1 c j+ni n i 1+1 d j+ni 2d j+ni 1 The reason why we cut G i and G i into two, as shown in items (a) and (b), is that we can show, by induction on i, that i pebbles cannot distinguish between G i and G i. Lemma 8 follows from the Lemma 23 below. This lemma essentially states that, for each i = 1,..., k, if G i G i,m, then pebble i of A cannot distinguish between G i and G i. Recall that for w D, a prefix v of w, and an (i + 1)-configuration γ, R γ,i (w, v) denotes the state in which pebble i exits v in the i-run of A on w yielded from γ. Lemma 23 Let 1 i k 1. Let G i and G i be infixes of G and G, respectively, as described in Remark 22. Let γ 1 be an (i + 1)-configuration of A on G and γ 2 be an (i + 1)-configuration of A on G such that 1. γ 1 and γ 2 are outside G i and G i, respectively, 2. q(γ 1 ) = q(γ 2 ), 3. θ(γ 1 ) mod G i = θ(γ 2 ) mod G i, and 31

Closure Under Reversal of Languages over Infinite Alphabets

Closure Under Reversal of Languages over Infinite Alphabets Closure Under Reversal of Languages over Infinite Alphabets Daniel Genkin 1, Michael Kaminski 2(B), and Liat Peterfreund 2 1 Department of Computer and Information Science, University of Pennsylvania,

More information

What You Must Remember When Processing Data Words

What You Must Remember When Processing Data Words What You Must Remember When Processing Data Words Michael Benedikt, Clemens Ley, and Gabriele Puppis Oxford University Computing Laboratory, Park Rd, Oxford OX13QD UK Abstract. We provide a Myhill-Nerode-like

More information

TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund

TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA Written by Liat Peterfreund 1 TWO-WAY FINITE AUTOMATA A two way deterministic finite automata (2DFA) is a quintuple M Q,,, q0, F where: Q,, q, F are as before

More information

Counter Automata and Classical Logics for Data Words

Counter Automata and Classical Logics for Data Words Counter Automata and Classical Logics for Data Words Amal Dev Manuel amal@imsc.res.in Institute of Mathematical Sciences, Taramani, Chennai, India. January 31, 2012 Data Words Definition (Data Words) A

More information

A Formalism for Graph Databases and its Model of Computation

A Formalism for Graph Databases and its Model of Computation A Formalism for Graph Databases and its Model of Computation Juan Reutter and Tony Tan University of Edinburgh Abstract. Graph databases are directed graphs in which the edges are labeled with symbols

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

On the Satisfiability of Two-Variable Logic over Data Words

On the Satisfiability of Two-Variable Logic over Data Words On the Satisfiability of Two-Variable Logic over Data Words Claire David, Leonid Libkin, and Tony Tan School of Informatics, University of Edinburgh Abstract. Data trees and data words have been studied

More information

Opleiding Informatica

Opleiding Informatica Opleiding Informatica Tape-quantifying Turing machines in the arithmetical hierarchy Simon Heijungs Supervisors: H.J. Hoogeboom & R. van Vliet BACHELOR THESIS Leiden Institute of Advanced Computer Science

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

Advanced topic: Space complexity

Advanced topic: Space complexity Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to

More information

Partially Ordered Two-way Büchi Automata

Partially Ordered Two-way Büchi Automata Partially Ordered Two-way Büchi Automata Manfred Kufleitner Alexander Lauser FMI, Universität Stuttgart, Germany {kufleitner, lauser}@fmi.uni-stuttgart.de June 14, 2010 Abstract We introduce partially

More information

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3 6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Finite Automata. Mahesh Viswanathan

Finite Automata. Mahesh Viswanathan Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata

More information

Variable Automata over Infinite Alphabets

Variable Automata over Infinite Alphabets Variable Automata over Infinite Alphabets Orna Grumberg a, Orna Kupferman b, Sarai Sheinvald b a Department of Computer Science, The Technion, Haifa 32000, Israel b School of Computer Science and Engineering,

More information

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational 1 The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational model. We'll remind you what a Turing machine is --- you

More information

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem R. Dustin Wehr December 18, 2007 Büchi s theorem establishes the equivalence of the satisfiability relation for monadic second-order

More information

arxiv: v2 [cs.fl] 29 Nov 2013

arxiv: v2 [cs.fl] 29 Nov 2013 A Survey of Multi-Tape Automata Carlo A. Furia May 2012 arxiv:1205.0178v2 [cs.fl] 29 Nov 2013 Abstract This paper summarizes the fundamental expressiveness, closure, and decidability properties of various

More information

Kybernetika. Daniel Reidenbach; Markus L. Schmid Automata with modulo counters and nondeterministic counter bounds

Kybernetika. Daniel Reidenbach; Markus L. Schmid Automata with modulo counters and nondeterministic counter bounds Kybernetika Daniel Reidenbach; Markus L. Schmid Automata with modulo counters and nondeterministic counter bounds Kybernetika, Vol. 50 (2014), No. 1, 66 94 Persistent URL: http://dml.cz/dmlcz/143764 Terms

More information

Algorithmic Model Theory SS 2016

Algorithmic Model Theory SS 2016 Algorithmic Model Theory SS 2016 Prof. Dr. Erich Grädel and Dr. Wied Pakusa Mathematische Grundlagen der Informatik RWTH Aachen cbnd This work is licensed under: http://creativecommons.org/licenses/by-nc-nd/3.0/de/

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-VIII COMPUTABILITY THEORY CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the

More information

On the use of guards for logics with data

On the use of guards for logics with data Author manuscript, published in "Proceedings of MFCS 2011, Warsaw : Poland (2011)" DOI : 10.1007/978-3-642-22993-0_24 On the use of guards for logics with data Thomas Colcombet 1, Clemens Ley 2, Gabriele

More information

Expressive power of pebble automata

Expressive power of pebble automata Expressive power of pebble automata Miko laj Bojańczyk 1,2, Mathias Samuelides 2, Thomas Schwentick 3, Luc Segoufin 4 1 Warsaw University 2 LIAFA, Paris 7 3 Universität Dortmund 4 INRIA, Paris 11 Abstract.

More information

MTAT Complexity Theory October 13th-14th, Lecture 6

MTAT Complexity Theory October 13th-14th, Lecture 6 MTAT.07.004 Complexity Theory October 13th-14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when

More information

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza Automata theory An algorithmic approach Lecture Notes Javier Esparza July 2 22 2 Chapter 9 Automata and Logic A regular expression can be seen as a set of instructions ( a recipe ) for generating the words

More information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

Automata on linear orderings

Automata on linear orderings Automata on linear orderings Véronique Bruyère Institut d Informatique Université de Mons-Hainaut Olivier Carton LIAFA Université Paris 7 September 25, 2006 Abstract We consider words indexed by linear

More information

Ma/CS 117c Handout # 5 P vs. NP

Ma/CS 117c Handout # 5 P vs. NP Ma/CS 117c Handout # 5 P vs. NP We consider the possible relationships among the classes P, NP, and co-np. First we consider properties of the class of NP-complete problems, as opposed to those which are

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

About the relationship between formal logic and complexity classes

About the relationship between formal logic and complexity classes About the relationship between formal logic and complexity classes Working paper Comments welcome; my email: armandobcm@yahoo.com Armando B. Matos October 20, 2013 1 Introduction We analyze a particular

More information

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Dexter Kozen Cornell University, Ithaca, New York 14853-7501, USA, kozen@cs.cornell.edu, http://www.cs.cornell.edu/~kozen In Honor

More information

Automata Theory for Presburger Arithmetic Logic

Automata Theory for Presburger Arithmetic Logic Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 10: CF, PDAs and Beyond Greibach Normal Form I We want to show that all context-free

More information

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations preprint Lauri Hella University of Tampere Antti Kuusisto University of Bremen Abstract This article investigates

More information

Computer Sciences Department

Computer Sciences Department Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Computer Sciences Department 3 ADVANCED TOPICS IN C O M P U T A B I L I T Y

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 30 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November 2016 1 / 17 The Chomsky hierarchy: summary Level Language

More information

On Recognizable Languages of Infinite Pictures

On Recognizable Languages of Infinite Pictures On Recognizable Languages of Infinite Pictures Equipe de Logique Mathématique CNRS and Université Paris 7 LIF, Marseille, Avril 2009 Pictures Pictures are two-dimensional words. Let Σ be a finite alphabet

More information

A Lower Bound for Boolean Satisfiability on Turing Machines

A Lower Bound for Boolean Satisfiability on Turing Machines A Lower Bound for Boolean Satisfiability on Turing Machines arxiv:1406.5970v1 [cs.cc] 23 Jun 2014 Samuel C. Hsieh Computer Science Department, Ball State University March 16, 2018 Abstract We establish

More information

On Recognizable Languages of Infinite Pictures

On Recognizable Languages of Infinite Pictures On Recognizable Languages of Infinite Pictures Equipe de Logique Mathématique CNRS and Université Paris 7 JAF 28, Fontainebleau, Juin 2009 Pictures Pictures are two-dimensional words. Let Σ be a finite

More information

Word-hyperbolic groups have real-time word problem

Word-hyperbolic groups have real-time word problem Word-hyperbolic groups have real-time word problem Derek F. Holt 1 Introduction Let G = X be a finitely generated group, let A = X X 1, and let A be the set of all words in A. For u, v A, we denote the

More information

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability 16.2. MINIMAL ARITHMETIC AND REPRESENTABILITY 207 If T is a consistent theory in the language of arithmetic, we say a set S is defined in T by D(x) if for all n, if n is in S, then D(n) is a theorem of

More information

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine Samuel C. Hsieh Computer Science Department, Ball State University July 3, 2014 Abstract We establish a lower

More information

Introduction to Languages and Computation

Introduction to Languages and Computation Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

NP, polynomial-time mapping reductions, and NP-completeness

NP, polynomial-time mapping reductions, and NP-completeness NP, polynomial-time mapping reductions, and NP-completeness In the previous lecture we discussed deterministic time complexity, along with the time-hierarchy theorem, and introduced two complexity classes:

More information

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY RYAN DOUGHERTY If we want to talk about a program running on a real computer, consider the following: when a program reads an instruction,

More information

The efficiency of identifying timed automata and the power of clocks

The efficiency of identifying timed automata and the power of clocks The efficiency of identifying timed automata and the power of clocks Sicco Verwer a,b,1,, Mathijs de Weerdt b, Cees Witteveen b a Eindhoven University of Technology, Department of Mathematics and Computer

More information

Polynomial Space. The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem

Polynomial Space. The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem Polynomial Space The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem 1 Polynomial-Space-Bounded TM s A TM M is said to be polyspacebounded if there is a polynomial

More information

Outline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018

Outline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018 Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 3. Logarithmic Space Reinhard Pichler Institute of Logic and Computation DBAI Group TU Wien 3. Logarithmic Space 3.1 Computational

More information

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic Introduction to EF-games Inexpressivity results for first-order logic Normal forms for first-order logic Algorithms and complexity for specific classes of structures General complexity bounds Preliminaries

More information

Lecture 3. 1 Terminology. 2 Non-Deterministic Space Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, 2005.

Lecture 3. 1 Terminology. 2 Non-Deterministic Space Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, 2005. Notes on Complexity Theory: Fall 2005 Last updated: September, 2005 Jonathan Katz Lecture 3 1 Terminology For any complexity class C, we define the class coc as follows: coc def = { L L C }. One class

More information

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity CSE 531: Computational Complexity I Winter 2016 Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity January 22, 2016 Lecturer: Paul Beame Scribe: Paul Beame Diagonalization enabled us to separate

More information

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler Database Theory Database Theory VU 181.140, SS 2018 5. Complexity of Query Evaluation Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 17 April, 2018 Pichler

More information

Alternating nonzero automata

Alternating nonzero automata Alternating nonzero automata Application to the satisfiability of CTL [,, P >0, P =1 ] Hugo Gimbert, joint work with Paulin Fournier LaBRI, Université de Bordeaux ANR Stoch-MC 06/07/2017 Control and verification

More information

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory (2A) Young Won Lim 5/31/18 Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

An Optimal Lower Bound for Nonregular Languages

An Optimal Lower Bound for Nonregular Languages An Optimal Lower Bound for Nonregular Languages Alberto Bertoni Carlo Mereghetti Giovanni Pighizzini Dipartimento di Scienze dell Informazione Università degli Studi di Milano via Comelico, 39 2035 Milano

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata. Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT. Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite

More information

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010 CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010 Computational complexity studies the amount of resources necessary to perform given computations.

More information

CSE 211. Pushdown Automata. CSE 211 (Theory of Computation) Atif Hasan Rahman

CSE 211. Pushdown Automata. CSE 211 (Theory of Computation) Atif Hasan Rahman CSE 211 Pushdown Automata CSE 211 (Theory of Computation) Atif Hasan Rahman Lecturer Department of Computer Science and Engineering Bangladesh University of Engineering & Technology Adapted from slides

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

More information

CS632 Notes on Relational Query Languages I

CS632 Notes on Relational Query Languages I CS632 Notes on Relational Query Languages I A. Demers 6 Feb 2003 1 Introduction Here we define relations, and introduce our notational conventions, which are taken almost directly from [AD93]. We begin

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

CpSc 421 Homework 9 Solution

CpSc 421 Homework 9 Solution CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade

More information

UNIT-VI PUSHDOWN AUTOMATA

UNIT-VI PUSHDOWN AUTOMATA Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic

More information

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement CS 710: Complexity Theory 9/29/2011 Lecture 7: The Polynomial-Time Hierarchy Instructor: Dieter van Melkebeek Scribe: Xi Wu In this lecture we first finish the discussion of space-bounded nondeterminism

More information

The Turing Machine. CSE 211 (Theory of Computation) The Turing Machine continued. Turing Machines

The Turing Machine. CSE 211 (Theory of Computation) The Turing Machine continued. Turing Machines The Turing Machine Turing Machines Professor Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka-1000, Bangladesh The Turing machine is essentially

More information

Metainduction in Operational Set Theory

Metainduction in Operational Set Theory Metainduction in Operational Set Theory Luis E. Sanchis Department of Electrical Engineering and Computer Science Syracuse University Syracuse, NY 13244-4100 Sanchis@top.cis.syr.edu http://www.cis.syr.edu/

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

Lecture 2. 1 More N P-Compete Languages. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Lecture 2. 1 More N P-Compete Languages. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz Notes on Complexity Theory: Fall 2005 Last updated: September, 2005 Jonathan Katz Lecture 2 1 More N P-Compete Languages It will be nice to find more natural N P-complete languages. To that end, we ine

More information

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete CS125 Lecture 15 Fall 2016 15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete Already know SAT NP, so only need to show SAT is NP-hard. Let L be any language in NP. Let M be a NTM that decides L

More information

ECS 120 Lesson 15 Turing Machines, Pt. 1

ECS 120 Lesson 15 Turing Machines, Pt. 1 ECS 120 Lesson 15 Turing Machines, Pt. 1 Oliver Kreylos Wednesday, May 2nd, 2001 Before we can start investigating the really interesting problems in theoretical computer science, we have to introduce

More information

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007. Proofs, Strings, and Finite Automata CS154 Chris Pollett Feb 5, 2007. Outline Proofs and Proof Strategies Strings Finding proofs Example: For every graph G, the sum of the degrees of all the nodes in G

More information

Unranked Tree Automata with Sibling Equalities and Disequalities

Unranked Tree Automata with Sibling Equalities and Disequalities Unranked Tree Automata with Sibling Equalities and Disequalities Wong Karianto Christof Löding Lehrstuhl für Informatik 7, RWTH Aachen, Germany 34th International Colloquium, ICALP 2007 Xu Gao (NFS) Unranked

More information

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ NICOLAS FORD Abstract. The goal of this paper is to present a proof of the Nullstellensatz using tools from a branch of logic called model theory. In

More information

PSPACE-completeness of LTL/CTL model checking

PSPACE-completeness of LTL/CTL model checking PSPACE-completeness of LTL/CTL model checking Peter Lohmann April 10, 2007 Abstract This paper will give a proof for the PSPACE-completeness of LTLsatisfiability and for the PSPACE-completeness of the

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata

More information

Hierarchy among Automata on Linear Orderings

Hierarchy among Automata on Linear Orderings Hierarchy among Automata on Linear Orderings Véronique Bruyère Institut d Informatique Université de Mons-Hainaut Olivier Carton LIAFA Université Paris 7 Abstract In a preceding paper, automata and rational

More information

September 7, Formal Definition of a Nondeterministic Finite Automaton

September 7, Formal Definition of a Nondeterministic Finite Automaton Formal Definition of a Nondeterministic Finite Automaton September 7, 2014 A comment first The formal definition of an NFA is similar to that of a DFA. Both have states, an alphabet, transition function,

More information

Space and Nondeterminism

Space and Nondeterminism CS 221 Computational Complexity, Lecture 5 Feb 6, 2018 Space and Nondeterminism Instructor: Madhu Sudan 1 Scribe: Yong Wook Kwon Topic Overview Today we ll talk about space and non-determinism. For some

More information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

Introduction: Computer Science is a cluster of related scientific and engineering disciplines concerned with the study and application of computations. These disciplines range from the pure and basic scientific

More information

On Stateless Multicounter Machines

On Stateless Multicounter Machines On Stateless Multicounter Machines Ömer Eğecioğlu and Oscar H. Ibarra Department of Computer Science University of California, Santa Barbara, CA 93106, USA Email: {omer, ibarra}@cs.ucsb.edu Abstract. We

More information

Theory of Computing Tamás Herendi

Theory of Computing Tamás Herendi Theory of Computing Tamás Herendi Theory of Computing Tamás Herendi Publication date 2014 Table of Contents 1 Preface 1 2 Formal languages 2 3 Order of growth rate 9 4 Turing machines 16 1 The definition

More information

Weak Alternating Automata Are Not That Weak

Weak Alternating Automata Are Not That Weak Weak Alternating Automata Are Not That Weak Orna Kupferman Hebrew University Moshe Y. Vardi Rice University Abstract Automata on infinite words are used for specification and verification of nonterminating

More information

Algebras with finite descriptions

Algebras with finite descriptions Algebras with finite descriptions André Nies The University of Auckland July 19, 2005 Part 1: FA-presentability A countable structure in a finite signature is finite-automaton presentable (or automatic)

More information

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

Equational Logic. Chapter Syntax Terms and Term Algebras Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from

More information

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition

More information

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total UVa - cs302: Theory of Computation Spring 2008 Final Exam Comments < 50 50 59 60 69 70 79 80 89 90 94 95-102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,

More information

1 Definition of a Turing machine

1 Definition of a Turing machine Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2017 April 10 24, 2017 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,

More information

X-machines - a computational model framework.

X-machines - a computational model framework. Chapter 2. X-machines - a computational model framework. This chapter has three aims: To examine the main existing computational models and assess their computational power. To present the X-machines as

More information