SlideShare a Scribd company logo
Lecture # 6
Automata Theory and formal languages
(CSC-307)
Muhammad Shahzeb
Example
Consider the Language L of Strings of length two
or more, defined over Σ = {a, b}, beginning
with and ending in same letters.
The language L may be expressed by the following
regular expression
a (a + b)* a + b (a + b)* b
It is to be noted that if the condition on the length
of string is not imposed in the above language
then the strings a and b will then belong to
the language.
This language L may be accepted by the following
FA
Example Continued …
Example
Consider the Language L of Strings , defined over
Σ = {a, b}, beginning with and ending in
different letters.
The language L may be expressed by the
following regular expression
a (a + b)* b + b (a + b)* a
This language may be accepted by the following
FA
Example Continued …
Example
Consider the Language L , defined over
Σ = {a, b} of all strings including Λ, The
language L may be accepted by the following FA
The language L may also be accepted by the
following FA
Example Continued …
The language L may be expressed by the following
regular expression
(a + b)*
Example
Consider the Language L , defined over Σ
= {a, b} of all non empty strings. The language
L may be accepted by the following FA
The above language may be expressed by the
following regular expression (a + b)+
Example
Consider the following FA, defined over Σ
= {a, b}
It is to be noted that the above FA does not
accept any string. Even it does not accept the
null string. As there is no path starting from
initial state and ending in final state.
Equivalent FAs
It is to be noted that two FAs are said to be
equivalent, if they accept the same language, as
shown in the following FAs.
Equivalent FAs Continued …
FA1
FA2
Note (Equivalent FAs)
FA1 has already been discussed, while in FA2,
there is no final state and in FA3, there is a final
state but FA3 is disconnected as the states 2 and 3
are disconnected.
It may also be noted that the language (empty
language) of strings accepted by FA1 , FA2 and FA3
is denoted by the empty set i.e.
{ } OR Ø
Example
Consider the Language L of strings , defined over
Σ = {a, b}, containing double a.
The language L may be expressed by the
following regular expression
(a+b)* (aa) (a+b) **
This language may be accepted by the following
FA
Example Continued …
Example
Consider the language L of strings, defined over
Σ={0, 1}, having double 0’s or double 1’s,
The language L may be expressed by the regular
expression
(0+1)* (00 + 11) (0+1)*
This language may be accepted by the following FA
Example Continued …
Example
Consider the language L of strings, defined over
Σ={a, b}, having triple a’s or triple b’s.
The language L may be expressed by RE
(a+b)* (aaa + bbb) (a+b)*
This language may be accepted by the following FA
Example Continued …
Example
Consider the EVEN-EVEN language, defined
over Σ={a, b}.
As discussed earlier that EVEN-EVEN language
can be expressed by the regular expression
( aa+bb+(ab+ba)(aa+bb)*(ab+ba) )*
EVEN-EVEN language may be accepted by the
following FA
Example Continued …
FA corresponding to finite languages
Example
Consider the language
L = {Λ, b, ab, bb}, defined over
Σ ={a, b}, expressed by
Λ + b + ab + bb OR Λ + b (Λ + a + b)
The language L may be accepted by the following
FA
Example continued …
Example
Consider the language
L = {aa, bab, aabb, bbba}, defined over
Σ ={a, b}, expressed by
aa + bab + aabb + bbba
OR aa (Λ + bb) + b (ab + bba)
The above language may be accepted by the
following FA
Example Continued …
Example
Consider
The language L expressed by the regular
expression
(a+b)*(ab+ba)
This language may be accepted by the following
FA
Example Continued …
Example
Consider
The language expressed by the regular
expression
Λ + a + b + (a+b)*(ab+ba+bb)
This language may be accepted by the following
FA
Example Continued …
Thank You…

More Related Content

What's hot

Lesson 08
Lesson 08Lesson 08
Lesson 09
Lesson 09Lesson 09
Lesson 05
Lesson 05Lesson 05
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
 
Language
LanguageLanguage
Language
Mobeen Mustafa
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphs
Arham Khan G
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
maamir farooq
 
Lesson 12
Lesson 12Lesson 12
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
hamzamughal39
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
Mobeen Mustafa
 
Lesson 03
Lesson 03Lesson 03
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Ratnakar Mikkili
 
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
 
Lesson 10
Lesson 10Lesson 10
Regular expressions-Theory of computation
Regular expressions-Theory of computationRegular expressions-Theory of computation
Regular expressions-Theory of computation
Bipul Roy Bpl
 
Lesson 04
Lesson 04Lesson 04
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
GhulamRabani9
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
Samita Mukesh
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical Analysis
Munni28
 
Introduction to Computer theory Daniel Cohen Chapter 2 Solutions
Introduction to Computer theory Daniel Cohen Chapter 2 SolutionsIntroduction to Computer theory Daniel Cohen Chapter 2 Solutions
Introduction to Computer theory Daniel Cohen Chapter 2 Solutions
Ashu
 

What's hot (20)

Lesson 08
Lesson 08Lesson 08
Lesson 08
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
 
Language
LanguageLanguage
Language
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphs
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Lesson 12
Lesson 12Lesson 12
Lesson 12
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
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
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Regular expressions-Theory of computation
Regular expressions-Theory of computationRegular expressions-Theory of computation
Regular expressions-Theory of computation
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical Analysis
 
Introduction to Computer theory Daniel Cohen Chapter 2 Solutions
Introduction to Computer theory Daniel Cohen Chapter 2 SolutionsIntroduction to Computer theory Daniel Cohen Chapter 2 Solutions
Introduction to Computer theory Daniel Cohen Chapter 2 Solutions
 

Similar to Lecture 6

5.ppt
5.ppt5.ppt
To lec 03
To lec 03To lec 03
To lec 03
Hasam Panezai
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
ReehaamMalikArain
 
Handout Regular expression with examples and lecture
Handout Regular expression with examples  and lecture Handout Regular expression with examples  and lecture
Handout Regular expression with examples and lecture
mariajan8
 
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
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 02
8threspecter
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
hamzamughal39
 
Lesson 01.ppt
Lesson 01.pptLesson 01.ppt
Lesson 01.ppt
ImXaib
 
Lesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.pptLesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.ppt
ashja1
 
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
 
Regular Expression
Regular ExpressionRegular Expression
Regular Expression
A. S. M. Shafi
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler design
Riazul Islam
 
Ch2 automata.pptx
Ch2 automata.pptxCh2 automata.pptx
Ch2 automata.pptx
TemesgenAzezew
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
RaviAr5
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
VenkataRaoS1
 
Cs419 lec4 lexical analysis using re
Cs419 lec4   lexical analysis using reCs419 lec4   lexical analysis using re
Cs419 lec4 lexical analysis using re
Arab Open University and Cairo University
 
Lesson 09.ppt
Lesson 09.pptLesson 09.ppt
Lesson 09.ppt
AbuBakkarShayan
 
Cfg part ii
Cfg   part iiCfg   part ii
Cfg part ii
Kashif Ali
 

Similar to Lecture 6 (20)

5.ppt
5.ppt5.ppt
5.ppt
 
To lec 03
To lec 03To lec 03
To lec 03
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
 
Handout Regular expression with examples and lecture
Handout Regular expression with examples  and lecture Handout Regular expression with examples  and lecture
Handout Regular expression with examples and lecture
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 02
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
 
Lesson 01.ppt
Lesson 01.pptLesson 01.ppt
Lesson 01.ppt
 
Lesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.pptLesson-01-29092022-081117pm.ppt
Lesson-01-29092022-081117pm.ppt
 
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 ...........
 
Regular Expression
Regular ExpressionRegular Expression
Regular Expression
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler design
 
Ch2 automata.pptx
Ch2 automata.pptxCh2 automata.pptx
Ch2 automata.pptx
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
 
