SlideShare a Scribd company logo
1 of 3
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

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.pdfDrIsikoIsaac
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2shah zeb
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsShiraz316
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia 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.pptxDrIsikoIsaac
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4shah zeb
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammarmeresie tesfay
 
Formal language
Formal languageFormal language
Formal languageRajendran
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of AutomataFarooq Mian
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languagesJohnDevaPrasanna1
 
Automata definitions
Automata definitionsAutomata definitions
Automata definitionsSajid Marwat
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryTsegazeab 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 ComputationAnkur Singh
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02hamzamughal39
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia 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

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

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

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