The complexity of unary tiling recognizable picture languages: nondeterministic and unambiguous cases

Size: px
Start display at page:

Download "The complexity of unary tiling recognizable picture languages: nondeterministic and unambiguous cases"

Transcription

1 Fundamenta Informaticae X (2) IOS Press The complexity of unary tiling recognizale picture languages: nondeterministic and unamiguous cases Alerto Bertoni Massimiliano Goldwurm Violetta Lonati Dipartimento di Scienze dell Informazione, Università degli Studi di Milano Via Comelico 39/41, Milano Italy {ertoni, goldwurm, lonati}@dsi.unimi.it Astract. In this paper we consider the classes REC 1 and UREC 1 of unary picture languages that are tiling recognizale and unamiguously tiling recognizale, respectively. By representing unary pictures y quasi-unary strings we characterize REC 1 (resp. UREC 1 ) as the class of quasi-unary languages recognized y nondeterministic (resp. unamiguous) linearly space-ounded one-tape Turing machines with constraint on the numer of head reversals. We apply such a characterization in two directions. First we prove that the inary string languages encoding tiling recognizale unary square languages lies etween NTIME(2 n ) and NTIME(4 n ); y separation results, this implies there exists a non-tiling recognizale unary square language whose inary representation is a language in NTIME(4 n log n). In the other direction, y means of results on picture languages, we are ale to compare the power of deterministic, unamiguous and nondeterministic one-tape Turing machines that are linearly space-ounded and have constraint on the numer of head reversals. Keywords: two-dimensional languages, tiling systems, linearly space-ounded Turing machine, head reversal-ounded computation. Address for correspondence: M. Goldwurm, Dip. Scienze dell Informazione, Università degli Studi di Milano, Via Comelico 39/41, Milano, Italy Partially appeared in Proc. 24th STACS, W. Thomas and P. Pascal eds, LNCS 4393, , Springer, 2007.

2 2 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 1. Introduction Picture languages have een introduced in the literature as two-dimensional extension of traditional string languages, a picture eing a two-dimensional array of elements from a finite alphaet. They have een originally considered as formal models for image processing in connection with prolems of pattern recognition. Several classical tools and concepts have een used to classify picture languages and study their properties: regular expressions [10], grammars [16], automata [8], logic formulas [7]. One of the main effort in this area is to capture the notion of recognizaility. In particular, various notions of two-dimensional finite automaton have een proposed and studied in the literature [8, 9]. An interesting formal model for the recognition of picture languages is given y the so-called tiling systems introduced in [5], which are ased on projection of local properties. A tiling system τ is defined y a finite set Θ of square pictures of size 2 together with a projection etween alphaets. Roughly speaking, a language is recognized y τ if each of its elements can e otained as a projection of a picture whose supictures of size 2 2 elong to Θ. The class of picture languages recognized y such systems satisfies relevant properties, which resemle classical properties of regular string languages [6]. A special case is represented y pictures over a one-letter alphaet: in this case only the shape of the picture is relevant, and hence a unary picture is simply identified y a pair of positive integers. In this context, a general goal is to define techniques to descrie families of recognizale languages, or to construct examples of non-recognizale languages [6, 9]. For instance, families of tiling-recognizale unary picture languages are introduced in [6] y means of integer functions or in [2] y means of special regular expressions, whereas in [9] two-dimensional automata are used to recognize unary languages and several strategies to explore pictures are presented. In this work we give a complexity result concerning the unary picture languages recognized y tiling systems and y unamiguous tiling systems. We characterize these two classes respectively y means of nondeterministic and unamiguous Turing machines that are space and head reversal-ounded. More precisely, we introduce a notion of quasi-unary string to represent pairs of positive numers and we prove that a unary picture language L is tiling recognizale (unamiguous tiling recognizale, respectively) if and only if the set of all quasi-unary strings encoding the sizes of the elements of L is recognizale y a nondeterministic (unamiguous, resp.) one-tape Turing machine that works within max(n, m) space and executes at most min(n, m) head reversals, on the input representing the pair (n, m). In particular for the case of squares, this result allows us to relate the recognizaility of unary square pictures to nondeterministic time complexity ounds. Informally, it shows that the complexity of the inary encodings of tiling recognizale unary square picture languages is located etween NTIME(2 n ) and NTIME(4 n ). This yields a large variety of examples of picture languages that are tiling recognizale. For instance, all inary languages in NP correspond to tiling recognizale (unary square) picture languages. The same holds for the inary languages that are NEXPTIME-complete [14]. Also, our characterization allows us to use separating results on time complexity classes as a tool for defining recognizale and non-recognizale unary picture languages. In particular, using a property proved in [15], we show the existence of a unary square language that is not tiling recognizale, ut corresponds to a inary string language recognizale in nondeterministic time O(4 n log n). Finally, we use properties of unamiguous and nondeterministic unary tiling recognizale picture languages to separate complexity classes. In particular, we consider the classes DSPACEREV Q, USPACEREV Q and NSPACEREV Q of quasi-unary languages accepted, respectively, y deterministic, unamiguous and nondeterministic one-tape Turing machines working in linear space with constraint on

3 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 3 the numer of head reversals. Here, our main result is that the inclusions DSPACEREV Q USPACEREV Q NSPACEREV Q are strict. The second strict inclusion is a consequence of a recent result appeared in [4], while the first one follows from a sort of iteration lemma for pictures of crossing sequences of Turing machine computations. 2. Preliminaries on picture languages Given a finite alphaet Σ, a picture (or two-dimensional string) over Σ is either a two-dimensional array (i.e., a matrix) of elements of Σ or the empty picture λ. The set of all pictures over Σ is denoted y Σ ; a picture language (or two-dimensional language) over Σ is a suset of Σ. Given a picture p Σ, we use r p and c p to denote the numer of rows and columns of p, respectively. The pair (r p, c p ) is called the size of p. By definition we have r p > 0 and c p > 0, except for the empty picture λ that has size (0, 0). The symol in p with coordinates (i, j) is denoted y p(i, j), for every 1 i r p and 1 j c p. We say that an element p Σ is a horizontal rectangle, a vertical rectangle, or a square according whether r p < c p, r p > c p, or r p = c p, respectively. If p is a square, then the size of p is simply r p. A square language is a picture language containing only square pictures. If the alphaet Σ is a singleton, then the pictures over Σ are called unary pictures. A unary picture language is a suset of Σ, where Σ is a singleton. For any picture p Σ of size (m, n), we use ˆp to denote a new picture of size (m + 2, n + 2) otained y surrounding p with a special oundary symol Σ. Such oundary will e useful when descriing scanning strategies for pictures. Many operations can e defined etween pictures or picture languages. In particular, we recall the operations of row and column concatenation. Let p and q e pictures over Σ of size (r p, c p ) and (r q, c q ), respectively. If r p = r q, we define the column concatenation p q etween p and q as the picture of size (r p, c p + c q ) whose i-th row equals the concatenation of the i-th rows of p and q, for every 1 i r p. If c p = c q, we define the row concatenation p q analogously. Clearly, and are partial operations over the set Σ. These definitions can e extended to picture languages and then iterated: for every language L Σ, we set L 0 = L 0 = {λ}, L i = L L (i 1) and L i = L L (i 1), for every i 1. Thus, one can define the row and column closures as the transitive closures of and : L = i 0 L i L = i 0 L i, which can e seen as a sort of two-dimensional Kleene star. Another useful operation is the so-called rotation: given p Σ, its rotation p R is the picture of size (c p, r p ) defined y p R (i, j) = p(r p + 1 j, i) for every i, j. Several approaches have een proposed to capture the notion of recognizaility of picture languages. Here we consider the class REC and its definition in terms of tiling systems [5, 6]. First, we recall the definition of local picture language.

