Assignment No 1 Toa
Assignment No 1 Toa
AUTOMATA
2019F-mulbscs-028
SYED HAZKEEL
Roll Number 028
Natural Language
◦ We define as a natural language a human spoken language, in opposition to artificial languages such as
computer languages C or Cobol. In other words, a natural language is nothing more than a spoken
language such as French, English, Hindi or Urdu.
◦ The main goal of this field is to make human languages automatically processable. Therefore, it implies
finding techniques to convert an utterance which can be either spoken or written, into formal data.
Formal data are a representation of that utterance that can be processed using a computer.
Example 1
aaa(a + b)* bbb + bbb(b + a)*aaa
A string start aaa and end bbb or start bbb and end aaa
Example 2
a(b + a)*
A string start with a
Example 3
bba*
A string start with bb
Example 4
aab*
A string start with aa
Example 5
bb(b + a)*bb
A string start bb and end bb
Example 6
OR
A string start and end same double letter
Example 7
aa(b + a)*aa
A string start aa and end aa
OR
A string start and end same double letter
Example 8
a*b
A string end with a
Example 9
( aa + bb)*
A string start with even numbers
Example 10
(a + b)*
A string start with odd numbers
REGULAR LANGUAGE
Example 2
Write a regular language of
a* b* c*
(aab,bbc,aac,abc,aabbcc,…..)
Example 3
Write a regular language of
(aa)*
(aa,aaaa,aaaaaa,…….)
Example 4
Write a regular language of
(b* (aaa)* b*)*
(bbab,bab,bbb,aaa,…..)
Example 5
Write a regular language of
(a* b*)
(a,b,ab,aa,bb,aab,….)
Example 6
Write a regular language of
(abb + a)*
(abb,a,abbabba,aabba,…..)
Example 7
Write a regular language of
(a + (bbb)*a))*
(a,bbba,abbba,bbbbbbaa,…..)
Example 8
Write a regular language of
a* b* c*
(a,b,c,ab,bc,ac,aac,bba,….)
Example 9
Write a regular language of
ab*
(ab,abbb,abbbb,abbbbb,……)
REGULAR EXPRESSION
ε is a Regular Expression indicates the language containing an empty string. (L (ε) = {ε})
If X is a Regular Expression denoting the language L(X) and Y is a Regular Expression denoting the language L(Y), then
o X + Y is a Regular Expression corresponding to the language L(X) ∪ L(Y) where L(X+Y) = L(X) ∪ L(Y).
o X . Y is a Regular Expression corresponding to the language L(X) . L(Y) where L(X.Y) = L(X) . L(Y)
(aa)*
FINITE AUTOMATA
◦ Finite Automata(FA) is the simplest machine to recognize patterns. The finite automata or finite state machine
is an abstract machine that has five elements or tuples. It has a set of states and rules for moving from one
state to another but it depends upon the applied input symbol. Basically, it is an abstract model of a digital
computer. The following figure shows some essential features of general automation.
◦ q : Initial state.
◦ δ : Transition Function.
Deterministic Finite Automata (DFA) –
1. Null (or ε) move is allowed i.e., it can move forward without reading symbols.
◦ However, these above features don’t add any power to NFA. If we compare both in terms of power, both
are equivalent.
◦ Due to the above additional features, NFA has a different transition function, the rest is the same as DFA.
◦ δ: Transition Function
◦ δ: Q X (Σ U ε ) --> 2 ^ Q.
THANKU
ALLAH HAFIZ