Cs419 lec4 lexical analysis using re
Cs419 lec4   lexical analysis using reCs419 lec4   lexical analysis using re
Cs419 lec4 lexical analysis using re
 
Lesson 09.ppt
Lesson 09.pptLesson 09.ppt
Lesson 09.ppt
 
Cfg part ii
Cfg   part iiCfg   part ii
Cfg part ii
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 

Lecture 6

  • 1. Lecture # 6 Automata Theory and formal languages (CSC-307) Muhammad Shahzeb
  • 2. Example Consider the Language L of Strings of length two or more, defined over Σ = {a, b}, beginning with and ending in same letters. The language L may be expressed by the following regular expression a (a + b)* a + b (a + b)* b It is to be noted that if the condition on the length of string is not imposed in the above language then the strings a and b will then belong to the language. This language L may be accepted by the following FA
  • 4. Example Consider the Language L of Strings , defined over Σ = {a, b}, beginning with and ending in different letters. The language L may be expressed by the following regular expression a (a + b)* b + b (a + b)* a This language may be accepted by the following FA
  • 6. Example Consider the Language L , defined over Σ = {a, b} of all strings including Λ, The language L may be accepted by the following FA The language L may also be accepted by the following FA
  • 7. Example Continued … The language L may be expressed by the following regular expression (a + b)*
  • 8. Example Consider the Language L , defined over Σ = {a, b} of all non empty strings. The language L may be accepted by the following FA The above language may be expressed by the following regular expression (a + b)+
  • 9. Example Consider the following FA, defined over Σ = {a, b} It is to be noted that the above FA does not accept any string. Even it does not accept the null string. As there is no path starting from initial state and ending in final state.
  • 10. Equivalent FAs It is to be noted that two FAs are said to be equivalent, if they accept the same language, as shown in the following FAs.
  • 11. Equivalent FAs Continued … FA1 FA2
  • 12. Note (Equivalent FAs) FA1 has already been discussed, while in FA2, there is no final state and in FA3, there is a final state but FA3 is disconnected as the states 2 and 3 are disconnected. It may also be noted that the language (empty language) of strings accepted by FA1 , FA2 and FA3 is denoted by the empty set i.e. { } OR Ø
  • 13. Example Consider the Language L of strings , defined over Σ = {a, b}, containing double a. The language L may be expressed by the following regular expression (a+b)* (aa) (a+b) ** This language may be accepted by the following FA
  • 15. Example Consider the language L of strings, defined over Σ={0, 1}, having double 0’s or double 1’s, The language L may be expressed by the regular expression (0+1)* (00 + 11) (0+1)* This language may be accepted by the following FA
  • 17. Example Consider the language L of strings, defined over Σ={a, b}, having triple a’s or triple b’s. The language L may be expressed by RE (a+b)* (aaa + bbb) (a+b)* This language may be accepted by the following FA
  • 19. Example Consider the EVEN-EVEN language, defined over Σ={a, b}. As discussed earlier that EVEN-EVEN language can be expressed by the regular expression ( aa+bb+(ab+ba)(aa+bb)*(ab+ba) )* EVEN-EVEN language may be accepted by the following FA
  • 21. FA corresponding to finite languages Example Consider the language L = {Λ, b, ab, bb}, defined over Σ ={a, b}, expressed by Λ + b + ab + bb OR Λ + b (Λ + a + b) The language L may be accepted by the following FA
  • 23. Example Consider the language L = {aa, bab, aabb, bbba}, defined over Σ ={a, b}, expressed by aa + bab + aabb + bbba OR aa (Λ + bb) + b (ab + bba) The above language may be accepted by the following FA
  • 25. Example Consider The language L expressed by the regular expression (a+b)*(ab+ba) This language may be accepted by the following FA
  • 27. Example Consider The language expressed by the regular expression Λ + a + b + (a+b)*(ab+ba+bb) This language may be accepted by the following FA