4 4 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages Definition 2.1. A tile is a square picture of size 2; for every picture p, T (p) denotes the set of all tiles that are supictures of p. A picture language L Γ is called local if there exists a finite set Θ of tiles over the alphaet Γ {} such that L = {p Γ T (ˆp) Θ}. In this case we write L = L(Θ). We also need the notion of projection of pictures and picture languages. Let π : Γ Σ e a mapping etween two alphaets. Given a picture p Γ, the projection of p y π is the picture π(p) Σ such that π(p) (i, j) = π(p(i, j)) for every pair of coordinates i, j. Analogously, the projection of a language L Γ y π is the set π(l) = {π(p) p Γ } Σ. Definition 2.2. A tiling system is a 4-tuple τ = Σ, Γ, Θ, π where Σ and Γ are two finite alphaets, Θ is a finite set of tiles over the alphaet Γ {} and π : Γ Σ is a projection. A picture language L Σ is tiling recognizale if there exists a tiling system Σ, Γ, Θ, π such that L = π(l(θ)). We say that τ generates L and denote y REC the class of picture languages that are tiling recognizale. Notice in particular that any local language is tiling recognizale. The class REC satisfies some remarkale properties. For instance it can e defined as the class of languages recognized y online tessellation automata, that are special acceptors related to cellular automata [8]; they can e expressed y formulas of existential monadic second order [7]; they can e defined y means of regular-like expressions ased on certain composition rules etween pictures [6]. In particular we will use the fact that REC is closed with respect to the operations,,,,, R. Since we are interested in unary pictures, we denote y REC 1 the class of unary picture languages that are tiling recognizale. Clearly REC 1 REC. Another relevant suclass of REC consists of the tiling recognizale languages whose pictures are the projection of a unique element in the corresponding local language. Definition 2.3. A tiling system τ = Σ, Γ, Θ, π is unamiguous if, for every q, q L(Θ), π(q) = π(q ) implies q = q. A language L Σ is unamiguously tiling recognizale if L is generated y an unamiguous tiling system. The family of all unamiguous tiling recognizale picture languages is denoted y UREC. Moreover, we define UREC 1 as the class REC 1 UREC. The unamiguous tiling recognizale picture languages have een introduced in [5]. In particular, it is known that the inclusion UREC REC is strict and that it is undecidale whether a tiling system is unamiguous [3]. The unary unamiguous languages in REC are also studied in [4], where their relationship with deterministic classes of recognizale picture languages is investigated and, using results appeared in [11, 12], it is shown that the inclusion UREC 1 REC 1 is strict. 3. Characterization of REC 1 and UREC 1 In this section, we state our main result, that is a characterization of the class of unary picture languages that are tiling recognizale, in terms of computational complexity. To this aim, consider the alphaet { } and notice that any unary picture p { } is identified y its size, that is y the pair (r p, c p ). Thus, unary pictures (i.e. pairs of positive integers) can e encoded y quasi-unary strings as follows. We consider the set of unary strings over { } U = { n n > 0}

5 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 5 and the following sets of strings that are unary except for one special letter h or v (not occurring in first position): Q h = { n h k n > 0, k 0}, Q v = { n v k n > 0, k 0}. We call quasi-unary string over the alphaet {, h, v} any string in Q = U Q h Q v. The length of any quasi-unary string x is denoted as usual y x, whereas we use x to denote the length of the longest prefix of x in +. The use of symols h and v allows us to distinguish among squares, horizontal and vertical rectangles. Thus, a quasi-unary string x Q h represents the unary horizontal rectangle of size ( x, x ); x Q v represents the unary vertical rectangle of size ( x, x ); whereas x U represents the unary square of size x. Summarizing the previous definitions, the encoding φ from unary pictures to quasi-unary strings can e stated as follows: for every picture p { }, we have rp h cp rp 1 if r p < c p φ(p) = rp if r p = c p (1) cp v rp cp 1 if r p > c p Notice that φ(p) = max(r p, c p ), while φ(p) = min(r p, c p ). Moreover, for every L { }, we set φ(l) = {φ(p) p L}. Note that function φ can e extended to Σ for an aritrary alphaet Σ. Thus φ(p) is defined as in (1) for every p Σ. Clearly if Σ includes more than one element then φ is not an encoding of pictures in Σ : for every p Σ, φ(p) only represents the shape of p. Now, let us introduce the complexity classes of quasi-unary languages that we shall use to characterize the class of tiling-recognizale unary languages. Our main model of computation is the one-tape nondeterministic Turing machine, that we denote y 1t-NTM for short. Definition 3.1. NSPACEREV Q is the class of quasi-unary string languages that can e recognized y a 1t-NTM working within x space and executing at most x head reversals, for any input x in Q. In the previous definition we assume that the first and the last symol of the input are marked in a special way so that the machine only scans the cells of tape containing the input. We call this set of cells the work portion of the tape. We recall that a 1t-NTM is unamiguous if every input string accepted y the machine admits a unique accepting computation. We denote such machine y 1t-UTM. Then, we use USPACEREV Q to denote the class of all quasi-unary string languages that can e recognized y a 1t-UTM working in x space with at most x head reversals, for any input x in Q. Our main theorem can then e stated as follows: Theorem 3.1. A unary picture language L is in REC 1 if and only if φ(l) elongs to NSPACEREV Q. Moreover, L is in UREC 1 if and only if φ(l) elongs to USPACEREV Q. The proof of Theorem 3.1 is split into two parts presented in Sections 4 and 5, respectively. The first part shows that L REC 1 and L UREC 1 imply, respectively, φ(l) NSPACEREV Q and φ(l) USPACEREV Q. The second part proves the inverse implications.

6 6 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages t 1 = a t 2 = t 3 = c 4. From recognizaility to complexity ounds To prove the first part of the main theorem, we show that for every L REC the quasi-unary string language φ(l) elongs to NSPACEREV Q. This clearly yields a complexity ound on the shapes of all tiling recognizale languages. The statement is a consequence of the following result concerning the recognition of the size encodings of local languages. Lemma 4.1. Let Θ e a finite set of tiles over an aritrary alphaet Γ. Then, φ(l(θ)) elongs to NSPACEREV Q. We define a 1t-NTM M that, for any input x Q, nondeterministically tries to generate some p L(Θ) such that φ(p) = x. First of all, M estalishes if x Q h, x Q v, or x U. This can e done nondeterministically without head reversals. If x Q h or x U, then the generation is performed row y row, otherwise the generation has to e done column y column. The input is accepted if and only if such a generating process can e accomplished. We descrie the computation in details only when x Q h since the other cases are similar. The working alphaet Γ of M contains the symols, h, v,, all the pairs (a, ) (Γ {}) (Γ {}), and their marked versions (a, ) and (ã, ). The symols (a, ) shall e used in correspondence with a pair of adjacent symols in some column of the picture p generated during the computation; the overlined symols shall e used as ookmarks at the x -th cell, tildes shall e used to implement a counter. Given an input x, the machine M ehaves as follows: 1. First of all, M reads the tape rightwards till the last input symol, nondeterministically replacing each input symol according to Θ, whenever such a replacement is possile. More precisely: the leftmost symol is replaced y some pair (, a) such that the tile t 1 in the figure elow elongs to Θ; any next symol is replaced y some pair (, ) in such a way that, for each pair of consecutive pairs (, ) and (, ), the tile t 2 in the figure elongs to Θ (the position of the symol h is preserved y using overlined pairs); the rightmost symol is replaced y some pair (, c) such that the tile t 3 in the figure elongs to Θ. At any position, if no replacement is allowed, then M halts and rejects. 2. M changes direction and reads all the work portion of the tape without head reversals, replacing each symol (a, ) y (, c) so that each pair of consecutive symols do respect Θ (as in point 1). Such a procedure is repeated ( x 1)-many times: this task can e performed y using the first ( x ) cells of the tape (those that precede some overlined symol of Γ ) and marking one cell with

