Page 1. 1)Let B n = { a k | where k is a multiple of n}. I.e. B 1 = { a k | where k is a multiple of 1} = { a k | k Є {0,1,2,3,…}} = {‘’, a, aa, aaa, aaaa,

Slides:



Advertisements
Similar presentations
Properties of Regular Languages
Advertisements

Lecture 8 From NFA to Regular Language. Induction on k= # of states other than initial and final states K=0 a a* b a c d c*a(d+bc*a)*
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Regular expressions Sipser 1.3 (pages 63-76). CS 311 Mount Holyoke College 2 Looks familiar…
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Fall 2006Costas Busch - RPI1 Regular Expressions.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
1 Regular Grammars Generate Regular Languages. 2 Theorem Regular grammars generate exactly the class of regular languages: If is a regular grammar then.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
Regular expressions Sipser 1.3 (pages 63-76). CS 311 Fall Looks familiar…
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
1 Homework #1 Solutions 2 #1. True or False a)Given a language (set of strings) L, the question: “Is string w  L” is a decision problem: T F b)  =
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Regular Expressions and Languages A regular expression is a notation to represent languages, i.e. a set of strings, where the set is either finite or contains.
CHAPTER 1 Regular Languages
CMSC 330: Organization of Programming Languages Finite Automata NFAs  DFAs.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
CS 203: Introduction to Formal Languages and Automata
Regular Expressions Costas Busch - LSU.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Homework 4 due 11/25.
CSCI 3130: Formal languages and automata theory Tutorial 3 Chin.
Finite Automata Chapter 1. Automatic Door Example Top View.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
Recap: Transformation NFA  DFA  s s1s1... snsn p1p1 p2p2... pmpm >...  p1p1  p2p2  pipi s e s1s1 e s2s2 e sisi >
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Conversions Regular Expression to FA FA to Regular Expression.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
CSE 105 theory of computation
CSCE 355 Foundations of Computation
CSE 105 theory of computation
Chapter 2 Finite Automata
Recognizer for a Language
Single Final State for NFA
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Lecture3 DFA vs. NFA, properties of RL
CS 154, Lecture 3: DFANFA, Regular Expressions.
COSC 3340: Introduction to Theory of Computation
Animated Conversion of Regular Expressions to C Code
Theory of Computation Lecture #
CS322D Tutorials.
CSCI 2670 Introduction to Theory of Computing
CS322D Tutorials.
Chapter 1 Regular Language - 02
Homework #5 (Models of Computation, Spring, 2001) Due: Section 1; February 27 Section 2; February 28 ** Please put your homework in the collection.
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
CSE 105 theory of computation
Chapter 1 Regular Language
Homework 1 (May 31) Material covered: Episodes 1 and 2
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Presentation transcript:

Page 1. 1)Let B n = { a k | where k is a multiple of n}. I.e. B 1 = { a k | where k is a multiple of 1} = { a k | k Є {0,1,2,3,…}} = {‘’, a, aa, aaa, aaaa, …} B 2 = { a k | where k is a multiple of 2} = { a k | k Є {0,2,4,6,…}} = {‘’, aa, aaaa, aaaaaa, …} Show that for each n  1, B n is regular. (20 pts) Hints: 1)First prove that a n is regular by induction on n. What is the induction variable. What is the formula as a function of the induction variable? What is the structure of the proof? What parts have induction hypotheses? You will need to appeal to the definition of what it means to be regular, and to closure properties of regular languages. State clearly what properties you use to justify each step. 2)Second, appeal to another closure property of the regular languages that uses the result of hint 1 to show that B n is regular. CS311Computational Structures Practice Midterm Exam Questions

Page 2. 2) For each description, draw a state diagram of a DFA that recognizes the language. In each case the alphabet  = {0,1}. A.{w | Every odd position of w is a 1} (6 pts) B.{w | w contains an even number of 0’s, or is a string of length 2 with exactly two 1’s} (7 pts) C.{w | w doesn’t contain the substring 110 } (7 pts)

Page 3. 3) Compute a regular expression that denotes the same set of strings as the DFA below. Use the state-ripping algorithm 1.5 Show the intermediate steps. (20 points)

Page 4. 4) Convert the following  -NFA into a DFA. (20pts) Hints 1.First remove the  edge 2.Then use the subset construction 3.You may compute the subsets lazily a a,b b a 