0% found this document useful (0 votes)
18 views9 pages

Identity Rules For Re

Uploaded by

busil.james
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views9 pages

Identity Rules For Re

Uploaded by

busil.james
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

IDENTITY RULES FOR RE

Richard A. Santos
Given R, P, L, Q as regular expressions, the following identities hold:
 R + ∅ = ∅ + R = R (The identity for union)
 R ε = ε R = R (The identity for concatenation)
 ∅ L = L ∅ = ∅ (The annihilator for concatenation)
 ε* = ε and ∅* = ε
We can write out the two sets:
 R + R = R (Idempotent law)
1. ∅={};
 R*R* = R*
2. {∅}={{}}.
 RR* = R*R
The first set has no elements; the second
 (R*)* = R* set has exactly one element: the set with no
 ε + RR* = ε + R*R = R* elements. You can see that they have
different structures.
 (PQ)*P =P(QP)*
 (P+Q)* = (P*Q*)* = (P*+Q*)* (D’Morgan’s Theorem)
 R (P + Q) = RP + RQ (Left distributive law)
 (P + Q) R = PR + QR (Right distributive law)
Example:
Based on the identities of RE, prove:
(1 + 100*) + (1 + 100*)(0 + 10*)(0 + 10*)* = 10*(0 + 10*)*

Solution:
LHS (1 + 100*) + (1 + 100*)(0 + 10*)(0 + 10*)*
: Factor out (1 + 100*) from the equation above
= (1 + 100*)(ε + (0 + 10*)(0 + 10*)*)
: Use the identity ε + RR* = R* to simplify
= (1 + 100*)(0 + 10*)*
: Factor out 1 from the equation above
= 1(ε + 00*)(0 + 10*)*
: Use the identity ε + RR* = R* to simplify
= 10*(0 + 10*)*
Therefore, (1 + 100*) + (1 + 100*)(0 + 10*)(0 + 10*)* is equal to 10*(0 + 10*)*.
EQUIVALENCE OF FINITE AUTOMATA (FA) WITH
REGULAR EXPRESSIONS (RE)

 Regular expressions and finite automata are equivalent in their respective power.
The equivalence can be proved by mathematical induction based on the size of a
regular expression. Therefore, it is possible to construct an equivalent finite
automation for any given regular expression that recognizes the language it
describes, and vice versa.
 Some examples of basic relation between FA, RE and Regular Sets
EQUIVALENCE OF FINITE AUTOMATA (FA) WITH
REGULAR EXPRESSIONS (RE)
EQUIVALENCE OF FINITE AUTOMATA (FA) WITH
REGULAR EXPRESSIONS (RE)
Example:
 Construct a finite automata (FA) for the regular expression (RE): (1 + 0)0*

Solution:
 By applying a sequence of operations on individual expression:
R = (1 + 0)0* = (R1 + R2) R3* where R1 = 1, R2 = 0, and R3 = 0
 The finite automata (FA) for the expression R1, R2, and R3 can be constructed as:
EQUIVALENCE OF FINITE AUTOMATA (FA) WITH
REGULAR EXPRESSIONS (RE)

By applying the union rule for (R1 + R2), the FA output would be:
EQUIVALENCE OF FINITE AUTOMATA (FA) WITH
REGULAR EXPRESSIONS (RE)

By applying the closure rule for R3 to get R3*, the FA output would be:
EQUIVALENCE OF FINITE AUTOMATA (FA) WITH
REGULAR EXPRESSIONS (RE)
By applying the concatenation rule between (R1 + R2) and R3*, the final NFA would
be:

You might also like