7 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 7 a tilde at each repetition. Also during this phase, if no replacement is allowed, then M halts and rejects. 3. After the ( x 1)-th repetition of step 2, M changes direction and reads all the tape again without head reversals, replacing each symol (a, ) y (, ) according to Θ. If no replacement is allowed then M halts and rejects. The input x is accepted if and only if the procedure can e concluded, that is, if and only if there exists a picture p L(Θ) of size ( x, x ). Since the machine M works exactly in space x and executes exactly x head reversals, the proof is complete. Theorem 4.1. For every L REC the quasi-unary string language φ(l) elongs to NSPACEREV Q. Let Σ, Γ, Θ, π e a tiling system generating L and let M e the corresponding Turing machine that recognizes φ(l(θ)), as defined in the proof of Lemma 4.1. Since for each p L the word φ(p) forgets the content of p and only depends on its shape, we have φ(l) = φ(l(θ)) and hence M just recognizes the set φ(l). The proof of the first part of Theorem 3.1 is completed y the following Proposition 4.1. For every L UREC 1, the quasi-unary string language φ(l) elongs to USPACEREV Q. Let { }, Γ, Θ, π e an unamiguous tiling system generating L. Then, for each x φ(l), there exists only one picture q L(Θ) such that φ(q) = x. Now consider the 1t-NTM M that recognizes φ(l(θ)): from the proof of Lemma 4.1 it is clear that the numer of accepting computations of M for an input x Q equals the numer of q L(Θ) such that φ(q) = x. Therefore, y the previous oservation, M is unamiguous and hence φ(l) = φ(l(θ)) elongs to USPACEREV Q. Note that the previous property does not hold for general L UREC, since L may contain two different pictures with the same shape. 5. From complexity ounds to recognizaility To prove the second part of Theorem 3.1, we first introduce an auxiliary picture language representing the accepting computations of a 1t-NTM. A similar approach is used in [5] to prove that the emptiness prolem for the family REC is undecidale The accepting-computation picture language of a 1t-NTM Let M e a 1t-NTM and let Σ and Λ e the input and the working alphaet (Λ contains the lank symol ). We denote y Q the set of states, which includes the initial state q 0 and a unique accepting state q yes. Also let δ : Q Λ 2 Q Λ {+, } e the transition function of M. Without loss of generality, we assume M can never print the lank symol, and hence (q, c, x) δ(p, a) implies c. However,

8 8 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages here the machine is not space ounded and it can scan the first lank of the tape: in this case we assume that such a lank is part of the work portion of the tape. Then, set Λ Q = {σ q σ Λ, q Q}, a configuration of M is a string C = xσ q y Λ Λ Q Λ which represents the instantaneous description of the machine where xσy is the work portion of the tape, q is the current state and the head scans the cell containing σ on the right of x. If q = q 0 and x is the empty string, then C is the initial configuration of M on input σy. If q = q yes then C is an accepting configuration. We assume the machine halts in every accepting configuration. Given two configurations C and D of M, we write C D whenever M can go from C to D without in-etween head reversals, possily y several distinct moves. Formally, we define an accepting computation 1 of M on input x Σ as a string of the form W = W 1 W 2 W n (2) such that all W j s are configurations of M, W 1 is the initial configuration on input x, W n is an accepting configuration, W i W i+1 holds for each i = 1,..., n 1, and at configuration W i the machine executes a head reversal for every 1 < i < n. Thus, from W i 1 to W i and from W i to W i+1, the head moves to opposite directions. We say that the sequence of moves from W i to W i+1 is a run of the computation, for any i = 1,..., n 1 (and hence a computation can e seen as a sequence of runs). Given an accepting computation W, let m = max i W i and consider the picture of size n m containing the string W i (possily followed y s) on the i-th row, for 1 i n. Notice that, from such a picture, one can recover the input and the sequence of runs ut not the complete step-y-step computation on the same input. Since M can never print the lank, the last row such a picture does not contain any (ut it may include a symol of the form q ). The accepting-computation language of M is defined as the set A(M) of all pictures corresponding to any accepting computation of M. Note that every accepting computation W of M corresponds to a picture w A(M) such that r w 2 equals the numer of head reversals executed in W (corresponding to W 2,, W n 1 ) and c w is the space used in W. Example 5.1. Let M e a 1t-NTM that has working alphaet {a,, c}, set of states Q = {0, 1, 2, 3, 4, 5, y} and accepting state y. Then, for the input x = aaccca, consider the sequence of moves represented in the following tale, where (σ, q, ) δ(σ, q): q σ a a c c a c c a a a c q y σ c a c a c a a a c The picture w associated with such a computation W = W 1 W 2 W 7 is given y 1 Usually, the computation is a description of the sequence of all single moves executed y the machine on a given input. Rather, here we refer to this concept using the expression step-y-step computation.

9 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 9 a 0 a c c c a W 1 c a c a c 4 c a W 2 c a c 1 c c a W 3 w = c a c a a a 3 W 4 c a c a a 4 a W 5 c a c a c a 2 W 6 c a c a y W 7 Proposition 5.1. The accepting-computation language of any 1t-NTM elongs to REC. Moreover, the accepting-computation language of any 1t-UTM elongs to UREC. Let L e the accepting-computation language of a 1t-NTM M. We show that L is the projection of a local language L. To this aim, for every picture w L, we define a new picture w otained from w y changing some symols, and set L = {w w L}. To uild w we proceed as follows, recalling that the i-th row of w corresponds to a configuration W i defined as in (2), for every i 1. We mark all symols of Λ Q occurring in w y replacing σ q y σ q when it occurs on odd rows, and y σ q when it occurs on even rows, except for the last row where σ qyes remains unchanged. Now, for every i 1, let j i e the column index such that w(i, j i ) is in Λ Q. Then, for each 1 i < n, w (i, j i ) contains an arrow denoting the direction of the head during the run from configuration W i to configuration W i+1. Then, for each i 2, we modify the symols in the i-th row included etween the columns of indices j i 1 and j i. Notice that this is the portion of the tape modified during the run from W i 1 to W i. More precisely, we replace each symol σ Λ in this portion y q σ, where q Q is the state entered y the machine just efore printing σ on the tape. Now, let Γ e the alphaet containing Λ and all symols q σ, σ q, σ q where σ Λ, q Q, and consider the morphism π : Γ Λ Λ Q such that π(σ) = π( q σ) = σ and π( σ q ) = π( σ q ) = σ q. Clearly, for every picture w L, we have w Γ and π(w ) = w. Therefore, the result is proved if we provide a representation y tiles for the picture language L = {w Γ w L}. The upper left cell of any w L contains σ q0, where q 0 is the initial state and σ Σ, while all other cells in the first row are in Σ { }, thus we have the tiles a qo a qo a for every a Σ, Σ { }. The last row of any picture in L must contain q yes and no s; thus we have to add the tiles a qyes a qyes a

10 10 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages a qyes a qyes a qyes for any a,, Λ, a,. Moreover, we have to add some tiles corresponding to the moves of the machine. For sake of revity, from now on we use capital letters to denote a symol or one of its leftapexed versions, that is A is either the symol a or p a for some p Q. Thus, for any rightwards move (q,, +) δ(p, a) such that q q yes, we have the tiles x x ap X x A, (3) ap for every x Λ {}, x. Moreover, if the previous move (q,, +) δ(p, a) can e followed y a rightwards move (r, d, +) δ(q, c) or y a leftwards move (s, f, ) δ(q, e), we have to add also the tiles ap C q d A p C q d or ap E A E. (4) eq eq For the moves of the form (q yes,, +) δ(p, a), that enter the machine in the accepting state, we add the tiles pa C A C C X c qyes p c qyes x c qyes for every x Λ {}, x. Analogously, if the directions of all previous moves are reversed, we have to consider the symmetric tiles of (3), (4) and (5), that is c qyes p p c qyes c qyes x (5) ap x x A ap X x C q d ap C q d A p where x Λ {}. The last tile aove can e distinguished from its symmetric version in (4) y adding a further mark to symols representing the direction of the moves (a mark we here avoid to use for sake of simplicity). Finally, we have to add the tiles corresponding to the tape portions far from the head, that is the tiles X Y A B x y where x, y Λ {} and a, Λ\{, }. The local picture language generated y the set of all tiles defined aove is just L and this proves that L REC.

