Context-sensitive languages. Context-sensitive languages. Context-sensitive and length-increasing grammars

Size: px
Start display at page:

Download "Context-sensitive languages. Context-sensitive languages. Context-sensitive and length-increasing grammars"

Transcription

1 Context-sensitive languages Context-sensitive languages Definition (λ-separated grammar) A λ-rule is a rule of the form w λ. A grammar G = (N, T, P, S) is λ-free if P does not contain λ-rules. The grammar G is λ-separated if G is either λ-free or S λ is the only λ-rule in P where in the latter case the variable S must not occur on the right-hand side of any rule in P. Remark (λ-separated grammar) A λ-separated grammar generating a language L is essentially the same as a λ-free grammar generating the language L \ {λ}. Any λ-separated grammar generating L can be transformed into a λ-free grammar generating L \ {λ} by removing the rule S λ. Any λ-free grammar with start symbol S generating L can be transformed into a λ-separated grammar generating L {λ} by introducing a new start symbol S 0 and rules S 0 S and S 0 λ. Definition (Length-increasing and context-sensitive grammars) A grammar G = (N, T, P, S) is length-increasing if G is λ-separated and for every rule u v in P it holds that u v, with the possible exception of the rule S λ. The grammar G is context-sensitive if G is λ-separated and all rules in P, with the possible exception S λ, are of the form uxv uwv where X N, u, v (N T ), w (N T ) +. By definition, every context-sensitive grammar is length-increasing. Conversely, for every length-increasing grammar there is a context-sensitive grammar that generates the same language. Theorem (Length-increasing and context-sensitive grammars) Every length-increasing grammar G can be effectively transformed into a context-sensitive grammar G that generates the same language, i.e., L(G) = L(G ). Definition (Context-sensitive languages) A language L is context-sensitive if L = L(G) for some context-sensitive grammar G. Corollary A language L is context-sensitive if and only if L = L(G) for some length-increasing grammar G. Proof of the theorem. For any given length-increasing grammar G = (N, T, P, S), we construct a context-sensitive grammar G = (N, T, P, S) such that L(G) = L(G ). We can assume that λ / L(G) because otherwise, by the remark above, we can simply remove the rule S λ from G and finally add a new initial state S 0 and the rules S 0 S λ to G. Furthermore, we can assume that all rules in G are of the form v w where v, w N +, v w or X a where X N, a T. Otherwise, replace in all rules in P each terminal symbol a by a corresponding new variable Z a and add rules of the form a Z a.

2 Proof of the theorem, cont. Each rule in P is either of the form X 1 X m Y 1 Y n where m n ( ) and X 1,..., X m, Y 1,..., Y n N or of the form X a. In order to obtain P, we replace in P each rule ρ of the form ( ) where m > 1 by the rules X 1 X m Z ρ 1 X 2 X m, ρ Z 1 Z m ρ Z ρ 1 Z ρ m 1 Y m, Z ρ 1 Z ρ m 1 X m Z ρ 1 Z ρ m, Z ρ 1 Z ρ m Z ρ 1 Z ρ my m+1 Y n, Z ρ 1 Z ρ 2 Z ρ m 1 Z ρ m Z ρ 1 Z ρ 2 Z ρ m 1 Z ρ m, Z ρ 1 Y 2 Y m Y 1 Y m. Proof of the theorem, cont. By construction, for any derivation in G of a terminal word w there is a corresponding derivation of w in G, hence L(G) L(G ). In order to see that L(G ) L(G) holds, it suffices to observe that when deriving a terminal word in G, the new rules can only be applied such that the rules introduced when replacing a rule ρ are applied all and in the order shown above, hence any useful application of new rules amounts to simulating rules of G. The variables Z 1,... Z m, Z 1, Z m are mutually distinct new variables that differ from all variables in N and from all variables introduced while replacing rules different from ρ. Example (A context-sensitive language) The language L = {0 n 1 n 0 n : n 0} is context-sensitive. For a sketch of proof, we specify the rules of a length-increasing grammar that generates L: S Z a Z b Zc 010 λ, Zc Z c Z a Z b Zc, Z b Z a Z a Z b, Z c Z a Z a Z c, Z c Z b Z b Z c, Z a Z a 0 Z a, Zb Z b 1 Z b, Zc Z c 0 Z c, Z a Z b 0 Z b, Zb Z c 1 Z c, Zc Zc 00. The rule S 010 is required, alternatively, we may replace it by the rule Z b Zc 10. Theorem (Context-free versus context-sensitive languages) The context-free languages form a proper subclass of the class of context-sensitive languages. Proof: The language {0 n 1 n 0 n : n 0} is context-sensitive according to the example above but is not context-free, as can easily be shown by the pumping lemma for context-free languages. In order to see that all context-free languages are context-sensitive, recall that every context-free language is generated by a context-free grammar in Chomsky normal form. It then suffices to observe that by definition any context-free grammar in Chomsky normal form is a length-increasing grammar.

