SlideShare a Scribd company logo
1 of 20
1
Recap lecture 8
TG definition, Examples:accepting all
strings, accepting none, starting with b,
not ending in b, containing aa,
containing aa or bb
2
Task Solution
Build a TG accepting the language L of strings,
defined over Σ={a, b}, ending in b.
Solution The language L may be expressed by
RE (a + b)*
b, may be accepted by the following
TG
b–– +
a,b
3
Example
Consider the language L of strings, defined over
Σ={a, b}, having triple a or triple b. The
language L may be expressed by RE
(a+b)*
(aaa + bbb) (a+b)*
This language may be accepted by the following
TG
4
Example Continued …
2
a
1–
3
6+
4
5
a
a
a,b
b
b
b
a,b
5
OR
aaa,bbb
a,ba,b
+-
6
OR
aaa
a,ba,b
2+1-
bbb
a,ba,b
4+3-
7
Example
Consider the language L of strings, defined over
Σ = {a, b}, beginning and ending in
different letters.
The language L may be expressed by RE
a(a + b)*
b + b(a + b)*
a
The language L may be accepted by the
following TG
8
Example continued …
b
1-
5+
a
4+
b
a
a,b
a, b
2
3
9
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
This language may be accepted by the following
TG
10
Example Continued …
b
1-
5+
a
4+
a
b
a,b
a, b
2
3
11
Task
Build a TG accepting the language L of strings,
defined over Σ={a, b}, beginning with and
ending in the same letters.
12
Example
Consider the EVEN-EVEN language, defined
over Σ={a, b}. As discussed earlier that
EVEN-EVEN language can be expressed
by a regular expression (aa+bb+(ab+ba)
(aa+bb)*
(ab+ba))*
The language EVEN-EVEN may be accepted
by the following TG
13
Example continued …
ab,ba
ab,ba
1±
aa,bbaa,bb
2
14
Example
Consider the language L, defined over Σ={a, b}, in
which a’s occur only in even clumps and that
ends in three or more b’s. The language L can be
expressed by its regular expression
(aa)*
b(b*
+(aa(aa)*
b)*
)bb
OR
(aa)*
b(b*
+( (aa)+
b)*
)bb
The language L may be accepted by the following TG
15
Example Continued …
aa
b
-
baa
b b +1 2
16
Example:
Consider the following TG
b
bb
bbb
ab
bb
b
b
a a,b
bbb
a a a
- +
a
1
2
3
4
17
Example Continued …
Consider the string abbbabbbabba. It may be
observed that the above string traces the
following three paths, (using the states)
1) (a)(b) (b) (b) (ab) (bb) (a) (bb) (a)
(-)(4)(4)(+)(+)(3)(2)(2)(1)(+)
2) (a)(b) ((b)(b)) (ab) (bb) (a) (bb) (a)
(-)(4)(+)(+)(+)(3)(2)(2)(1)(+)
3) (a) ((b) (b)) (b) (ab) (bb) (a) (bb) (a)
(-) (4)(4)(4)(+) (3)(2)(2)(1)(+)
18
Example Continued …
Which shows that all these paths are successful,
(i.e. the path starting from an initial state and
ending in a final state).
Hence the string abbbabbbabba is accepted by
the given TG.
19
Generalized Transition Graphs
A generalized transition graph (GTG) is a
collection of three things
1) Finite number of states, at least one of which
is start state and some (maybe none) final
states.
2) Finite set of input letters (Σ) from which input
strings are formed.
3) Directed edges connecting some pair of
states labeled with regular expression.
It may be noted that in GTG, the labels of
transition edges are corresponding regular
expressions
20
Summing Up
TGs accepting the languages:
containing aaa or bbb, beginning and
ending in different letters, beginning and
ending in same letters, EVEN-EVEN, a’s
occur in even clumps and ends in three
or more b’s, example showing different
paths traced by one string, Definition of
GTG

More Related Content

What's hot (20)

Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Lesson 12
Lesson 12Lesson 12
Lesson 12
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphs
 
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. ...
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Automata Theory
Automata TheoryAutomata Theory
Automata Theory
 
Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
 

Similar to Lesson 09 (17)

Lesson 09.ppt
Lesson 09.pptLesson 09.ppt
Lesson 09.ppt
 
