Professional Documents
Culture Documents
Act CH 1
Act CH 1
Chapter 1
INTRODUCTION
Automata & complexity 2
The word automaton itself, closely related to the word "automation", denotes
automatic processes carrying out the production of specific processes.
Automata theory deals theory of abstract computing devices with the logic of
computation, referred to as automata.
Through automata, computer scientists are able to understand
how machines compute functions and solve problems
and more importantly, computability or decidability of problems.
… 3
Alphabets
• An alphabet is a finite, non-empty set of symbols. Conventionally, we use the
symbol for alphabet.
• ={0,1} , the binary alphabet
• ={a, b, c,…, z} , the lower-case letters
• ={0, 1, 2,…, 9}, the Arabic numerals
Strings
• A string (sometimes called word) is a finite sequence of symbols chooses from
some alphabets.
• 11010 is a string from the binary alphabet ={0,1}
… 5
Concatenation of strings
• Let x and y be strings.
• Then xy denotes the concatenation of x and y, that is the string formed by making a copy
of x followed by a copy of y.
• Let x= { a, b, c, … z} and y= { 1, 2, …9}, then xy= {a1, a2, …, b1, b2, … }
Languages
A language is a set of strings all of which are chosen from some *, where is a
particular set of alphabet.
If is an alphabet, and L * then L is a language over .
አማርኛ is a language consisted all legal አማርኛ words, which are set of strings over
አማርኛ ሆሄያት (alphabets).
… 8
C++, Java or any other programming languages are languages which consists set of legal
strings over ASCII characters.
In the study of automata we may create other languages too, like
Set of strings over alphabet = {0, 1}, that ends with 1. L= {1, 01, 001, 101 …}
Set of strings over alphabet = {0, 1}, which consists even number of 0’s. L= {0011, 1010 …}
And others of such a type.
Finite state automata 9
1. Check if the string 011010 and 111110 are legal for the DFA given below.
2. Draw a DFA that accept the following languages over alphabet ={0, 1}
a. Set of all strings ends with 00.
b. Set of all strings with three consecutive 000’s (not necessarily at the end)
Notation 13
0 1
qi q1 qi
q1 qf qi
qf qf qi
Exercise: draw DFA that can accept even number of 0’s and 1’s.
Language of DFA 14
The language of DFA A=(Q, , , qi, qf) denoted by L(A) can be defined as:
L(A)= {w| (qi, w) is in qf}
If L is L(A) for some DFA A then we can say L is a regular language.
Which means, the language of A is the set of strings w that takes the start state qi to one of
the accepting states qf.
Generally, language of DFA is a regular language.
NFA 15
Example: design an NFA that accepts strings ends with 01 over ={0,1}
Language of NFA 17
Formally -NFA can be defined as A=(Q, , , qi, qf) where all components have the same
interpretation as NFA except a transition function .
now is a function that takes arguments
A state in Q, and
A member of U {} that is ether input symbol or .
Note can not be a member of any alphabet, it’s a string of length zero.
-closures
State q is ECLOSE (q)
If state p is ECLOSE(q), and there is a transition from state p to state r labeled , then r is
ECLOSE(q).
if is a transition function of -NFA involved, p is ECLOSE(q) then ECLOSE(q) also contains all
states in (p, ).
… 21
1. take the ε-closure for the starting state of -NFA as a starting state of DFA.
2. Find the states for each input symbol that can be traversed from the present.
That means the union of transition value and their closures for each state of NFA present in the
current state of DFA.
3. If we found a new state, take it as current state and repeat step 2.
4. Repeat Step 2 and Step 3 until there is no new state present in the transition table of DFA.
5. Mark the states of DFA as a final state which contains the final state of NFA.
Examples 23