11 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 11 Moreover, if M is unamiguous then there is only one picture w L corresponding to each input x accepted y the machine. This means that every picture in L admits a unique covering y the set of tiles defined aove. Formally, for every w L there is a unique w L such that w = π(w ). This shows that L elongs to UREC. Example 5.2. Consider the 1t-NTM, the sequence of moves and the associated picture w defined in Example 5.1. When transforming w as descried in the proof of Proposition 5.1, we otain the new picture a0 a c c c a c 1 a 4 c c a c w = c a c a c a c a 2 1 a c4 c a 1 5 c c a 4 0 a c a c a c 2 a3 a4 2 a a2 c a c a y 0 Note that in the proof of Proposition 5.1, if M works in space n = x for an accepted input x, then the corresponding picture in L has n columns and does not contain Overlap of picture languages We now introduce a partial operation on the set of all picture languages (over aritrary alphaets), that will e used to fix the size of the accepting-computations of Turing machines studied aove. Formally, given two pictures p and q of the same size (n, m), let p q e the picture such that (p q)(i, j) = (p(i, j), q(i, j)) for every 1 i n and 1 j m. Then, the overlap L 1 L 2 of two picture languages L 1 and L 2 is defined as L 1 L 2 = {p q p L 1, q L 2, r p = r q, c p = c q, p(1, j) = q(1, j) for every 1 j c p } (6) Proposition 5.2. Given two picture languages in REC, their overlap is still in REC. Moreover, the overlap of two languages in UREC elongs to UREC. Let L 1 and L 2 e two picture languages over the alphaets Σ 1 and Σ 2, respectively, and assume that they are in REC. Then, for each i {1, 2}, there exists a tiling system Σ i, Γ i, Θ i, π i recognizing L i. Set Top(Θ i ) = {t Θ i t = a where a, Γ i {}}

12 12 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages and let Left(Θ i ), Right(Θ i ), and Bottom(Θ i ) e defined analogously. Also, define Inner(Θ i ) as the set of tiles of Θ i that do not elong to any of the previous set. Now, let Γ = Γ 1 Γ 2 and define Θ as the union of the sets Inner(Θ), Left(Θ), Right(Θ), Bottom(Θ), Top(Θ), where: Inner(Θ) = { (a 1, a 2 ) ( 1, 2 ) (c 1, c 2 ) (d 1, d 2 ) a i i c i d i Inner (Θ i ), i {1, 2}}, Left(Θ) = { (a 1, a 2 ) ( 1, 2 ) a i i Left(Θ i ), i {1, 2} }, Bottom(Θ) and Right(Θ) are defined similarly, whereas Top(Θ) is given y Top(Θ) = { (a 1, a 2 ) ( 1, 2 ) Top(Θ i ), i {1, 2} and a i i π 1 (a 1 ) = π 2 (a 2 ), π 1 ( 1 ) = π 2 ( 2 )}. Finally, set π = π 1 π 2, that is, for each pair (a 1, a 2 ) Γ, set π(a 1, a 2 ) = (π 1 (a 1 ), π 2 (a 2 )). Clearly, τ = Σ 1 Σ 2, Γ, Θ, π is a tiling system recognizing the overlap of L 1 and L 2. Moreover, if the two tiling systems are unamiguous then also τ is and this concludes the proof. We are now ale to prove the second part of Theorem 3.1. Theorem 5.1. Let L e a unary picture language such that φ(l) is in NSPACEREV Q. Then L is tiling recognizale. Further, if φ(l) is in USPACEREV Q then L elongs to UREC 1. Since φ(l) is in NSPACEREV Q, it is recognized y a 1-tape nondeterministic Turing machine 1t-NTM M that works in x space for any input x Q, and executes at most x head reversals during each computation. Thus, the accepting-computation language A(M) of such a Turing machine is in REC, y Proposition 5.1, and so is the language Ā otained from A(M) y replacing the symol q 0 y in the upper-leftmost cell of each picture in A(M). Such a language can e further extended y adding rows of lanks to each picture. Thus we can define the language A = Ā ( ) which is also in REC y the properties of and. Now, let us introduce some auxiliary picture languages we shall use to ind the size of pictures in A. Let E s e the set of all unary squares over the alphaet { } and set E h = E s h and E v = E s v. In other words, every p E s E h contains φ(p) on each row, while any p E v contains, on each row, the quasi-unary string φ(p R ). Moreover, consider the picture languages L s = A E s, L h = A E h and L v = (A E v ) R.

13 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages 13 and set L = L s L h L v. By Proposition 5.2, also L is tiling recognizale and we now show that L = π(l ), where π is the ovious projection mapping into all symols of the alphaet of L. Indeed, y the previous definition, we have that any quasi-unary string x representing a picture of π(l ) is an accepted input of M; hence x φ(l), that is x represents a picture in L. Since oth L and π(l ) are unary, this implies π(l ) L. On the other hand, assume p L. First of all, notice that φ(p) is accepted y M, hence there exists a Ā having x = φ(p) on the first row and such that c a = max(r p, c p ) and r a min(r p, c p ). Let a A e the extension of a that has exactly min(r p, c p ) rows, and notice that a always is a horizontal rectangle or a square (i.e. r a c a ). Moreover, consider the picture u p = φ(p) x. Notice that, if p is a horizontal rectangle, then u p E h ; if p is a vertical rectangle, then u p E v, otherwise, if p is a square, u p E s. In any case, u p has the same size as a. Hence, if p is a square or a horizontal rectangle, then we have p = π(a u p ); otherwise we have p = π ( (a u p ) R). In all cases, p π(l ) and hence L π(l ). Thus, L = π(l ) is in REC 1. Now assume that φ(l) elongs to USPACEREV Q. Then, y Proposition 5.2, we have L UREC and thus, for every p L, there is a unique q L such that π(q) = p. This proves that also L elongs to UREC Square languages In this section we focus on unary square languages, that is on unary picture languages whose elements are all squares. It is clear that square languages are nothing ut sets of positive integers, so far represented y unary strings over the alphaet { }. In the following definition we introduce a suclass of NSPACEREV Q that concerns only square languages and their representation. Definition 6.1. NSPACEREV 1 (USPACEREV 1, respectively) is the class of unary string languages that can e recognized y a 1t-NTM (1t-UTM, resp.) working within n space and executing at most n head reversals, for any input of length n. Integers can also e represented y the classical inary encoding and this suggests to define the inary complexity class corresponding to the previous definition. Definition 6.2. NSPACEREV 2 (USPACEREV 2, respectively) is the class of inary string languages that can e recognized y a 1t-NTM (1t-UTM, resp.) working within 2 n space and executing at most 2 n head reversals, for any input of length n. Notice that the families NSPACEREV 1 and NSPACEREV 2 are related to the well-known time complexity classification. In particular, denoting y NTIME 1 (f(n)) (resp. NTIME 2 (f(n))) the class of unary (resp. inary) string languages recognizale y 1t-NTMs working in f(n) time for any input of length n, we have the following relations: NTIME 1 (n) NSPACEREV 1 NTIME 1 (n 2 ), NTIME 2 (2 n ) NSPACEREV 2 NTIME 2 (4 n ). (7)

