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
6.11 Idiomatic Expressions
OCR A-Level French > 6. Grammar
40 cards
6.3 Angular Momentum and Angular Impulse
AP Physics C: Mechanics > Unit 6: Energy and Momentum of Rotating Systems
48 cards
5.4 Angular Momentum
AP Physics 1: Algebra-Based > Unit 5: Torque and Rotational Dynamics
25 cards
Unit 6: Gene Expression and Regulation
AP Biology
No cards
8. The Control of Gene Expression
AQA A-Level Biology
No cards
6.11 Idiomatic Expressions
OCR A-Level French > Grammar
25 cards
3.1 Boolean Expressions
AP Computer Science A > Unit 3: Boolean Expressions and if Statements
57 cards
3.1.9.1 Rate Expression
AQA A-Level Chemistry > 3.1 Physical Chemistry > 3.1.9 Rate Equations (A-level only)
84 cards
1.4.2 Effects of regular training on body systems
AQA GCSE Physical Education > 1. Applied anatomy and physiology > 1.4 The short- and long-term effects of exercise
62 cards
6.4 Conservation of Angular Momentum
AP Physics C: Mechanics > Unit 6: Energy and Momentum of Rotating Systems
26 cards
Unit 3: Boolean Expressions and if Statements
AP Computer Science A
No cards
6.5 Regulation of Gene Expression
AP Biology > Unit 6: Gene Expression and Regulation
39 cards
8.2.1 Oncogenes and Tumor Suppressor Genes
AQA A-Level Biology > 8. The Control of Gene Expression > 8.2 Gene Expression and Cancer
69 cards
8.2.2 Abnormal Methylation
AQA A-Level Biology > 8. The Control of Gene Expression > 8.2 Gene Expression and Cancer
40 cards
1.2 Arithmetic Expressions
AP Computer Science A > Unit 1: Primitive Types
56 cards
1.4.2 Effects of regular training on body systems
GCSE Physical Education > 1. Applied anatomy and physiology > 1.4 The short- and long-term effects of exercise
52 cards
8.2 Gene Expression and Cancer
AQA A-Level Biology > 8. The Control of Gene Expression
No cards
3.2.4 Density of Irregular Objects
WJEC GCSE Physics > Unit 3: Practical Assessment > 3.2 Required Practicals
29 cards
6.6 Gene Expression and Cell Specialization
AP Biology > Unit 6: Gene Expression and Regulation
39 cards
2.5 Cultural Expressions through Art and Literature
AP Spanish Language and Culture > Unit 2: The Influence of Language and Culture on Identity
No cards
6.3 Angular Momentum
AP Physics 1: Algebra-Based > Unit 6: Energy and Momentum of Rotating Systems
45 cards