270 likes | 520 Views
Erik Jonsson School of Engineering and Computer Science. CS 4384 – 001. Automata Theory. http://www.utdallas.edu/~pervin. Thur sday: Read Chapter 1 Look at Ullman’s Lecture 1. Tues day 1-14-14. FEARLESS Engineering. www.utdallas.edu/~pervin. Erik Jonsson School of Engineering
E N D
Erik Jonsson School of Engineering and Computer Science CS 4384– 001 Automata Theory http://www.utdallas.edu/~pervin Thursday: Read Chapter 1 Look at Ullman’s Lecture 1 Tuesday 1-14-14 FEARLESS Engineering www.utdallas.edu/~pervin
Erik Jonsson School of Engineering and Computer Science Dr. William J. Pervin Professor Emeritus of Mathematics, Electrical and Computer Engineering, University of Texas at Dallas Head, Computer Engineering Program (ret.) Master, College of Engineering (ret.) Head, Computer Science Department (ret) Director, UT Regional Comp. Center (ret.) Chair, Mathematics Department (ret.) Office: ECSN 4.626 E-mail: pervin@utdallas.edu FEARLESS Engineering www.utdallas.edu/~pervin
cs4384SylS2014.docx TEXT “Theory of Computation” by Anil Maheshwari & Michiel Smid of Carleton University (Free Download) Theory of Computation ADDITIONAL MATERIAL “Automata Theory” web-course by J. Ullman on coursera (Free Download) Ullman JFLAP computer program and tutorial (Free Download) JFLAP Syllabus Remember these FREE items at course evaluation time, please.
Hopcroft & Ullman, Intro. to Automata Theory, Languages, and Computation (~$135) • Lewis & Papadimitriou, Elements of the Theory of Computation • Martin, Intro. to Languages and the Theory of Computation (B&N $174) • Sipser, Intro. to the Theory of Computation (~$150 for newest edition) < (Other section) • [see eLearning for this book material] http://meminagaoglu.yasar.edu.tr/wp-content/uploads/2012/10/Introduction-To-The-Theory-Of-Computation-Michael-Sipser.pdf • Du(UTD) & Ko, Problem Solving in Automata, Languages, and Complexity (e-book $160) RESERVE BOOK LIST
A variety of properties concerning the models, grammars, and languages will be proven. • The existence or non-existence of algorithms for processing languages and language processors will be proven. • These algorithms form the basis of tools for processing languages, e.g., parsers, compilers, assemblers, etc. • Other algorithms will form the basis of tools that automatically construct language processors, e.g., yacc, lex, etc. Note that our perspective will be similar to, yet different from a compiler class. • Additionally, some things will be proven to be non-computable, e.g., the enhanced compiler. Practical Applications
The set of all strings over S is S* M&S, pp. 6-7
CHAPTER ONE 1.3 Proof Techniques 1.3.6 Proof by Induction Note: Pigeon Hole Principle
CS 4384 14 January 2014 HOMEWORK 0 Due 16 January 2014 Keep copies of your homework; they probably will not be returned but instead submitted to ABET/SACS for accreditation
L(M) = {w | w is a string over Σ and M “accepts” w} FINITEAUTOMATAFinite State MachinesDeterministic Finite Automata
Deterministic Finite State Automata (DFA) …….. • One-way, infinite tape, broken into cells • One-way, read-only tape head. • Finite control, I.e., a program, containing the position of the read head, current symbol being scanned, and the current “state.” • A string is placed on the tape, read head is positioned at the left end, and the DFA will read the string one symbol at a time until all symbols have been read. The DFA will then either accept or reject. Finite Control
Formal Definition of a DFA A DFA is a five-tuple: M = (Q, Σ, δ, q0, F) Q A finite set of states Σ A finite input alphabet q0 The initial/starting state, q0 is in Q F A set of final/accepting states, which is a subset of Q δ A transition function, which is a total function from Q x Σ to Q δ: (Q x Σ) –> Q δ is defined for any q in Q and s in Σ, and δ(q, s) = q’ is equal to some state q’ in Q, could be q’=q Intuitively, δ(q, s) is the state entered by M after reading symbol s while in state q.
Example: Sudkamp 2.6Strings over {a,b,c} in which all the a’s precede the b’s, which in turn precede the c’s. State Diagram JFLAP
M&S p. 26 Extension to Strings
Example: Sudkamp 2.8Strings over {a,b} in which the substring aa occurs exactly once.
Example: Sudkamp 2-22The set of strings over {a,b} with an even number of a’s and an even number of b’s.
Example: Sudkamp 2-13The set of strings over {a,b,c} such that every b is immediately followed by at least one c.
a b b b a q4 q1 q2 q5 q6 q3 q7 a b b a/b a q0 a b a b a Give a DFA M such that: L(M) = {x | x is a string of a’s and b’s such that x contains both aa and bb}
Language • A language is a set of strings. For example, {0, 1}, {all English words}, {ε=00, 01, 02, ...} are all languages. • The following are operations on sets and hence also on languages. Union: A U B Intersection: A ∩ B Difference: A \ B (also A - B) Complement: A = Σ* - A where Σ* is the set of all strings on alphabet Σ. _
A language is regular iff it is accepted by a (deterministic) finite automata. REGULAR LANGUAGES
CS 4384 14 January 2014 HOMEWORK 1Due: 21 JANUARY 2014 Written carefully on 8.5x11 white paper as for your boss!
Concatenation: • For example, {0, 1}{1, 2} = {01, 02, 11, 12}. • Especially, we denote A = A, A = AA, ..., and define A = {ε}. 2 1 0 Concatenation of Languages
Kleene closure: A* = A U A U A U ··· • Notation: A = A U A U A U ··· 0 1 2 + 1 2 3 Kleene Closure
What is ? • What is ? • What is ? Where is the empty language.
0/1 0/1 0/1 q1 q0 q0 q0 q1 0/1 0/1 q0 Let Σ = {0, 1}. Give DFAs for {}, {ε}, Σ*, and Σ+. For {}: For {ε}: For Σ*: For Σ+: 0/1
Regular Languages • The concept of regular languages on an alphabet Σ is defined recursively as follows: (1) The empty language is regular. (2) For every symbol a Σ, {a} is regular. (3) If A and B are regular languages, then A U B, AB, and A* are regular. (4) Nothing else is a regular language.