1 1. Show the result of each of the following set operations in terms of set property. Write your sets as simple as possible. (a) L 0  L 4 (b) L 0  L.

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
Congruent Triangles Geometry Chapter 4.
Lecture 15UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 15.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
127 The Chomsky Hierarchy(review) Recursively Enumerable Sets Turing Machines Post System Markov Algorithms,  -recursive Functions Regular Expression.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
1 Homework #6 (Models of Computation, Spring, 2001) Due: Section 1; March 29 Section 2; March Let L be the language of the following grammar G 1.
104 Closure Properties of Regular Languages Regular languages are closed under many set operations. Let L 1 and L 2 be regular languages. (1) L 1  L 2.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 12: 10/5.
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
1 Module 31 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union, concatenation.
Key to Homework #2 1. What is the language of L-system G = ({a, b, c}, h, acb ), where the rewriting rule h is defined as follows: h (a) = aa h (b) = cb.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
1 Background Information for the Pumping Lemma for Context-Free Languages Definition: Let G = (V, T, P, S) be a CFL. If every production in P is of the.
4. There once lived a king, named Hagar, who had thousands of sons and daughters, still giving more births to his wives. One of his serious problems was.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Chapter 12: Context-Free Languages and Pushdown Automata
1/22/03Tucker, Applied Combinatorics, Section EDGE COUNTING TUCKER, APPLIED COMBINATORICS, SECTION 1.3, GROUP B Michael Duquette & Amanda Dargie.
Problem of the DAY Create a regular context-free grammar that generates L= {w  {a,b}* : the number of a’s in w is not divisible by 3} Hint: start by designing.
Chapter 4 Context-Free Languages Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
1 Section 3.3 Grammars A grammar is a finite set of rules, called productions, that are used to describe the strings of a language. Notational Example.
1 Chapter Construction Techniques. 2 Section 3.3 Grammars A grammar is a finite set of rules, called productions, that are used to describe the.
1 Homework #7 (Models of Computation, Spring, 2001) Due: Section 1; April 16 (Monday) Section 2; April 17 (Tuesday) 2. Covert the following context-free.
Context-free Grammars Example : S   Shortened notation : S  aSaS   | aSa | bSb S  bSb Which strings can be generated from S ? [Section 6.1]
The Pumping Lemma for Context Free Grammars. Chomsky Normal Form Chomsky Normal Form (CNF) is a simple and useful form of a CFG Every rule of a CNF grammar.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
1 Let L= { w= u v : u  {a, b}*, v  {c, d}* and |u|= |v|} 1.Design a context-free grammar that generates L. 2.Use your grammar and the construction from.
1 Chapter Regular Language Topics. 2 Section 11.4 Regular Language Topics Regular languages are also characterized by special grammars called regular.
Lecture # 19. Example Consider the following CFG ∑ = {a, b} Consider the following CFG ∑ = {a, b} 1. S  aSa | bSb | a | b | Λ The above CFG generates.
Chapter 5 Context-Free Grammars
Languages & Grammars. Grammars  A set of rules which govern the structure of a language Fritz Fritz The dog The dog ate ate left left.
TK PrasadPumping Lemma1 Nonregularity Proofs. TK PrasadPumping Lemma2 Grand Unification Regular Languages: Grand Unification (Parallel Simulation) (Rabin.
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.
1 L= { w c w R : w  {a, b}* } is accepted by the PDA below. Use a construction like the one for intersection for regular languages to design a PDA that.
Section 12.4 Context-Free Language Topics
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
Enter Chomsky Grammars. 2 What has Chomsky* to do with computing? Linguistics and computing intersect at various places: Things that are used to create.
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.
1 1. Let A ={r, p, i } and B = { w, o, r, l, d }. What does each of the following (a), (b) and (c) denote? Briefly explain in plain English. (a) A * B.
Chapter 6 Properties of Regular Languages. 2 Regular Sets and Languages  Claim(1). The family of languages accepted by FSAs consists of precisely the.
Section 11.4 Regular Language Topics
CS 203: Introduction to Formal Languages and Automata
Introduction Finite Automata accept all regular languages and only regular languages Even very simple languages are non regular (  = {a,b}): - {a n b.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
Regular Grammars Reading: 3.3. What we know so far…  FSA = Regular Language  Regular Expression describes a Regular Language  Every Regular Language.
1 Find as many examples as you can of w, x, y, z so that w is accepted by this DFA, w = x y z, y ≠ ε, | x y | ≤ 7, and x y n z is in L for all n ≥ 0.
Models of Computation: Automata and Formal Languages Sam M. Kim.
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
1 Section 12.1 Context-Free Languages We know that the language {a n b n | n  N} is not regular, but it certainly has a non-regular grammar, such as S.
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.
1 1. Eliminate all  -transitions from the following FA without changing the number of states and the language accepted by the automaton. You should also.
Recap lecture 31 Context Free Grammar, Terminals, non- terminals, productions, CFG, context Free language, examples.
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,
1 Chapter Context-Free Languages. 2 Section 12.1 Context-Free Languages We know that the language {a n b n | n ∈ N} is not regular, but it certainly.
Standard Representations of Regular Languages
Proof technique (pigeonhole principle)
Language Recognition (12.4)
Chapter 7 Regular Grammars
Follow me for a walk through...
Elementary Questions about Regular Languages
Midterm (Models of Computation, Fall, 2000)
Homework #5 (Models of Computation, Spring, 2001) Due: Section 1; February 27 Section 2; February 28 ** Please put your homework in the collection.
Language Recognition (12.4)
Key Answers for Homework #7
Presentation transcript:

1 1. Show the result of each of the following set operations in terms of set property. Write your sets as simple as possible. (a) L 0  L 4 (b) L 0  L 1 (c) L 3  L 5 (d) (L 2 - L 1 )  L 4 (e) L 0 L 5,where L 0 = {a i b j c k | i, j, k > 0, j  k }, L 1 = { a i b j c k | i, j, k  0, i  j }, L 2 = {a, b, c}*, L 3 = {x | x  {a, b, c}* and x = x R }, L 4 = { a i b j c k | i,j,k  0 }, L 5 = {a i b j a k | i,j,k  0 } Homework #1 (Models of Computation, Spring, 2001) Due: Section 1: January 25 (Thursday) Section 2: January 26 (Friday) 2. We proved that the Sperner’s lemma is true, i.e., the number of good label blocks is always odd. Define a bad label block as a block which is not a good label block (i.e., either 1-1 or 2-2). Can we claim similar lemma for the number of bad label blocks? In other words, is the number of bad label blocks always odd, always even, or can be both? Justify your answer.

2 3. Let G be a directed graph (see an example below) of n nodes (vertices). Using the pigeonhole principle, we could simply proved that every path of length greater than or equal to n has a cycle. In this homework we will prove the same problem using the proof by induction technique. (Please review the proof by induction technique and the application examples.) (a) What is the base case? Prove that the statement is true for the base case. (b) Write the induction hypothesis. (c) Complete the induction step using the information provided on the following page. Figure 1. A directed graph with 9 nodes and a path of length

3 Fig. (a) – (c) There is a node that the path does not go through. (d) The path goes through every node. (a) (b) (c)(d) For a graph G which has n nodes, the following figures (a) – (d) illustrates four typical cases depending on how the path of length n goes through the nodes. - How can we apply the induction hypothesis for cases (a) through (c), and say that there should be a cycle? - What can we say for case (d)?

4 4. What is the language generated by each of the following grammars, where S is the start symbol, the capital letters are nonterminal symbols and the lower case letters are terminal symbols. Show the languages in terms of a set using properties. Try to express the set as simple as possible. (a) S  aS | bS |  (b) S  aA | bB A  Sa |a B  Sb | b (c) S  aSb | A A  aA | a (d) S  DF F  bAFc | bEc bA  Ab bE  Eb DA  aaD DE  aa 5. Construct regular (i.e., type 3) grammar for each of the following languages. (a) L 1 = {ab, abb, abbb} (b) L 2 = { x | x  {0, 1} + } (c) L 3 = { x | x is an integer, possibly with leading zeros } 6. Construct context-free (type 2) grammar for each of the following languages. (a) L 4 = {a i b j | i > j > 0} (b) L 5 = {a i b j | j > i > 0} (c ) L 6 = {a i b j | i, j > 0 and i  j} (d) L 7 = {xx R | x  {a, b, c}*} 7. Construct any grammar for each of the following languages. You should briefly describe how your grammar generates the language. (Hint: Examine how the grammar in problem 3-(d) above and the example for type 1 grammar in your handout generates the language.) (a) L 8 = {a 2n b 2n c 2n | n  1 } (b) L 9 = {a n b n c n d n | n  1 }