SlideShare a Scribd company logo
1 of 20
1
Recap Lecture 4
Regular expression of EVEN-EVEN language,
Difference between a* + b* and (a+b)*,
Equivalent regular expressions; sum, product
and closure of regular expressions; regular
languages, finite languages are regular,
introduction to finite automaton, definition of FA,
transition table, transition diagram.
2
Note
It may be noted that to indicate the initial state,
an arrow head can also be placed before that
state and that the final state with double circle,
as shown below. It is also to be noted that while
expressing an FA by its transition diagram, the
labels of states are not necessary.
a, b
a, b
3
Example
Σ = {a,b}
States: x, y, where x is both initial and final
state.
Transitions:
1.At state x reading a or b go to state y.
2.At state y reading a or b go to state x.
4
Example Continued …
These transitions can be expressed by the
following transition table
Old States New States
Reading
a
Reading
b
x ± y y
y x x
5
Example Continued …
It may be noted that the previous transition table
may be depicted by the following transition
diagram.
y
a, b
x ±
a, b
6
Example Continued …
The previous transition diagram is an FA
accepting the language of strings, defined over
Σ={a, b} of even length. It may be noted that
this language may be expressed by the regular
expression
((a+ b) (a + b))*
7
TASK
Build an FA for the language L of strings,
defined over Σ={a, b}, of odd length.
8
Solution of Task
+
a,b
–
a,b
9
Example: Consider the language L of strings,
defined over Σ={a, b}, starting with b. The
language L may be expressed by RE b(a + b)*
,
may be accepted by the following FA
a,b
a,b
b
a
–– +
1
10
Example:
Consider the language L of strings, defined
over Σ={a, b}, ending in a. The language L
may be expressed by RE
(a+b)*
a
This language may be accepted by the following
FA
11
Example Continued …
There may be another FA corresponding to the
given language.
ab
+
b
–
a
12
Example continued …
a
b
b
ba
+
a
––
13
Note
It may be noted that corresponding to a given
language there may be more than one FA
accepting that language, but for a given FA
there is a unique language accepted by that FA.
14
Note
It is to be noted that given the languages L1
and
L2
,where
L1
= The language of strings, defined over
Σ={a, b}, beginning with a
L2
= The language of strings, defined over
Σ={a, b}, not beginning with b
The Λ does not belong to L1
while it does belong to
L2
. This fact may be depicted by the
corresponding transition diagrams of L1
and L2
.
15
FA1
Corresponding to L1
The language L1
may be expressed by the
regular expression a(a + b)*
a,b
a
b a,b
–– +
16
FA2
Corresponding to L2
The language L2
may be expressed by the
regular expression a (a + b)*
+ Λ
a,b
a,b
a
b
± +
17
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
18
Example Continued …
b
a
a
b
+
ab
b
a
+
b
a–
19
Task
Build an FA accepting the Language L of
Strings, defined over Σ = {a, b}, beginning
with and ending in same letters.
20
Summing Up
Different notations of transition diagrams,
languages of strings of even length, Odd
length, starting with b, ending in a,
beginning with b, not beginning with b,
beginning and ending in same letters;

More Related Content

What's hot (20)

Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Lesson 12
Lesson 12Lesson 12
Lesson 12
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphs
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Language
LanguageLanguage
Language
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Lecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesLecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular Languages
 

Similar to Lesson 05

CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...parmeet834
 
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.pptashja1
 
Lesson 01.ppt
Lesson 01.pptLesson 01.ppt
Lesson 01.pptImXaib
 
Problemes chap1 toc
Problemes chap1 tocProblemes chap1 toc
Problemes chap1 tocparmeet834
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler designRiazul Islam
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxRaviAr5
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFAMaulik Togadiya
 
DFA Assignment solution.pptx
DFA Assignment solution.pptxDFA Assignment solution.pptx
DFA Assignment solution.pptxKamran Zafar
 

Similar to Lesson 05 (14)

To lec 03
To lec 03To lec 03
To lec 03
 
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
 
Hwsoln03 toc
Hwsoln03 tocHwsoln03 toc
Hwsoln03 toc
 
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
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
 
Lesson 01.ppt
Lesson 01.pptLesson 01.ppt
Lesson 01.ppt
 
Problemes chap1 toc
Problemes chap1 tocProblemes chap1 toc
Problemes chap1 toc
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler design
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFA
 
DFA Assignment solution.pptx
DFA Assignment solution.pptxDFA Assignment solution.pptx
DFA Assignment solution.pptx
 
To lec 04
To lec 04To lec 04
To lec 04
 

Recently uploaded

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

Lesson 05

  • 1. 1 Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure of regular expressions; regular languages, finite languages are regular, introduction to finite automaton, definition of FA, transition table, transition diagram.
  • 2. 2 Note It may be noted that to indicate the initial state, an arrow head can also be placed before that state and that the final state with double circle, as shown below. It is also to be noted that while expressing an FA by its transition diagram, the labels of states are not necessary. a, b a, b
  • 3. 3 Example Σ = {a,b} States: x, y, where x is both initial and final state. Transitions: 1.At state x reading a or b go to state y. 2.At state y reading a or b go to state x.
  • 4. 4 Example Continued … These transitions can be expressed by the following transition table Old States New States Reading a Reading b x ± y y y x x
  • 5. 5 Example Continued … It may be noted that the previous transition table may be depicted by the following transition diagram. y a, b x ± a, b
  • 6. 6 Example Continued … The previous transition diagram is an FA accepting the language of strings, defined over Σ={a, b} of even length. It may be noted that this language may be expressed by the regular expression ((a+ b) (a + b))*
  • 7. 7 TASK Build an FA for the language L of strings, defined over Σ={a, b}, of odd length.
  • 9. 9 Example: Consider the language L of strings, defined over Σ={a, b}, starting with b. The language L may be expressed by RE b(a + b)* , may be accepted by the following FA a,b a,b b a –– + 1
  • 10. 10 Example: Consider the language L of strings, defined over Σ={a, b}, ending in a. The language L may be expressed by RE (a+b)* a This language may be accepted by the following FA
  • 11. 11 Example Continued … There may be another FA corresponding to the given language. ab + b – a
  • 13. 13 Note It may be noted that corresponding to a given language there may be more than one FA accepting that language, but for a given FA there is a unique language accepted by that FA.
  • 14. 14 Note It is to be noted that given the languages L1 and L2 ,where L1 = The language of strings, defined over Σ={a, b}, beginning with a L2 = The language of strings, defined over Σ={a, b}, not beginning with b The Λ does not belong to L1 while it does belong to L2 . This fact may be depicted by the corresponding transition diagrams of L1 and L2 .
  • 15. 15 FA1 Corresponding to L1 The language L1 may be expressed by the regular expression a(a + b)* a,b a b a,b –– +
  • 16. 16 FA2 Corresponding to L2 The language L2 may be expressed by the regular expression a (a + b)* + Λ a,b a,b a b ± +
  • 17. 17 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
  • 19. 19 Task Build an FA accepting the Language L of Strings, defined over Σ = {a, b}, beginning with and ending in same letters.
  • 20. 20 Summing Up Different notations of transition diagrams, languages of strings of even length, Odd length, starting with b, ending in a, beginning with b, not beginning with b, beginning and ending in same letters;