Closure Properties of Regular Languages -Automata

Closure Properties of Regular Languages

We use the term “Closure” when we talk about sets of things. If we have two regular languages L1 and L2, and L is obtained by applying certain operations on L1, L2 then L is also regular.

Consider an Example: Let us take a set of candy. Each member of the set contains an individual pieces of candy. Suppose we have taken a candy from the set candy and dropped it on the clean ground, now what happen? We can still eat it, so it is still candy. The set candy is closed under the operation called “drop”.

Closure Properties used in Regular Languages are as follows:

  • Union
  • Concatenation
  • Complementation
  • Intersection
  • Reversal
  • Difference
  • Homomorphism
  • Inverse Homomorphism

Union

Theorem: If L1 and L2 are regular languages, then their union L1 U L2 is also a regular language.

Proof: Let M1 and M2 are two finite automata accepting L1 and L2 regular language. If we want to prove that the union of L1 U L2 is also a regular language then we can perform following steps:

  • Create a new initial state.
  • Make ?-transitions from new state to each of the original state of M1 and M2.
Closure Properties of Regular Languages

Concatenation

Theorem: The Concatenation operation of two regular languages is also regular.

Proof: Let M1 and M2 are two finite automata, and L1, L2 are the languages accepted by the M1 and M2 respectively. We want to prove that L1L2 = L i.e. their concatenation results in regular language. Let M is finite automata combining M1 and M2.

Closure Properties of Regular Languages

Closure or Star

In this, the theorem depicts that the closure or star of any regular languages is also regular.

Proof: Let L1 is regular language and we want to prove that L1* is also regular language, the proof is given below:

  • Create a new initial state connect it to original state start with ?-transition.
  • Create a new final. Connect the original final state to it with ?-transitions. The original final state will be non-final state.
  • Connect the new initial state and new final state with a pair of ?-transitions.

 Let L1 is accepted by finite automata M. Now we have to prove that M also accepts L1*.

Closure Properties of Regular Languages

Complementation

Theorem: The complement of two regular language is also regular.

Proof: Let M be a deterministic finite automata accepting L, then we can write L= L(M), then L’ = L(M1). The DFA M1 is like M but the accepting states of M are now non-accepting states of M1 and vice versa.

Closure Properties of Regular Languages

The complement of above langages is:

Closure Properties of Regular Languages
Closure Properties of Regular Languages

Intersection:

Theorem: The set of regular languages are closed under intersection.

Proof: Let L1 and L2 are regular language and we want to prove that the intersection of L1 ? L2 is also a regular language. We can obtain the intersection of language L1 ? L2 by De Morgen’s Law.

Closure Properties of Regular Languages

Reversal

Theorem: The set of regular languages are closed under reversal.

Proof: Let M be a deterministic finite automata accepting L, from M we will construct M’ such that states of M and M’ are same. Make final state of M as initial state of M’ and initial state of M as accepting state of M’. The direction of edges in M’ is reversed. It means that the string written backward i.e.

Reversal of abbc is cbba

The reverse of above language is shown below:

Closure Properties of Regular Languages

Difference

Theorem: If L1 and L2 are regular languages then L1-L2 is also regular

Proof:

L1-L2 = L1 ? L2’

As we know L2 is regular then its complement L2 is also regular and L1 ? L2’ is also regular, so it proves that L1-L2 is also regular.

Homomorphism

The Homomorphism theorem depicts that a single letter is replaced with a string. If h is a homomorphism on alphabet ? and w = a1a2……….an is a string of symbols in ?, then

   h(w) = h(a1)h(a2)…………………..h(an)

If L is a language over alphabet ?then itshomomorphism h is defined as:

h(L) = {h(w)  : w  ? L }

Inverse Homomorphism

The inverse homomorphism theorem states that if h is a homomorphism from alphabet ? to alphabet A and L is a regular language on A then h’(L) is also a regular language.

Closure Properties of Regular Languages

Related Topics

Derivation Tree of Context Free Grammar - Automata

Derivation Tree of Context Free Grammar Derivation tree gives a way to show how a string can be derived from context free grammar. It is also called as parse tree, production...

3 minutes read.

Conversion from NFA to DFA

