Save
TC
regular expressions
algebraic laws of regular expressions
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Francisca Portugal
Visit profile
Cards (12)
EQUIVALENCE OF REs
Two REs are
equivalent
if they define the same
language
Two REs with
variables
are equivalent if, for any
language
substitution for the variables, they define the same
language
Main interest is to
simplify
REs
COMMUTATIVITY
Union: L
+
M = M
+
L
Concatenation: does not exist (LM ≠ ML in general)
ASSOCIATIVITY
Union: (L
+M
)
+
N = L
+
(M
+
N)
Concatenation: (LM)N = L(MN)
IDENTITY
Union: ∅+L = L+∅ = L
Concatenation: εL = Lε = L
ABSORPTION
Union
: does not exist
Concatenation
: ∅L = L∅ = ∅
DISTRUBUTIVE LAWS
Concatenation over union:
Left
distributivity: L(M
+
N) = LM
+
LN
Right distributivity: (M
+
N)L = ML
+
NL
IDEMPOTENT LAW
Union: L
+ L
= L
Concatenation: does not exist (
LL≠
L
in general
)
EXAMPLE
ALGEBRAIC LAWS ENVOLVING CLOSURE
A)
L*
B)
ε
C)
ε
D)
LL*
E)
L*L
F)
L+ + ε
G)
ε + L
7
DISCOVERING
NEW LAWS
TESTING
EQUIVALENCE
OF
REs
To test if
E
= F, where E and
F
are REs with the same set of variables:
Convert E and
F
into concrete REs C and
D
, substituting each variable by a symbol
Test if
L(C)
=
L(D)
; if true, then
E = F
is a
law
, otherwise, its
not
LIMITATIONS OF REs TESTS
The test for
RE equivalence
becomes
invalid
when considering operators
outside
of the REs algebra.
See similar decks
regular expressions
85 cards
regular expresions
76 cards
Regular expressions
Computer
9 cards
Algebraic expressions
9 cards
Algebraic expressions
11 cards
Algebraic expressions
88 cards
Maths for Regular Expressions
Computer Science > Regular Languages
5 cards
Algebraic expressions
Maths > Algebra
23 cards
Algebraic Expressions
Maths
47 cards
factorising algebraic expressions
5 cards
Algebraic Expressions
Pure Maths > Algebra & Functions
6 cards
algebraic expressions
Maths
5 cards
Algebraic Expressions
Maths > Pure Maths > Algebra and Functions
6 cards
Algebraic Expressions
Maths > Pure 1
8 cards
Spanish regular and irregular verbs
79 cards
expressions
37 cards
Simplifying algebraic expressions
11 cards
Regular and irregular verbs
232 cards
Algebra expression
18 cards
Regular and Irregular words
Spanish > Topic 1 > Spanish Language Definitions and Examples
10 cards
regular
French A level > present tense > re verbs
5 cards