Probabilistic Aspects of Computer Science: Probabilistic Automata
|
|
- Clarence Owens
- 5 years ago
- Views:
Transcription
1 Probabilistic Aspects of Computer Science: Probabilistic Automata Serge Haddad LSV, ENS Paris-Saclay & CNRS & Inria M Jacques Herbrand Presentation 2 Properties of Stochastic Languages 3 Decidability Results /42
2 Plan Presentation Properties of Stochastic Languages Decidability Results 2/42
3 An introductive example Planning holidays in a foreign country Choosing which plane company to use lowcost or highcost; 2 Renting a room in an hotel by internet or phone; 3 Buying tickets for some exhibitions with agency seeall or dontmiss. Usually these actions must be planned before the holidays. Thus one looks for an a priori optimal policy that maximizes the probability to reach a goal. 3/42
4 Formalisation start 3 4low + high airport 4 low 3 4 internet + 2 phone fail 4 internet + 2 phone 4 seeall + 8 dontmiss hotel 3 4 seeall dontmiss success The probability of success of lowcost internet seeall is /42
5 Probabilistic automata Probabilistic Automata (PA) are a variation of MDP where: The set of possible actions is the same in every state. There are no rewards. There is a subset of final states. More formally, a PA A = (Q, A, {P a } a A, π 0, F ) is defined by: Q, the finite set of states; A, the finite alphabet; For all a A, P a, a probability transition matrix over S; π 0, the initial distribution over states and F Q the final states. 5/42
6 Illustration 2 b a + q 0 q 2 b 2 a + b A = {a, b}; Q = {q 0, q }, F = {q }; π 0 [q 0 ] =. 2 a An edge from a state to another one is labelled by a vector of transition probabilities indexed by A. The vector is denoted by a formal sum. For instance, the transition from q 0 to itself is labelled by a + 0.5b means that: when a is chosen in state q 0, the probability that the next state is q 0, P a [q 0, q 0 ], is equal to. when b is chosen in state q 0, the probability that the next state is q 0, P b [q 0, q 0 ], is equal to /42
7 Policies in PA Words are policies. When some finite word w def = a... a n is selected, we are interested in the probability to be in a final state using w as a policy. Given A a PA and w def = a... a n A a word, the acceptance probability of w by A is defined by: Pr A (w) def = π 0 [q] q Q q F ( n ) P ai [q, q ] i= Notation. Given a word w def = a... a n, the probability matrix P w is defined by P w def = n i= P a i. In particular P ε = Id. With these notations: Pr A (w) = π 0 P w T F where F is the indicator vector of subset F. 7/42
8 Illustration 2 b a + q 0 q 2 b 2 a + b Computation of Pr A (abba) by induction w.r.t. the prefixes. First Pr A (ε) = 0. Pr A (a) = 2 Pr A(ε) = 0 2 a Pr A (ab) = Pr A (a) + 2 ( Pr A(a)) = 2 Pr A (abb) = Pr A (ab) + 2 ( Pr A(ab)) = 3 4 Pr A (abba) = 2 Pr A(abb) = 3 8 More generally, the following recursive equations hold: Pr A (wa) = 2 Pr A(w) and Pr A (wb) = 2 ( + Pr A(w)) from which one can derive an explicit expression of the acceptance probability: n Pr A (a... a n ) = 2 i n ai=b i= Which word maximizes the acceptance probability? 8/42
9 Stochastic languages We are interested in useful policies. This directly leads to the introduction of stochastic languages. Let: A be a probabilistic automaton; θ [0, ] be a threshold also called a cut point; {<,, >,, =, } be a comparison operator. Then L θ (A) is defined by: L θ (A) = {w A Pr A (w) θ} For expressiveness and decidability issues, one also needs the following definitions. A rational PA is a PA with probability distributions over Q Q. A rational stochastic language is a stochastic language specified by a rational PA and a rational threshold. 9/42
10 Counting with PA q 0 a q 2 a 2 a 2 a q 3 q 4 a 2 b b q 2 (a succinct representation with an omitted absorbing rejecting state) Any word z different from a m b n with m > 0, n > 0 cannot be accepted. 2 a Let w def = a m b n with m > 0, n > 0. w can be accepted by: a path q 0, q m, q2 n with probability 2 ; n or by a family of paths q 0, q3, r q4, s q5 n with 0 < r, s and r + s = m with cumulated probability 2 2. m Summing, one obtains: n 2. m Thus: L =0.5 (A) = {a n b n n > 0} b q 5 b 0/42
11 Plan Presentation 2 Properties of Stochastic Languages Decidability Results /42
12 Expressiveness problems Provide a minimal set of comparison operators and thresholds. Position the stochastic languages w.r.t. the Chomsky hierarchy. Study the closure properties of the stochastic languages. 2/42
13 A single threshold is enough A απ 0 [q] α q q 0 A The value α depends on θ 2 in the following way: If θ > 2 then q 0 / F and α def = 2θ so that for all w A, Pr A (w) = 2θ Pr A(w) Thus w L 2 (A ) iff w L θ (A). If θ < 2 then q 0 F and α def = 2( θ) so that for all w A, Pr A (w) = 2θ+Pr A(w) 2( θ) Thus w L (A ) iff w L 2 θ (A). 3/42
14 Getting rid of (dis)equality Given a PA A, we build A as follows. The set of states Q def = Q Q; P a[(q, q 2 ), (q, q 2)] def = P a [q, q ]P a [q 2, q 2]; π 0[q, q 2 ] def = π 0 [q ]π 0 [q 2 ] and F def = F (Q \ F ). Once a word w is selected, the two components of the DES behave independently and so: Pr A (w) = Pr A (w)( Pr A (w)) Consequently Pr A (w) 4 with equality iff Pr A(w) = 2. Thus: L 4 (A ) = L = 2 (A) 4/42
15 Getting rid of lower (or equal) than Given a PA A, we build A by complementing the final states. Then: And so: Pr A (w) = Pr A (w) L θ (A ) = L <θ (A) L >θ (A ) = L θ (A) 5/42
16 The Chomsky hierarchy recursively enumerable context sensitive algebraic regular Class Grammar Device Regular language L ar a ε Finite automaton with L, R, a Σ Algebraic language L R... R n with Stack automaton L and R i Σ Context-sensitive L... L m R... R n Non determ. Turing language m n, (S ε) with L i, R j Σ machine performing in linear space Recursively enumerable language L... L m R... R n avec L i, R j Σ Turing machine 6/42
17 Revisiting the Chomsky hierarchy recursively enumerable stochastic context sensitive algebraic regular rational stochastic 7/42
18 Non recursively enumerable languages 2 b a + q 0 q 2 b 2 a + b Define v a def = 0 and v b def =. The acceptance probability of w... w n is the binary number 0.v wn... v w. So L >θ (A) is the set of representations of numbers (with finite binary development) greater than θ. Thus given 0 θ < θ, 2 a L >θ (A) L >θ (A) So there is an uncountable number of stochastic languages implying that most of them are non recursively enumerable. This result does not hold for rational stochastic languages. 8/42
19 Regular versus stochastic languages A deterministic automaton is a stochastic automaton with probabilities in {0, }. Thus regular languages are stochastic languages. The language {a n b n n > 0} is a rational stochastic non regular language. 9/42
20 Non stochastic context-free languages () L def = {a n ba n2 b... a n k ba i > n i = n } is a non stochastic context-free language. Proof. L is context-free. Use a non deterministic automaton with a counter. With a counter one counts n the number of a s until the first occurrence of b. Then one guesses an occurrence of b and decrements the counter by the occurrences of a until the next occurrence of b. If the counter is zero the word is accepted. Assume that () L = L >θ (A) or (2) L = L θ (A). Let n i=0 c ix i be the minimal polynomial of P a. Since is an eigenvalue of P a, one gets n i=0 c i = 0 and there are positive and negative coefficients. By definition, n i=0 c ip a i = 0 and so for any word w, n i=0 c ip a i w = 0. 20/42
21 Non stochastic context-free languages (2) Proof (continued). Let P os = {i 0 i n c i > 0} and NonP os = {i 0 i n c i 0}. Write P os as {i,..., i k }. Choose w def = ba i b... ba i k b. Case L = L >θ (A). Let 0 i n, by definition of L, π 0 P ai w T F > θ iff i {i,..., i k } So: 0 = n i=0 c iπ 0 P a i w T F = i P os c iπ 0 P a i w T F + i NonP os c iπ 0 P a i w T F > ( i P os c i)θ + ( i NonP os c i)θ = ( n i=0 c i)θ = 0 leading to a contradiction. Case L = L θ (A). Let 0 i n, by definition of L, π 0 P a i w T F θ iff i {i,..., i k } So: 0 = n i=0 c iπ 0 P a i w T F = i P os c iπ 0 P a i w T F + i NonP os c iπ 0 P a i w T F >( i P os c i)θ + ( i NonP os c i)θ = ( n i=0 c i)θ = 0 leading to a contradiction. 2/42
22 Non context-free stochastic languages () L def = {a n b n c n n > 0} is a non context-free rational stochastic language. Proof. Using Ogden s lemma it can be easily proved that L is not context-free. def Observe that L = L L 2 with L = {a n b n c + n > 0} and def L 2 = {a + b n c n n > 0}. So we prove that: for i {, 2}, L i = L = 2 (A i) for some A i the family of languages {L = L = 2 (A)} A is closed under intersection. 22/42
23 Non context-free stochastic languages (2) Proof (continued). L = 2 (A) = {an b n c + n > 0} q 0 2 a 2 a a q 2 a q 3 q 4 a b 2 a b 2 b q 2 c q 6 c c q 7 c q 5 b 23/42
24 Non context-free stochastic languages (3) Proof (ended). Let L = (A ) and L 2 = (A 2) be two arbitrary languages. 2 Using the previous construction, let A and A 2 be automata such that: For any word w, Pr A i (w) 4 ; L = 2 (A i) = L = 4 (A i ). One builds A as follows: The set of states Q def = Q Q 2; P a [(q, q 2 ), (q, q 2)] def = (P ) a [q, q ](P 2) a [q 2, q 2]; π 0[q, q 2 ] def = π,0 [q ]π 2,0 [q 2 ] and F def = F F 2. By construction, Pr A (w) = Pr A (w)pr A 2 (w). So for all word w, Pr A (w) 6 and Pr A(w) = 6 iff Pr A (w) = Pr A 2 (w) = 4. Consequently, L = 6 (A) = L = 2 (A ) L = 2 (A 2) 24/42
25 Inclusion in context-sensitive languages The class of rational stochastic languages is strictly included in the class of context-sensitive languages. Proof. Context-sensitive languages are the languages for which membership checking can be performed by a non deterministic procedure in linear space. A deterministic procedure in linear space (far from being optimal) Pre-computation in constant space. Compute the l.c.m., say b, of denominators of θ, items of matrices {P a } a A and, items of vector π 0. Build the integer matrices P a def = bp a and vector π 0 def = bπ 0. For word w def = a... a n, the problem becomes π 0( n i= P a i ) T F θbn+? Compute θb n+ in space O(n). Compute v def = π 0( n i= P a i ) by initializing v to π 0 and then iteratively multiply it by P a i. The vectors are bounded by b n+. So this is performed in space O(n). The sum and comparison are also done in space O(n). 25/42
26 Operations with regular languages The family of (rational) stochastic languages is closed under intersection and union with regular languages. Proof. Let L θ (A ) be a (rational) stochastic language (with {>, }) and L = (A 2 ) be a regular language. A 2 π 0[q] 2 A A 2 q q 0 L θ 2 (A) = L θ (A ) L = (A 2 ) and L +θ (A) = L θ (A ) L = (A 2 ) 2 26/42
27 A stochastic language a q b 2 b q 2 a 2 a 2 2 a q 3 q 4 a b b a b q 2 2 b 2 b q 5 q 6 b a L = (A) = 2 {am b... ba m k b < k m = m k } ( ( since Pr A (a m b... ba m k b) = ) k+mk ( ) ) k+m /42
28 Concatenation The family of (rational) stochastic languages is not closed under concatenation with a regular language. Proof. Let L def = {a m b... ba m k b < k m = m k } be the previous stochastic language. Then LA = {a m ba m2 b... a m k ba i > m i = m } which is not a stochastic language. 28/42
29 Iteration The family of (rational) stochastic languages is not closed under Kleene star. Proof. Let L def = {a m b... ba m k b < k m = m k } be the previous stochastic language. Assume that L = L θ (A) with {>, }. Let n i=0 c ix i be the minimal polynomial of P a. Since is an eigenvalue of P a, one gets n i=0 c i = 0 and there are positive and negative coefficients. By definition, n i=0 c ip a i = 0 and so for any word w, n i=0 c ip a i w = 0. Let c i,..., c ik be the positive coefficients of this polynomial. Let w def = ba i b(a i2 b) 2... (a i k b) 2. a i w L iff i {i,..., i k }. Case L = L >θ (A). Let 0 i n, π 0 P ai w T F > θ iff i {i,..., i k }. So: 0 = n i=0 c iπ 0 P a i w T F > ( n i=0 c i)θ = 0 leading to a contradiction. Case L = L θ (A). Let 0 i n, π 0 P a i w T F θ iff i {i,..., i k }. So: 0 = n i=0 c iπ 0 P a i w T F > ( n i=0 c i)θ = 0 leading to a contradiction. 29/42
30 A stochastic language a q b 2 a 2 2 a q 3 q 4 a 2 b b a b 2 a q 2 b 2 b q 5 q 6 b b a c q 2 c q 7 A L = 2 (A) = {am b... ba m k bca < k m = m k } 30/42
31 Homomorphism The family of (rational) stochastic languages is not closed under homomorphism. Proof. Let L def = {a m b... ba m k bca < k m = m k } be the previous stochastic language. Define the homomorphism h from A to A def = {a, b} by: h(a) def = a h(b) def = b h(c) def = ε Then h(l) = {a m ba m2 b... a m k ba i > m i = m } which is not a stochastic language. 3/42
32 Plan Presentation Properties of Stochastic Languages 3 Decidability Results 32/42
33 Two decision problems Let A and A be probabilistic automata. First problem Are A and A equivalent? w A Pr A (w) = Pr A (w) Second problem Is L θ (A) equal to L θ (A )? For deterministic automata this is the same problem. It can be solved in polynomial time by a product construction which provides a witness of non equivalence of size less than Q Q. 33/42
34 Linear algebra recalls Let v 0 R n and v,..., v k be linearly independent vectors of R n. How to check whether v 0 is a linear combination of v,..., v k? Solve in O(k 3 + n 2 ) v []... v k [] v [n]... v k [n] x. x k = When v,..., v k are orthogonal def (i.e. for all a b, v a v b = n i= v a[i]v b [i] = 0) Compute in O(kn) the orthogonal projection w 0 = k i= v 0 v i v i v i v i v 0 []. v 0 [n] Check in O(n) whether v 0 = w 0. 34/42
35 Principles of equivalence checking Enumeration of words Looking for a counter-example whose length is increasing starting with word ε. A stack Managing a stack of words w in order to find counter-examples aw for all a A. For efficiency purposes, the stack contains tuples (P w F, P w F, w). An orthogonal family for restricting the enumeration Gen is a set of independent orthogonal vectors of R Q Q. If w is not a counter-example, check if v def = (P w F, P w F ) is generated by Gen. producing v the orthogonal projection of v on subspace spanned by Gen; comparing v to v. If v v then: w is added to the stack; v v is added to Gen. 35/42
36 The algorithm If π 0 F π 0 F then return(false, ε) Gen {( F, F )}; Push(Stack, ( F, F, ε)) Repeat (v, v, w) Pop(Stack) For a A do z P a v; z P av If π 0 z π 0 z then return(false, aw) y 0; y 0 For (x, x ) Gen do (y, y ) (y, y ) + z x+z x x x+x x (x, x ) If (z, z ) (y, y ) then Push(Stack, (z, z, aw)) Gen Gen {(z y, z y )} Until IsEmpty(Stack) return(true) 36/42
37 Complexity Time complexity An item is pushed on the stack iff an item is added to Gen. There can be no more than Q + Q items in Gen. So there are at most Q + Q iterations of the external loop. The index of the first inner loop ranges over A while the index of the most inner loop ranges over Gen. The operations inside the most inner loop are done in O( Q + Q ). This leads to an overall time complexity of O(( Q + Q ) 3 A ). Length of witnesses In addition, the length of the witness is at most Q + Q. (also valid for deterministic automata) 37/42
38 Correctness Assume that the automata are not equivalent and that the algorithm returns true. Let u be a non examined word such that Pr A (u) Pr A (u). Let u def = w w with w( u) the greatest suffix examined by the algorithm. Among such words u, pick one word such that w is minimal. Claim. There exists w that has been inserted in the stack before w such that Pr A (w w ) Pr A (w w ). Let Gen = {w,..., w k } when examining w, there exist λ,..., λ k such that: So: P w F = k i= λ ip wi F and P w F = k i= λ ip w i F Pr A (w w) def = π 0 P w P w F = k i= λ iπ 0 P w P wi F = k i= λ ipr A (w w i ) Similarly: Pr A (w w) = k i= λ ipr A (w w i ) So there exists i, with Pr A (w w i ) Pr A (w w i ). Let w def = w a. aw i is examined by the algorithm. So the word u def = w w i has a decomposition u def = z z where z the greatest suffix examined by the algorithm has for suffix aw i. So z < w : a contradiction. 38/42
39 Undecidability of the equality problem Given A a rational stochastic automaton, the question L = (A) = {ε}? is undecidable. 2 Proof. By reduction of the undecidable Post correspondence problem (PCP): Given an alphabet A and two morphisms ϕ, ϕ 2 from A to {0, } +, does there exist a word w A + such that ϕ (w) = ϕ 2 (w)? Already undecidable for a restriction where the images of letters lie in (0 + ) +. Inserting a before each letter of images reduces the former problem to the latter. A word w def = a... a n (0 + ) + defines a value val(w) [0, ] by: val(w) def = n i= a i 2 n+ i Since every word starts with a, val(w) = val(w ) implies w = w. 39/42
40 Reduction of PCP For w A + and i {, 2}, define val i (w) def = val(ϕ i (w)). a ( val (a))a 2 a val (a)a q 0 q a (val (a) + 2 ϕ(a) )a a ( val 2(a))a a ( val (a) 2 ϕ(a) )a a val 2(a)a 2 q 20 q 2 a (val 2(a) + 2 ϕ2(a) )a a ( val 2(a) 2 ϕ2(a) )a 40/42
41 Illustration of the reduction A a b c ϕ ()0() ()0()0 () ϕ 2 ()0 ()0 ()()() A a b c 3 val 6 val a b c 3 q 0 q 6 a b + 4 c 7 8 a + 2 b + c 8 a + 2 b 4 a + 4 b c 3 q 20 q 4 a b + 64 c 2 2 a + 2 b + c 2 a + 2 b 4/42
42 Correctness of the reduction The recurrence equation: qi0 P wa T q i = qi0 P w T q i (val i (a) + 2 ϕi(a) ) + ( qi0 P w T q i )val i (a) = val i (a) + 2 ϕi(a) qi0 P w T q i By induction we obtain that for all w def = a... a n : qi0 P w T q i = n val i (a j )2 j<k n ϕi(ak) = val i (w) j= So for w A + : Pr A (w) = 2 (val (w) + val 2 (w)). Thus w L = 2 (A) iff val(ϕ (w)) = val(ϕ 2 (w)) implying that ϕ (w) = ϕ 2 (w). 42/42
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be
More informationSYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES
Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,
More informationTheory Bridge Exam Example Questions
Theory Bridge Exam Example Questions Annotated version with some (sometimes rather sketchy) answers and notes. This is a collection of sample theory bridge exam questions. This is just to get some idea
More informationDM17. Beregnelighed. Jacob Aae Mikkelsen
DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................
More informationFoundations of Informatics: a Bridging Course
Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html
More informationOn the Accepting Power of 2-Tape Büchi Automata
On the Accepting Power of 2-Tape Büchi Automata Equipe de Logique Mathématique Université Paris 7 STACS 2006 Acceptance of infinite words In the sixties, Acceptance of infinite words by finite automata
More informationFinal exam study sheet for CS3719 Turing machines and decidability.
Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,
More informationMA/CSSE 474 Theory of Computation
MA/CSSE 474 Theory of Computation CFL Hierarchy CFL Decision Problems Your Questions? Previous class days' material Reading Assignments HW 12 or 13 problems Anything else I have included some slides online
More informationTHEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET
THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages
More informationUNIT-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 informationAutomata 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 informationPushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen
Pushdown automata Twan van Laarhoven Institute for Computing and Information Sciences Intelligent Systems Version: fall 2014 T. van Laarhoven Version: fall 2014 Formal Languages, Grammars and Automata
More information6.8 The Post Correspondence Problem
6.8. THE POST CORRESPONDENCE PROBLEM 423 6.8 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that turns out to be a very helpful tool for
More informationCSE 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 informationNPDA, CFG equivalence
NPDA, CFG equivalence Theorem A language L is recognized by a NPDA iff L is described by a CFG. Must prove two directions: ( ) L is recognized by a NPDA implies L is described by a CFG. ( ) L is described
More informationIncompleteness Theorems, Large Cardinals, and Automata ov
Incompleteness Theorems, Large Cardinals, and Automata over Finite Words Equipe de Logique Mathématique Institut de Mathématiques de Jussieu - Paris Rive Gauche CNRS and Université Paris 7 TAMC 2017, Berne
More informationCSE 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 informationThe Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc.
The Pumping Lemma For every regular language L, there is a number l 1 satisfying the pumping lemma property: All w L with w l can be expressed as a concatenation of three strings, w = u 1 vu 2, where u
More informationComputational Models - Lecture 5 1
Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationTheory of Computation Turing Machine and Pushdown Automata
Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type
More informationCSci 311, Models of Computation Chapter 4 Properties of Regular Languages
CSci 311, Models of Computation Chapter 4 Properties of Regular Languages H. Conrad Cunningham 29 December 2015 Contents Introduction................................. 1 4.1 Closure Properties of Regular
More informationHKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed
HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite
More informationTheory of Computation 8 Deterministic Membership Testing
Theory of Computation 8 Deterministic Membership Testing Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Theory of Computation
More informationIntroduction to Automata
Introduction to Automata Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr 1 /
More informationOn Recognizable Languages of Infinite Pictures
On Recognizable Languages of Infinite Pictures Equipe de Logique Mathématique CNRS and Université Paris 7 JAF 28, Fontainebleau, Juin 2009 Pictures Pictures are two-dimensional words. Let Σ be a finite
More informationThis lecture covers Chapter 7 of HMU: Properties of CFLs
This lecture covers Chapter 7 of HMU: Properties of CFLs Chomsky Normal Form Pumping Lemma for CFs Closure Properties of CFLs Decision Properties of CFLs Additional Reading: Chapter 7 of HMU. Chomsky Normal
More informationAutomata Theory for Presburger Arithmetic Logic
Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood
More informationThe View Over The Horizon
The View Over The Horizon enumerable decidable context free regular Context-Free Grammars An example of a context free grammar, G 1 : A 0A1 A B B # Terminology: Each line is a substitution rule or production.
More informationCS 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 information1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.
Code No: R09220504 R09 Set No. 2 II B.Tech II Semester Examinations,December-January, 2011-2012 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 75 Answer
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 14 Ana Bove May 14th 2018 Recap: Context-free Grammars Simplification of grammars: Elimination of ǫ-productions; Elimination of
More informationOgden s Lemma for CFLs
Ogden s Lemma for CFLs Theorem If L is a context-free language, then there exists an integer l such that for any u L with at least l positions marked, u can be written as u = vwxyz such that 1 x and at
More information60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor
60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is
More informationDuality and Automata Theory
Duality and Automata Theory Mai Gehrke Université Paris VII and CNRS Joint work with Serge Grigorieff and Jean-Éric Pin Elements of automata theory A finite automaton a 1 2 b b a 3 a, b The states are
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.
More informationOn Recognizable Languages of Infinite Pictures
On Recognizable Languages of Infinite Pictures Equipe de Logique Mathématique CNRS and Université Paris 7 LIF, Marseille, Avril 2009 Pictures Pictures are two-dimensional words. Let Σ be a finite alphabet
More informationGEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I
GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three
More informationCS 455/555: Finite automata
CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently
More informationCS Automata, Computability and Formal Languages
Automata, Computability and Formal Languages Luc Longpré faculty.utep.edu/longpre 1 - Pg 1 Slides : version 3.1 version 1 A. Tapp version 2 P. McKenzie, L. Longpré version 2.1 D. Gehl version 2.2 M. Csűrös,
More informationON THE STAR-HEIGHT OF SUBWORD COUNTING LANGUAGES AND THEIR RELATIONSHIP TO REES ZERO-MATRIX SEMIGROUPS
ON THE STAR-HEIGHT OF SUBWORD COUNTING LANGUAGES AND THEIR RELATIONSHIP TO REES ZERO-MATRIX SEMIGROUPS TOM BOURNE AND NIK RUŠKUC Abstract. Given a word w over a finite alphabet, we consider, in three special
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 1 Course Web Page www3.cs.stonybrook.edu/ cse303 The webpage contains: lectures notes slides; very detailed solutions to
More informationCS481F01 Solutions 6 PDAS
CS481F01 Solutions 6 PDAS A. Demers 2 November 2001 1. Give a NPDAs that recognize the following languages: (a) The set of all strings in {0, 1} that contain twice as many 1s as 0s. (answer a) We build
More informationNon-context-Free Languages. CS215, Lecture 5 c
Non-context-Free Languages CS215, Lecture 5 c 2007 1 The Pumping Lemma Theorem. (Pumping Lemma) Let be context-free. There exists a positive integer divided into five pieces, Proof for for each, and..
More informationUndecidability 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 informationIntroduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.
Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures and Instructions 23.10. 3.11. 17.11. 24.11. 1.12. 11.12.
More informationSri vidya college of engineering and technology
Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order
More informationCS243, Logic and Computation Nondeterministic finite automata
CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333
More informationClosure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism
Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement
More informationA Survey of Partial-Observation Stochastic Parity Games
Noname manuscript No. (will be inserted by the editor) A Survey of Partial-Observation Stochastic Parity Games Krishnendu Chatterjee Laurent Doyen Thomas A. Henzinger the date of receipt and acceptance
More informationCPSC 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 informationON PARTITIONS SEPARATING WORDS. Formal languages; finite automata; separation by closed sets.
ON PARTITIONS SEPARATING WORDS Abstract. Partitions {L k } m k=1 of A+ into m pairwise disjoint languages L 1, L 2,..., L m such that L k = L + k for k = 1, 2,..., m are considered. It is proved that such
More informationIntroduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.
Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures Tuesday 10:45 pm - 12:15 pm Instructions Tuesday 12:30
More informationTWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund
TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA Written by Liat Peterfreund 1 TWO-WAY FINITE AUTOMATA A two way deterministic finite automata (2DFA) is a quintuple M Q,,, q0, F where: Q,, q, F are as before
More informationSt.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad
St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-500 014 Subject: FORMAL LANGUAGES AND AUTOMATA THEORY Class : CSE II PART A (SHORT ANSWER QUESTIONS) UNIT- I 1 Explain transition diagram, transition
More informationPrimitive recursive functions: decidability problems
Primitive recursive functions: decidability problems Armando B. Matos October 24, 2014 Abstract Although every primitive recursive (PR) function is total, many problems related to PR functions are undecidable.
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 15 Ana Bove May 17th 2018 Recap: Context-free Languages Chomsky hierarchy: Regular languages are also context-free; Pumping lemma
More informationHomework 8. a b b a b a b. two-way, read/write
Homework 8 309 Homework 8 1. Describe a TM that accepts the set {a n n is a power of 2}. Your description should be at the level of the descriptions in Lecture 29 of the TM that accepts {ww w Σ } and the
More informationTheory of Computation
Fall 2002 (YEN) Theory of Computation Midterm Exam. Name:... I.D.#:... 1. (30 pts) True or false (mark O for true ; X for false ). (Score=Max{0, Right- 1 2 Wrong}.) (1) X... If L 1 is regular and L 2 L
More informationLecture 17: Language Recognition
Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to
More informationRegular Languages. Problem Characterize those Languages recognized by Finite Automata.
Regular Expressions Regular Languages Fundamental Question -- Cardinality Alphabet = Σ is finite Strings = Σ is countable Languages = P(Σ ) is uncountable # Finite Automata is countable -- Q Σ +1 transition
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 1.4 Explain the limits of the class of regular languages Justify why the Pumping
More informationPushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen
Pushdown Automata Notes on Automata and Theory of Computation Chia-Ping Chen Department of Computer Science and Engineering National Sun Yat-Sen University Kaohsiung, Taiwan ROC Pushdown Automata p. 1
More informationTheory of Computation
Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 14: Applications of PCP Goal of this Lecture Our goal is to present some typical undecidability
More informationarxiv: v2 [cs.fl] 29 Nov 2013
A Survey of Multi-Tape Automata Carlo A. Furia May 2012 arxiv:1205.0178v2 [cs.fl] 29 Nov 2013 Abstract This paper summarizes the fundamental expressiveness, closure, and decidability properties of various
More informationCSC173 Workshop: 13 Sept. Notes
CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of
More informationTHE AUSTRALIAN NATIONAL UNIVERSITY Second Semester COMP2600 (Formal Methods for Software Engineering)
THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester 2012 COMP2600 (Formal Methods for Software Engineering) Writing Period: 3 hours duration Study Period: 15 minutes duration Permitted Materials: One A4
More information5 3 Watson-Crick Automata with Several Runs
5 3 Watson-Crick Automata with Several Runs Peter Leupold Department of Mathematics, Faculty of Science Kyoto Sangyo University, Japan Joint work with Benedek Nagy (Debrecen) Presentation at NCMA 2009
More informationAutomata on linear orderings
Automata on linear orderings Véronique Bruyère Institut d Informatique Université de Mons-Hainaut Olivier Carton LIAFA Université Paris 7 September 25, 2006 Abstract We consider words indexed by linear
More informationProperties of Context-Free Languages. Closure Properties Decision Properties
Properties of Context-Free Languages Closure Properties Decision Properties 1 Closure Properties of CFL s CFL s are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms
More informationLecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2
BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 4 Ana Bove March 23rd 2018 Recap: Formal Proofs How formal should a proof be? Depends on its purpose...... but should be convincing......
More informationControlling probabilistic systems under partial observation an automata and verification perspective
Controlling probabilistic systems under partial observation an automata and verification perspective Nathalie Bertrand, Inria Rennes, France Uncertainty in Computation Workshop October 4th 2016, Simons
More informationCS 121, Section 2. Week of September 16, 2013
CS 121, Section 2 Week of September 16, 2013 1 Concept Review 1.1 Overview In the past weeks, we have examined the finite automaton, a simple computational model with limited memory. We proved that DFAs,
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017 Lecture 4 Ana Bove March 24th 2017 Structural induction; Concepts of automata theory. Overview of today s lecture: Recap: Formal Proofs
More information1.A Sets, Relations, Graphs, and Functions 1.A.1 Set a collection of objects(element) Let A be a set and a be an elements in A, then we write a A.
1.A Sets, Relations, Graphs, and Functions 1.A.1 Set a collection of objects(element) Let A be a set and a be an elements in A, then we write a A. How to specify sets 1. to enumerate all of the elements
More informationAC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013
Q.2 a. Prove by mathematical induction n 4 4n 2 is divisible by 3 for n 0. Basic step: For n = 0, n 3 n = 0 which is divisible by 3. Induction hypothesis: Let p(n) = n 3 n is divisible by 3. Induction
More informationLanguages, regular languages, finite automata
Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 14 SMALL REVIEW FOR FINAL SOME Y/N QUESTIONS Q1 Given Σ =, there is L over Σ Yes: = {e} and L = {e} Σ Q2 There are uncountably
More informationWhat is this course about?
What is this course about? Examining the power of an abstract machine What can this box of tricks do? What is this course about? Examining the power of an abstract machine Domains of discourse: automata
More informationAutomata Theory and Formal Grammars: Lecture 1
Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)
More informationCS481F01 Prelim 2 Solutions
CS481F01 Prelim 2 Solutions A. Demers 7 Nov 2001 1 (30 pts = 4 pts each part + 2 free points). For this question we use the following notation: x y means x is a prefix of y m k n means m n k For each of
More informationNondeterministic Finite Automata
Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,
More informationECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam
ECS 120: Theory of Computation Handout MT UC Davis Phillip Rogaway February 16, 2012 Midterm Exam Instructions: The exam has six pages, including this cover page, printed out two-sided (no more wasted
More informationDecidable and Expressive Classes of Probabilistic Automata
Decidable and Expressive Classes of Probabilistic Automata Yue Ben a, Rohit Chadha b, A. Prasad Sistla a, Mahesh Viswanathan c a University of Illinois at Chicago, USA b University of Missouri, USA c University
More informationOn the Average Complexity of Brzozowski s Algorithm for Deterministic Automata with a Small Number of Final States
On the Average Complexity of Brzozowski s Algorithm for Deterministic Automata with a Small Number of Final States Sven De Felice 1 and Cyril Nicaud 2 1 LIAFA, Université Paris Diderot - Paris 7 & CNRS
More informationAn algebraic characterization of unary two-way transducers
An algebraic characterization of unary two-way transducers (Extended Abstract) Christian Choffrut 1 and Bruno Guillon 1 LIAFA, CNRS and Université Paris 7 Denis Diderot, France. Abstract. Two-way transducers
More informationIntroduction 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 informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are
More informationOn closures of lexicographic star-free languages. E. Ochmański and K. Stawikowska
On closures of lexicographic star-free languages E. Ochmański and K. Stawikowska Preprint No 7/2005 Version 1, posted on April 19, 2005 On closures of lexicographic star-free languages Edward Ochma ski
More informationUndecidable 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 informationFinite Automata and Languages
CS62, IIT BOMBAY Finite Automata and Languages Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS62: New Trends in IT: Modeling and Verification of Cyber-Physical Systems (2
More informationWarshall s algorithm
Regular Expressions [1] Warshall s algorithm See Floyd-Warshall algorithm on Wikipedia The Floyd-Warshall algorithm is a graph analysis algorithm for finding shortest paths in a weigthed, directed graph
More informationNotes 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 informationProperties of Regular Languages (2015/10/15)
Chapter 4 Properties of Regular Languages (25//5) Pasbag, Turkey Outline 4. Proving Languages Not to e Regular 4.2 Closure Properties of Regular Languages 4.3 Decision Properties of Regular Languages 4.4
More informationClarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.
CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications
More informationBefore We Start. The Pumping Lemma. Languages. Context Free Languages. Plan for today. Now our picture looks like. Any questions?
Before We Start The Pumping Lemma Any questions? The Lemma & Decision/ Languages Future Exam Question What is a language? What is a class of languages? Context Free Languages Context Free Languages(CFL)
More informationNotes on generating functions in automata theory
Notes on generating functions in automata theory Benjamin Steinberg December 5, 2009 Contents Introduction: Calculus can count 2 Formal power series 5 3 Rational power series 9 3. Rational power series
More informationTheory of computation: initial remarks (Chapter 11)
Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.
More informationComputational Models - Lecture 4
Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push
More informationEquivalence of DFAs and NFAs
CS 172: Computability and Complexity Equivalence of DFAs and NFAs It s a tie! DFA NFA Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: L.von Ahn, L. Blum, M. Blum What we ll do today Prove that DFAs
More information