This preview shows page 1. Sign up to view the full content.
Unformatted text preview: REGULAR EXPRESSIONS DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: Basis: DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: Basis: • ∅ is a regular expression denoting the language {}. DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: Basis: • ∅ is a regular expression denoting the language {}. • is a regular expression denoting the language {}. DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: Basis: • ∅ is a regular expression denoting the language {}. • is a regular expression denoting the language {}. • a is a regular expression denoting the language {a}. DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: Basis: • ∅ is a regular expression denoting the language {}. • is a regular expression denoting the language {}. • a is a regular expression denoting the language {a}. Induction Step: DEFINITION
A regular expression over alphabet Σ is deﬁned inductively by: Basis: • ∅ is a regular expression denoting the language {}. • is a regular expression denoting the language {}. • a is a regular expression denoting the language {a}. Induction Step: • if r, s are regular expressions denoting languages R, S then: – r + s is a regular expression denoting R ∪ S . – rs is a regular expression denoting RS . – r∗ is a regular expression denoting R∗ . EXAMPLES
L(r) = language denoted by regular expression r EXAMPLES
L(r) = language denoted by regular expression r (0 + 1)∗ EXAMPLES
L(r) = language denoted by regular expression r (0 + 1)∗ ∅0 EXAMPLES
L(r) = language denoted by regular expression r (0 + 1)∗ ∅0 0∗ + (0∗ 10∗ 10∗ 10∗ )∗ EXAMPLES
L(r) = language denoted by regular expression r (0 + 1)∗ ∅0 0∗ + (0∗ 10∗ 10∗ 10∗ )∗ (0 + )(1 + 10)∗ EXAMPLES
L(r) = language denoted by regular expression r (0 + 1)∗ ∅0 0∗ + (0∗ 10∗ 10∗ 10∗ )∗ (0 + )(1 + 10)∗ (1 + 01)∗ (0 + ) REGULAR EXPRESSIONS VS REGULAR LANGUAGES Theorem. Regular languages = {L : ∃r s.t. L = L(r)}.
no e s! te ad e R th pr e of o om fr th USEFUL EQUALITIES USEFUL EQUALITIES
r = r USEFUL EQUALITIES
r = r r∅ = ∅ USEFUL EQUALITIES
r = r r∅ = ∅ r+s=s+r USEFUL EQUALITIES
r = r r∅ = ∅ r+s=s+r (r + s) + t = r + (s + t) USEFUL EQUALITIES
r = r r∅ = ∅ r+s=s+r (r + s) + t = r + (s + t) r(s + t) = rs + rt USEFUL EQUALITIES
r = r r∅ = ∅ r+s=s+r (r + s) + t = r + (s + t) r(s + t) = rs + rt (rs)t = r(st) USEFUL EQUALITIES
r = r r∅ = ∅ r+s=s+r (r + s) + t = r + (s + t) r(s + t) = rs + rt (rs)t = r(st) (r ) = r
∗∗ ∗ ...
View
Full
Document
This note was uploaded on 04/11/2010 for the course CSC CSC236 taught by Professor Farzanazadeh during the Spring '10 term at University of Toronto Toronto.
 Spring '10
 FarzanAzadeh

Click to edit the document details