Notes-SecD - COT 4210 Section D Spring 2001 Regular...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COT 4210 Section D Spring 2001 Regular Expressions Definition 20. The set, E ( ), of regular expressions over is a subset of ( ')* defined inductively below, where ' = { , , (,),+,*, }, called the meta alphabet of E ( ), is assumed to satisfy: { , , (,),+,*, } = . Basis: , E ( ) and E ( ). Inductive rule: If e 1 , e 2 E ( ), then each of the following strings is in E ( ): [1] (e 1 )* [2] (e 1 e 2 ) [3] (e 1 + e 2 ) Completion: Nothing else is in E ( ) that cannot be obtained by a finite application of the above rules. Examples. If = {a,b}, then ' = {a,b, , , (,),+,*, }. The following strings are members of E ( ) . From the basis: , , a, b, are members of E ( ) . From the induction rules: ( )*, ( )*, (a)*, (b)*, ( )*, (b+( )*), ((a) * b), etc., are members of E ( ) . The following are not members of E ( ) : ( a ) , ((* ab ) At this point E ( ) is nothing more than a set of strings, a language over '. In our next definition we assign meaning to these strings. That is, for the sake of understanding, think of regular expressions as programs written in the language E ( ) . Definition 21 will tell us what we get when these programs are compiled and executed, or interpreted. The result of executing a regular expression produces or outputs a language over . Definition 21 introduces the "Language of" operator, L, that maps each e E ( ) to L[e] *, that is, L[e]: E ( ) 2 * , where 2 * , denotes the power set of * , the set of all languages over . Definition 21. Let be an alphabet and let E ( ) be the language of regular expressions over . Then each e E ( ) describes(defines or specifies) a language, L[e], over (that is, L[e] *) defined inductively below. Basis : L[ ] = , L[ ] = { }, and L[a] = {a}, for each a . Inductive rules : [1] if e = ( x )* , for some x E ( ), then L[e] = L[x]* [2] if e = ( x y ) , for some x and y E ( ), then L[e] = L[x] L[y], and [3] if e = ( x + y ) , for some x and y E ( ), then L[e] = L[x] L[y]. Examples. L[( )*] = L[ ]* = * = { } = L[ ]; by [1] and Basis. 4/29/2009 Page 38 COT 4210 Section D Spring 2001 L[( ( +((a.b))*) )] = L[( +((a.b))*)] L[ ] by [2] = L[( +((a.b))*)] = by Basis and Proposition 1(1). Observe that L[e] = L[f] is possible even though e f. Also observe that it is important that the inductive rules be applied properly. To this point consider the expression e = (a+(b a)). If one attempts to apply rule [2] to this expression, then x must equal "a+(b" and y must equal "a)"....
View Full Document

This note was uploaded on 06/09/2011 for the course COT 4210 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 10

Notes-SecD - COT 4210 Section D Spring 2001 Regular...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online