Lecture No. 25
Dated: 01-03-2025
Theorem
Statement
If \(L_1\) and \(L_2\) are two regular languages
1 then \(L_1 \cap L_2\) is also a regular language
.1
Proof
Using De Morgan's
law
Example
Finite Automaton
2 for \(L_1\).
Finite Automaton
2 for \(L_2\).
Finite Automaton
2 for \(L_1^c\).
Finite Automaton
2 for \(L_2^c\).
Old States | New States After Reading | |
---|---|---|
a | b | |
\(z_1 \pm \equiv (p, 1)\) | \((q, 2) \equiv z_4\) | \((p, 1) \equiv z_1\) |
\(z_2 + \equiv (p, 2)\) | \((q, 1) \equiv z_3\) | \((p, 2) \equiv z_2\) |
\(z_3 + \equiv (q, 1)\) | \((r, 2) \equiv z_6\) | \((p, 1) \equiv z_1\) |
\(z_4 + \equiv (q, 2)\) | \((r, 1) \equiv z_6\) | \((p, 2) \equiv z_2\) |
\(z_5 \equiv (r, 1)\) | \((r, 2) \equiv z_6\) | \((r, 1) \equiv z_6\) |
\(z_6 + \equiv (r, 2)\) | \((r, 1) \equiv z_5\) | \((r, 2) \equiv z_6\) |
Finite Automaton
2 for \(L_1^c \, \cup \, L_2^c\).
Finite Automaton
2 for \(L_1 \, \cap \, L_2\).
Determining Regular Expression
3
Eliminating states
\(z_2\) and \(z_6\) from \(L_1 \, \cap \, L_2\).
Eliminating states
\(z_2\) and \(z_6\) from \(L_1 \, \cap \, L_2\).
Non Regular Languages
The languages which cannot be expressed using regular expressions
3 are called non regular languages
.
Example
Palindrome
Prime numbers
Note
A non regular language
cannot be expressed by a finite automaton
2 or a transition graph
.4
Example
Imagine a language
5 \(L\).
Assume that \(L\) is a regular language
1 and can be represented by a finite automaton
.2 The finite automaton
2 has a limited number of states
. \(L\) will have words with length that is greater than the number of states
in the finite automaton
.2 This means that for finite automaton
2 to represent \(L\), it needs to have a circuit.
Finite automaton
2 with 10 states
for \(a^9b^9\).
Notice how this finite automaton
2 is also capable of generating words such as \(a^{9+4}b^9\). More generally, \(a^9(a^4)^mb^9(b^2)^n\) where \(m, n \in \mathbb W\). These are not words belonging to \(L\).
References
-
Read more about regular languages. ↩↩↩
-
Read more about regular expressions. ↩↩
-
Read more about transition graph. ↩
-
Read more about the foundations. ↩