Lex analysis
Lex analysisLex analysis
Lex analysis
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 
Compilers midterm spring 2013 model answer
Compilers midterm spring 2013   model answerCompilers midterm spring 2013   model answer
Compilers midterm spring 2013 model answer
 
Automata theory -RE to NFA-ε
Automata theory -RE to  NFA-εAutomata theory -RE to  NFA-ε
Automata theory -RE to NFA-ε
 
Language
LanguageLanguage
Language
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
13000120020_A.pptx
13000120020_A.pptx13000120020_A.pptx
13000120020_A.pptx
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
 
regular expressions (Regex)
regular expressions (Regex)regular expressions (Regex)
regular expressions (Regex)
 
Model answer of exam TC_spring 2013
Model answer of exam TC_spring 2013Model answer of exam TC_spring 2013
Model answer of exam TC_spring 2013
 
Theory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsTheory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and Problems
 
Ch03
Ch03Ch03
Ch03
 
Theory of computation Lec2
Theory of computation Lec2Theory of computation Lec2
Theory of computation Lec2
 
To lec 03
To lec 03To lec 03
To lec 03
 
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
 

Recently uploaded

BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 

Recently uploaded (20)

BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 

Lesson 09

  • 1. 1 Recap lecture 8 TG definition, Examples:accepting all strings, accepting none, starting with b, not ending in b, containing aa, containing aa or bb
  • 2. 2 Task Solution Build a TG accepting the language L of strings, defined over Σ={a, b}, ending in b. Solution The language L may be expressed by RE (a + b)* b, may be accepted by the following TG b–– + a,b
  • 3. 3 Example Consider the language L of strings, defined over Σ={a, b}, having triple a or triple b. The language L may be expressed by RE (a+b)* (aaa + bbb) (a+b)* This language may be accepted by the following TG
  • 7. 7 Example Consider the language L of strings, defined over Σ = {a, b}, beginning and ending in different letters. The language L may be expressed by RE a(a + b)* b + b(a + b)* a The language L may be accepted by the following TG
  • 9. 9 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 This language may be accepted by the following TG
  • 11. 11 Task Build a TG accepting the language L of strings, defined over Σ={a, b}, beginning with and ending in the same letters.
  • 12. 12 Example Consider the EVEN-EVEN language, defined over Σ={a, b}. As discussed earlier that EVEN-EVEN language can be expressed by a regular expression (aa+bb+(ab+ba) (aa+bb)* (ab+ba))* The language EVEN-EVEN may be accepted by the following TG
  • 14. 14 Example Consider the language L, defined over Σ={a, b}, in which a’s occur only in even clumps and that ends in three or more b’s. The language L can be expressed by its regular expression (aa)* b(b* +(aa(aa)* b)* )bb OR (aa)* b(b* +( (aa)+ b)* )bb The language L may be accepted by the following TG
  • 16. 16 Example: Consider the following TG b bb bbb ab bb b b a a,b bbb a a a - + a 1 2 3 4
  • 17. 17 Example Continued … Consider the string abbbabbbabba. It may be observed that the above string traces the following three paths, (using the states) 1) (a)(b) (b) (b) (ab) (bb) (a) (bb) (a) (-)(4)(4)(+)(+)(3)(2)(2)(1)(+) 2) (a)(b) ((b)(b)) (ab) (bb) (a) (bb) (a) (-)(4)(+)(+)(+)(3)(2)(2)(1)(+) 3) (a) ((b) (b)) (b) (ab) (bb) (a) (bb) (a) (-) (4)(4)(4)(+) (3)(2)(2)(1)(+)
  • 18. 18 Example Continued … Which shows that all these paths are successful, (i.e. the path starting from an initial state and ending in a final state). Hence the string abbbabbbabba is accepted by the given TG.
  • 19. 19 Generalized Transition Graphs A generalized transition graph (GTG) is a collection of three things 1) Finite number of states, at least one of which is start state and some (maybe none) final states. 2) Finite set of input letters (Σ) from which input strings are formed. 3) Directed edges connecting some pair of states labeled with regular expression. It may be noted that in GTG, the labels of transition edges are corresponding regular expressions
  • 20. 20 Summing Up TGs accepting the languages: containing aaa or bbb, beginning and ending in different letters, beginning and ending in same letters, EVEN-EVEN, a’s occur in even clumps and ends in three or more b’s, example showing different paths traced by one string, Definition of GTG