CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA
|
|
- Lee West
- 6 years ago
- Views:
Transcription
1 1 CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA GUO-QIANG ZHANG, XIANGNAN ZHOU, ROBERT FRASER, LICONG CUI Department of Electrical Engineering and Computer Science, Case Western Reserve University, Cleveland, Ohio 44106, USA College of Mathematics and Econometrics, Hunan University, Changsha 41001, China Department of Mathematics, Case Western Reserve University, Cleveland, Ohio 44106, USA This paper presents direct, explicit algebraic constructions of concatenation and Kleene star on deterministic finite automata (DFA), using the Booleanmatrix method of Zhang in Ref. 1 and ideas of Kozen in Ref.. The consequence is trifold: (1) it provides an alternative proof of the classical Kleene s Theorem on the equivalence of regular expressions and DFAs without using nondeterministic finite automata (NFA); () it demonstrates how the language constructions of concatenation and Kleene star can be captured elegantly as algebraic laws in the form of binomial theorems; (3) it provides a demonstration of the (tight) upper bounds of the state complexity of concatenation and Kleene star, but offers a way to study the state complexity of NFA also. Keywords: Automata; Concatenation; Kleene Star; Boolean matrices. 1. Matrix-Approach to Automata Theory We begin by providing a brief account of the matrix-approach to automata theory as introduced by Zhang. 1 A Boolean matrix is a matrix (of size m n) whose elements are either 0 or 1, where the internal operations are carried out over the Boolean algebra. We write B m n for the set of all Boolean matrices of size m n. A Boolean (row) vector of dimension n is an n-tuple (b 1, b,..., b n ) of 0s and 1s. We write B n for the set of all Boolean vectors of dimension n. A column vector is the transpose ( ) t of a row vector. The characteristic vector of a subset A of {1,, n} is the row vector I n A B n such that the p-th component of
2 I n A is a 1 if and only if p A. The characteristic vector of a singleton set {p} is written as I n p, or simply I p. O m n stands for an (m n)-matrix, all of its elements are 0. When dimension is fixed by context, we abuse notion and write O n n as 0. A deterministic finite automaton (DFA) is a 5-tuple M = (Q, Σ, δ, q 0, F ), where Q is the finite set of states, Σ is the alphabet, δ : Q Σ Q is the transition function, q 0 is the start state, and F is the set of final states. For notational convenience, we use initial segments of natural numbers {1,,, n} to denote the set of states, and fix 1 to be the start state, for base/background DFAs. When there is no confusion, we omit the indication of the start state (which is assumed to be state 1 by default). Each n-state DFA determines a (associated) matrix system { a a Σ}, where a is the (n n) adjacency matrix of the a-labeled subgraph associated with the DFA. In other words, the (i, j) entry of a is 1 if and only if δ(i, a) = j. Since M is a DFA, each a is row-stochastic (i.e., every row contains precisely a single 1). The (Boolean) sum of all members a in the matrix system is the adjacency matrix. For a string w = a 1 a a n over Σ, we write w for the matrix product a1 a an. The language accepted by M, denoted L(M), is the set {w I q0 w I t F = 1}. See Ref. 1 for more details of the utility of this approach. Example {( ) ( 1.1. )} The matrix system of the following DFA is , b a b start 1 a With the use of Boolean matrices, it is straightforward to describe a wide spectrum of constructions on DFA in a simple, algebraic manner, with their correctness established by induction and algebraic manipulation. 1 Here we briefly treat Brzozowski s derivation in Ref. 3, as an example. Given a string u and a language L, the Brzozowski derivative u 1 L is the language {w uw L}. Suppose L is accepted by an n-state DFA M = (Q, Σ, δ, F ), with { a a Σ} its matrix system. Then a DFA accepting u 1 L can be
3 3 given as M = (Q, Σ, δ, q 0, F ), where Q = {A A B n n }, q 0 = u, δ (A, a) = A a, F = {A I 1 AI t F = 1}. One can see that w is accepted by M if and only if δ ( u, w) = uw F, i.e., uw is accepted by M. In the remainder of this paper, we present the constructions of concatenation and Kleene star on DFA, and analyze the state complexity of such constructions. It turns out that, without additional effort, these algebraic constructions are already optimal in the number of states used after projecting to the first row.. Concatenation This section presents the concatenation construction. Theorem.1. Suppose matrix systems { a 1 a Σ} and { a a Σ} are associated with m- and n-state DFAs M 1 = (Q 1, Σ, δ 1, F 1 ) and M = (Q, Σ, δ, F ), respectively. The DFA M = (Q, Σ, δ, q 0, F ) defined as Q = {(A, B) A B m m, B B m n }, q 0 = (T 0, T ), δ((a, B), a) = (A, B) a (= (A a 1, A a 1T + B a )), F = {(A, B) I m 1 BI t F = 1}, ( ) where a a = 1 a 1T 0 a for a Σ, T = I t F 1 I n 1, and T 0 is the (m m) identity matrix, has the property that L(M) = L(M 1 ) L(M ). To understand how this construction works, suppose δ(q 0, w) = (A, B) for some w Σ. By the definition of δ, we have, for a Σ, δ(q 0, wa) = ( wa 1, wa 1 T + B a ). Therefore, δ(q 0, wa) F if and only if I m 1 ( wa 1 T + B a )I t F = 1, or (I m 1 wa 1 I t F 1 I n 1 I t F )+(I m 1 B a I t F ) = 1. Hence, δ(q 0, wa) F if and only if either wa L(M 1 ) (i.e., I m 1 wa 1 I t F 1 = 1) and 1 F (i.e., I n 1 I t F = 1), or else I m 1 B a I t F = 1. In general, I m 1 A, the first row of A, keeps track of the ending state through w in M 1, and I m 1 B keeps track of all possible states (in M 1 and M ) resulting from a decomposition w = w 1 w,
4 4 with w 1 going through M 1 and w going through M. This analysis can be captured more precisely in general in the next lemma. Lemma.1. Suppose δ(q 0, w) = (A, B) in M, and suppose w = a 1 a l where a i Σ for 1 i l. We have B = l a1a ai i=0 1 T ai+1ai+ a l. Proof. Suppose δ(q 0, w) = (A, B) in the DFA M given in Theorem.1, and suppose w = a 1 a l, where a i Σ for 1 i l. In what follows, by the induction on the length of w, we show that A = w 1, B = l i=0 a1a ai 1 T ai+1ai+ a l Remark that when i = 0 or i = l, it represents T a1a a l and a1a a l 1 T, respectively. (1) Suppose that l = 1 and w = a 1, then δ(q 0, a 1 ) ( = (I m a 1 1 1, T ) a1 1 T ) 0 a1 = ( a1 1, a1 1 T + T a1 ). The conclusion holds. () Suppose that the conclusion holds when l = k 1 and δ(q 0, a 1 a a k 1 ) = (A k 1, B k 1 ), where k 1 A k 1 = w 1, B k 1 = a1a ai 1 T ai+1ai+ a k 1. i=0 Then when l = k and w = a 1 a a k, we have δ(δ(q 0, a 1 a a k 1 ), a k ) ( a k 1 a k 1 = (A k 1, B k 1 ) T ) 0 a k = (A k 1 a k 1, A k 1 a k 1 T + B k 1 a k ) k = ( w 1, a1a ai 1 T ai+1ai+ a k ). i=0 By induction, we know that the conclusion holds for any l N. This lemma captures the key technical content for the proof of Theorem.1. It is interesting to observe that this lemma assumes the general flavor of a binomial theorem. The proof of Theorem.1 is as follows:
5 5 Proof of Theorem.1. Suppose that δ(q 0, w) = q, then w L(M) iff q F. If w = ɛ, then q = q 0. Thus, ɛ L(M) iff q 0 F, iff I m 1 T I t F = 1, iff ɛ L(M 1 ) L(M ). Since q F iff I m 1 BI t F = 1, by Lemma.1, we have w = a 1 a a l L(M) iff l i=0 I m 1 a1a ai 1 T ai+1ai+ a l I t F = 1, which means w = a 1 a a l L(M 1 ) and ɛ L(M ), or there exists 1 i l 1 such that u = a 1 a a i L(M 1 ), v = a i+1 a i+ a l L(M ) and w = uv, or ɛ L(M 1 ) and w = a 1 a a l L(M ). Therefore, w L(M) iff w L(M 1 ) L(M ), that is, L(M) = L(M 1 ) L(M ). 3. Kleene Star This section presents the Kleene star construction. Theorem 3.1. Suppose the matrix system { a 1 a Σ} is associated with an n-state DFA M 1 = (Q 1, Σ, δ 1, F 1 ). The DFA M = (Q, Σ, δ, q 0, F ) with H = I t F 1 I 1 and Q = {A A B n n } {s}, q 0 = s, { a δ(q, a) = 1 (H 0 + H 1 ), if q = s, A a 1(H 0 + H 1 ), if q = A, F = {A I 1 AI t F 1 = 1} {s}, has the property that L(M) = (L(M 1 )). Here, H 1 = H and H 0 is the identity matrix. The role of H is to mark possible positions for string partition. Even though it has no effect by itself for the acceptance of strings (and represents a redundant term), it accounts for the restart of M 1 and prepares the way for the next chunk of strings to be scanned from the initial state of M 1. Therefore, upon reading a symbol a, M appends a to the end of the current chunk, but branches with two threads: extending the current chunk
6 6 (the a 1 term) for one, and starting a new chunk (the a 1H term) for the other. Lemma 3.1. Suppose w = a 1 a l with a i Σ for 1 i l. We have, for the DFA M given in Theorem 3.1, δ(s, w) = w1 1 H w 1 H w k 1 Hi. w=w 1 w k,1 k l w j ɛ,1 j k i=0,1 Proof. We show that the conclusion holds by induction on the length of w. (1) Suppose that l = 1 and w = a 1, then by the definition of the DFA M given in Theorem 3.1, we have δ(s, a 1 ) = a1 1 (H0 + H 1 ) = i=0,1 a1 1 Hi The conclusion holds. () Suppose that the conclusion holds when l = k 1 and w = a 1 a a k 1, i.e., δ(s, a 1 a a k 1 ) = w=w 1 w h,1 h k 1 w j ɛ,1 j h i=0,1 Then when l = k and w = a 1 a a k, we have Next, we show that w=w 1 w h,1 h k w j ɛ,1 j h i=0,1 δ(s, a 1 a a k ) = δ(δ(s, a 1 a a k 1 ), a k ) w1 1 H w h 1 Hi. = δ(s, a 1 a a k 1 ) a k 1 (H0 + H 1 ). δ(s, a 1 a k 1 ) a k 1 (H0 + H 1 ) = w1 1 H w h 1 Hi. w=w 1 w h,1 h k w j ɛ,1 j h i=0,1 Let L denote δ(s, a 1 a k 1 ) a k 1 (H0 + H 1 ), and let R denote w1 1 H w h 1 Hi. Let e be a term in L, then e = w1 1 H w h 1 Hi a k 0, 1, w 1 w h = a 1 a k 1. If i = 0, e = w1 1 H w 1 H w ha k 1 Hj, where i, j 1 H j, take
7 7 w h = w ha k, then w 1 w h = a 1 a k 1 a k, which means e is a term in R. If i = 1, e = w1 1 H w 1 H w h 1 H a k 1 Hj, take w h+1 = a k, then w 1 w h w h+1 = a 1 a k 1 a k, which yields e is a term in R. Hence, every term in L is a term in R. Let e be a term in R, then e = w1 1 H w h 1 Hi, where w 1 w h = w. If w h = a k, then e = w1 1 H w h 1 1 H a k 1 Hi and w 1 w h 1 = a 1 a k 1. By the induction, w1 1 H w h 1 in δ(s, a 1 a k 1 ). Thus, e is a term in L. Otherwise, w h = w h a k, w h ɛ. 1 H is a term In this case e = w1 1 H H w h 1 a k 1 Hi and w 1 w h 1 w h = a 1 a k 1, which yields w1 1 H H w h 1 is a term in δ(s, a 1 a k 1 ). Thus, e is a term in L. Therefore, every term in R is a term in L. Thus, when l = k, the conclusion holds. By induction, we know that the conclusion holds for any l N. Proof of Theorem 3.1. At first, s F implies ɛ L(M). Suppose w = a 1 a a l, then by Lemma 3.1, w L(M) iff there exist w 1, w,, w k such that w = w 1 w w k and I 1 w1 1 H w 1 H w k 1 (H0 + H 1 )I t F 1 = 1, i.e., w 1, w,, w k L(M 1 ). Therefore, L(M) = (L(M 1 )). Remark. The essential language operators associated with regular languages are union, concatenation, and Kleene star. After addressing the matrix constructions for concatenation, and Kleene star, we only need to note that the union (and intersection) construction is straightforward and is left as an exercise. 4. State Complexity State complexity studies the minimal number of states needed for a given language operation as a function of the sizes of the underlying automata. 4 One general observation on constructions given in Sections and 3 is that we only need to keep track of the first rows of the respective matrices used for states, since their status of being a final state is determined by prefixing I 1 in a matrix multiplication. Theorem 4.1. Projecting to the first row by replacing (A, B) systematically with (I 1 A, I 1 B) for concatenation and replacing A systematically with I 1 A for Kleene star, we have: (1) The number of reachable states for the concatenation construction given in Section is m n k n 1, where the first underlying DFA has m
8 8 states, the second has n states, and k is the number of final states the first DFA. () The number of reachable states for the Kleene star construction given in Section 3 is n 1 + n k 1, where n is the number of states of the underlying DFA and k is the number of its non-initial final states. We remark that these numbers are lowest possible upper bounds, since they agree with the results in Ref. 4. Proof. By replacing (A, B) systematically with (I 1 A, I 1 B) for concatenation and replacing A systematically with I 1 A for Kleene star, the construction M of concatenation in Section can be reduced as M = (Q, Σ, δ, q 0, F ) with Q = {(A, B) A B m, B B n }, q 0 = (I m 1 T 0, I m 1 T ) = I m 1 q 0, δ ((A, B), a) = (A, B) a, F = {(A, B) BI t F = 1}, and the construction M of Kleene star in Section 3 can be reduced as M = (Q, Σ, δ, s, F ) Q = {A A B n } {s} { δ I1 a (q, a) = 1(H 0 + H 1 ), if q = s, A a 1(H 0 + H 1 ), if q = A, F = {A AI t F 1 = 1} {s}. In what follows, the state complexity of concatenation and Kleene star are obtained by using the equivalent constructions M and M. Concatenation. Let k be the number of final states of M 1. Note that δ ((A, B), a) = (A, B) a = (A a 1, A a 1T + B a ), where (A, B) = δ (q 0, w), w Σ. From the proof of Theorem.1, we know that A = I m 1 w 1, which means A has exactly one entry being 1 among its m bits, since 1 is row stochastic (and so is wa 1 ). This means that there are a maximal number of m n possible bit vectors of the form (A a 1, A a 1T + B a ), where m accounts for the variability of A a 1 and n for the variability of A a 1T + B a. However, not all n combinations can be realized by A a 1T + B a : A a 1T is equal to I n 1 if and only if wa L(M 1 ). We know that the first entry in B will always be equal to 1 if any of the positions in A corresponding to any of the states in F 1 is equal to 1. In particular, we can never reach a state for which the entry of A corresponding to a final
9 9 state of M 1 is equal to 1 and the entry of B corresponding to the start state of M is equal to zero. There are k n 1 states of this form. So the total number of reachable states in M is m n k n 1. Kleene star. Let k be the number of non-initial final states of M 1. Then realizing that for nonempty w Σ, a Σ, we have δ (A, a) = A a 1(H 0 + H 1 ), where A = δ (s, w). Note that A a 1H = I 1 if and only if we have A a 1IF t 1 = 1. This, in turn, happens if and only if A a 1 has a 1 in some entry corresponding to a final state of M 1. But δ (A, a) is the sum of A a 1 and A a 1H. In particular, this means that if any entry of A a 1 corresponding to a final state of M 1 is equal to 1, then we have A a 1H = I 1, and so the first entry of A a 1(H 0 + H 1 ) must be equal to 1 as well. Finally, because A a 1H is always either equal to 0 or I 1, we know that if any position except for the first one in A a 1(H 0 + H 1 ) is nonzero, then the corresponding position in A a 1 must also be nonzero. Putting these facts together, we conclude that the first entry of δ (A, a) will always be equal to 1 if any position corresponding to any final state is equal to 1. There are n 1 possibly reachable states in which there is a 1 in the first position, and n k 1 possibly reachable states in which the first entry is 0 and the entry in the position corresponding to every element of F 1 is zero. Furthermore, we need to remember to include our start state in the total number of states for our DFA. So the maximum number of reachable states in the DFA M is n 1 + n k = n 1 + n k Conclusion With the constructions given, we see that operations on regular expressions can be directly translated to constructions on DFA. We obtained along the way a proof of the classical Kleene s Theorem avoiding the use of NFA (using Arden s Lemma in the other direction). Our Lemmas (.1, 3.1) illustrated how laws of Boolean matrices capture language operations inductively and algebraically. The natural constructions using matrix systems are also optimal in the usage of states. Our approach does not depend on the deterministic nature of the underlying automata until the topic of state complexity. Barring the use of ɛ-edges, our constructions work for NFA, possibly informing the study of state complexity for NFA in Ref. 5 also. References 1. Guo-Qiang Zhang, Inform. Comput. 15(1), 138 (1999).. D. Kozen, Inform. Comput. 110, 366 (1994). 3. J.A. Brzozowski, J. Assoc. Comput. Mach. 11, 481 (1964).
10 10 4. S. Yu, Q. Zhuang, K. Salomaa, Theor. Comput. Sci. 15, 315 (1994). 5. S. Yu, Fundam. Inform. 64, 471 (005).
CS 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 informationT (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,
Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the
More informationLecture 3: Nondeterministic Finite Automata
Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where
More informationCS 154. Finite Automata, Nondeterminism, Regular Expressions
CS 54 Finite Automata, Nondeterminism, Regular Expressions Read string left to right The DFA accepts a string if the process ends in a double circle A DFA is a 5-tuple M = (Q, Σ, δ, q, F) Q is the set
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 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 informationTheory of Computation (I) Yijia Chen Fudan University
Theory of Computation (I) Yijia Chen Fudan University Instructor Yijia Chen Homepage: http://basics.sjtu.edu.cn/~chen Email: yijiachen@fudan.edu.cn Textbook Introduction to the Theory of Computation Michael
More informationUNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r
Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite
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 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 informationNondeterministic Finite Automata
Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input
More informationTheoretical Computer Science. State complexity of basic operations on suffix-free regular languages
Theoretical Computer Science 410 (2009) 2537 2548 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs State complexity of basic operations
More informationSeptember 11, Second Part of Regular Expressions Equivalence with Finite Aut
Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language
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 informationFinite Automata. Mahesh Viswanathan
Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,
More 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 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 informationCMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013
CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset
More information3515ICT: Theory of Computation. Regular languages
3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,
More informationClosure under the Regular Operations
September 7, 2013 Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have shown this closure
More informationCOM364 Automata Theory Lecture Note 2 - Nondeterminism
COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly
More informationFinite Automata and Regular languages
Finite Automata and Regular languages Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/
More informationDeterministic Finite Automata (DFAs)
CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri
More informationChapter 6: NFA Applications
Chapter 6: NFA Applications Implementing NFAs The problem with implementing NFAs is that, being nondeterministic, they define a more complex computational procedure for testing language membership. To
More informationDeterministic Finite Automata (DFAs)
Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel
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 informationNon-deterministic Finite Automata (NFAs)
Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel
More informationUniversal Disjunctive Concatenation and Star
Universal Disjunctive Concatenation and Star Nelma Moreira 1 Giovanni Pighizzini 2 Rogério Reis 1 1 Centro de Matemática & Faculdade de Ciências Universidade do Porto, Portugal 2 Dipartimento di Informatica
More informationKleene Algebras and Algebraic Path Problems
Kleene Algebras and Algebraic Path Problems Davis Foote May 8, 015 1 Regular Languages 1.1 Deterministic Finite Automata A deterministic finite automaton (DFA) is a model of computation that can simulate
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 informationChapter Five: Nondeterministic Finite Automata
Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more
More informationCourse 4 Finite Automata/Finite State Machines
Course 4 Finite Automata/Finite State Machines The structure and the content of the lecture is based on (1) http://www.eecs.wsu.edu/~ananth/cpts317/lectures/index.htm, (2) W. Schreiner Computability and
More informationCS 322 D: Formal languages and automata theory
CS 322 D: Formal languages and automata theory Tutorial NFA DFA Regular Expression T. Najla Arfawi 2 nd Term - 26 Finite Automata Finite Automata. Q - States 2. S - Alphabets 3. d - Transitions 4. q -
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 informationLecture 1: Finite State Automaton
Lecture 1: Finite State Automaton Instructor: Ketan Mulmuley Scriber: Yuan Li January 6, 2015 1 Deterministic Finite Automaton Informally, a deterministic finite automaton (DFA) has finite number of s-
More informationCS 154, Lecture 3: DFA NFA, Regular Expressions
CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and
More informationSeptember 7, Formal Definition of a Nondeterministic Finite Automaton
Formal Definition of a Nondeterministic Finite Automaton September 7, 2014 A comment first The formal definition of an NFA is similar to that of a DFA. Both have states, an alphabet, transition function,
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages
More informationFinite Automata and Regular Languages
Finite Automata and Regular Languages Topics to be covered in Chapters 1-4 include: deterministic vs. nondeterministic FA, regular expressions, one-way vs. two-way FA, minimization, pumping lemma for regular
More informationTasks of lexer. CISC 5920: Compiler Construction Chapter 2 Lexical Analysis. Tokens and lexemes. Buffering
Tasks of lexer CISC 5920: Compiler Construction Chapter 2 Lexical Analysis Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Copyright Arthur G. Werschulz, 2017. All
More informationTheory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is
Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a
More informationOutline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)
Outline Nondeterminism Regular expressions Elementary reductions http://www.cs.caltech.edu/~cs20/a October 8, 2002 1 Determistic Finite Automata A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F) Q is a finite
More informationFinite Automata. Seungjin Choi
Finite 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 / 28 Outline
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 informationNondeterministic Finite Automata
Nondeterministic Finite Automata Lecture 6 Section 2.2 Robb T. Koether Hampden-Sydney College Mon, Sep 5, 2016 Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016
More informationOperations on Unambiguous Finite Automata
Mathematical Institute, Slovak Academy of Sciences, Košice, Slovakia Joint work with Jozef Jirásek, Jr, and Juraj Šebej DLT 2016, Montréal, Québec, Canada Nondeterministic and Deterministic Finite Automata
More informationCSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )
CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) Sungjin Im University of California, Merced 2-3-214 Example II A ɛ B ɛ D F C E Example II A ɛ B ɛ D F C E NFA accepting
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) September, 24 2015 Last week was all about Deterministic Finite Automaton We saw three main
More informationCSC236 Week 11. Larry Zhang
CSC236 Week 11 Larry Zhang 1 Announcements Next week s lecture: Final exam review This week s tutorial: Exercises with DFAs PS9 will be out later this week s. 2 Recap Last week we learned about Deterministic
More informationInf2A: Converting from NFAs to DFAs and Closure Properties
1/43 Inf2A: Converting from NFAs to DFAs and Stuart Anderson School of Informatics University of Edinburgh October 13, 2009 Starter Questions 2/43 1 Can you devise a way of testing for any FSM M whether
More informationClosure under the Regular Operations
Closure under the Regular Operations Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have
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 information(Refer Slide Time: 0:21)
Theory of Computation Prof. Somenath Biswas Department of Computer Science and Engineering Indian Institute of Technology Kanpur Lecture 7 A generalisation of pumping lemma, Non-deterministic finite automata
More informationUnit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1
Unit 6 Non Regular Languages The Pumping Lemma Reading: Sipser, chapter 1 1 Are all languages regular? No! Most of the languages are not regular! Why? A finite automaton has limited memory. How can we
More informationNondeterministic Finite Automata. Nondeterminism Subset Construction
Nondeterministic Finite Automata Nondeterminism Subset Construction 1 Nondeterminism A nondeterministic finite automaton has the ability to be in several states at once. Transitions from a state on an
More informationIntro to Theory of Computation
Intro to Theory of Computation 1/19/2016 LECTURE 3 Last time: DFAs and NFAs Operations on languages Today: Nondeterminism Equivalence of NFAs and DFAs Closure properties of regular languages Sofya Raskhodnikova
More informationCSE 105 Theory of Computation Professor Jeanne Ferrante
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s agenda NFA Review and Design NFA s Equivalence to DFA s Another Closure Property proof for Regular Languages
More informationLet us first give some intuitive idea about a state of a system and state transitions before describing finite automata.
Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a
More informationDeterministic Finite Automata (DFAs)
Algorithms & Models of Computation CS/ECE 374, Spring 29 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, January 22, 29 L A TEXed: December 27, 28 8:25 Chan, Har-Peled, Hassanieh (UIUC) CS374 Spring
More informationRegular expressions and Kleene s theorem
and Informatics 2A: Lecture 5 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 25 September, 2014 1 / 26 1 More closure properties of regular languages Operations on languages
More informationConstructions on Finite Automata
Constructions on Finite Automata Informatics 2A: Lecture 4 Mary Cryan School of Informatics University of Edinburgh mcryan@inf.ed.ac.uk 24 September 2018 1 / 33 Determinization The subset construction
More informationState Complexity of Two Combined Operations: Catenation-Union and Catenation-Intersection
International Journal of Foundations of Computer Science c World Scientific Publishing Company State Complexity of Two Combined Operations: Catenation-Union and Catenation-Intersection Bo Cui, Yuan Gao,
More informationUses of finite automata
Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.
More informationComputer Sciences Department
1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 objectives Finite automaton Infinite automaton Formal definition State diagram Regular and Non-regular
More informationClasses and conversions
Classes and conversions Regular expressions Syntax: r = ε a r r r + r r Semantics: The language L r of a regular expression r is inductively defined as follows: L =, L ε = {ε}, L a = a L r r = L r L r
More informationGreat Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2
5-25 Great Theoretical Ideas in Computer Science Lecture 4: Deterministic Finite Automaton (DFA), Part 2 January 26th, 27 Formal definition: DFA A deterministic finite automaton (DFA) M =(Q,,,q,F) M is
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 informationCISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata
CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences
More informationCMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata
: Organization of Programming Languages Theory of Regular Expressions Finite Automata Previous Course Review {s s defined} means the set of string s such that s is chosen or defined as given s A means
More informationAdvanced Automata Theory 2 Finite Automata
Advanced Automata Theory 2 Finite Automata Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Advanced Automata Theory 2 Finite
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 2 1
Computational Models Lecture 2 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. March 16/18, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationRegular Expressions. Definitions Equivalence to Finite Automata
Regular Expressions Definitions Equivalence to Finite Automata 1 RE s: Introduction Regular expressions are an algebraic way to describe languages. They describe exactly the regular languages. If E is
More informationReversal of Regular Languages and State Complexity
Reversal of Regular Languages and State Complexity Juraj Šebej Institute of Computer Science, Faculty of Science, P. J. Šafárik University, Jesenná 5, 04001 Košice, Slovakia juraj.sebej@gmail.com Abstract.
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 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 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 informationFinite Automata and Regular Languages (part III)
Finite Automata and Regular Languages (part III) Prof. Dan A. Simovici UMB 1 / 1 Outline 2 / 1 Nondeterministic finite automata can be further generalized by allowing transitions between states without
More informationHomework Assignment 6 Answers
Homework Assignment 6 Answers CSCI 2670 Introduction to Theory of Computing, Fall 2016 December 2, 2016 This homework assignment is about Turing machines, decidable languages, Turing recognizable languages,
More informationLanguages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)
Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting
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 informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 2 January 5, 2018 January 5, 2018 CS21 Lecture 2 1 Outline Finite Automata Nondeterministic Finite Automata Closure under regular operations NFA, FA equivalence
More informationNotes on State Minimization
U.C. Berkeley CS172: Automata, Computability and Complexity Handout 1 Professor Luca Trevisan 2/3/2015 Notes on State Minimization These notes present a technique to prove a lower bound on the number of
More informationDecision, Computation and Language
Decision, Computation and Language Non-Deterministic Finite Automata (NFA) Dr. Muhammad S Khan (mskhan@liv.ac.uk) Ashton Building, Room G22 http://www.csc.liv.ac.uk/~khan/comp218 Finite State Automata
More informationTakeaway Notes: Finite State Automata
Takeaway Notes: Finite State Automata Contents 1 Introduction 1 2 Basics and Ground Rules 2 2.1 Building Blocks.............................. 2 2.2 The Name of the Game.......................... 2 3 Deterministic
More informationTheory of Computation (II) Yijia Chen Fudan University
Theory of Computation (II) Yijia Chen Fudan University Review A language L is a subset of strings over an alphabet Σ. Our goal is to identify those languages that can be recognized by one of the simplest
More informationLanguages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:
Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings
More informationCS 208: Automata Theory and Logic
CS 28: Automata Theory and Logic b a a start A x(la(x) y(x < y) L b (y)) B b Department of Computer Science and Engineering, Indian Institute of Technology Bombay of 32 Nondeterminism Alternation 2 of
More informationComputational Models - Lecture 1 1
Computational Models - Lecture 1 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. February 29/ March 02, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames
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 informationConstructions on Finite Automata
Constructions on Finite Automata Informatics 2A: Lecture 4 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 23rd September, 2014 1 / 29 1 Closure properties of regular languages
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 informationModel-Based Estimation and Inference in Discrete Event Systems
Model-Based Estimation and Inference in Discrete Event Systems State Estimation and Fault Diagnosis in Automata Notes for ECE 800 (Spring 2013) Christoforos N. Hadjicostis Contents 1 Finite Automata:
More informationFurther discussion of Turing machines
Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will
More informationExamples of Regular Expressions. Finite Automata vs. Regular Expressions. Example of Using flex. Application
Examples of Regular Expressions 1. 0 10, L(0 10 ) = {w w contains exactly a single 1} 2. Σ 1Σ, L(Σ 1Σ ) = {w w contains at least one 1} 3. Σ 001Σ, L(Σ 001Σ ) = {w w contains the string 001 as a substring}
More informationNondeterministic finite automata
Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the
More informationDeterministic Finite Automaton (DFA)
1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular
More informationFORMAL 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 informationRegular expressions and Kleene s theorem
and Kleene s theorem Informatics 2A: Lecture 5 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 29 September 2016 1 / 21 1 More closure properties of regular languages Operations
More informationAutomata and Languages
Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Nondeterministic Finite Automata with empty moves (-NFA) Definition A nondeterministic finite automaton
More information