0% found this document useful (0 votes)
38 views16 pages

Assignment No 1 Toa

Assign then 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views16 pages

Assignment No 1 Toa

Assign then 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

THEORY OF

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

◦ The language accepted by finite automata can be easily described by


simple expressions called Regular Expressions. It is the most effective way
to represent any language. The languages accepted by some regular
expression are referred to as Regular languages. A regular expression can
also be described as a sequence of pattern that defines a string.
◦ Regular expressions are used to match character combinations in strings.
String searching algorithm used this pattern to find the operations on a
string.
Example 1
Write a regular language of
(a + ab)*
(a, aba, aab, aba, aaa, abab, .....)

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 (ε) = {ε})

 φ is a Regular Expression denoting an empty language. (L (φ) = { })

 x is a Regular Expression where L = {x}

 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)

o R* is a Regular Expression corresponding to the language L(R*)where L(R*) = (L(R))*


Example 1
Write the regular expression for the language accepting all combinations of a's
a*
Example 2
Write the regular expression for the language accepting all the string containing
any number of a's and b's.
(a + b)*
Example 3
Write the regular expression for the language accepting all the string which are
starting with a and ending with b
a (a+b)* b
Example 4
Write the regular expression for the language over ∑ = {a} having even
length of the string.

(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.

◦ A Finite Automata consists of the following :

◦ Q : Finite set of states.

◦ Σ : set of Input Symbols.

◦ q : Initial state.

◦ F : set of Final States.

◦ δ : Transition Function.
Deterministic Finite Automata (DFA) –

DFA consists of 5 tuples {Q, Σ, q, F, δ}. Q : set of all states.Σ : set of


input symbols. ( Symbols which machine takes as input )q : Initial
state. ( Starting state of a machine )F : set of final state.δ : Transition
Function, defined as δ : Q X Σ --> Q.
Nondeterministic Finite Automata (NFA)

◦ NFA is similar to DFA except following additional features:

1. Null (or ε) move is allowed i.e., it can move forward without reading symbols.

2. Ability to transmit to any number of states for a particular input.

◦ 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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy