This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Chapter 6 Properties of Regular Languages 2 Regular Sets and Languages Claim(1) . The family of languages accepted by FSAs consists of precisely the regular sets over a given alphabet. Every regular set is accepted by some NFA λ , a) φ : b) λ : c) a ∈ ∑ : Defn. 2.3.1 (on regular sets ): Let ∑ be an alphabet. The regular sets over ∑ are defined recursively as follows: i) Basis: φ , { λ }, and { a }, a ∈ ∑ , are regular sets over ∑ ii) Recursion: Let X and Y be regular sets over ∑ . The sets X ∪ Y , XY , and X * are regular sets over ∑ . iii) Closure: Every regular set is obtained from(i) by a finite number of application of (ii) q q f q q f a q q f λ q or 3 Regular Sets and Languages Let M 1 and M 2 be two FSAs, and let S m 1 , F m 1 , S m 2 , and F m 1 , be the new start and accepting states of M 1 and M 2 , respectively: a) L ( M 1 ) ∪ L( M 2 ): a string can be processed by M 1 and M 2 in parallel b) L ( M 1 ) • L( M 2 ): a string is processed by the composite machine sequentially c) L ( M 1 )* S m 2 F m 2 M 1 M 2 S F S m 1 F m 1 λ λ λ λ λ λ λ λ M 1 M 2 S m 1 S m 2 F m 1 F m 2 λ λ λ λ λ λ M 1 S m 1 F m 1 F S λ λ λ λ λ 4 3.3 Regular Grammars A grammar is defined as a quadruple ( V , ∑ , P , S ), where V is a finite set of nonterminals ∑ is a finite set of terminals S ∈ V , is a start symbol , and P is a finite set of rewrite/production rules of the form α → β , where α ∈ ( V ∪ ∑ )*, β ∈ ( V ∪ ∑ )* Defn 3.3.1 . A regular grammar is a grammar in which each rule has one of the following forms, where A , B ∈ V and a ∈ ∑ (i) A → a (ii) A → aB (iii) A → λ • A language is regular if it can be generated by a regular grammar • Regular grammars generate precisely the languages defined by regular expressions • Regular expressions are used to abbreviate the descriptions of regular sets 5 3.3 Regular Grammars ■ Example . Given G = ( V , ∑ , P , S ), where P = { S → xX X → yY Y → xX Y → λ } ⇔...
View
Full Document
 Winter '12
 DennisNg
 Formal language, Regular expression, Regular language, Nondeterministic finite state machine

Click to edit the document details