Friday Four Square! Today at 4:15PM, Outside Gates
|
|
- Rosanna McDonald
- 7 years ago
- Views:
Transcription
1 Pushdown Automata
2 Friday Four Square! Today at 4:15PM, Outside Gates
3 Announcements Problem Set 5 due right now Or Monday at 2:15PM with a late day. Problem Set 6 out, due next Friday, November 9. Covers context-free languages, CFGs, and PDAs. Midterm and Problem Set 4 should be graded by Monday.
4 Generation vs. Recognition We saw two approaches to describe regular languages: Build automata that accept precisely strings in language. Design regular expressions that describe precisely strings in language. Regular expressions generate all of strings in language. Useful for listing off all strings in language. Finite automata recognize all of strings in language. Useful for detecting wher a specific string is in language.
5 Context-Free Languages Yesterday, we saw context-free languages, which are those that can be generated by context-free grammars. Is re some way to build an automaton that can recognize context-free languages?
6 The Problem Finite automata accept precisely regular languages. We may need unbounded memory to recognize context-free languages. e.g. { 0n 1 n n N } requires unbounded counting. How do we build an automaton with finitely many states but unbounded memory?
7 The The finite-state finite-state control control acts acts as as a a finite finite memory. memory. The The input input tape tape holds holds input input string. string. A B C A... Memory Device We We can can add add an an infinite infinite memory memory device device finite-state finite-state control control can can use use to to store store information. information.
8 Adding Memory to Automata We can augment a finite automaton by adding in a memory device for automaton to store extra information. The finite automaton now can base its transition on both current symbol being read and values stored in memory. The finite automaton can issue commands to memory device whenever it makes a transition. e.g. add new data, change existing data, etc.
9 Stack-Based Memory Only top of stack is visible at any point in time. New symbols may be pushed onto stack, which cover up old stack top. The top symbol of stack may be popped, exposing symbol below it.
10 Pushdown Automata A pushdown automaton (PDA) is a finite automaton equipped with a stack-based memory. Each transition is based on current input symbol and top of stack, optionally pops top of stack, and optionally pushes new symbols onto stack. Initially, stack holds a special symbol Z 0 that indicates bottom of stack.
11 Our First PDA Consider language L = { w Σ* w is a string of balanced digits } over Σ = { 0, 1 } We can exploit stack to our advantage: Whenever we see a 0, push it onto stack. Whenever we see a 1, pop corresponding 0 from stack (or fail if not matched) When input is consumed, if stack is empty, accept.
12 A Simple Pushdown Automaton start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε To To find find an an applicable applicable transition, transition, match match current current input/stack input/stack pair. pair. A A transition transition of of form form a, a, b z Means Means If If current current input input symbol symbol is is a a and and current current stack stack symbol symbol is is b, b, n n follow follow this this transition, transition, pop pop b, b, and and push push string string z. z. Z
13 A Simple Pushdown Automaton start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε If If a a transition transition reads reads top top symbol symbol of of stack, stack, it it always always pops pops that that symbol symbol (though (though it it might might replace replace it) it)
14 A Simple Pushdown Automaton start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε Each Each transition transition n n pushes pushes some some (possibly (possibly empty) empty) string string back back onto onto stack. stack. Notice Notice that that leftmost leftmost symbol symbol is is pushed pushed onto onto top. top. 0 Z
15 A Simple Pushdown Automaton start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε We We now now push push string string ε ε onto onto stack, stack, which which adds adds no no new new characters. characters. This This essentially essentially means means pop pop stack. stack. 0 0 Z
16 A Simple Pushdown Automaton start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε This This transition transition can can be be taken taken at at any any time time Z Z 0 is 0 is atop atop stack, stack, but but we've we've nondeterministically nondeterministically guessed guessed that that this this would would be be a a good good time time to to take take it. it. Z
17 A Simple Pushdown Automaton start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε
18 Pushdown Automata Formally, a pushdown automaton is a nondeterministic machine defined by 7-tuple (Q, Σ, Γ, δ, q 0, Z 0, F), where Q is a finite set of states, Σ is an alphabet, Γ is stack alphabet of symbols that can be pushed on stack, δ : Q Σ ε Γ ε (Q Γ*) is transition function, where no tuple is mapped to an infinite set, q 0 Q is start state, Z 0 Γ is stack start symbol, and F Q is set of accepting states. The automaton accepts if it ends in an accepting state with no input remaining.
19 The Language of a PDA The language of a PDA is set of strings that PDA accepts: L(P) = { w Σ* P accepts w } If P is a PDA where ( L P) = L, we say that P recognizes L.
20 A Note on Terminology Finite automata are highly standardized. There are many equivalent but different definitions of PDAs. The one we will use is a slight variant on one described in Sipser. Sipser does not have a start stack symbol. Sipser does not allow transitions to push multiple symbols onto stack. Feel free to use eir this version or Sipser's; two are equivalent to one anor.
21 A PDA for Palindromes A palindrome is a string that is same forwards and backwards. Let Σ = {0, 1} and consider language PALINDROME = { w Σ* w is a palindrome }. How would we build a PDA for PALINDROME? Idea: Push first half of symbols on to stack, n verify that second half of symbols match. Nondeterministically guess when we've read half of symbols. This handles even-length strings; we'll see a cute trick to handle odd-length strings in a minute.
22 A PDA for Palindromes start 0, ε 0 1, ε 1 This transition indicates that transition does not pop anything from stack. It just pushes on a new symbol instead.
23 A PDA for Palindromes start Σ, ε Σ The The Σ Σ here here refers refers to to same same symbol symbol in in both both contexts. contexts. It It is is a a shorthand shorthand for for treat treat any any symbol symbol in in Σ Σ this this way way
24 A PDA for Palindromes Σ, ε Σ start ε, ε ε This This transition transition means means don't don't consume consume any any input, input, don't don't change change top top of of stack, stack, and and don't don't add add anything anything to to a a stack. stack. It's It's equivalent equivalent of of an an ε ε -transition -transition in in an an NFA. NFA.
25 A PDA for Palindromes start Σ, ε Σ Σ, Σ ε ε, ε ε Σ, ε ε ε, Z 0 ε This This transition transition lets lets us us consume consume one one character character before before we we start start matching matching what what we we just just saw. saw. This This lets lets us us match match odd-length odd-length palindromes palindromes
26 A Note on Nondeterminism In a PDA, if re are multiple nondeterministic choices, you cannot treat machine as being in multiple states at once. Each state might have its own stack associated with it. Instead, re are multiple parallel copies of machine running at once, each of which has its own stack.
27 A PDA for Arithmetic Let Σ = { int, +, *, (, ) } and consider language ARITH = { w Σ* w is a legal arithmetic expression } Examples: int + int * int ((int + int) * (int + int)) + (int) Can we build a PDA for ARITH?
28 A PDA for Arithmetic start (, ε ( ), ( ε int, ε ε ε, Z 0 ε +, ε ε *, ε ε
29 Why PDAs Matter Recall: A language is context-free iff re is some CFG that generates it. Important, non-obvious orem: A language is context-free iff re is some PDA that recognizes it. Need to prove two directions: If L is context-free, n re is a PDA for it. If re is a PDA for L, n L is context-free. Part (1) is absolutely beautiful and we'll see it in a second. Part (2) is brilliant, but a bit too involved for lecture (you should read this in Sipser).
30 From CFGs to PDAs Theorem: If G is a CFG for a language L, n re exists a PDA for L as well. Idea: Build a PDA that simulates expanding out CFG from start symbol to some particular string. Stack holds part of string we haven't matched yet.
31 From CFGs to PDAs Example: Let Σ = { 1, } and let GE = { 1 m 1 n m, n N m n } GE GE GE GE One CFG for GE is following: S 1S1 1S How would we build a PDA for GE?
32 From CFGs to PDAs S 1S1 S 1S S ε, S 1S ε, S 1S1 ε, S Σ, Σ ε start ε, ε S ε, Z 0 Z 0
33 From CFGs to PDAs Make three states: start, parsing, and accepting. There is a transition ε, ε S from start to parsing. Corresponds to starting off with start symbol S. There is a transition ε, A ω from parsing to itself for each production A ω. Corresponds to predicting which production to use. There is a transition Σ, Σ ε from parsing to itself. Corresponds to matching a character of input. There is a transition ε, Z 0 Z 0 from parsing to accepting. Corresponds to completely matching input.
34 From CFGs to PDAs The PDA constructed this way is called a predict/match parser. Each step eir predicts which production to use or matches some symbol of input.
35 From PDAs to CFGs The or direction of proof (converting a PDA to a CFG) is much harder. Intuitively, create a CFG representing paths between states in PDA. Lots of tricky details, but a marvelous proof. It's just too large to fit into margins of this slide. Read Sipser for more details.
36 Regular and Context-Free Languages Theorem: Any regular language is context-free. Proof Sketch: Let L be any regular language and consider a DFA D for L. Then we can convert D into a PDA for L by converting any transition on a symbol a into a transition a, ε ε that ignores stack. This new PDA accepts L, so L is context-free. -ish
37 Refining Context-Free Languages
38 NPDAs and DPDAs With finite automata, we considered both deterministic (DFAs) and nondeterministic (NFAs) automata. So far, we've only seen nondeterministic PDAs (or NPDAs). What about deterministic PDAs (DPDAs)?
39 DPDAs A deterministic pushdown automaton is a PDA with extra property that For each state in PDA, and for any combination of a current input symbol and a current stack symbol, re is at most one transition defined. In or words, re is at most one legal sequence of transitions that can be followed for any input. This does not preclude ε-transitions, as long as re is never a conflict between following ε-transition or some or transition. However, re can be at most one ε-transition that could be followed at any one time. This does not preclude automaton dying from having no transitions defined; DPDAs can have undefined transitions.
40 Is this a DPDA? start 0, Z 0 0Z 0 0, , 0 ε ε, Z 0 ε
41 Is this a DPDA? This This ε-transition ε-transition is is allowable allowable because because no no or or transitions transitions in in this this state state use use input input symbol symbol 0 0 start 0, ε 0 0, , 0 ε ε, Z 0 Z 0 This This ε-transition ε-transition is is allowable allowable because because no no or or transitions transitions in in this this state state use use stack stack symbol symbol Z 0. 0.
42 Why DPDAs Matter Because DPDAs are deterministic, y can be simulated efficiently: Keep track of top of stack. Store an action/goto table that says what operations to perform on stack and what state to enter on each input/stack pair. Loop over input, processing input/stack pairs until automaton rejects or ends in an accepting state with all input consumed. If we can find a DPDA for a CFL, n we can recognize strings in that language efficiently.
43 If we can find a DPDA for a CFL, n we can recognize strings in that language efficiently. Can we guarantee that we can always find a DPDA for a CFL?
44 The Power of Nondeterminism When dealing with finite automata, re is no difference in power of NFAs and DFAs. However, when dealing with PDAs, re are CFLs that can be recognized by NPDAs that cannot be recognized by DPDAs. Simple example: The language of palindromes. How do you know when you've read half string? NPDAs are more powerful than DPDAs.
45 Deterministic CFLs A context-free language L is called a deterministic context-free language (DCFL) if re is some DPDA that recognizes L. Not all CFLs are DCFLs, though many important ones are. Balanced parenses, most programming languages, etc. Why Why are are all all regular regular languages languages DCFLs? DCFLs? Regular Languages DCFLs CFLs
46 Summary Automata can be augmented with a memory storage to increase ir power. PDAs are finite automata equipped with a stack. PDAs accept precisely context-free languages: Any CFG can be converted to a PDA. Any PDA can be converted to a CFG. Deterministic PDAs are strictly weaker than nondeterministic PDAs.
47 Next Time The Limits of CFLs A New Pumping Lemma Non-Closure Properties of CFLs Turing Machines An extremely powerful computing device......that is almost impossible to program.
Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.
Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free
More informationPushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile
Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along
More informationAutomata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
More informationFormal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
More information6.080/6.089 GITCS Feb 12, 2008. Lecture 3
6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my
More informationModel 2.4 Faculty member + student
Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email
More informationSRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN
Course Code : CS0355 SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN Course Title : THEORY OF COMPUTATION Semester : VI Course : June
More information6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)
More informationTuring Machines: An Introduction
CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,
More informationCS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.
CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write
More information3515ICT Theory of Computation Turing Machines
Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation
More informationFinite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream
More informationThe Halting Problem is Undecidable
185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine
More informationCS 301 Course Information
CS 301: Languages and Automata January 9, 2009 CS 301 Course Information Prof. Robert H. Sloan Handout 1 Lecture: Tuesday Thursday, 2:00 3:15, LC A5 Weekly Problem Session: Wednesday, 4:00 4:50 p.m., LC
More informationCSE 135: Introduction to Theory of Computation Decidability and Recognizability
CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing
More informationHonors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology
Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information
More informationRegular Languages and Finite State Machines
Regular Languages and Finite State Machines Plan for the Day: Mathematical preliminaries - some review One application formal definition of finite automata Examples 1 Sets A set is an unordered collection
More informationIntroduction to Automata Theory. Reading: Chapter 1
Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a
More informationCS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015
CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015 Course Info Instructor: Prof. Marvin K. Nakayama Office: GITC 4312 Phone: 973-596-3398 E-mail: marvin@njit.edu (Be sure
More informationAutomata and Formal Languages
Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
More informationComputer Science Theory. From the course description:
Computer Science Theory Goals of Course From the course description: Introduction to the theory of computation covering regular, context-free and computable (recursive) languages with finite state machines,
More informationComputational Models Lecture 8, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance
More informationIncreasing Interaction and Support in the Formal Languages and Automata Theory Course
Increasing Interaction and Support in the Formal Languages and Automata Theory Course Susan H. Rodger Duke University ITiCSE 2007 June 25, 2007 Supported by NSF Grant DUE 0442513. Outline Overview of JFLAP
More informationNotes on Complexity Theory Last updated: August, 2011. Lecture 1
Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look
More informationPhiladelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.
Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008 Course Syllabus Course Title: Theory of Computation Course Level: 3 Lecture Time: Course
More informationOverview of E0222: Automata and Computability
Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study
More informationTuring Machines, Part I
Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context
More informationRegular Expressions and Automata using Haskell
Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions
More informationIncreasing Interaction and Support in the Formal Languages and Automata Theory Course
Increasing Interaction and Support in the Formal Languages and Automata Theory Course [Extended Abstract] Susan H. Rodger rodger@cs.duke.edu Jinghui Lim Stephen Reading ABSTRACT The introduction of educational
More informationLecture 2: Universality
CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal
More informationGenetic programming with regular expressions
Genetic programming with regular expressions Børge Svingen Chief Technology Officer, Open AdExchange bsvingen@openadex.com 2009-03-23 Pattern discovery Pattern discovery: Recognizing patterns that characterize
More informationT-79.186 Reactive Systems: Introduction and Finite State Automata
T-79.186 Reactive Systems: Introduction and Finite State Automata Timo Latvala 14.1.2004 Reactive Systems: Introduction and Finite State Automata 1-1 Reactive Systems Reactive systems are a class of software
More informationCS 3719 (Theory of Computation and Algorithms) Lecture 4
CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a
More information6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008
MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
More informationFinite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automata Informally, a state machine that comprehensively captures all possible states and transitions that a machine can take while responding to a stream (or
More informationCAs and Turing Machines. The Basis for Universal Computation
CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.
More informationAutomata and Formal Languages. Push Down Automata. Sipser pages 109-114. Lecture 13. Tim Sheard 1
Automata and Formal Languages Push Down Automata Sipser pages 109-114 Lecture 13 Tim Sheard 1 Push Down Automata Push Down Automata (PDAs) are ε-nfas with stack memory. Transitions are labeled by an input
More informationImplementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP
International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation
More informationReading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
More informationProperties of Stabilizing Computations
Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA
More informationOn Winning Conditions of High Borel Complexity in Pushdown Games
Fundamenta Informaticae (2005) 1 22 1 IOS Press On Winning Conditions of High Borel Complexity in Pushdown Games Olivier Finkel Equipe de Logique Mathématique U.F.R. de Mathématiques, Université Paris
More informationAutomata on Infinite Words and Trees
Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:
More informationInformatique Fondamentale IMA S8
Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université Lille 1 - Polytech Lille
More informationComputer Architecture Syllabus of Qualifying Examination
Computer Architecture Syllabus of Qualifying Examination PhD in Engineering with a focus in Computer Science Reference course: CS 5200 Computer Architecture, College of EAS, UCCS Created by Prof. Xiaobo
More informationUsing Hands-On Visualizations to Teach Computer Science from Beginning Courses to Advanced Courses
Using Hands-On Visualizations to Teach Computer Science from Beginning Courses to Advanced Courses Susan H. Rodger Department of Computer Science Duke University Durham, NC 27705 rodger@cs.duke.edu Abstract
More informationPushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain
Pushdown Automata transparencies made for a course at the International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Hendrik Jan Hoogeboom, Leiden http://www.liacs.nl/
More informationLecture I FINITE AUTOMATA
1. Regular Sets and DFA Lecture I Page 1 Lecture I FINITE AUTOMATA Lecture 1: Honors Theory, Spring 02, Yap We introduce finite automata (deterministic and nondeterministic) and regular languages. Some
More information1 Definition of a Turing machine
Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,
More informationC H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
More informationCompiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
More informationComposability of Infinite-State Activity Automata*
Composability of Infinite-State Activity Automata* Zhe Dang 1, Oscar H. Ibarra 2, Jianwen Su 2 1 Washington State University, Pullman 2 University of California, Santa Barbara Presented by Prof. Hsu-Chun
More informationCourse Manual Automata & Complexity 2015
Course Manual Automata & Complexity 2015 Course code: Course homepage: Coordinator: Teachers lectures: Teacher exercise classes: Credits: X_401049 http://www.cs.vu.nl/~tcs/ac prof. dr. W.J. Fokkink home:
More informationDiagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.
Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity
More information(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
More informationNFAs with Tagged Transitions, their Conversion to Deterministic Automata and Application to Regular Expressions
NFAs with Tagged Transitions, their Conversion to Deterministic Automata and Application to Regular Expressions Ville Laurikari Helsinki University of Technology Laboratory of Computer Science PL 9700,
More informationFinite Automata and Regular Languages
CHAPTER 3 Finite Automata and Regular Languages 3. Introduction 3.. States and Automata A finite-state machine or finite automaton (the noun comes from the Greek; the singular is automaton, the Greek-derived
More information24 Uses of Turing Machines
Formal Language and Automata Theory: CS2004 24 Uses of Turing Machines 24 Introduction We have previously covered the application of Turing Machine as a recognizer and decider In this lecture we will discuss
More informationThe Classes P and NP
The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the
More informationFast nondeterministic recognition of context-free languages using two queues
Fast nondeterministic recognition of context-free languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a context-free language nondeterministically in O( n log
More informationω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:
ω-automata ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear: in verification, as encodings of non-terminating executions of a program. in arithmetic,
More informationÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 15 april 2003. Master Edition
ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK 5 april 23 Master Edition CONTEXT FREE LANGUAGES & PUSH-DOWN AUTOMATA CONTEXT-FREE GRAMMARS, CFG Problems Sudkamp Problem. (3.2.) Which language generates the grammar
More informationCS5236 Advanced Automata Theory
CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 2012-2013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then
More informationCourse Syllabus. Also listed as CS 5349.0U1 Automata Theory (http://go.utdallas.edu/cs5349.0u1.14u)
Course Syllabus Course Information CS 4384.0U1 Automata Theory Summer 2014 TR 3-5:15PM. ECSS 2.312 3 Semester Hours UTD Coursebook: http://go.utdallas.edu/cs4384.0u1.14u Also listed as CS 5349.0U1 Automata
More informationPush-down Automata and Context-free Grammars
14 Push-down Automata and Context-free Grammars This chapter details the design of push-down automata (PDA) for various languages, the conversion of CFGs to PDAs, and vice versa. In particular, after formally
More informationScanner. tokens scanner parser IR. source code. errors
Scanner source code tokens scanner parser IR errors maps characters into tokens the basic unit of syntax x = x + y; becomes = + ; character string value for a token is a lexeme
More informationDeterministic Finite Automata
1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function
More informationFinite Automata and Formal Languages
Finite Automata and Formal Languages TMV026/DIT321 LP4 2011 Ana Bove Lecture 1 March 21st 2011 Course Organisation Overview of the Course Overview of today s lecture: Course Organisation Level: This course
More informationComputability Theory
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.
More informationChapter 7 Uncomputability
Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction
More informationAutomata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi
Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the
More informationTwo-dimensional Languages
Charles University Faculty of Mathematics and Physics Mgr. Daniel Průša Two-dimensional Languages Doctoral Thesis Supervisor: Martin Plátek, CSc. Prague, 2004 Acknowledgements The results presented in
More informationCS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing
CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing Handout written by Maggie Johnson and revised by Julie Zelenski. Bottom-up parsing As the name suggests, bottom-up parsing works in the opposite
More information1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:
Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of
More informationSimulation-Based Security with Inexhaustible Interactive Turing Machines
Simulation-Based Security with Inexhaustible Interactive Turing Machines Ralf Küsters Institut für Informatik Christian-Albrechts-Universität zu Kiel 24098 Kiel, Germany kuesters@ti.informatik.uni-kiel.de
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata A C Norman, Lent Term 1996 Part IA 1 Introduction This course is short, but it is present in Part 1A because of the way it introduces links between many different
More informationMath Workshop October 2010 Fractions and Repeating Decimals
Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,
More informationKenken For Teachers. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles June 27, 2010. Abstract
Kenken For Teachers Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles June 7, 00 Abstract Kenken is a puzzle whose solution requires a combination of logic and simple arithmetic skills.
More informationMathematical Induction
Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How
More informationIntrusion Detection via Static Analysis
Intrusion Detection via Static Analysis IEEE Symposium on Security & Privacy 01 David Wagner Drew Dean Presented by Yongjian Hu Outline Introduction Motivation Models Trivial model Callgraph model Abstract
More informationMACM 101 Discrete Mathematics I
MACM 101 Discrete Mathematics I Exercises on Combinatorics, Probability, Languages and Integers. Due: Tuesday, November 2th (at the beginning of the class) Reminder: the work you submit must be your own.
More informationCSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions
CSC45 AUTOMATA 2. Finite Automata: Examples and Definitions Finite Automata: Examples and Definitions A finite automaton is a simple type of computer. Itsoutputislimitedto yes to or no. It has very primitive
More informationAutomata, languages, and grammars
Automata, languages, and grammars Cristopher Moore January 24, 2015 Abstract These lecture notes are intended as a supplement to Moore and Mertens The Nature of Computation, and are available to anyone
More informationTwo Way F finite Automata and Three Ways to Solve Them
An Exponential Gap between LasVegas and Deterministic Sweeping Finite Automata Christos Kapoutsis, Richard Královič, and Tobias Mömke Department of Computer Science, ETH Zürich Abstract. A two-way finite
More informationDiscrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2
CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us
More information03 - Lexical Analysis
03 - Lexical Analysis First, let s see a simplified overview of the compilation process: source code file (sequence of char) Step 2: parsing (syntax analysis) arse Tree Step 1: scanning (lexical analysis)
More informationTHE TURING DEGREES AND THEIR LACK OF LINEAR ORDER
THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.
More informationIntroduction to Turing Machines
Automata Theory, Languages and Computation - Mírian Halfeld-Ferrari p. 1/2 Introduction to Turing Machines SITE : http://www.sir.blois.univ-tours.fr/ mirian/ Automata Theory, Languages and Computation
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationUniversality in the theory of algorithms and computer science
Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)
More informationHow To Compare A Markov Algorithm To A Turing Machine
Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also
More informationLecture summary for Theory of Computation
Lecture summary for Theory of Computation Sandeep Sen 1 January 8, 2015 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E- mail:ssen@cse.iitd.ernet.in Contents 1 The
More information1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)
Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:
More informationFINITE STATE AND TURING MACHINES
FINITE STATE AND TURING MACHINES FSM With Output Without Output (also called Finite State Automata) Mealy Machine Moore Machine FINITE STATE MACHINES... 2 INTRODUCTION TO FSM S... 2 STATE TRANSITION DIAGRAMS
More informationTesting LTL Formula Translation into Büchi Automata
Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland
More information2110711 THEORY of COMPUTATION
2110711 THEORY of COMPUTATION ATHASIT SURARERKS ELITE Athasit Surarerks ELITE Engineering Laboratory in Theoretical Enumerable System Computer Engineering, Faculty of Engineering Chulalongkorn University
More information4.6 The Primitive Recursive Functions
4.6. THE PRIMITIVE RECURSIVE FUNCTIONS 309 4.6 The Primitive Recursive Functions The class of primitive recursive functions is defined in terms of base functions and closure operations. Definition 4.6.1
More informationCPS 140 - Mathematical Foundations of CS Dr. S. Rodger Section: Properties of Context-Free Languages èhandoutè Section 3.5 Which of the following languages are CFL? æ L=fa n b n c j j 0 énçjg æ L=fa n
More informationAlgebraic Computation Models. Algebraic Computation Models
Algebraic Computation Models Ζυγομήτρος Ευάγγελος ΜΠΛΑ 201118 Φεβρουάριος, 2013 Reasons for using algebraic models of computation The Turing machine model captures computations on bits. Many algorithms
More informationThe Graphical Method: An Example
The Graphical Method: An Example Consider the following linear program: Maximize 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2 0, where, for ease of reference,
More information