Descriptive and Recursive Language
Descriptive and Recursive Language
1
Table of Contents
ASSIGNMENT # 1.................................................................................1
EXAMPLES OF DESCRIPTIVE LANGUAGE DEFINATION:....................3
EXAMPLE # 1:.........................................................................................3
EXAMPLE # 2:.........................................................................................3
EXAMPLE # 3:.........................................................................................3
EXAMPLES OF RECURSIVE LANGUAGE DEFINATION:........................4
EXAMPLE # 1:.......................................................................................4
EXAMPLE # 2:.......................................................................................4
EXAMPLE # 3:.......................................................................................4
2
EXAMPLES OF DESCRIPTIVE LANGUAGE
DEFINATION:
EXAMPLE # 1:
The language L of string of even length, defined over ∑ ¿{c } can be written
as:
L= {cc, cccc, cccccc, cccccccc …}
EXAMPLE # 2:
The language L of string that does not start with “y” defined over ∑ ¿{ x , y , z }
can be written as:
L= {x, z, xz, xy, zx, zy, zzz, zzy, xxy…}
EXAMPLE # 3:
The language L of string of length 3, defined over ∑ ¿{2,4,6 } can be
written as:
L= {222, 224, 226, 246, 264, 462, 642, 666…}
3
EXAMPLES OF RECURSIVE LANGUAGE
DEFINATION:
EXAMPLE # 1:
EXAMPLE # 2:
Recursive definition of Σ*
Rule 1: Λ∈Σ*2.
Rule 2: For all x∈Σ* and all a∈Σ, xa∈Σ*.
Rule 3: Nothing else is in Σ* unless it can be obtained by a finite number
of applications of rules 1 and 2.
EXAMPLE # 3:
Defining the language L, of strings containing cc or ee or ii, defined over
∑ ¿{c ,e ,i }.
Rule 1: cc, ee and ii are in L.
Rule 2: s(cc)s, s(ee)s s(ii)s are also in L, where s belongs to Σ*.
Rule 3: No strings except those constructed in above, are allowed to be
in L.