14 14 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages As one might guess, the classes NSPACEREV 1 and NSPACEREV 2 define the same family of integer sets, the only difference eing their integer representation. To prove this relationship we first show a speed-up property of the numer of head reversals that holds for linear space ounded 1t-NTMs. Lemma 6.1. For every c > 1 and every language L recognized y a 1t-NTM M working in n space within n head reversals, there exists a n-space ounded 1t-NTM M recognizing L within n/c head reversals. We prove the statement only for c = 2 and, without loss of generality, we assume that any head reversal of M only occurs at either the first or the last cell of the work portion of the tape. Thus, a computation of M is a sequence of runs as defined in Section 5.1 where, however, in each run the tape head scans all the work portion from one order cell to the other. We show how a computation of M for an input of length n can e simulated y a machine M with n/2 head reversals, considering only the case where n and n/2 are even (the other cases are treated similarly). Thus, in the first and in the n/2 + 1-th run of M the head moves rightwards. We can design M as a 1t-NTM with the tape split in 4 tracks. First, on track 1 M simulates M starting from the initial configuration while, on track 2, in the first run it guesses nondeterministically a configuration α of M and keeps it in the susequent runs. Simultaneously, on track 3 M simulates M starting just from α and, on track 4, it marks 2 cells at each run. Thus, after n/2 head reversals the whole track 4 is marked and then M accepts if and only if the state entered in track 3 is accepting and configuration α kept in track 2 equals the configuration reached in track 1. Note that the numer of accepting computations of M and M (for the same input) are equal. The case c > 2 (or with odd n or n/2) are treated y possily increasing the numer of tracks. The correspondence etween NSPACEREV 1 and NSPACEREV 2 is formally descried y the following proposition. Here, we denote y Bin(n) the inary encoding of a positive integer n. Proposition 6.1. A unary language L is in NSPACEREV 1 (in USPACEREV 1, respectively) if and only if the set {Bin(n) 1 n L} is in NSPACEREV 2 (in USPACEREV 2, resp.). We prove the statement only in the first direction (the other is similar). Let M e a 1t-NTM accepting L in n space with n head reversals and define L = {Bin(n) 1 n L}. Then, a 1t-NTM accepting L can e designed which works in two phases. First, for an input x {0, 1} +, the unary string 1 n is computed such that x = Bin(n). Then, the machine simulates M on input 1 n and yields the same output. These phases can e carried out in 2 x space y 2 x +1 head reversals. However, the numer head reversals can e halved y Lemma 6.1. Now, applying the proposition aove, Theorem 3.1 can e re-stated using these new classes and we get the following corollary. Corollary 6.1. Given a unary square language L, the following statements are equivalent: 1. L is in REC 1, 2. { rp p L} NSPACEREV 1,

15 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages {Bin(r p ) p L} NSPACEREV 2, Moreover, an analogous statement holds in the unamiguous case. That is, for every unary square language L, the following properties are equivalent: 1a. L is in UREC 1, 2a. { rp p L} USPACEREV 1, 3a. {Bin(r p ) p L} USPACEREV 2. The previous corollary provides a useful tool to verify whether a unary square language is tiling recognizale. For instance, it is well-known that the set of prime numers is recognizale in polynomial time[1] and hence y the previous corollary we get the following Proposition 6.2. The set of unary square pictures whose size is a prime numer is in UREC 1. More generally, if L π is a inary NP language, then the picture language elongs to REC 1. {p r p = c p, x L π such that Bin(r p ) = 1x} 6.1. A tiling recognizale language from an exponential time complete prolem In this susection we descrie an example of tiling recognizale unary square language that corresponds to a decision prolem complete in the class NEXPTIME = c 1 NTIME 2 (2 cn ) and hence not included in NP y well-known separation results [15]. This is the inequality prolem of regular expressions with squaring INEQ(RE,2), studied y Meyer and Stockmeyer in the framework of the complexity analysis of word prolems requiring exponential time [13, 14]. A rather natural inary encoding of INEQ(RE,2) is solvale in NTIME 2 (2 n ) and hence the corresponding family of unary square pictures is tiling recognizale. For sake of completeness, we present the construction in detail even if it can e derived y standard arguments from results and material given in [14]. Let us denote y RE(0, 1,,, 2 ) the family of regular expressions with squaring over the alphaet {0, 1}. Formally, this is defined y stating that 0, 1 and ε elong to RE(0, 1,,, 2 ) and, for every e 1, e 2 RE(0, 1,,, 2 ), also the expressions (e 1 e 2 ), (e 1 e 2 ), (e 1 ) 2 are in RE(0, 1,,, 2 ). Clearly, every e RE(0, 1,,, 2 ) represents a finite language L(e) {0, 1} defined in the ovious way. Moreover, we say that two expressions e, f RE(0, 1,,, 2 ) are equivalent if L(e) = L(f). The decision prolem INEQ(RE,2) consists of determining, on input e, f RE(0, 1,,, 2 ), whether e and f are not equivalent. It is well-known that such a prolem is log-space complete for the class NEXPTIME [14] and hence it does not lie in NP. Proposition 6.3. The prolem INEQ(RE,2) is solvale y a 1t-NTM in O(2 n( 4 3 +ε) ) time and O(2 n( 1 3 +ε) ) space (for any ε > 0).

