Documente Academic
Documente Profesional
Documente Cultură
Theory of Automata
Material / Resources
Definition:
“A finite non-empty set of symbols (letters)”.
It is denoted by Σ ( Greek letter sigma).
Example:
Σ={A….Z, a…z} // alphabets for English language.
Σ={0,1} // Binary language alphabets.
Σ={Aa…..Zz, 0…9, -+%&*….}
Word / String
Definition:
“Sequence of symbols chosen from some alphabet” or
simply, “Set of words” or “Concatenation of finite symbols
(letters) from alphabets”.
Denoted by Σ+
Example:
Strings of English words are:
Σ+ = {any words found in English dictionary}
Strings for C++
Σ+ = {all allowable variables}
EMPTY STRING or NULL STRING
Finite Languages
In these languages the number of strings are finite such as:
L1= {a ab bab}
L2= {a b}
L3= {b}
L4= {ab}
L5= {} // Ø
L6= {є ab abb}
L7= {є}
Finite vs Infinite Languages
Infinite Languages
In these languages the number of strings are infinite such as:
Definition:
The length of string s, denoted by |s| or length(s)
or sometimes as |w|, is the number of letters in
the string.
Example:
Σ={a,b}
s=ababa
|s|=5
Length of Strings
length(λ) = 0
Reverse of a String
Definition:
The reverse of a string s in a language L denoted by
Rev(s) or sr , is obtained by writing the letters of s
in reverse order even if this backward string is not
a word in L.
Example:
If s = abc is a string defined over
Σ={a,b,c} then
Rev(s) or sr = cba
Same Words
Definition:
The words or strings are said to be same if they are
made up of the same alphabets in the same order.
E.g. book (kitab) and book (reserve).
Null Language
Definition:
A language with no words or strings. It is denoted
by ∅.
Dictionary
Definition:
An all inclusive list of words or strings created over
fixed alphabets.
Lexicographic
Definition:
When the words are arranged as per their length
i.e. shortest word first. This is a computable
arrangement.
Palindrome
Definition:
A string whose reverse is equal to itself. E.g.
reverse (eye) = eye
reverse (abba) = abba
reverse (……..) = ?
From Computability point of view, a palindrome has
same first and last alphabets and what lies in
between is a palindrome too.
Every single letter is always a ……………..?
Defining Languages
Example:
The language SQUARE, of strings defined over
Σ={a}, as {an2 : n=1,2,3,…}, can be written as
{a, aaaa, aaaaaaaaa,…}
Example:
The language DOUBLESQUARE, of strings
defined over Σ={a,b}, as
{an2 bn2 : n=1,2,3,…}, can be written as
{aa,aaa,aaaaa,aaaaaaa,aaaaaaaaaaa…}
Kleene Star Closure / Kleene Closure
If Σ = {x}
Then Σ* = {Λ, x, xx, xxx, xxxx, ….}
Lexicographic
If Σ = {0,1} Order
Then Σ* = {Λ, 0, 1, 00, 01, 10, 11, ….}
If Σ = {a,b}
Then Σ* = {Λ, a, b, aa, ab,
ba,bb,aaa,aab,aba,abb,aab,baa,bab,bba,bbb}
If Σ = {aaB, c}
Then Σ* = {Λ, aaB, c, aaBaaB, aaBc, caaB, cc, ….}
Note