{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

LectureNotes4 - ECS 120 Lesson 4 Closure Properties of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECS 120 Lesson 4 – Closure Properties of Regular Languages, Pt. 1 Oliver Kreylos Friday, April 6th, 2001 1 Operations on Languages We defined a (formal) language L over an alphabet Σ as a set of words: L Σ * . Today we introduce operations on languages, and how the class of regular languages behaves under such operations. Since languages are sets of words, the first operations we look at are the set operations complement, intersection and union. Let A Σ * be a language. Then we define the complement ¯ A of A as ¯ A := w Σ * w / A , or, equivalently, ¯ A = Σ * \ A . Let A, B Σ * be languages over the same alphabet. Then we define the intersection A B of A and B as A B := w Σ * w A w B , the usual set intersection; and we define the union A B of A and B as A B := w Σ * w A w B , the usual set union. The next two operations are specific to sets of words: Concatenation and Kleene Star. Before we introduce them, we have to formally define the concatenation of two words. Let x 1 , x 2 Σ * be two words over the same alphabet. Then we define the concatenation x 1 x 2 of x 1 and x 2 recursively as follows: 1. If x 1 Σ 0 , i. e., x 1 = , then we define x 1 x 2 := x 2 . 2. If x 1 Σ * \ { } , i. e., x 1 is not the empty word, we can split x 1 into a character a Σ and a word x 1 Σ * : x 1 = ax 1 . Then we define x 1 x 2 = ( ax 1 ) x 2 := a ( x 1 x 2 ). 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Less formally, two words are concatenated by writing their characters as a sin- gle word: If x 1 = a 1 a 2 . . . a n and x 2 = b 1 b 2 . . . b m , then x 1 x 2 = a 1 a 2 . . . a n b 1 b 2 . . . b n . From the formal definition of concatenation, we can derive its following two properties: Associativity: If a, b, c Σ * are words over the same alphabet, then a ( bc ) = ( ab ) c . In other words, concatenating a with the result of con- catenating b and c
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}