SlideShare a Scribd company logo
Assignment:Theory of Automata
QN0.1: Write the Descriptive Language of the followingLanguage over alphabetΣ = {a,b}
 Language containing no words starting and ending on “a”.
Ans: L = {ba,bb,ab,......}
 Languages containing only words starting and ending on same letter
Ans: L = {ab,bb,ba,......}
 Language ofall words with a appears in pairs only
Ans: L = {aa,aaaa,aaaaaa,......}
 Language ofall words not ending on “b”
Ans: L = {a,ba,aba,......}
 Language ofall words with count of “a “ as multiple ofthree
Ans: L = {aaa,aab,aba,......}
Name MudassarRasool
RollNo. BCSM-F15-038
Class BCS-5A
Assignment Theory of Autometa
Submitted to: Ms. Maryam
Assignment:Theory of Automata
 EVEN-ODD
Ans: L = {a,b,aa,bb,......}
Q#02. L2 is a language defined over alphabet Σ ={a,b} as “language of all words where a never
appears after b”; now list describe the language in your own words. Create a table of with three
columns named i. Word ii. Word is in L2 or Not iii. Why?
ANS:
L = {a,aa,ab,aab,……..}
In this language a must b appear first of b example ab,aab, etc.
Word Word is in L2 or Not Why?
Now mention five words that are part of language and five words that are not.
part of language Not part of language
1) a is a part of language
2) B is a part of language
3) Ab isa part of language
4) aab is a part of language
5) Aabbis a part of language
1) ba is a not part of language
2) aba is a not part of language
3)s bba isa not part of language
4) aaba is a not part of language
5) bbaa isa notpart of language
Q#03: Write down recursive definition of following languages over alphabet
Σ={0,1}:
a. Language ofall words with odd length (L1)
Ans:
L = {0,1,000,111,……}
Step 1:0 and 1 are in L
Step 2: (000)and (111) are also in L, where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L
Assignment:Theory of Automata
b. Language ofall words not ending in ‘0’ (least length ofword is one)
Ans:
L = {o,1,….}
Step 1: 0 and 1 are in L
Step 2: (0)and (1) are also in L, where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L
c. Language ofall words with where length NOTmultiple ofthree (least length ofword
is one)
Ans:
Step 1: 0 and 1 are in L
Step 2: (000)and (111) are not in L, where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L
d. EVEN-EVEN or ODD-ODD
Ans:
Step 1: 0 and 1 are in L
Step 2: If 0 is in EVEN then 0+2 and 0-2 are also in EVEN.
Or if 1 is odd 1+2 and 1-2 are also odd.
Step 3: No strings except those constructed in above,are allowed to be in L
e. Language ofall words where ‘0’ appears at most once
Ans:
L = {0,01,10,….}
Step 1: 0 and 1 are in L
Step 2: If (0)s(0) is L .where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L

More Related Content

What's hot

Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
Dattatray Gandhmal
 
Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdf
DrIsikoIsaac
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
shah zeb
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Shiraz316
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
Rabia Khalid
 
Chapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxChapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptx
DrIsikoIsaac
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
shah zeb
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammar
meresie tesfay
 
Formal language
Formal languageFormal language
Formal language
Rajendran
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
Farooq Mian
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languages
JohnDevaPrasanna1
 
Automata definitions
Automata definitionsAutomata definitions
Automata definitions
Sajid Marwat
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
shah zeb
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
Tsegazeab Asgedom
 
Types of Language in Theory of Computation
Types of Language in Theory of ComputationTypes of Language in Theory of Computation
Types of Language in Theory of Computation
Ankur Singh
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
shah zeb
 
Language
LanguageLanguage
Language
Mobeen Mustafa
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
shah zeb
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
hamzamughal39
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
Rabia Khalid
 

What's hot (20)

Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
 
Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdf
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Chapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxChapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptx
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammar
 
Formal language
Formal languageFormal language
Formal language
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languages
 
Automata definitions
Automata definitionsAutomata definitions
Automata definitions
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
 
Types of Language in Theory of Computation
Types of Language in Theory of ComputationTypes of Language in Theory of Computation
Types of Language in Theory of Computation
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Language
LanguageLanguage
Language
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 

Similar to Theory of automata

Lesson 02
Lesson 02Lesson 02
Lesson 02
Lesson 02Lesson 02
Lesson 02
maamir farooq
 
Theory of Automata ___ Basis ...........
Theory of Automata ___ Basis ...........Theory of Automata ___ Basis ...........
Theory of Automata ___ Basis ...........
NaumanAli215439
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
shah zeb
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
ReehaamMalikArain
 
01-Introduction&Languages.pdf
01-Introduction&Languages.pdf01-Introduction&Languages.pdf
01-Introduction&Languages.pdf
TariqSaeed80
 
10651372.ppt
10651372.ppt10651372.ppt
10651372.ppt
ssuserf3a6ff
 
Lecture3 lexical analysis
Lecture3 lexical analysisLecture3 lexical analysis
Lecture3 lexical analysis
Mahesh Kumar Chelimilla
 
Lesson 01.ppt
Lesson 01.pptLesson 01.ppt
Lesson 01.ppt
ImXaib
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
hamzamughal39
 
Lesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.pptLesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.ppt
ashja1
 
Module 1 TOC.pptx
Module 1 TOC.pptxModule 1 TOC.pptx
Module 1 TOC.pptx
MohitJain21BCE1523
 
2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt
Ratnakar Mikkili
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 02
8threspecter
 
1 introduction
1 introduction1 introduction
1 introduction
parmeet834
 
Unit-1-part-1.pptx
Unit-1-part-1.pptxUnit-1-part-1.pptx
Unit-1-part-1.pptx
DiwasUpadhyay5
 
PART A.doc
PART A.docPART A.doc
regular expression
regular expressionregular expression
regular expression
RohitKumar596173
 
regular expressions (Regex)
regular expressions (Regex)regular expressions (Regex)
regular expressions (Regex)
Rebaz Najeeb
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
RaviAr5
 

Similar to Theory of automata (20)

Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Theory of Automata ___ Basis ...........
Theory of Automata ___ Basis ...........Theory of Automata ___ Basis ...........
Theory of Automata ___ Basis ...........
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
 
01-Introduction&Languages.pdf
01-Introduction&Languages.pdf01-Introduction&Languages.pdf
01-Introduction&Languages.pdf
 
10651372.ppt
10651372.ppt10651372.ppt
10651372.ppt
 
Lecture3 lexical analysis
Lecture3 lexical analysisLecture3 lexical analysis
Lecture3 lexical analysis
 
Lesson 01.ppt
Lesson 01.pptLesson 01.ppt
Lesson 01.ppt
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
 
Lesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.pptLesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.ppt
 
Module 1 TOC.pptx
Module 1 TOC.pptxModule 1 TOC.pptx
Module 1 TOC.pptx
 
2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 02
 
1 introduction
1 introduction1 introduction
1 introduction
 
Unit-1-part-1.pptx
Unit-1-part-1.pptxUnit-1-part-1.pptx
Unit-1-part-1.pptx
 
PART A.doc
PART A.docPART A.doc
PART A.doc
 
regular expression
regular expressionregular expression
regular expression
 
regular expressions (Regex)
regular expressions (Regex)regular expressions (Regex)
regular expressions (Regex)
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 

Recently uploaded

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Theory of automata

  • 1. Assignment:Theory of Automata QN0.1: Write the Descriptive Language of the followingLanguage over alphabetΣ = {a,b}  Language containing no words starting and ending on “a”. Ans: L = {ba,bb,ab,......}  Languages containing only words starting and ending on same letter Ans: L = {ab,bb,ba,......}  Language ofall words with a appears in pairs only Ans: L = {aa,aaaa,aaaaaa,......}  Language ofall words not ending on “b” Ans: L = {a,ba,aba,......}  Language ofall words with count of “a “ as multiple ofthree Ans: L = {aaa,aab,aba,......} Name MudassarRasool RollNo. BCSM-F15-038 Class BCS-5A Assignment Theory of Autometa Submitted to: Ms. Maryam
  • 2. Assignment:Theory of Automata  EVEN-ODD Ans: L = {a,b,aa,bb,......} Q#02. L2 is a language defined over alphabet Σ ={a,b} as “language of all words where a never appears after b”; now list describe the language in your own words. Create a table of with three columns named i. Word ii. Word is in L2 or Not iii. Why? ANS: L = {a,aa,ab,aab,……..} In this language a must b appear first of b example ab,aab, etc. Word Word is in L2 or Not Why? Now mention five words that are part of language and five words that are not. part of language Not part of language 1) a is a part of language 2) B is a part of language 3) Ab isa part of language 4) aab is a part of language 5) Aabbis a part of language 1) ba is a not part of language 2) aba is a not part of language 3)s bba isa not part of language 4) aaba is a not part of language 5) bbaa isa notpart of language Q#03: Write down recursive definition of following languages over alphabet Σ={0,1}: a. Language ofall words with odd length (L1) Ans: L = {0,1,000,111,……} Step 1:0 and 1 are in L Step 2: (000)and (111) are also in L, where L belongs to Σ* Step 3: No strings except those constructed in above,are allowed to be in L
  • 3. Assignment:Theory of Automata b. Language ofall words not ending in ‘0’ (least length ofword is one) Ans: L = {o,1,….} Step 1: 0 and 1 are in L Step 2: (0)and (1) are also in L, where L belongs to Σ* Step 3: No strings except those constructed in above,are allowed to be in L c. Language ofall words with where length NOTmultiple ofthree (least length ofword is one) Ans: Step 1: 0 and 1 are in L Step 2: (000)and (111) are not in L, where L belongs to Σ* Step 3: No strings except those constructed in above,are allowed to be in L d. EVEN-EVEN or ODD-ODD Ans: Step 1: 0 and 1 are in L Step 2: If 0 is in EVEN then 0+2 and 0-2 are also in EVEN. Or if 1 is odd 1+2 and 1-2 are also odd. Step 3: No strings except those constructed in above,are allowed to be in L e. Language ofall words where ‘0’ appears at most once Ans: L = {0,01,10,….} Step 1: 0 and 1 are in L Step 2: If (0)s(0) is L .where L belongs to Σ* Step 3: No strings except those constructed in above,are allowed to be in L