3 Definition (Pushdown automaton) A linear bounded automaton, or LBA for short, is a sixtupel M = (Q, Σ, Γ,, s, F ), Q is a finite set of states, Σ is the input alphabet, where Γ is the tape alphabet, where Σ Γ and {# A, # E } Γ \ Σ, is the transition relation or program of M, where (Q Γ) (Q Γ Move) and Move = {L, R, S}, s Q is the initial state, F Q is the set of accepting states. Similar to the case of PDAs, the relation is identified with a relation that contains tuples of the form (q, a, q, a, Z). Each such tuple in is referred to as an instruction of M. A linear bounded automata - has a single two-way read-write tape, i.e., the head can move in both directions and symbols on the tape can be overwritten, - the head can only access the region of the tape from the left end marker # A to the right end marker # E, - the end markers # A and # E cannot be overwritten, - on input w, initally the tape holds the word # A w# E and M is in the initial state, - the available instructions depend on the current state and the symbol currently read on the tape, - each instruction specifies the subsequent state, a symbol to be written at the current tape position, and a move, - a move is either to stay (S) at the current position, or to move one position left (L) or right (R). Let (Q Γ) (Q Γ Move) be the transition relation of an LBA. A single instruction (q, a, q, a, Z) in has the meaning that - in case q is the current state and a Γ is the symbol currently read on the tape, - then the instruction may be executed by going into state q, replacing the tape symbol currently read by a, and finally performing the move Z. LBAs are in general nondeterministic, i.e., for any given pair (q, a) the program may contain several (or no) instructions of the form (q, a, q, a, Z). The computation model LBA is equivalent to nondeterministic Turing machines that are restricted to space equal to the length of their input. Definition (Configuration of a linear bounded automaton) Let M = (Q, Σ, Γ,, s, F ) be an LBA. With inputs of length n, a configuration of M is a triple (q, # A u# E, i) Q Γ {0,..., n + 1} where u = n. The inital configuration on input w is (s, # A w# E, 0) A configuration (q, # A u# E, i) represents a situation where q is the current state of the computation, # A u# E is the tape content, i is the position of the head on the tape. Positions are numbered in the natural way. For u = n, the left and right end marker are at position 0 and n + 1, respectively.

4 Definition (Transition relation of an LBA) Let M = (Q, Σ, Γ,, s, F ) be an LBA. In order to define the transition relation M, let for all words u of length n over Γ, all states q and q in Q, and all i where 0 i n + 1 (q, # A u# E, i) M (q, # A u # E, i ) if for # A u# E = a 0 a n+1 there is an instruction (q, a i, q, a, Z) in such that { u a 0... a i 1 a a i+1 in case a i / {# A, # E } = u otherwise. max{0, i 1} in case Z = L, i = i in case Z = S, min{n + 1, i + 1} in case Z = R. Definition (Computations of an LBA) Let M = (Q, Σ, Γ,, s, F ) be an LBA. A stop configuration of M on inputs of length n is a configuration (q, # A u# E, i) such that for # A u# E = a 0 a n+1 there is no instruction of the form (q, a i,.,.,.) in. A partial computation of M of length t is a sequence C 0,..., C t of configurations such that C 0 M C1 M M Ct. We write C M,t C if there is such a computation where C = C 0 and C = C t. We write C M, C if C M,t C for some t 0. Definition (Language recognized by an LBA) Let M = (Q, Σ, Γ,, s, F ) be an LBA. A finite or terminating computation of M is a partial computation that starts with the initial configuration (s, # A w# E, 0) of some input w and ends with a stop configuration. An accepting computation is a finite computation where the state of the last configuration of the computation, the stop configuration, is an accepting state. The LBA M accepts an input w if there is some accepting computation that starts with the initial configuration of input w. The language accepted by the LBA M is LBAs and context-sensitive languages Remark (Tracks) The tape of an LBA can be partitioned into a constant number of tracks where each track essentially works like a separate tape, except that all tracks share a common head. In order to obtain k tracks each with alphabet Σ 0, the alphabet of the LBA is chosen as Σ = Σ k 0, that is, each symbol of the tape alphabet Σ has k components from Σ 0. For any j where 1 j k, the jth components of the symbols on the tape can be viewed as forming a separate tape with an inscription over Γ 0. L(M) = {w Σ : M accepts w}.

5 LBAs and context-sensitive languages Theorem (Context-sensitive grammars and LBAs) A language L is context-sensitive if and only if L is recognized by some LBA. Lemma 1 For every length-increasing grammar G there is an LBA M such that L(G) = L(M). Lemma 2 For every LBA M there is a length-increasing grammar G such that L(G) = L(M). LBAs and context-sensitive languages Lemma 1 For every length-increasing grammar G there is an LBA M such that L(G) = L(M). Sketch of proof. Let G = (N, T, P, S) be a length-increasing grammar. An LBA M that recognizes L(G) works as follows: On an input w of length n, initially w is copied to the first of two tracks, while on the second track the first symbol is equal to S and all other symbols are equal to a blank symbol / N T. On the second track, within the given space n all possible derivations in G are nondeterminisitically simulated. At any time, the simulation may be ended nondeterministically in order to check wether the derived sentential form is equal to w. The input w is accepted in some computation if and only if w could be derived during the corresponding simulation. LBAs and context-sensitive languages Lemma 2 For every LBA M there is a length-increasing grammar G such that L(G) = L(M). Sketch of proof. Let M = (Q, Σ, Γ,, s, F ) be an LBA. We can assume that M has two tracks and initially copies its input w to both tracks, resulting in an initial configuration with double input. Then M computes as usual using only the second track, while the copy of w on the first track is left untouched. A length-increasing grammar G generating L(M) works as follows. The rules of G allow to generate arbitrary initial configuration with double input, followed by simulations of arbitrary steps of M. On simulating an accepting computation, the simulated tape content can be transformed into the input w on the first track. End markers need to be incorporated into first and last symbol. Remark (Boolean functions and set-theoretical operations) Recall that every k-ary Boolean function α: {0, 1} k {0, 1} induces a k-ary set-theoretical operation L α. More precisely, for any given alphabet Σ and languages L 1,..., L K over Σ, we have ((L α (L 1,..., L k ))(w) = α(l 1 (w),..., L k (w)). For example, if we let α be equal to the ternary AND function, we have L α (L 1, L 2, L 3 ) = L 1 L 2 L 3, where as usual 0 and 1 represent false and true, respectively. Given any alphabet Σ, the set-theoretical operations of arity k are k = 0: the constant mappings with values and Σ, k = 1: identity L L and complement L L = Σ \ L, k = 2: binary union L 1 L 2, binary difference L 1 \ L 2, etc., k = 3: ternary union L 1 L 2 L 3, etc.

6 Theorem (Closure under complementation) The class of contextsensitive languages is closed under complementation. Sketch of proof. The theorem of Immerman and Szelepcsényi states that for every space-constructible function s where s(n) log n, the class of languages that can be recognized by nondeterministic Turing acceptors restricted to space s(n) is closed under complementation. The theorem above is then immediate as a special case because the function s(n) = n is space-constructible, the class of contex-sensitive languages coincides with the class of languages that can be recognized by LBAs, which in turn coincides with the class of languages that can be recognized by nondeterministic Turing acceptors restricted to space n. Theorem (Closure under union) The class of context-sensitive languages is closed under union. Proof. Given two context-sensitive languages L 1 over T 1 and L 2 over T 2, fix context-sensitive grammars G 1 = (N 1, T 1, S 1, P 1 ) and G 2 = (N 2, T 2, S 2, P 2 ) that generate L 1 and L 2, respectively. We can assume N 1 N 2 =. Then the grammar G = (N, T 1 T 2, S, P) where S / N 1 N 2, N = N 1 N 2 {S} and P = P 1 P 2 {S S 1 S 2 } is context-sensitive and generates the language L 1 L 2. In connection with the latter assertion, recall our convention that the left-hand side of each rule must contain some variable symbol, hence each derivation in G uses only rules from either P 1 or P 2. Theorem (Closure under set-theoretical operations) The class of context-sensitive languages is closed under set-theoretical operations. Proof: The class of context-sensitive languages is closed under 0-ary set-theoretical operations since it contains the empty set and Σ for any alphabet Σ. We have already seen that the class of context-sensitive languages is closed under complementation and binary union. All other set-theoretical operations can be expressed by the set-theoretical operations mentioned so far. For example, by the De Morgan s rules, binary intersection can be expressed by complementation and binary union. Theorem (Closure under concatenation and Kleene closure) The class of context-sensitive languages is closed under concatenation, and Kleene closure, i.e., (i) if L 1 and L 2 are context-sensitive, then L 1 L 2 is context-sensitive, (ii) if L is context-sensitive, then L is context-sensitive, Proof. We give the proof of assertion (ii) and omit the essentially identical considerations for assertion (i). We construct an LBA that recognizes L, which first guesses nondeterministically a partition of the input w of the form w = w 1 w t, and then simulates successively an LBA that recognizes L with inputs w 1,..., w t, and accepts w if all simulations were accepting.

7 Proof cont. More precisely, given a context-sensitive languages L pick some LBA M such that L = L(M). As outlined above, we construct an LBA M that recognizes L. On input w, first M scans w and marks first and last letters of subwords w 1,..., w t of w such that w = w 1 w t, Then M successively simulates M on the inputs w 1,..., w t with appropriately simulated left and right end markers. The input w is accepted by some computation of M if and only if in this computation all simulated computations accept. By construction, we have L(G) = L because M will on input w L accept for some guessed partition of w, w / L accept for no partition of w. Theorem (Closure under inverse homomorphisms) The class of context-sensitive languages is closed under inverse homomorphisms. Proof. Let L 2 be a context-sensitive language over some alphabet T 2 that is recognized by some LBA M 2. For some alphabet T 1, let h : T 1 T 2 be a homomorpism. For d = max a T1 h(a), we have for all w that h(w) d w. An LBA M 1 that recognizes L 1 = h 1 [L 2 ] works as follows: On input w, M 1 writes h(w) on at most d tracks. Then M 1 simulates the computations of M 2 on input h(w). A single computation of M 1 accepts if and only if the corresponding simulated computation of M 2 accepts. Theorem (Nonclosure under homomorphisms) Definition (Nonerasing homomorphism) A homomorphism h is nonerasing in case h(w) is always different from the empty word. Theorem (Closure under nonerasing homomorphisms) The class of context-free languages is closed under nonerasing homomorphisms. Proof. See exercises. The class of context-free languages is not closed under arbitrary homomorphisms. Proof. For a grammar G = (N, T, P, S) and a symbol # / N T, we say the word w = w 1 #w 2 # #w t represents a derivation in G in case w 1 = S, w t T, and w i G wi+1 for i = 1,..., t 1, i.e., w i can be transformed into w i+1 by applying a single rule in P. Let T = {ã: a T } be an alphabet of new, mutually distinct symbols that are different from the symbols in N and T.

8 Proof cont. For a word w = a 1 a n, let w = ã 1 ã n. Given a grammar G, consider the language L G of all words w = w 1 #w 2 # #w t that represent derivations in G and let L G = {w 1 #w 2 # # w t : w 1 #w 2 # #w t L G } the language of all words obtained from representations w L G by replacing in the terminal subword w t of w all symbols a by ã, where we assume that the symbols of the form ã are not in N T {#}. Given any grammar G, the languages L G and L G are both recognized by appropriate LBAs, hence are context-sensitive. We have L(G) = h[ L G ] for the homomorphism h that maps all symbols to the empty string except that h(ã) = a for all a T. So L G is context-sensitive for all grammars G, while we will see later that there are grammars G such that L(G) = h[ L G ] is not context-sensitive.

The Halting Problem is Undecidable

The Halting Problem is Undecidable 185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine

More information

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. 3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

More information

Turing Machines: An Introduction

Turing Machines: An Introduction CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Computability Theory

Computability Theory CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.

More information

Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011. Lecture 1 Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

More information

Automata and Formal Languages

Automata and Formal Languages Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,

More information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

More information

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

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along

More information

Automata and Computability. Solutions to Exercises

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

More information

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the

More information

3515ICT Theory of Computation Turing Machines

3515ICT Theory of Computation Turing Machines Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation

More information

Deterministic Finite Automata

Deterministic Finite Automata 1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function

More information

Automata on Infinite Words and Trees

Automata on Infinite Words and Trees Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Regular Languages and Finite State Machines

Regular Languages and Finite State Machines Regular Languages and Finite State Machines Plan for the Day: Mathematical preliminaries - some review One application formal definition of finite automata Examples 1 Sets A set is an unordered collection

More information

24 Uses of Turing Machines

24 Uses of Turing Machines Formal Language and Automata Theory: CS2004 24 Uses of Turing Machines 24 Introduction We have previously covered the application of Turing Machine as a recognizer and decider In this lecture we will discuss

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

Lecture 2: Universality

Lecture 2: Universality CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

More information

Fast nondeterministic recognition of context-free languages using two queues

Fast nondeterministic recognition of context-free languages using two queues Fast nondeterministic recognition of context-free languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a context-free language nondeterministically in O( n log

More information

C H A P T E R Regular Expressions regular expression

C H A P T E R Regular Expressions regular expression 7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun

More information

1 Definition of a Turing machine

1 Definition of a Turing machine Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,

More information

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move. CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write

More information

Properties of Stabilizing Computations

Properties of Stabilizing Computations Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA

More information

CS5236 Advanced Automata Theory

CS5236 Advanced Automata Theory CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 2012-2013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then

More information

6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.080/6.089 GITCS Feb 12, 2008. Lecture 3 6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

More information

Theory of Computation Chapter 2: Turing Machines

Theory of Computation Chapter 2: Turing Machines Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),

More information

Chapter 7 Uncomputability

Chapter 7 Uncomputability Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction

More information

The Classes P and NP

The Classes P and NP The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

More information

1 Approximating Set Cover

1 Approximating Set Cover CS 05: Algorithms (Grad) Feb 2-24, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the set-covering problem consists of a finite set X and a family F of subset of X, such that every elemennt

More information

NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

More information

How To Compare A Markov Algorithm To A Turing Machine

How To Compare A Markov Algorithm To A Turing Machine Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Turing Machines, Part I

Turing Machines, Part I Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context

More information

Formal Grammars and Languages

Formal Grammars and Languages Formal Grammars and Languages Tao Jiang Department of Computer Science McMaster University Hamilton, Ontario L8S 4K1, Canada Bala Ravikumar Department of Computer Science University of Rhode Island Kingston,

More information

Finite Automata. Reading: Chapter 2

Finite Automata. Reading: Chapter 2 Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream

More information

Computational Models Lecture 8, Spring 2009

Computational Models Lecture 8, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance

More information

On Winning Conditions of High Borel Complexity in Pushdown Games

On Winning Conditions of High Borel Complexity in Pushdown Games Fundamenta Informaticae (2005) 1 22 1 IOS Press On Winning Conditions of High Borel Complexity in Pushdown Games Olivier Finkel Equipe de Logique Mathématique U.F.R. de Mathématiques, Université Paris

More information

CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions

CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions CSC45 AUTOMATA 2. Finite Automata: Examples and Definitions Finite Automata: Examples and Definitions A finite automaton is a simple type of computer. Itsoutputislimitedto yes to or no. It has very primitive

More information

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information

More information

Two-dimensional Languages

Two-dimensional Languages Charles University Faculty of Mathematics and Physics Mgr. Daniel Průša Two-dimensional Languages Doctoral Thesis Supervisor: Martin Plátek, CSc. Prague, 2004 Acknowledgements The results presented in

More information

Informatique Fondamentale IMA S8

Informatique Fondamentale IMA S8 Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université Lille 1 - Polytech Lille

More information

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

More information

Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain

Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Pushdown Automata transparencies made for a course at the International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Hendrik Jan Hoogeboom, Leiden http://www.liacs.nl/

More information

T-79.186 Reactive Systems: Introduction and Finite State Automata

T-79.186 Reactive Systems: Introduction and Finite State Automata T-79.186 Reactive Systems: Introduction and Finite State Automata Timo Latvala 14.1.2004 Reactive Systems: Introduction and Finite State Automata 1-1 Reactive Systems Reactive systems are a class of software

More information

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

More information

CAs and Turing Machines. The Basis for Universal Computation

CAs and Turing Machines. The Basis for Universal Computation CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.

More information

Composability of Infinite-State Activity Automata*

Composability of Infinite-State Activity Automata* Composability of Infinite-State Activity Automata* Zhe Dang 1, Oscar H. Ibarra 2, Jianwen Su 2 1 Washington State University, Pullman 2 University of California, Santa Barbara Presented by Prof. Hsu-Chun

More information

Finite Automata and Regular Languages

Finite Automata and Regular Languages CHAPTER 3 Finite Automata and Regular Languages 3. Introduction 3.. States and Automata A finite-state machine or finite automaton (the noun comes from the Greek; the singular is automaton, the Greek-derived

More information

Genetic programming with regular expressions

Genetic programming with regular expressions Genetic programming with regular expressions Børge Svingen Chief Technology Officer, Open AdExchange bsvingen@openadex.com 2009-03-23 Pattern discovery Pattern discovery: Recognizing patterns that characterize

More information

4.6 The Primitive Recursive Functions

4.6 The Primitive Recursive Functions 4.6. THE PRIMITIVE RECURSIVE FUNCTIONS 309 4.6 The Primitive Recursive Functions The class of primitive recursive functions is defined in terms of base functions and closure operations. Definition 4.6.1

More information

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: http://www.ist.tugraz.at/pact.html

More information

Testing LTL Formula Translation into Büchi Automata

Testing LTL Formula Translation into Büchi Automata Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES ANDREW E.M. LEWIS 1. Introduction This will be a course on the Turing degrees. We shall assume very little background knowledge: familiarity with

More information

How To Understand The Theory Of Computer Science

How To Understand The Theory Of Computer Science Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked

More information

6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008

6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

Computer Architecture Syllabus of Qualifying Examination

Computer Architecture Syllabus of Qualifying Examination Computer Architecture Syllabus of Qualifying Examination PhD in Engineering with a focus in Computer Science Reference course: CS 5200 Computer Architecture, College of EAS, UCCS Created by Prof. Xiaobo

More information

Compiler Construction

Compiler Construction Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation

More information

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification) Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

More information

Let H and J be as in the above lemma. The result of the lemma shows that the integral

Let H and J be as in the above lemma. The result of the lemma shows that the integral Let and be as in the above lemma. The result of the lemma shows that the integral ( f(x, y)dy) dx is well defined; we denote it by f(x, y)dydx. By symmetry, also the integral ( f(x, y)dx) dy is well defined;

More information

Scanner. tokens scanner parser IR. source code. errors

Scanner. tokens scanner parser IR. source code. errors Scanner source code tokens scanner parser IR errors maps characters into tokens the basic unit of syntax x = x + y; becomes = + ; character string value for a token is a lexeme

More information

Nondeterministic polynomial time factoring in the tile assembly model

Nondeterministic polynomial time factoring in the tile assembly model Theoretical Computer Science 395 2008) 3 23 www.elsevier.com/locate/tcs Nondeterministic polynomial time factoring in the tile assembly model Yuriy Brun Department of Computer Science, University of Southern

More information

On String Languages Generated by Spiking Neural P Systems

On String Languages Generated by Spiking Neural P Systems On String Languages Generated by Spiking Neural P Systems Haiming Chen 1, Rudolf Freund 2, Mihai Ionescu 3, Gheorghe Păun 4,5, Mario J. Pérez-Jiménez 5 1 Computer Science Laboratory, Institute of Software

More information

Lecture I FINITE AUTOMATA

Lecture I FINITE AUTOMATA 1. Regular Sets and DFA Lecture I Page 1 Lecture I FINITE AUTOMATA Lecture 1: Honors Theory, Spring 02, Yap We introduce finite automata (deterministic and nondeterministic) and regular languages. Some

More information

Model 2.4 Faculty member + student

Model 2.4 Faculty member + student Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email

More information

Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.

Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008. Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008 Course Syllabus Course Title: Theory of Computation Course Level: 3 Lecture Time: Course

More information

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.

More information

Hint 1. Answer (b) first. Make the set as simple as possible and try to generalize the phenomena it exhibits. [Caution: the next hint is an answer to

Hint 1. Answer (b) first. Make the set as simple as possible and try to generalize the phenomena it exhibits. [Caution: the next hint is an answer to Problem. Consider the collection of all subsets A of the topological space X. The operations of osure A Ā and ementation A X A are functions from this collection to itself. (a) Show that starting with

More information

o-minimality and Uniformity in n 1 Graphs

o-minimality and Uniformity in n 1 Graphs o-minimality and Uniformity in n 1 Graphs Reid Dale July 10, 2013 Contents 1 Introduction 2 2 Languages and Structures 2 3 Definability and Tame Geometry 4 4 Applications to n 1 Graphs 6 5 Further Directions

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata A C Norman, Lent Term 1996 Part IA 1 Introduction This course is short, but it is present in Part 1A because of the way it introduces links between many different

More information

Increasing Interaction and Support in the Formal Languages and Automata Theory Course

Increasing Interaction and Support in the Formal Languages and Automata Theory Course Increasing Interaction and Support in the Formal Languages and Automata Theory Course [Extended Abstract] Susan H. Rodger rodger@cs.duke.edu Jinghui Lim Stephen Reading ABSTRACT The introduction of educational

More information

Simulation-Based Security with Inexhaustible Interactive Turing Machines

Simulation-Based Security with Inexhaustible Interactive Turing Machines Simulation-Based Security with Inexhaustible Interactive Turing Machines Ralf Küsters Institut für Informatik Christian-Albrechts-Universität zu Kiel 24098 Kiel, Germany kuesters@ti.informatik.uni-kiel.de

More information

Overview of E0222: Automata and Computability

Overview of E0222: Automata and Computability Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study

More information

Lecture summary for Theory of Computation

Lecture summary for Theory of Computation Lecture summary for Theory of Computation Sandeep Sen 1 January 8, 2015 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E- mail:ssen@cse.iitd.ernet.in Contents 1 The

More information

2110711 THEORY of COMPUTATION

2110711 THEORY of COMPUTATION 2110711 THEORY of COMPUTATION ATHASIT SURARERKS ELITE Athasit Surarerks ELITE Engineering Laboratory in Theoretical Enumerable System Computer Engineering, Faculty of Engineering Chulalongkorn University

More information

CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015

CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015 CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015 Course Info Instructor: Prof. Marvin K. Nakayama Office: GITC 4312 Phone: 973-596-3398 E-mail: marvin@njit.edu (Be sure

More information

Data Structures Fibonacci Heaps, Amortized Analysis

Data Structures Fibonacci Heaps, Amortized Analysis Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:

More information

Secrecy for Bounded Security Protocols With Freshness Check is NEXPTIME-complete

Secrecy for Bounded Security Protocols With Freshness Check is NEXPTIME-complete Journal of Computer Security vol 16, no 6, 689-712, 2008. Secrecy for Bounded Security Protocols With Freshness Check is NEXPTIME-complete Ferucio L. Țiplea a), b), Cătălin V. Bîrjoveanu a), Constantin

More information

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY CARL G. JOCKUSCH, JR. AND PAUL E. SCHUPP Abstract. Generic decidability has been extensively studied in group theory, and we now study it in

More information

Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

More information

Degrees that are not degrees of categoricity

Degrees that are not degrees of categoricity Degrees that are not degrees of categoricity Bernard A. Anderson Department of Mathematics and Physical Sciences Gordon State College banderson@gordonstate.edu www.gordonstate.edu/faculty/banderson Barbara

More information

Omega Automata: Minimization and Learning 1

Omega Automata: Minimization and Learning 1 Omega Automata: Minimization and Learning 1 Oded Maler CNRS - VERIMAG Grenoble, France 2007 1 Joint work with A. Pnueli, late 80s Summary Machine learning in general and of formal languages in particular

More information

SOLUTIONS TO ASSIGNMENT 1 MATH 576

SOLUTIONS TO ASSIGNMENT 1 MATH 576 SOLUTIONS TO ASSIGNMENT 1 MATH 576 SOLUTIONS BY OLIVIER MARTIN 13 #5. Let T be the topology generated by A on X. We want to show T = J B J where B is the set of all topologies J on X with A J. This amounts

More information

On line construction of suffix trees 1

On line construction of suffix trees 1 (To appear in ALGORITHMICA) On line construction of suffix trees 1 Esko Ukkonen Department of Computer Science, University of Helsinki, P. O. Box 26 (Teollisuuskatu 23), FIN 00014 University of Helsinki,

More information

Dynamic Cognitive Modeling IV

Dynamic Cognitive Modeling IV Dynamic Cognitive Modeling IV CLS2010 - Computational Linguistics Summer Events University of Zadar 23.08.2010 27.08.2010 Department of German Language and Linguistics Humboldt Universität zu Berlin Overview

More information

ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605

ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605 ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605 (1) (a) (0 + 1) 010 (finite automata below). (b) First observe that the following regular expression generates the binary strings with an even

More information

Invertible elements in associates and semigroups. 1

Invertible elements in associates and semigroups. 1 Quasigroups and Related Systems 5 (1998), 53 68 Invertible elements in associates and semigroups. 1 Fedir Sokhatsky Abstract Some invertibility criteria of an element in associates, in particular in n-ary

More information

Universal Turing Machine: A Model for all Computational Problems

Universal Turing Machine: A Model for all Computational Problems Universal Turing Machine: A Model for all Computational Problems Edward E. Ogheneovo Lecturer I, Dept of Computer Science, University of Port Harcourt, Port Harcourt Nigeria. ABSTRACT: Turing machines

More information

Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005

Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005 Turing Degrees and Definability of the Jump Theodore A. Slaman University of California, Berkeley CJuly, 2005 Outline Lecture 1 Forcing in arithmetic Coding and decoding theorems Automorphisms of countable

More information

Introduction to Topology

Introduction to Topology Introduction to Topology Tomoo Matsumura November 30, 2010 Contents 1 Topological spaces 3 1.1 Basis of a Topology......................................... 3 1.2 Comparing Topologies.......................................

More information

Wang s B machines are efficiently universal, as is Hasenjaeger s small universal electromechanical toy

Wang s B machines are efficiently universal, as is Hasenjaeger s small universal electromechanical toy Wang s B machines are efficiently universal, as is Hasenjaeger s small universal electromechanical toy Turlough Neary 1, Damien Woods 2, Niall Murphy 3, and Rainer Glaschick 5 arxiv:1304.0053v2 [cs.cc]

More information

Complexity of Algorithms

Complexity of Algorithms 1 Complexity of Algorithms Lecture Notes, Spring 1999 Peter Gács Boston University and László Lovász Yale University 2 Contents 1 Introduction and Preliminaries 1 1.1 The subject of complexity theory.........................

More information

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

More information

An example of a computable

An example of a computable An example of a computable absolutely normal number Verónica Becher Santiago Figueira Abstract The first example of an absolutely normal number was given by Sierpinski in 96, twenty years before the concept

More information