Regular Languages, which are accepted by finite automata, are the most constrained sorts of languages according to Chomsky’s hierarchy.
The four types of grammar are as follows, according to the Chomsky hierarchy:
Unrestricted grammar is also referred to as type 0.
Grammar of Type 1 is referred to as context-sensitive grammar.
Type 2 is referred to as context-free grammar.
Regular Grammar of Type 3.
Simple expressions known as Regular Expressions make it easy to explain the language that finite automata can understand. Any language can be represented in this way the most effective. The term “Regular languages” refers to the languages that some regular expressions allow. A string definition defined by a series of patterns is another way to define a regular expression. String character combinations can be matched using regular expressions. This pattern was employed by the string searching method to find the operations on a string.
Regular Expression :
A language containing an empty string is indicated by the notation “is a Regular Expression.” (L (ε) = {ε})
A Regular Expression that represents an empty language is. (L (φ) = { })
L = “x” and “x” is a Regular Expression.
When X and Y are Regular Expressions designating the language L(X) and L(Y), respectively, then the language L(X) L(Y) corresponds to the regular expression X + Y, where L(X+Y) = L(X) L. (Y).
A Regular Expression that corresponds to the language L(X) is X. Y. L(X.Y) = L(X), hence L(Y) = L(X). L(Y)
The language L(R*) corresponds to the regular expression R*, where L(R*) = (L(R))*.
Closure Properties of Regular Languages :
Union: If two regular languages L1 and L2 are combined, L1 ∪ L2 will also be regular.
Intersection: Intersection of L1 L2 will also be a regular if L1 and L2 are two regular languages.
Concatenation: If L1 and If L2 are two regular languages, their concatenation L1.L2 will also be regular.
Kleene Closure: A regular language L1 will likewise have a regular Kleene closure L1*.
Complement: If L(G) is a regular language, L'(G) will also be a regular language.