lect5-re1

# lect5-re1 - 1 Regular Expressions Definitions Equivalence...

This preview shows pages 1–6. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Regular Expressions Definitions Equivalence to Finite Automata 2 RE’s: Introduction ◆ Regular expressions are an algebraic way to describe languages. ◆ They describe exactly the regular languages. ◆ If E is a regular expression, then L(E) is the language it defines. ◆ We’ll describe RE’s and their languages recursively. 3 RE’s: Definition ◆ Basis 1 : If a is any symbol, then a is a RE, and L( a ) = {a}. ◗ Note : {a} is the language containing one string, and that string is of length 1. ◆ Basis 2 : ε is a RE, and L( ε ) = { ε }. ◆ Basis 3 : ∅ is a RE, and L( ∅ ) = ∅ . 4 RE’s: Definition – (2) ◆ Induction 1 : If E 1 and E 2 are regular expressions, then E 1 +E 2 is a regular expression, and L(E 1 +E 2 ) = L(E 1 ) ∪ L(E 2 ). ◆ Induction 2 : If E 1 and E 2 are regular expressions, then E 1 E 2 is a regular expression, and L(E 1 E 2 ) = L(E 1 )L(E 2 ). Concatenation : the set of strings wx such that w Is in L(E 1 ) and x is in L(E 2 ). 5 RE’s: Definition – (3) ◆ Induction 3 : If E is a RE, then E* is a RE, and L(E*) = (L(E))*. Closure , or “Kleene closure” = set of strings w 1 w 2 …w n , for some n > 0, where each w i is in L(E)....
View Full Document

{[ snackBarMessage ]}

### Page1 / 26

lect5-re1 - 1 Regular Expressions Definitions Equivalence...

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

View Full Document
Ask a homework question - tutors are online