0% found this document useful (0 votes)
57 views

Drawing Finite Automation

This document contains an assignment submitted by Muhammad Nasir for a Theory of Automata course. It includes 10 questions asking to draw finite automata for various languages. For each question, Muhammad provides the possible regular expression to describe the language and draws the corresponding finite automaton. He also explains some of the regular expressions and properties of equivalent finite automata.

Uploaded by

M Nasir Baloch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Drawing Finite Automation

This document contains an assignment submitted by Muhammad Nasir for a Theory of Automata course. It includes 10 questions asking to draw finite automata for various languages. For each question, Muhammad provides the possible regular expression to describe the language and draws the corresponding finite automaton. He also explains some of the regular expressions and properties of equivalent finite automata.

Uploaded by

M Nasir Baloch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

ISLAMIA UNIVERSITY OF BAHAWALPUR

SUBJECT THEORY OF AUTOMATA

ASSIGNMENT TITLE Draw Finite Automata’s


SUBMITTED TO MISS HIRA AWAIS
SUBMITTED BY MUHAMMAD NASIR
DEGREE TITLE BS-COMPUTER SCIENCE
SESSION 2020-204
SEMESTER 3rd
SECTION EVE-A
ROLL NUM SP20M2BB030

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
Q.1 Build an FA for the language L of strings, defined over Σ={a, b}, of odd
length.
Possible Regular Expression
(a+b)((a+b)(a+b))*i
((a+b)(a+b))*(a+b)ii

Given Finite Automata My Creation

Q.2 Build an FA accepting the Language L of Strings, defined over Σ = {a,


b}, beginning with and ending in same letters.
Possible Regular Expression
a(a + b)*a + b(a + b)*biii

Given Finite Automata My Creation

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
Q.3 Consider the Language L of Strings , defined over Σ = {a, b}, beginning
with and ending in different letters.
Possible Regular Expression
a (a + b)* b + b (a + b)* aiv

Given Finite Automata My Creation

Q.4 Consider the Language L , defined over Σ = {a, b} of all strings


including Λ,
Possible Regular Expression
(a+b)*v

Given Finite Automata My Creation

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
Q.5 Consider the Language L , defined over Σ = {a, b} of all
nonempty strings.
Possible Regular Expression
(a+b)+vi

Given Finite Automata My Creation

Q.6 Equivalent FA’s


Possible Regular Expression
vii

Given Finite Automata’s My Creation

These FA’s will not accept any String not Here I create FA’s which can accept null with
even null, so that’s why all three FA’s are all possible strings of alphabets (a,b), I draw 2
equal FA’s both accept same so both are equivalent

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
Q.7 Consider the Language L of strings , defined over Σ = {a, b}, containing
double a.
Possible Regular Expression
(a+b)* (aa) (a+b)*.viii

Given Finite Automata My Creation

Q.8 Consider the language L of strings, defined over


Σ={0, 1}, having double 0’s or double 1’s.
Possible Regular Expression
(0+1)* (00 + 11) (0+1)*ix

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
Given Finite Automata My Creation

Q.9 Consider the language L of strings, defined over Σ= {a, b}, having triple
a’s or triple b’s.
Possible Regular Expression
(a+b)* (aaa + bbb) (a+b)*x

Given Finite Automata My Creation

Q.10 Consider the EVEN-EVEN language, defined over Σ= {a, b}. As


discussed earlier that EVEN-EVEN

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
Possible Regular Expression
(aa+bb+(ab+ba)(aa+bb)*(ab+ba))*xi

Given Finite Automata My Creation

NOT GIVEN

Theory Of Automata
Created By Muhammad Nasir (SP20M2BB030) BS-COMPUTER SCIENCE EVE-A
i
Basically as we are asked that string of the given language must have odd length, so Expression No 1 is the expression for
that language because, (a+b) is compulsory and after that ((a+b)(a+b))* have clean closure means it may or may not exist,
but if it exist we have two OR with and operator means one alphabet from (a+b) and also one another will come from next
(a+b) so string can be something like
Aaa, aab,baa,abbab, baabb, and so on.

ii
Now lets evaluate Expression 2. it is ((a+b)(a+b)*(a+b) so basically we just swap the order of given regular expression, but
it also convey the same meaning, let create some string using Regex 2 so we might get,
Aab, aba,aabba,abbaa and so on so all the string generated from these 2 expression can only have odd number of length.
iii
Now the rule for language is that, only string that start and end with same letter are accepted, so our Regular Expression
a(a + b)*a + b(a + b)*b ,
iv
This language rule is that only string starting and ending with different letters are accepted, so out regular expression a (a
+ b)* b + b (a + b)* a, there are two parts connected with OR operator means that one of them can occur at once, first part
a(a+b)*b states that letter can start with a but must end with b, and part b b(a+b)*a states that letter can begin with b but
must end with a, let see finite automata of this class

v
This language rule states that null or all string of (a,b) can be accepted, so the regex (a,b)* steric clean closure states that
all the string in result of concatenation of a and b are accepted of any length including null ^.
vi
This language rule states that all the string of a and b are accepted but not the ^ null, empty string. So instead of clean
closure we use positive closure which (a+b)+ it states that all possible string but not including null.
vii
Equivalent FA’s means if two or more FA’s accept the same language (same string) then these kind of FA’s are said to be
equivalent. Let see example to understand
viii
According to language rule it accept only the string which must contain double aa, so regex will be (a+b) * (aa) (a+b)*, first
part can be null but middle part aa must come so that it will be acceptable and the last part is again optional (clean
closure)
ix
According to language rule the langue only accept the strings(numbers) which contains 00 or 11, so for this language the
regex will be (0+1)* (00 + 11) (0+1)*,
In this regex first part is optional(clean closure) second part is necessary either 00 or 11 must have to come, then the last
part is optional(clean closure), so this regex satisfied the language rule
x
According to language rule, only the string having triple a or tiple b are accepted so the regex for this language will be
(a+b)* (aaa + bbb) (a+b)*
First part is optional (clean closure) from second part aaa or bbb must have to come and the last part is optional, so this
regex satisfied the language rule.
xi
According to language rule language is even-even which means only string having even number of a’s and even
number of b’s are acceptable, so the regex (aa+bb+(ab+ba)(aa+bb) *(ab+ba))*
First of all there is whole clean closure of regex, which means ^ and ^ is known as even, in first there are two part in first
part there must come ‘aa’ or ‘bb’ so let suppose we choose aa, and from second part must come one ‘ab’ or ‘ba’ so let
suppose we choose ba our string is aaba, next part is option so we don’t choose any thing in last part there must be one
choosen from ‘ab’ or ‘ba’ so we choose ab now our string will be
aabaab so in this string there are 4 times a and two times b which means both are even-even so this regex satisfied the
language rule

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