16 16 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages Proof (outline). Reasoning as in [14] one can design an algorithm that, on input e, f RE(0, 1,,, 2 ), first determines two nondeterministic finite state automata A e, A f recognizing L(e) and L(f), respectively. This can e done y eliminating the squaring from oth e and f, which leads to a possile exponential increase of the size of the expressions. Then, the procedure nondeterministically generates a word x {0, 1} of length at most 2 max{ e, f } and deterministically checks whether x is accepted y one of the automata and rejected y the other: if this is the case the algorithm accepts the input, otherwise it rejects. The complexity ounds follow from standard Turing machine constructions; in particular, we recall that every multitape TM working in O(t(n)) time and O(s(n)) space can e simulated y a single tape TM in time O(t(n)s(n)). Now, given the alphaet Σ = {0, 1, ε, (, ),,, 2, #}, consider a standard encoding cod : Σ {0, 1} associating each symol of Σ with a string of at least 2 digits. Then, define the language I {0, 1} of all strings y such that y = cod(e#f) for some e, f RE(0, 1,,, 2 ) and L(e) L(f). Since y 2 max{ e, f }, y Proposition 6.3 we otain the following Proposition 6.4. The language I is recognizale y a 1t-NTM in O(2 n( 2 3 +ε) ) time and O(2 n( 1 6 +ε) ) space (for any ε > 0). As a consequence I elongs to NTIME 2 (2 n ) and setting we have that T is in REC 1. T = {p r p = c p = 1x for a string x I} 6.2. Nonrecognizale picture languages Another consequence of Corollary 6.1 concerns the construction of unary square languages that are not tiling recognizale. For instance one can prove the existence of a unary square language that is not tiling recognizale, ut such that the set of inary encoding of its sizes is not too far (from a complexity view point) from the class NSPACEREV 2. In order to present such an example, for any function f : N R +, let us define 2t-NTIME 2 (f) as the class of inary string languages that are recognizale y 2-tape nondeterministic Turing machines working within time f(n) on every input of length n. Proposition 6.5. There exists a unary square picture language L REC 1 such that the string language S = {x {0, 1} 1x = Bin(r p ) for a picture p L} elongs to 2t-NTIME 2 (4 n log n). The existence of such language is guaranteed y a result proved in [15]. If T 1, T 2 : N R + are two running-time functions such that T 1 (n + 1)/T 2 (n) tends to 0 as n goes to infinity, then there exists a language S {0, 1} that elongs to 2t-NTIME 2 (T 2 (n)) ut does not elong to 2t-NTIME 2 (T 1 (n)). Setting T 1 (n) = 4 n, T 2 (n) = 4 n log n, and oserving that 2t-NTIME 2 (4 n ) NSPACEREV 2, y Theorem 3.1 we have that S is in 2t-NTIME 2 (4 n log n) whereas L cannot e tiling recognizale.

17 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages Separation results In the previous section we have shown how properties of complexity classes can e used to determine examples and results concerning the recognizaility of picture languages. Here we use our main result in the opposite direction, showing properties of the class NSPACEREV Q otained y studying the corresponding family REC 1. A first result concerns the separation etween the classes NSPACEREV Q and USPACEREV Q. Theorem 7.1. The class USPACEREV Q is strictly included in NSPACEREV Q. This property is an immediate consequence of a separation result otained in [4], where it is proved that there exists a picture language L in REC 1 that does not lie in UREC 1. Indeed, y Theorem 3.1, this implies that the encoding φ(l) elongs to NSPACEREV Q \USPACEREV Q. A further natural suclass of NSPACEREV Q is defined y considering deterministic Turing machine. In accordance with our previous notation, let 1t-DTM stand for one-tape deterministic Turing machine. Then we denote y DSPACEREV Q the class of quasi-unary string languages accepted y a 1t-DTM working within x space and executing at most x head reversals, for every input x in Q. Clearly such a class is included in USPACEREV Q and our main purpose in this section is to prove that such inclusion is strict. The result is mainly ased on the following property. Lemma 7.1. Let L Q h e a language in DSPACEREV Q and let M e a 1t-DTM with s states recognizing L within x space and executing at most x head reversals, for every input x in Q. Also assume there exists a word z L such that z > m s m+1, where m = z. Then there exists c N such that z c is in L and all prime divisors of c are smaller or equal to s. As in Lemma 6.1, let M e allowed to reverse the tape head only at the order cells of the work portion of the tape. We also assume that, for any input x Q h, M always executes x head inversions and hence 1 + x runs. This can e done y marking the input symols that preceed h once at each run and stopping the computation when all the first x symols are marked. Now, let z L e a string of length n > m s m+1, where m = z and let us denote y C the computation of M on input z. For every j {1, 2,..., n}, the crossing sequence at position j is an array of states p = (p 0, p 1,..., p m ), where each p i is the state of M while the machine is scanning the j-th cell in the i + 1-th run of the computation. Let us first prove the following easy property. Claim. Assume that, in the computation C on z, the crossing sequences at positions i and j are equal, for two integers i and j such that m + 1 < i < j n. Then, the string z c elongs to L, where c = j i. Indeed, let C e the computation of M on input z c. Since the machine is deterministic and the input symols placed after the position m + 1 are all, in computation C etween positions j and n + c the machine makes the same moves as in the computation C etween the positions i and n. This means that, for every l = j, j + 1,..., n + c, the crossing sequence of C at position l equals the crossing sequence of C at position l c. Moreover, it is clear that C and C have the same crossing sequences at positions l i. As a consequence, the states reached y C and C at the end of the last run must e equal, and this proves the claim.

18 18 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages Now, let us construct a pair of positions i, j satisfying the hypothesis of the previous claim and let us evaluate their distance. Consider the first two positions i 0, j 0, such that m + 1 < i 0 < j 0, where M enters the same state (say p 0 ) during the first run of C. Set α 0 = j 0 i 0 and note that α 0 s (and j 0 m + s + 2). Consider also the arithmetic progression of positions given y T 0 = {i 0 + lα 0 l N, i 0 + lα 0 n} Since, in the first run of C the moves etween two consecutive positions in T 0 are the same, M enters state p 0 at each position j T 0 ; for the same reason, it prints the same word etween any two consecutive positions of T 0. Thus, in the second run, while it moves from right to left, etween any two consecutive positions of T 0 the machine reads the same word. In such run, as T 0 has more than s elements, we can consider the first pair of positions i 1, j 1 T 0, n (sα 0 ) i 1 < j 1 n, where M enters the same state, say p 1. The difference c 1 = j 1 i 1 satisfies the equality c 1 = α 0 α 1, for some positive integer α 1 s. Again, we can consider the arithmetic progression T 1 = {j 1 lc 1 l N, m + 1 < j 1 lc 1 } Thus, during the second run of C, at each position j T 1 the machine enters the same state p 1 ; moreover, etween any two consecutive positions in T 1 it prints the same word, which will e read ackwards in the third run. The previous reasoning can e repeated for all susequent runs of C, as the input is long enough. In the last run, we otain a crossing sequence p = (p 0, p 1,..., p m ) that occurs in the computation C at all positions elonging to an arithmetic progression T m defined y T m = {i m + lc m l N, i m + lc m n}, where i m is an integer such that m + 1 < i m m c m, c m = α 0 α 1 α m, with α i N and 1 α i s for every i. Note that c m s m+1. Thus, the length n > m s m+1 guarantees that T m contains at least two positions at a distance c m and hence the lemma follows from the claim aove with c = c m. Theorem 7.2. The language elongs to USPACEREV Q \DSPACEREV Q. L = { m h n 1 m n = km, k, m N} It is easy to show that L is in USPACEREV Q. Indeed, a 1t-UTM can e designed which, for an input x Q h, in the first run nondeterministically marks some symols of x on the right of h; then, it checks in a deterministic way, y using at most m = x head reversals, whether the distance etween any two consecutive marks equals m. Note that there is at most one accepting computation for any input. Now, assume y contradiction that L DSPACEREV Q. Then, there is a 1t-DTM M that recognizes L within x space and executing at most x head reversals, for every input x in Q. Let s e the numer of states of M and let m e a prime integer greater than s. Also consider a word z = m h mk 1, where k is an integer such that the length of z satisfies (k + 1)m > m s m+1. Since z L, y Lemma 7.1, there is c N with all prime divisors at most equal to s, such that the string y = m h mk+c 1 is in L. This implies y = m(k + 1) + c is a multiple of m and hence m > s is a divisor of c: however this is a contradiction since, as stated aove, every prime divisor of c must e smaller or equal to s.

19 A. Bertoni, M. Goldwurm, V. Lonati / The complexity of unary tiling recognizale picture languages Conclusions In this work we have characterized the families REC 1 and UREC 1 of unary two-dimensional languages that are tiling recognizale and unamiguously tiling recognizale, respectively. We have shown that any unary picture language in REC 1 or in UREC 1 can e represented y a single-tape, linearly spaceounded, nondeterministic or unamiguous Turing machine, with a further input dependent constraint on the numer of head reversals. In this construction, each picture in the local language corresponds to an accepting computation of the Turing maching, and viceversa. Exploiting such a correspondence, we use a deep result on picture languages [4, 11, 12] to otain a separation property etween complexity classes. This approach could e also applied to other natural suclasses of NSPACEREV Q. Another open prolem concerns the comparison etween the class DSPACEREV Q introduced in the present work and the class DREC 1 of deterministic unary picture languages studied in [4]. Concluding, we oserve that another natural prolem concerns the analysis of classes of languages defined y Turing machines with a ounded numer of head reversals. More precisely, one may ask whether a separation property, similar to that one proved in [15] for multitape time-ounded nondeterministic Turing machine, also holds for complexity classes defined y ounding the numer of head reversals. This would lead to simpler examples of unary picture languages that are not tiling recognizale. References [1] M. Agrawal, N. Kayal, N. Saxena. PRIMES is in P. Annals of Mathematics, 160(2): , [2] M. Anselmo, D. Giammarresi, M. Madonia. Regular expressions for two-dimensional languages over oneletter alphaet. In Proc. 8th DLT, C.S. Calude, E. Calude and M.J. Dinneen (Eds.), LNCS 3340, 63 75, Springer, [3] M. Anselmo, D. Giammarresi, M. Madonia, A. Restivo. Unamiguous recognizale two-dimensional languages. Theoretical Informatics and Applications 40(2): , [4] M. Anselmo, M. Madonia. Deterministic and unamiguous two-dimensional languages over one-letter alphaet. To appear in Theoretical Computer Science. Preliminary version in Proc. CAI 2007, S. Bozapalidis and G. Rahonis (Eds.), LNCS 4728, , Springer, [5] D. Giammarresi, A. Restivo. Recognizale picture languages. Int. J. Pattern Recognition and Artificial Intelligence 6: 31 42, [6] D. Giammarresi, A. Restivo. Two-dimensional languages. In Handook of Formal Languages, G. Rosenerg and A. Salomaa (Eds.), Vol. III, , Springer-Verlag, [7] D. Giammarresi, A. Restivo, S. Seiert, W. Thomas. Monadic second order logic over rectangular pictures and recognizaility y tiling system. Information and Computation, 125(1):32 45, [8] K. Inoue, I. Takanami. A survey of two-dimensional automata theory. In Proc. 5th Int. Meeting of Young Computer Scientists, J. Dasson, J. Kelemen (Eds.), LNCS 381, 72 91, Springer-Verlag, [9] J. Kari, C. Moore. New results on alternating and non-deterministic two-dimensional finite state automata. In Proc. 18th STACS, A. Ferreira, H. Reichel (Eds.), LNCS 2010, , Springer-Verlag, [10] O. Matz. Regular expressions and context-free grammars for picture languages. In Proc. 14th STACS, LNCS 1200, , Springer-Verlag, 1997.

Reversal of regular languages and state complexity

Reversal of regular languages and state complexity Reversal of regular languages and state complexity Juraj Šeej Institute of Computer Science, Faculty of Science, P. J. Šafárik University Jesenná 5, 04001 Košice, Slovakia juraj.seej@gmail.com Astract.

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

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

Finite Automata and Regular Languages (part II)

Finite Automata and Regular Languages (part II) Finite Automata and Regular Languages (part II) Prof. Dan A. Simovici UMB 1 / 25 Outline 1 Nondeterministic Automata 2 / 25 Definition A nondeterministic finite automaton (ndfa) is a quintuple M = (A,

More information

Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp

Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp. 373-384 www.stacs-conf.org COMPLEXITY OF SOLUTIONS OF EQUATIONS OVER SETS OF NATURAL NUMBERS ARTUR JEŻ 1 AND ALEXANDER OKHOTIN

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 1 / 38 Lecture 21: Overview Big-Oh notation. Little-o notation. Time Complexity Classes Non-deterministic TMs The Class

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

arxiv: v1 [cs.cc] 3 Feb 2019

arxiv: v1 [cs.cc] 3 Feb 2019 Some Remarks on Real-Time Turing Machines (Preliminary Report) arxiv:1902.00975v1 [cs.cc] 3 Feb 2019 Holger Petersen Reinsburgstr. 75 70197 Stuttgart February 5, 2019 Abstract The power of real-time Turing

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

Ambiguity and Complementation in Recognizable Two-dimensional Languages

Ambiguity and Complementation in Recognizable Two-dimensional Languages Ambiguity and Complementation in Recognizable Two-dimensional Languages Dora Giammarresi 1 and Antonio Restivo 2 1 Dipartimento di Matematica, Università diroma TorVergata, via della Ricerca Scientifica,

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

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

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA Turing Machines A Turing machine is similar to a finite automaton with supply of unlimited memory. A Turing machine can do everything that any computing device can do. There exist problems that even a

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

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1) Time Complexity (1) CSCI 2670 Original Slides were written by Dr. Frederick W Maier Spring 2014 Time Complexity So far we ve dealt with determining whether or not a problem is decidable. But even if it

More information

Computability Theory. CS215, Lecture 6,

Computability Theory. CS215, Lecture 6, Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

More information

TWO-DIMENSIONAL JUMPING FINITE AUTOMATA. 1. Introduction

TWO-DIMENSIONAL JUMPING FINITE AUTOMATA. 1. Introduction Math Appl 5 (2016), 105 122 DOI: 1013164/ma201608 TWO-DIMENSIONAL JUMPING FINITE AUTOMATA S JAMES IMMANUEL and D G THOMAS Abstract In this paper, we extend a newly introduced concept called the jumping

More information

Lecture 3: Reductions and Completeness

Lecture 3: Reductions and Completeness CS 710: Complexity Theory 9/13/2011 Lecture 3: Reductions and Completeness Instructor: Dieter van Melkebeek Scribe: Brian Nixon Last lecture we introduced the notion of a universal Turing machine for deterministic

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

Parallel Turing Machines on a Two-Dimensional Tape

Parallel Turing Machines on a Two-Dimensional Tape Czech Pattern ecognition Workshop 000, Tomáš Svoboda (Ed.) Peršlák, Czech epublic, February 4, 000 Czech Pattern ecognition Society Parallel Turing Machines on a Two-Dimensional Tape Daniel Průša František

More information

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write

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

conp, Oracles, Space Complexity

conp, Oracles, Space Complexity conp, Oracles, Space Complexity 1 What s next? A few possibilities CS161 Design and Analysis of Algorithms CS254 Complexity Theory (next year) CS354 Topics in Circuit Complexity For your favorite course

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

Computational Models Lecture 11, Spring 2009

Computational Models Lecture 11, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 11, Spring 2009 Deterministic Time Classes NonDeterministic Time Classes

More information

Rectangles and squares recognized by two-dimensional automata

Rectangles and squares recognized by two-dimensional automata Rectangles and squares recognized by two-dimensional automata Jarkko Kari 1 and Cristopher Moore Department of Computer Science, 15 MLH, University of Iowa, Iowa City IA 52242 USA, jjkari@cs.uiowa.edu

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 12: Turing Machines Turing Machines I After having dealt with partial recursive functions,

More information

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined.

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined. LECTURE 23 10.1 Formal Definition of a DFA Definition 10.1 A Deterministic Finite Automaton (DFA) M, is a five-tuple: where M = (Q,Σ,δ, 0,F) Q is a finite set of states. It is important that the set of

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 8 Nancy Lynch Today More undecidable problems: About Turing machines: Emptiness, etc. About

More information

CSCI3390-Assignment 2 Solutions

CSCI3390-Assignment 2 Solutions CSCI3390-Assignment 2 Solutions due February 3, 2016 1 TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems.

More information

Pseudo-automata for generalized regular expressions

Pseudo-automata for generalized regular expressions Pseudo-automata for generalized regular expressions B. F. Melnikov A. A. Melnikova Astract In this paper we introduce a new formalism which is intended for representing a special extensions of finite automata.

More information

CSCC63 Worksheet Turing Machines

CSCC63 Worksheet Turing Machines 1 An Example CSCC63 Worksheet Turing Machines Goal. Design a turing machine, M that accepts only strings of the form {w#w w {0, 1} }. Idea. Describe in words how the machine would work. Read first symbol

More information

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines

More information

Homework Assignment 6 Answers

Homework Assignment 6 Answers Homework Assignment 6 Answers CSCI 2670 Introduction to Theory of Computing, Fall 2016 December 2, 2016 This homework assignment is about Turing machines, decidable languages, Turing recognizable languages,

More information

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus

More information

CS151 Complexity Theory. Lecture 1 April 3, 2017

CS151 Complexity Theory. Lecture 1 April 3, 2017 CS151 Complexity Theory Lecture 1 April 3, 2017 Complexity Theory Classify problems according to the computational resources required running time storage space parallelism randomness rounds of interaction,

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

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Plan for Today and Beginning Next week (Lexical Analysis)

Plan for Today and Beginning Next week (Lexical Analysis) Plan for Today and Beginning Next week (Lexical Analysis) Regular Expressions Finite State Machines DFAs: Deterministic Finite Automata Complications NFAs: Non Deterministic Finite State Automata From

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

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

Chapter 3. Regular grammars

Chapter 3. Regular grammars Chapter 3 Regular grammars 59 3.1 Introduction Other view of the concept of language: not the formalization of the notion of effective procedure, but set of words satisfying a given set of rules Origin

More information

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harry Lewis October 22, 2013 Reading: Sipser, 3.2, 3.3. The Basic Turing Machine The Basic Turing Machine a a b a

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger

More information

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computation (IX) Yijia Chen Fudan University Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and

More information

Turing Machines Part III

Turing Machines Part III Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

More information

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE Volume 3, No. 5, May 2012 Journal of Global Research in Computer Science REVIEW ARTICLE Available Online at www.jgrcs.info COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE Tirtharaj Dash

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

Verifying whether One-Tape Turing Machines Run in Linear Time

Verifying whether One-Tape Turing Machines Run in Linear Time Electronic Colloquium on Computational Complexity, Report No. 36 (2015) Verifying whether One-Tape Turing Machines Run in Linear Time David Gajser IMFM, Jadranska 19, 1000 Ljubljana, Slovenija david.gajser@fmf.uni-lj.si

More information

NP-Completeness and Boolean Satisfiability

NP-Completeness and Boolean Satisfiability NP-Completeness and Boolean Satisfiability Mridul Aanjaneya Stanford University August 14, 2012 Mridul Aanjaneya Automata Theory 1/ 49 Time-Bounded Turing Machines A Turing Machine that, given an input

More information

Finish K-Complexity, Start Time Complexity

Finish K-Complexity, Start Time Complexity 6.045 Finish K-Complexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts

More information

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved!

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved! N P NP Announcements Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved! Now in cabinets in the Gates open area near the drop-off box. The Complexity Class

More information

Average Value and Variance of Pattern Statistics in Rational Models

Average Value and Variance of Pattern Statistics in Rational Models Average Value and Variance of Pattern Statistics in Rational Models Massimiliano Goldwurm and Roberto Radicioni Università degli Studi di Milano Dipartimento di Scienze dell Informazione Via Comelico 39,

More information

The WHILE Hierarchy of Program Schemes is Infinite

The WHILE Hierarchy of Program Schemes is Infinite The WHILE Hierarchy of Program Schemes is Infinite Can Adam Alayrak and Thomas Noll RWTH Aachen Ahornstr. 55, 52056 Aachen, Germany alayrak@informatik.rwth-aachen.de and noll@informatik.rwth-aachen.de

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Fall 28 Alexis Maciel Department of Computer Science Clarkson University Copyright c 28 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with

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

Some hierarchies for the communication complexity measures of cooperating grammar systems

Some hierarchies for the communication complexity measures of cooperating grammar systems Some hierarchies for the communication complexity measures of cooperating grammar systems Juraj Hromkovic 1, Jarkko Kari 2, Lila Kari 2 June 14, 2010 Abstract We investigate here the descriptional and

More information

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A

More information

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet: Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings

More information

Advanced Undecidability Proofs

Advanced Undecidability Proofs 17 Advanced Undecidability Proofs In this chapter, we will discuss Rice s Theorem in Section 17.1, and the computational history method in Section 17.3. As discussed in Chapter 16, these are two additional

More information

Cone Avoidance of Some Turing Degrees

Cone Avoidance of Some Turing Degrees Journal of Mathematics Research; Vol. 9, No. 4; August 2017 ISSN 1916-9795 E-ISSN 1916-9809 Published by Canadian Center of Science and Education Cone Avoidance of Some Turing Degrees Patrizio Cintioli

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

The Church-Turing Thesis

The Church-Turing Thesis The Church-Turing Thesis Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

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

CS4026 Formal Models of Computation

CS4026 Formal Models of Computation CS4026 Formal Models of Computation Turing Machines Turing Machines Abstract but accurate model of computers Proposed by Alan Turing in 1936 There weren t computers back then! Turing s motivation: find

More information

Friday Four Square! Today at 4:15PM, Outside Gates

Friday Four Square! Today at 4:15PM, Outside Gates P and NP Friday Four Square! Today at 4:15PM, Outside Gates Recap from Last Time Regular Languages DCFLs CFLs Efficiently Decidable Languages R Undecidable Languages Time Complexity A step of a Turing

More information

Complexity Theory Part I

Complexity Theory Part I Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?

More information

CP405 Theory of Computation

CP405 Theory of Computation CP405 Theory of Computation BB(3) q 0 q 1 q 2 0 q 1 1R q 2 0R q 2 1L 1 H1R q 1 1R q 0 1L Growing Fast BB(3) = 6 BB(4) = 13 BB(5) = 4098 BB(6) = 3.515 x 10 18267 (known) (known) (possible) (possible) Language:

More information

CS154, Lecture 17: conp, Oracles again, Space Complexity

CS154, Lecture 17: conp, Oracles again, Space Complexity CS154, Lecture 17: conp, Oracles again, Space Complexity Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string

More information

ECS 120 Lesson 20 The Post Correspondence Problem

ECS 120 Lesson 20 The Post Correspondence Problem ECS 120 Lesson 20 The Post Correspondence Problem Oliver Kreylos Wednesday, May 16th, 2001 Today we will continue yesterday s discussion of reduction techniques by looking at another common strategy, reduction

More information

SUFFIX TREE. SYNONYMS Compact suffix trie

SUFFIX TREE. SYNONYMS Compact suffix trie SUFFIX TREE Maxime Crochemore King s College London and Université Paris-Est, http://www.dcs.kcl.ac.uk/staff/mac/ Thierry Lecroq Université de Rouen, http://monge.univ-mlv.fr/~lecroq SYNONYMS Compact suffix

More information

Definition: conp = { L L NP } What does a conp computation look like?

Definition: conp = { L L NP } What does a conp computation look like? Space Complexity 28 Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string y of x k length and the machine accepts

More information

Accepting H-Array Splicing Systems and Their Properties

Accepting H-Array Splicing Systems and Their Properties ROMANIAN JOURNAL OF INFORMATION SCIENCE AND TECHNOLOGY Volume 21 Number 3 2018 298 309 Accepting H-Array Splicing Systems and Their Properties D. K. SHEENA CHRISTY 1 V.MASILAMANI 2 D. G. THOMAS 3 Atulya

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

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce

More information

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Computability and Complexity CISC462, Fall 2018, Space complexity 1 Computability and Complexity CISC462, Fall 2018, Space complexity 1 SPACE COMPLEXITY This material is covered in Chapter 8 of the textbook. For simplicity, we define the space used by a Turing machine

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

Complexity Theory Part II

Complexity Theory Part II Complexity Theory Part II Time Complexity The time complexity of a TM M is a function denoting the worst-case number of steps M takes on any input of length n. By convention, n denotes the length of the

More information

where Q is a finite set of states

where Q is a finite set of states Space Complexity So far most of our theoretical investigation on the performances of the various algorithms considered has focused on time. Another important dynamic complexity measure that can be associated

More information

Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols

Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols The purpose of this document is to illustrate what a completed project should look like. I have chosen a problem that

More information

Theory of Computation - Module 4

Theory of Computation - Module 4 Theory of Computation - Module 4 Syllabus Turing Machines Formal definition Language acceptability by TM TM as acceptors, Transducers - designing of TM- Two way infinite TM- Multi tape TM - Universal Turing

More information

CS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs

CS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs CS 42 Lecture 3 Automating lexical analysis 29 August 2 Lecturer: Andrew Myers A lexer generator converts a lexical specification consisting of a list of regular expressions and corresponding actions into

More information

Decidability and Undecidability

Decidability and Undecidability Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an

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

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

SVETLANA KATOK AND ILIE UGARCOVICI (Communicated by Jens Marklof)

SVETLANA KATOK AND ILIE UGARCOVICI (Communicated by Jens Marklof) JOURNAL OF MODERN DYNAMICS VOLUME 4, NO. 4, 010, 637 691 doi: 10.3934/jmd.010.4.637 STRUCTURE OF ATTRACTORS FOR (a, )-CONTINUED FRACTION TRANSFORMATIONS SVETLANA KATOK AND ILIE UGARCOVICI (Communicated

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

Notes for Lecture Notes 2

Notes for Lecture Notes 2 Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

COMPUTATIONAL COMPLEXITY

COMPUTATIONAL COMPLEXITY ATHEATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Computational Complexity - Osamu Watanabe COPUTATIONAL COPLEXITY Osamu Watanabe Tokyo Institute of Technology, Tokyo, Japan Keywords: {deterministic, randomized,

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

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

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

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

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

Branching Bisimilarity with Explicit Divergence

Branching Bisimilarity with Explicit Divergence Branching Bisimilarity with Explicit Divergence Ro van Glaeek National ICT Australia, Sydney, Australia School of Computer Science and Engineering, University of New South Wales, Sydney, Australia Bas

More information