Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Vision 2023 Toc Chapter 4 Regular Language 26

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

byjusexamprep.

com

1
byjusexamprep.com

THEORY OF COMPUTATION

4 REGULAR LANGUAGE

1. CLOSURE PROPERTIES OF REGULAR LANGUAGE

Closure properties on regular languages are defined as certain operations on regular language
which are guaranteed to produce regular language. Closure refers to some operation on a
language, resulting in a new language that is of same “type” as originally operated on i.e.,
regular.
Regular languages are closed under following operations.
Consider L and M are regular languages:
1.1. Kleene Closure:
RS is a regular expression whose language is L, M. R* is a regular expression whose
language is L*.
1.2. Positive closure:
RS is a regular expression whose language is L, M. 𝑅 + is a regular expression whose
language is
1.3. Complement of regular language :
The complement of a language L (with respect to an alphabet E such that E* contains
L) is E*–L. Since E* is surely regular, the complement of a regular language is always
regular. Because we can construct DFA for Σ*-L by interchanging final and non final
state. Hence regular language closed under complement.
1.4. Union:
Let L and M be the languages of regular expressions R and S, respectively. Then R+S is
a regular expression whose language is (L U M).Union of regular language is always
regular because we can construct finite automata for L1 ∪ L2 by using Thomson
construction algorithm.
1.5. Intersection operation:
L1 ∩ L2 = 𝐿1𝑐 ∩ 𝐿2𝑐
L1 and L2 are two regular languages then L1 ∩ L2 always regular according to
demorgon’s law.
Regular Language closed union and complement. Hence also closed under intersection
1.6. Set Difference operator:
If L and M are regular languages, then so is L – M = strings in L but not M.

2
byjusexamprep.com
Proof: Let A and B be DFA’s whose languages are L and M, respectively. Construct C,
the product automaton of A and B make the final states of C be the pairs, where A-state
is final but B-state is not.
1.7. Subset operation :
{𝑎𝑛 𝑏 𝑛 } ⊆ (a+b)*
Subset of a regular language may or may not be regular. Hence regular languages not
closed under subset.
Example1:
Which of the following is true?
A) Subset of a regular set is always regular
B) Subset of a infinite set is always regular
C) Subset of a non regular set is always regular
D) Subset of finite set is always regular
Answer D)
Example 2: how many states are there in minimal DFA of L1 ∩ L2
L1 = (a+b)*a
L2= (a+b)*
Solution: Ending with a .So two states required.
Example 3: how many states are there in minimal DFA of L1 ∪ L2
L1 = (a+b)*
L2= (a+b)*b
Solution: one states required because language accepting complete language.
1.8. Reversal operation:
Reversal : Reversing a language means reversing the each string in the language.
Steps to Reversal:
1. Draw the states as it is.
2. Make final state as initial state and initial states as a final state
3. Reverse the edges
4. Loop will remain same
5. Remove the inappropriate transition state.
1. (E + F)𝑅 = 𝐸 𝑅 + 𝐹 𝑅
2. (E. F)𝑅 = 𝐹 𝑅 . 𝐸 𝑅
3. (𝐸 ∗ )𝑅 = (𝐸 𝑅 )∗
Hence regular language is closed under reverse operation.
1.9. Homomorphism:
A homomorphism on an alphabet is a function that gives a string for each symbol in
that alphabet. Example: h(0) = ab; h(1) = E. Extend to strings by h(a1…an)
=h(a1)…h(an). Example: h(01010) = ababab.

3
byjusexamprep.com
If L is a regular language, and h is a homomorphism on its alphabet, then h(L)= {h(w)
| w is in L} is also a regular language.
Proof: Let E be a regular expression for L. Apply h to each symbol in E. Language of
resulting R, E is h(L).
1.10. Inverse Homomorphism
Let h be a homomorphism and L a language whose alphabet is the output language of
h. ℎ−1 (L) = {w | h(w) is in L}.
Note: There are few more properties like symmetric difference operator, prefix operator,
substitution which are closed under closure properties of regular language.

2. DECISION PROPERTIES

Approximately all the properties are decidable in case of finite automaton.


(i) Emptiness
(ii) Non-emptiness
(iii) Finiteness
(iv) Infiniteness
(v) Membership
(vi) Equality
These are explained as following below.
2.1. Emptiness and Non-emptiness:
Step-1:
Select the state that cannot be reached from the initial states & delete them (remove
unreachable states).
Step 2:
If the resulting machine contains at least one final states, so then the finite automata
accepts the non-empty language.
Step 3:
If the resulting machine is free from final state, then finite automata accepts empty
language.
2.2. Finiteness and Infiniteness:
Step-1:
Select the state that cannot be reached from the initial state & delete them (remove
unreachable states).
Step-2:
Select the state from which we cannot reach the final state & delete them (remove dead
states).
Step-3:
If the resulting machine contains loops or cycles then the finite automata accepts infinite
language.

4
byjusexamprep.com
Step-4:
If the resulting machine do not contain loops or cycles then the finite automata accepts
infinite language.
2.3. Membership:
Membership is a property to verify an arbitrary string is accepted by a finite automaton
or not i.e. it is a member of the language or not.
Let M is a finite automata that accepts some strings over an alphabet, and let ‘w’ be any
string defined over the alphabet, if there exist a transition path in M, which starts at initial
state & ends in anyone of the final state, then string ‘w’ is a member of M, otherwise ‘w’
is not a member of M.
2.4. Equality:
Two finite state automata M1 & M2 is said to be equal if and only if, they accept the same
language. Minimise the finite state automata and the minimal DFA will be unique.

****

You might also like