Automata Theory, Computability and Complexity
|
|
- Quentin Stafford
- 6 years ago
- Views:
Transcription
1 Automata Theory, Computability and Complexity Mridul Aanjaneya Stanford University June 26, 22 Mridul Aanjaneya Automata Theory / 64
2 Course Staff Instructor: Mridul Aanjaneya Office Hours: 2:PM - 4:PM, Gates 26 (Mon). Course Assistant: Sean Kandel Office Hours: 6:PM - 8:PM, Gates 372 (Tue/Thu). Textbook: Michael T. Sipser, Introduction to the Theory of Computation (second edition). Website: Discussion: Lore ( Access code: R4ML4Z Mridul Aanjaneya Automata Theory 2/ 64
3 Course Reuirements Homework Midterm Final (optional) Note: Final grade will be computed from Homework (6%) and best of Midterm/Final (4%). Projected grade will be out one week before the Final, taking Homework (6%) and Midterm (4%). Can skip Final if satisfied with grade. Can collaborate on homeworks, but separate write-up per person and must mention collaborators. 4 homeworks, 2 free late days, use them however you want. No late days for final homework. Mridul Aanjaneya Automata Theory 3/ 64
4 Why Study Automata? Regular expressions: are used in many systems, e.g., UNIX. DTD s describe XML tags with RE like format. Finite automata model protocols, electronic circuits. Theory is used in model-checking. Context free languages: are used as syntax descriptors for PL s, parsers (YACC). have an important role in describing natural languages. find use in procedural modeling. Mridul Aanjaneya Automata Theory 4/ 64
5 Course Outline Deterministic/Nondeterministic finite automata. Regular expressions. Decision/closure properties of regular languages. Context-free languages. Parse trees. Normal forms. Pushdown automata. Euivalence of CFG s and PDA s. Pumping lemma for CFL s. Properties of CFL s. Enumerations, Turing machines. Undecidable problems. NP-completeness. Satisfiability. Cook s theorem. Mridul Aanjaneya Automata Theory 5/ 64
6 Automata, Computability and Complexity Main Question: What are the fundamental capabilities and limitations of computers? Dates back to the 93s. Different interpretations in all three areas. Mridul Aanjaneya Automata Theory 6/ 64
7 Complexity Question Why are some problems hard and others easy? Subset sum: Given a set of integers, does any non-empty subset of them add up to zero? So far only a classification according to hardness. Can help alter the root of difficulty, settle for an approximate solution, some problems are hard only in the worst case. Mridul Aanjaneya Automata Theory 7/ 64
8 Computability Question Which problems are solvable? Halting problem: Given an arbitrary computer program, decide if it finishes or continues running forever. Computability and complexity are closely related. Mridul Aanjaneya Automata Theory 8/ 64
9 Automata Deals with different models of computation. Mridul Aanjaneya Automata Theory 9/ 64
10 Preliminaries: Mathematical Induction Mridul Aanjaneya Automata Theory / 64
11 Preliminaries: Mathematical Induction Example Prove that n 2 is n(n+)(2n+) 6. Basis (n=): (+)(2 +) 6 = = = 2. Induction: Let P(n) := n 2 is n(n+)(2n+) 6. P(n + ) = { n 2 } + (n + ) 2 = { n(n+)(2n+) 6 } + (n + ) 2 = (n + ) n(2n+)+6n+6 6 = (n + ) 2n 2 +7n+6 6 { } = (n + ) 2n 2 +4n+3n+6 6 = (n+)(n+2)(2n+3) 6 Since P() is true and P(n) P(n + ), we conclude that P(n) is true for all n. Mridul Aanjaneya Automata Theory / 64
12 Preliminaries: Graphs Undirected graph Mridul Aanjaneya Automata Theory 2/ 64
13 Preliminaries: Graphs Degree of a vertex Mridul Aanjaneya Automata Theory 3/ 64
14 Preliminaries: Graphs Subgraph Mridul Aanjaneya Automata Theory 4/ 64
15 Preliminaries: Graphs Path Mridul Aanjaneya Automata Theory 5/ 64
16 Preliminaries: Graphs Cycle Mridul Aanjaneya Automata Theory 6/ 64
17 Preliminaries: Graphs Directed graph Mridul Aanjaneya Automata Theory 7/ 64
18 Preliminaries: Pigeonhole Principle Pigeonhole Principle If there are n + pigeons and n pigeonholes, then some pigeonhole must contain at least two pigeons. Mridul Aanjaneya Automata Theory 8/ 64
19 Preliminaries: Pigeonhole Principle Generalized Pigeonhole Principle If there are kn + pigeons and n pigeonholes, then some pigeonhole must contain at least k + pigeons. Mridul Aanjaneya Automata Theory 9/ 64
20 Preliminaries: Pigeonhole Principle Example Given twelve integers, show that two of them can be chosen whose difference is divisible by. Example 2 Twenty-five crates of apples are delivered to a store. The apples are of three different sorts, and all the apples in each crate are of the same sort. Show that among these crates there are at least nine containing the same sort of apple. Example 3 Show that in any group of five people, there are two who have an identical number of friends within the group. Mridul Aanjaneya Automata Theory 2/ 64
21 Alphabet An alphabet is any finite set of symbols. Some examples include: ASCII, {,} (binary), {a,b,c}. The set of strings over an alphabet Σ is the set of lists, each element of which is a member of Σ. Note: Strings are shown with no commas, e.g., abc,. Σ denotes this set of strings. ε stands for the empty string (string of length ). Example: For the alphabet Σ = {, }, the set of strings in Σ is: {ε,,,,,,,,,,,,,,,...} For the alphabet Σ = {a, b, c}, the set of strings in Σ is: {ε,a,b,c,aa,ab,ac,ba,bb,bc,ca,cb,cc,...} Mridul Aanjaneya Automata Theory 2/ 64
22 Alphabet An alphabet is any finite set of symbols. Some examples include: ASCII, {,} (binary), {a,b,c}. The set of strings over an alphabet Σ is the set of lists, each element of which is a member of Σ. Note: Strings are shown with no commas, e.g., abc,. Σ denotes this set of strings. ε stands for the empty string (string of length ). Example: For the alphabet Σ = {, }, the set of strings in Σ is: {ε,,,,,,,,,,,,,,,...} Subtlety: as a string, and as an alphabet look the same. Context determines the type. Mridul Aanjaneya Automata Theory 22/ 64
23 Languages A language is a subset of Σ for some alphabet Σ. Example : The set of strings over {,} with no two consecutive s. {ε,,,,,,,,,,,,,,,,,,,...} Example 2: The set of strings over {a,b,c} with uneual number of a s and b s. {a,b,aa,ac,bb,bc,ca,cb,aaa,bbb,aab,baa,aba,aac,caa, aca,bbc,cbb,bcb,bba,abb,bab,cca,ccb,cac,cbc,bcc,acc,...} Mridul Aanjaneya Automata Theory 23/ 64
24 Finite Automata Informally, finite automata are finite collections of states with transition rules for going from one state to another. There is a start state and (one or more) accept states. Representation: Simplest representation is often a graph. Nodes denote states, and arcs indicate state transitions. Labels on arcs denote the cause of transition. 2 The above automaton only accepts binary strings ending in. Mridul Aanjaneya Automata Theory 24/ 64
25 An example 2 Mridul Aanjaneya Automata Theory 25/ 64
26 An example 2 Mridul Aanjaneya Automata Theory 26/ 64
27 An example 2 Mridul Aanjaneya Automata Theory 27/ 64
28 An example 2 Mridul Aanjaneya Automata Theory 28/ 64
29 An example 2 Mridul Aanjaneya Automata Theory 29/ 64
30 An example 2 Mridul Aanjaneya Automata Theory 3/ 64
31 An example 2 Mridul Aanjaneya Automata Theory 3/ 64
32 An example 2 Mridul Aanjaneya Automata Theory 32/ 64
33 An example 2 Mridul Aanjaneya Automata Theory 33/ 64
34 An example 2 Mridul Aanjaneya Automata Theory 34/ 64
35 An example 2 Mridul Aanjaneya Automata Theory 35/ 64
36 An example 2 Mridul Aanjaneya Automata Theory 36/ 64
37 An example 2 Mridul Aanjaneya Automata Theory 37/ 64
38 An example 2 Mridul Aanjaneya Automata Theory 38/ 64
39 An example 2 Mridul Aanjaneya Automata Theory 39/ 64
40 An example Accept! 2 Mridul Aanjaneya Automata Theory 4/ 64
41 An example Exercise: Verify that is rejected. 2 Mridul Aanjaneya Automata Theory 4/ 64
42 Deterministic Finite Automata Definition A DFA is a 5-tuple (Q, Σ, δ,, F ) consisting of: A finite set of states Q, A set of input alphabets Σ, A transition function δ : Q Σ Q, A start state, and A set of accept states F Q. The transition function δ: Takes two arguments, a state and an alphabet a. δ(,a) = the state the DFA goes to when it is in state and the alphabet a is received. Mridul Aanjaneya Automata Theory 42/ 64
43 Graph representation of DFA s Nodes correspond to states. Arcs represent transition function. Arc from state p to state labeled by all those input symbols that have transitions from p to. Incoming arrow from outside denotes start state. Accept states indicated by double circles. 2, 3 Accepts all binary strings without two consecutive s. Mridul Aanjaneya Automata Theory 43/ 64
44 Example 2, 3 Mridul Aanjaneya Automata Theory 44/ 64
45 Example 2, 3 Mridul Aanjaneya Automata Theory 45/ 64
46 Example 2, 3 Mridul Aanjaneya Automata Theory 46/ 64
47 Example 2, 3 Mridul Aanjaneya Automata Theory 47/ 64
48 Example 2, 3 Mridul Aanjaneya Automata Theory 48/ 64
49 Transition table for DFA s A row for each state, a column for each alphabet. Accept states are starred. Arrow for the start state. 2, 3 Mridul Aanjaneya Automata Theory 49/ 64
50 Extended transition function Effect of a string on a DFA can be described by extending δ to a state and a string. Induction on length of the input string. Basis: δ(,ε)= Induction: δ(,wa)=δ(δ(,w),a) w is a string, a is an input alphabet. Convention: w,x,y,... are strings, a,b,c,... are alphabets. For a DFA, extended δ is computed for state and inputs a a 2...a n by following a path starting at and selecting arcs with labels a,a 2,...,a n in turn. Mridul Aanjaneya Automata Theory 5/ 64
51 Example using transition table δ( 2, ) = δ(δ( 2, ), ) = δ(δ(δ( 2, ), ), ) = δ(δ(, ), ) = δ( 2, ) = 3 2, 3 Mridul Aanjaneya Automata Theory 5/ 64
52 Language of a DFA Automata of all kinds define languages. If A is an automaton, L(A) is its language. For a DFA A, L(A) is the set of strings labeling paths from the start state to an accept state. Formally, L(A) = set of strings w such that δ(,w) is in F. Example: is in L(A), where A is: 2 Mridul Aanjaneya Automata Theory 52/ 64
53 Proofs of set euivalence Question How to prove that two different sets are in fact the same? Here, T is the set of strings of s and s with no consecutive s and L = {w M accepts w}, where M is: 2, 3 Mridul Aanjaneya Automata Theory 53/ 64
54 Proofs of set euivalence Question How to prove that two different sets are in fact the same? In general, to show T = L, we need to prove two parts: If w is in L, then w is in T, i.e., L T. If w is in T, then w is in L, i.e., T L. 2, 3 Mridul Aanjaneya Automata Theory 54/ 64
55 Part : L T To prove: If w L, then w has no consecutive s. Proof is induction on length of w. Important trick: Expand the inductive hypothesis to be more detailed than you need. Mridul Aanjaneya Automata Theory 55/ 64
56 Part : L T (Inductive Hypothesis) If δ(,w)=, then w has no consecutive s and does not end in. 2 If δ(,w)= 2, then w has no consecutive s and ends in a single. Basis: w =, i.e., w = ε. holds as ε has no s at all. 2 holds vacuously, since δ(,ε) is not 2. Note: p is always true, if p is false. 2, 3 Mridul Aanjaneya Automata Theory 56/ 64
57 Part : L T If δ(,w)=, then w has no consecutive s and does not end in. 2 If δ(,w)= 2, then w has no consecutive s and ends in a single. Inductive step: Assume IH is true for strings shorter than w, where w. Because w is not empty, we can write w = xa, where a is the last alphabet of w and x is the string that precedes. IH is true for x. 2, 3 Mridul Aanjaneya Automata Theory 57/ 64
58 Part : L T If δ(,w)=, then w has no consecutive s and does not end in. 2 If δ(,w)= 2, then w has no consecutive s and ends in a single. Inductive step: Assume IH is true for strings shorter than w, where w. for w is δ(,w) =. Since δ(,w) =, δ(,x) must be or 2 and a must be. 2, 3 Mridul Aanjaneya Automata Theory 58/ 64
59 Part : L T If δ(,w)=, then w has no consecutive s and does not end in. 2 If δ(,w)= 2, then w has no consecutive s and ends in a single. Inductive step: Assume IH is true for strings shorter than w, where w. 2 for w is δ(,w) = 2. Since δ(,w) = 2, δ(,x) must be and a must be. 2, 3 Mridul Aanjaneya Automata Theory 59/ 64
60 Part 2: T L To prove: If w has no consecutive s, then w L. We prove the contrapositive. Note: p is euivalent to p. To prove (contrapositive): If w / L, then w has no s. Mridul Aanjaneya Automata Theory 6/ 64
61 Part 2: T L Simple induction on length of w. The only way w is not accepted is if it gets to 3. The only way to get to 3 is if w = xy. If δ(,x) = 2, then surely x = z (from Part : L T). w = zy! 2, 3 Mridul Aanjaneya Automata Theory 6/ 64
62 Regular languages Definition A DFA M = (Q, Σ, δ,, F ) accepts w if there exists a seuence of states r, r,..., r n in Q with three conditions: r = δ(r i, w i+ ) = r i+ for i =,..., n, and r n F Condition says that M starts in the start state. Condition 2 says that M follows δ between two states. Condition 3 says that last state is an accept state. We say that M recognizes L if L = {w M accepts w}. Mridul Aanjaneya Automata Theory 62/ 64
63 Regular languages A language L is regular if it is the language of some DFA. Note: the DFA must accept only the strings in L. Some languages are not regular (more later). Intuitively, DFA s are memoryless. Mridul Aanjaneya Automata Theory 63/ 64
64 A regular language Example Let L = {w w {,} and w, viewed as a binary integer, is divisible by 5.} Mridul Aanjaneya Automata Theory 64/ 64
Nondeterminism and Epsilon Transitions
Nondeterminism and Epsilon Transitions Mridul Aanjaneya Stanford University June 28, 22 Mridul Aanjaneya Automata Theory / 3 Challenge Problem Question Prove that any square with side length a power of
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY YOU NEED TO PICK UP THE SYLLABUS, THE COURSE SCHEDULE, THE PROJECT INFO SHEET, TODAY S CLASS NOTES
More informationFinite Automata. BİL405 - Automata Theory and Formal Languages 1
Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states
More informationCS 154 Introduction to Automata and Complexity Theory
CS 154 Introduction to Automata and Complexity Theory cs154.stanford.edu 1 INSTRUCTORS & TAs Ryan Williams Cody Murray Lera Nikolaenko Sunny Rajan 2 Textbook 3 Homework / Problem Sets Homework will be
More informationRegular Expressions and Language Properties
Regular Expressions and Language Properties Mridul Aanjaneya Stanford University July 3, 2012 Mridul Aanjaneya Automata Theory 1/ 47 Tentative Schedule HW #1: Out (07/03), Due (07/11) HW #2: Out (07/10),
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 informationThe Pumping Lemma and Closure Properties
The Pumping Lemma and Closure Properties Mridul Aanjaneya Stanford University July 5, 2012 Mridul Aanjaneya Automata Theory 1/ 27 Tentative Schedule HW #1: Out (07/03), Due (07/11) HW #2: Out (07/10),
More informationTheory of Computation Lecture 1. Dr. Nahla Belal
Theory of Computation Lecture 1 Dr. Nahla Belal Book The primary textbook is: Introduction to the Theory of Computation by Michael Sipser. Grading 10%: Weekly Homework. 30%: Two quizzes and one exam. 20%:
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 informationCSE 2001: Introduction to Theory of Computation Fall Suprakash Datta
CSE 2001: Introduction to Theory of Computation Fall 2013 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.eecs.yorku.ca/course/2001 9/10/2013
More informationCSE 2001: Introduction to Theory of Computation Fall Suprakash Datta
CSE 2001: Introduction to Theory of Computation Fall 2012 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/2001 9/6/2012 CSE
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 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 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 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 informationTheory of Computation
Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what
More informationCS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa
CS:4330 Theory of Computation Spring 2018 Regular Languages Finite Automata and Regular Expressions Haniel Barbosa Readings for this lecture Chapter 1 of [Sipser 1996], 3rd edition. Sections 1.1 and 1.3.
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 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 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 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 informationAutomata: a short introduction
ILIAS, University of Luxembourg Discrete Mathematics II May 2012 What is a computer? Real computers are complicated; We abstract up to an essential model of computation; We begin with the simplest possible
More informationUNIT-I. Strings, Alphabets, Language and Operations
UNIT-I Strings, Alphabets, Language and Operations Strings of characters are fundamental building blocks in computer science. Alphabet is defined as a non empty finite set or nonempty set of symbols. The
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 informationTheory of Computation
Theory of Computation COMP363/COMP6363 Prerequisites: COMP4 and COMP 6 (Foundations of Computing) Textbook: Introduction to Automata Theory, Languages and Computation John E. Hopcroft, Rajeev Motwani,
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 informationMidterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama
Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand
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 informationI have read and understand all of the instructions below, and I will obey the University Code on Academic Integrity.
Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2016, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all
More informationFunctions on languages:
MA/CSSE 474 Final Exam Notation and Formulas page Name (turn this in with your exam) Unless specified otherwise, r,s,t,u,v,w,x,y,z are strings over alphabet Σ; while a, b, c, d are individual alphabet
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 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 informationComputational Theory
Computational Theory Finite Automata and Regular Languages Curtis Larsen Dixie State University Computing and Design Fall 2018 Adapted from notes by Russ Ross Adapted from notes by Harry Lewis Curtis Larsen
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 informationAssignment #2 COMP 3200 Spring 2012 Prof. Stucki
Assignment #2 COMP 3200 Spring 2012 Prof. Stucki 1) Construct deterministic finite automata accepting each of the following languages. In (a)-(c) the alphabet is = {0,1}. In (d)-(e) the alphabet is ASCII
More informationIntroduction to the Theory of Computing
Introduction to the Theory of Computing Lecture notes for CS 360 John Watrous School of Computer Science and Institute for Quantum Computing University of Waterloo June 27, 2017 This work is licensed under
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 informationMathematical Preliminaries. Sipser pages 1-28
Mathematical Preliminaries Sipser pages 1-28 Mathematical Preliminaries This course is about the fundamental capabilities and limitations of computers. It has 3 parts 1. Automata Models of computation
More informationCS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF)
CS5371 Theory of Computation Lecture 7: Automata Theory V (CFG, CFL, CNF) Announcement Homework 2 will be given soon (before Tue) Due date: Oct 31 (Tue), before class Midterm: Nov 3, (Fri), first hour
More informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata
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 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 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 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 informationTopics COSC Administrivia. Topics Today. Administrivia (II) Acknowledgements. Slides presented May 9th and 16th,
Topics COSC 2001 Introduction to the Theory of Computation Dr. David Forster Basic concepts of theoretical CS, with practical applications: Regular Languages Context Free Languages Recursively Enumerable
More informationMidterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama
Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand
More informationNODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY
No part of this publication may be reproduced or distributed in any form or any means, electronic, mechanical, photocopying, or otherwise without the prior permission of the author. GATE SOLVED PAPER Computer
More informationCSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.
CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this
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 informationPart I: Definitions and Properties
Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States
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 informationIntroduction to Computers & Programming
16.070 Introduction to Computers & Programming Theory of computation: What is a computer? FSM, Automata Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT Models of Computation What is a computer? If you
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 informationCSCE 551 Final Exam, Spring 2004 Answer Key
CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is
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 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 informationCS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)
CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1) Definition 1 (Alphabet) A alphabet is a finite set of objects called symbols. Definition 2 (String)
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 informationCpSc 421 Final Exam December 15, 2006
CpSc 421 Final Exam December 15, 2006 Do problem zero and six of problems 1 through 9. If you write down solutions for more that six problems, clearly indicate those that you want graded. Note that problems
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 informationCOMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 5 : DFA minimization
COMP-33 Theory of Computation Fall 27 -- Prof. Claude Crépeau Lec. 5 : DFA minimization COMP 33 Fall 27: Lectures Schedule 4. Context-free languages 5. Pushdown automata 6. Parsing 7. The pumping lemma
More informationTheory of Computation (IV) Yijia Chen Fudan University
Theory of Computation (IV) Yijia Chen Fudan University Review language regular context-free machine DFA/ NFA PDA syntax regular expression context-free grammar Pushdown automata Definition A pushdown automaton
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 informationWhat we have done so far
What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.
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 informationEquivalence of CFG s and PDA s
Equivalence of CFG s and PDA s Mridul Aanjaneya Stanford University July 24, 2012 Mridul Aanjaneya Automata Theory 1/ 53 Recap: Pushdown Automata A PDA is an automaton equivalent to the CFG in language-defining
More informationjflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text
On the menu today jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text 1 jflap Demo jflap: Useful tool for creating and testing abstract machines Finite automata,
More information1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,
1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, v, x, y, z as per the pumping theorem. 3. Prove that
More informationUNIT-VI PUSHDOWN AUTOMATA
Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic
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 informationCpSc 421 Final Exam December 6, 2008
CpSc 421 Final Exam December 6, 2008 Do any five of problems 1-10. If you attempt more than five of problems 1-10, please indicate which ones you want graded otherwise, I ll make an arbitrary choice. Graded
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described
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 informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationNP-Completeness and Boolean Satisfiability
NP-Completeness and Boolean Satisfiability Mridul Aanjaneya Stanford University August 14, 2012 Mridul Aanjaneya Automata Theory 1/ 49 Time-Bounded Turing Machines A Turing Machine that, given an input
More informationPart 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 4 out of 5 ETH Zürich (D-ITET) October, 12 2017 Last week, we showed the equivalence of DFA, NFA and REX
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 informationContext-Free Languages
CS:4330 Theory of Computation Spring 2018 Context-Free Languages Pushdown Automata Haniel Barbosa Readings for this lecture Chapter 2 of [Sipser 1996], 3rd edition. Section 2.2. Finite automaton 1 / 13
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 informationRecap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.
Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite
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 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 2 Define push down automata Trace the computation of a push down automaton Design
More informationMapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:
Mapping Reducibility 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/mapping.pdf 1 Last time Reducibility
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 informationComputational Models: Class 1
Computational Models: Class 1 Benny Chor School of Computer Science Tel Aviv University October 19, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free
More informationComputational Models #1
Computational Models #1 Handout Mode Nachum Dershowitz & Yishay Mansour March 13-15, 2017 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, 2017 1 / 41 Lecture Outline I Motivation
More informationJohns Hopkins Math Tournament Proof Round: Automata
Johns Hopkins Math Tournament 2018 Proof Round: Automata February 9, 2019 Problem Points Score 1 10 2 5 3 10 4 20 5 20 6 15 7 20 Total 100 Instructions The exam is worth 100 points; each part s point value
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 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 informationTheory of Computation (IX) Yijia Chen Fudan University
Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and
More informationPushdown Automata (2015/11/23)
Chapter 6 Pushdown Automata (2015/11/23) Sagrada Familia, Barcelona, Spain Outline 6.0 Introduction 6.1 Definition of PDA 6.2 The Language of a PDA 6.3 Euivalence of PDA s and CFG s 6.4 Deterministic PDA
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Review of CFG, CFL, ambiguity What is the language generated by the CFG below: G 1 = ({S,T 1,T 2 }, {0,1,2}, { S
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 informationUNIT-III REGULAR LANGUAGES
Syllabus R9 Regulation REGULAR EXPRESSIONS UNIT-III REGULAR LANGUAGES Regular expressions are useful for representing certain sets of strings in an algebraic fashion. In arithmetic we can use the operations
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 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 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 informationContext-Free Grammars and Languages. Reading: Chapter 5
Context-Free Grammars and Languages Reading: Chapter 5 1 Context-Free Languages The class of context-free languages generalizes the class of regular languages, i.e., every regular language is a context-free
More information