Theory of Automata Math'S-Overview: by DR - Hamed Alrjoub
Theory of Automata Math'S-Overview: by DR - Hamed Alrjoub
Dr.Hamed Alrjoub
THEORY OF AUTOMATA
MATH'S- OVERVIEW
Theory Of Automata - Maths
2
Theory Of Automata - Maths
BACKGROUND
We shall form several mathematical models that will
describe with varying degrees of accuracy parts of
computers, types of computers, and similar machines.
3
Theory Of Automata - Maths
4
Theory Of Automata - Maths
6
Theory Of Automata - Maths
7
Theory Of Automata - Maths
LANGUAGES
In English, we distinguish 3 different entities: letters, words,
and sentences.
8
Theory Of Automata - Maths
9
Theory Of Automata - Maths
Basic Definitions
A finite non-empty set of symbols (letters), is
called an
alphabet. It is denoted by Σ ( Greek letter
sigma).
Example:
Σ={a,b}
Σ={0,1} //important as this is the language
//which the computer understands.
Σ={i,j,k}
10
Theory Of Automata - Maths
STRINGS
Example:
If Σ= {a,b} then
a, abab, aaabb, ababababababababab
11
Theory Of Automata - Maths
WORDS
Words are strings belonging to some language.
Example:
If Σ= {x} then a language L can be defined as
L={xn : n=1,2,3,…..} or L={x,xx,xxx,….}
Here x,xx,… are the words of L
All words are strings, but not all strings are words.
12
Theory Of Automata - Maths
Two words are considered the same if all their letters are
the same and in the same order.
13
Theory Of Automata - Maths
Discussion of null
The language that has no words is denoted by the standard
symbol for null set, ø.
14
Theory Of Automata - Maths
They can tell us how to construct all the words in the language by
some clear procedures.
15
Theory Of Automata - Maths
DEFINING LANGUAGES
Note that because of the way we have defined it, the language
L1 does not include the null word Λ.
16
Theory Of Automata - Maths
EXAMPLE:
The language L of strings of odd length,
defined over Σ={a}, can be written as
L={a, aaa, aaaaa,…..}
Example:
The language L of strings that does not start
with a, defined over Σ={a,b,c}, can be written as
17
Theory Of Automata - Maths
EXAMPLE:
The language L of strings of length 2, defined over
Σ={0,1,2}, can be written as
L={00, 01, 02,10, 11,12,20,21,22}
Example:
The language L of strings ending in 0, defined over
Σ ={0,1}, can be written as
L={0,00,10,000,010,100,110,…}
18
Theory Of Automata - Maths
EXAMPLE:
The language EQUAL, of strings with number of
a’s equal to number of b’s, defined over
Σ={a,b}, can be written as
{Λ ,ab,aabb,abab,baba,abba,…}
19
Theory Of Automata - Maths
CONCATENATION
Let us define an operation, concatenation, in which two strings are
written down side by side to form a new longer string.
xxx concatenated with xx is the word xxxxx
xn concatenated with xm is the word xn+m
20
Theory Of Automata - Maths
21
Theory Of Automata - Maths
22
Theory Of Automata - Maths
DEFINITION: LENGTH
We define the function length of a string to be the number
of letters in the string.
Example:
If a = xxxx in the language L1, then length(a) = 4
If c = 428 in the language L3, then length(c) = 3
If d = 0 in the language L3, then length(d) = 1
In any language that includes the null word Λ, then length(Λ) =
0
23
Theory Of Automata - Maths
Recall that the language L1 does not contain the null string
Λ. Let us define a language like L1 but that does contain Λ:
L4 = { Λ, x, xx, xxx, xxxx, … }
= { xn for n = 0, 1, 2, 3, … }
Here we have defined that
x0 = Λ (NOT x0 = 1 as in algebra)
In this way, xn always means the string of n alphabet letters
x’s.
Remember that even Λ is a word in the language, it is not a
letter in the alphabet.
24
Theory Of Automata - Maths
DEFINITION: REVERSE
25
Theory Of Automata - Maths
DEFINITION: PALINDROME
26
Theory Of Automata - Maths
PALINDROME
27
Theory Of Automata - Maths
TASK
28
Theory Of Automata - Maths
KLEENE CLOSURE
Examples:
If ∑ = { x } then ∑* = { Λ, x, xx, xxx, … }
If ∑ = { 0, 1 } then ∑* = { Λ, 0, 1, 00, 01, 10, 11,
000, 001, … }
If ∑ = { a, b, c } then ∑* = { Λ, a, b, c, aa, ab, ac,
ba, bb, bc, ca, cb, cc, aaa, … }
29
Theory Of Automata - Maths
LEXICOGRAPHIC ORDER
30
Theory Of Automata - Maths
KLEENE CLOSURE
31
Theory Of Automata - Maths
KLEENE CLOSURE
32
Theory Of Automata - Maths
KLEENE CLOSURE
33
Theory Of Automata - Maths
34
Theory Of Automata - Maths
35
Theory Of Automata - Maths
POSITIVE CLOSURE
If we wish to modify the concept of closure to refer only
the concatenation of some (not zero) strings from a set S,
we use the notation + instead of *.
This “plus operation” is called positive closure.
Example: if ∑ = { x } then ∑+ = { x, xx, xxx, … }
Observe that:
36
Theory Of Automata - Maths
EXAMPLE
Defining language of EVEN
Step 1:
2 is in EVEN.
Step 2:
If x is in EVEN then x+2 and x-2 are also in
EVEN.
Step 3:
No strings except those constructed in above,
are allowed to be in EVEN.
37
Theory Of Automata - Maths
EXAMPLE
39
Theory Of Automata - Maths
40
Theory Of Automata - Maths
41
Theory Of Automata - Maths
42
Theory Of Automata - Maths
43
Theory Of Automata - Maths
44