Conversion from NFA to DFA A Non-deterministic Finite Automata (NFA) is a finite state machine, in which, the move from one state to another is not fully deterministic, i.e., for a...

4 minutes read.

Simplification of Context Free Grammar - Automata

Simplification of Context Free Grammar Context Free Grammar has recursive structure. The languages that are accepted with Context Free Grammar are called Context Free Languages. Context Free Grammar has one condition...

3 minutes read.

What is Automata Theory?

What is Automata Theory? Automata theory is used to study the abstract machine and automata (the self-acting machine).  Abstract machine is a theoretical model of a computer used in Automata theory. Automata...

4 minutes read.

Recursive Language and Recursive Enumerable Language

Recursive Language and Recursive Enumerable Language Before discussing Recursive language and Recursive Enumerable language, let us see what Turing machine responds for some input string. If we have the Turing machine T...

4 minutes read.

Automata Greibach Normal Form

Greibach Normal Form In Greibach Normal Form, there is restriction on the position, in which, terminals and variables can appear on right-hand side of production rules. In Greibach Normal Form, every...

4 minutes read.

Ambiguity in Context Free Grammar - Automata

Ambiguity in Context Free Grammar? Context Free Grammar Context Free Grammar has one condition for production rules, which is, on the left-hand side of each rule, there must be only single variable,...

4 minutes read.

Finite Automata

Finite Automata Finite state Automata or Finite State Machine is the simplest model used in Automata. Finite state automata accepts regular language. In this, the term finite means it has a...

4 minutes read.

Context Free Grammar - Automata

Context Free Grammar Grammar defines a set of rules, and with the help of these rules valid sentences in a language are constructed. A grammar consists of collection of substitution rules,...

3 minutes read.

Undecidable Problem of Turing Machine

Automata Undecidable Problem of Turing Machine Undecidable problems areproblems which cannot be solved by any Turing machine. Example: Post Correspondence Problem is the type of undecidable Problem. Post Correspondence Problem Post Correspondence problem is...

7 minutes read.

Equivalence of Regular Grammar and Finite Automata

Equivalence of Regular Grammar and Finite Automata Regular Grammar / type -3 grammar A regular grammar or type-3 defines the language called regular language that is accepted by finite Automata.A Regular Grammar...

3 minutes read.

Minimization of Finite Automata

Minimization of Finite Automata The term minimization refers to the construction of finite automata with a minimum number of states, which is equivalent to the given finite automata. The number of...

4 minutes read.

Closure Properties of Regular Languages -Automata

Closure Properties of Regular Languages We use the term “Closure” when we talk about sets of things. If we have two regular languages L1 and L2, and L is obtained by...

3 minutes read.

Non-deterministic Turing Machine - Automata

A non-deterministic Turing machine (NTM) is a theoretical machine used in computability theory to study the extent to which a machine can "guess" at a solution and yet still be...

4 minutes read.

Automata Tutorial

What is Automata? Automata is a mathematical model and abstract model, which is used to detect string in various languages. In Automata, Regular language is recognized by Finite state AutomataContext Free language...

4 minutes read.

Conversion from Mealy Machine to Moore Machine

Conversion from Mealy Machine to Moore Machine In this topic, we will see different ways that are used for the conversion of Mealy Machine to Moore Machine. Moore Machine The output of Moore...

4 minutes read.

Minimization of Finite Automata with Output

Minimization of Finite Automata with Output The method to minimize the Moore and Mealy machine is very much similar to the method that we have used to minimize the DFA. Methods to...

3 minutes read.

Pumping Lemma for Context Free Languages

Pumping Lemma for Context Free Languages The Pumping Lemma is made up of two words, in which, the word pumping is used to generate many input strings by pushing the symbol...

3 minutes read.

Push down Automata Acceptance

Acceptance of Language by Push down Automata Push down Automata accepts the language, which is called context free language. Push down Automata = Finite Automata + Auxiliary Memory (Stack) Auxiliary Memory helps Push...

3 minutes read.

Conversion from Moore Machine to Mealy Machine

Conversion from Moore Machine to Mealy Machine Moore Machine The output of Moore machine depends only on the present state. In this, if machine has N number of states, then it will...

6 minutes read.