SlideShare a Scribd company logo
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,b
a,b
+
-
6
OR
aaa
a,b
a,b
2+
1-
bbb
a,b
a,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,bb
aa,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
-
b
aa
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

PPT
PPT
Lecture 7
PDF
Lesson 07 GTG-Kleens Theorem.ppt.pdf for Masters
PPT
PPTX
Lesson_10.pptx data science technology to create self-driving cars
PPT
Lec 03-Regular Expression.pptLec 01-IntroductionLec 01-IntroductionLec 01-Int...
PPT
PPTX
Lesson_3.pptx database management of employee
Lecture 7
Lesson 07 GTG-Kleens Theorem.ppt.pdf for Masters
Lesson_10.pptx data science technology to create self-driving cars
Lec 03-Regular Expression.pptLec 01-IntroductionLec 01-IntroductionLec 01-Int...
Lesson_3.pptx database management of employee

Similar to Lesson 09.ppt (20)

PDF
Equal regular expression / for theory of automsta.pdf
PPTX
Regular Expression Examples.pptx
PPT
PPT
Lesson 03
PPT
DOCX
Automata theory
PDF
Lex analysis
PPTX
Mod 2_RegularExpressions.pptx
PPT
Lecture 3,4
PPT
Lecture 3,4
PPT
Theory of Automata Power Point Slides Lecture 05.ppt
PPT
PPT
Lecture 6
PPT
Lesson 02.ppt computer science data analysis
PPT
Lesson 03.ppt theory of automata including basics of it
PPT
PPT
Lesson 02
PDF
Complier Design - Operations on Languages, RE, Finite Automata
PPT
Theory of Automata Lesson 02
PDF
Compilers midterm spring 2013 model answer
Equal regular expression / for theory of automsta.pdf
Regular Expression Examples.pptx
Lesson 03
Automata theory
Lex analysis
Mod 2_RegularExpressions.pptx
Lecture 3,4
Lecture 3,4
Theory of Automata Power Point Slides Lecture 05.ppt
Lecture 6
Lesson 02.ppt computer science data analysis
Lesson 03.ppt theory of automata including basics of it
Lesson 02
Complier Design - Operations on Languages, RE, Finite Automata
Theory of Automata Lesson 02
Compilers midterm spring 2013 model answer
Ad

More from AbuBakkarShayan (12)

PPTX
wk 1 lec 4-5 on Communication Skills
PPTX
Communications Skills PPt Slides for how to begin
PPTX
DLD PRESENTATION1.pptx
PPTX
Critical Section Problem.pptx
PPTX
Deadlock Algorithms 3.pptx
PDF
PPTX
Deadlock 4.pptx
PPTX
1 Synchronization.pptx
PPTX
OS Semaphore.pptx
PPT
dessler_ch1.ppt
PPT
Area-12-Internal-and-External-Environment.ppt
PPTX
Lecture #02 ECS-511.pptx
wk 1 lec 4-5 on Communication Skills
Communications Skills PPt Slides for how to begin
DLD PRESENTATION1.pptx
Critical Section Problem.pptx
Deadlock Algorithms 3.pptx
Deadlock 4.pptx
1 Synchronization.pptx
OS Semaphore.pptx
dessler_ch1.ppt
Area-12-Internal-and-External-Environment.ppt
Lecture #02 ECS-511.pptx
Ad

Recently uploaded (20)

PPTX
quadraticequations-111211090004-phpapp02.pptx
PDF
Dozuki_Solution-hardware minimalization.
PDF
PPT Determiners.pdf.......................
PDF
Smarter Security: How Door Access Control Works with Alarms & CCTV
PPTX
material for studying about lift elevators escalation
PDF
2_STM32&SecureElements2_STM32&SecureElements
DOCX
Edukasi kultural untuk kita semua maka c
PPTX
Fundamentals of Computer.pptx Computer BSC
PPT
Lines and angles cbse class 9 math chemistry
PPTX
Computers and mobile device: Evaluating options for home and work
DOCX
A PROPOSAL ON IoT climate sensor 2.docx
DOCX
fsdffdghjjgfxfdghjvhjvgfdfcbchghgghgcbjghf
PPTX
Lecture-3-Computer-programming for BS InfoTech
PPTX
Nanokeyer nano keyekr kano ketkker nano keyer
PPTX
Presentacion compuuuuuuuuuuuuuuuuuuuuuuu
PDF
Tcl Scripting for EDA.pdf
PPTX
Prograce_Present.....ggation_Simple.pptx
PPT
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
PPTX
A Clear View_ Interpreting Scope Numbers and Features
PDF
Presented by ATHUL KRISHNA.S_20250813_191657_0000.pdf
quadraticequations-111211090004-phpapp02.pptx
Dozuki_Solution-hardware minimalization.
PPT Determiners.pdf.......................
Smarter Security: How Door Access Control Works with Alarms & CCTV
material for studying about lift elevators escalation
2_STM32&SecureElements2_STM32&SecureElements
Edukasi kultural untuk kita semua maka c
Fundamentals of Computer.pptx Computer BSC
Lines and angles cbse class 9 math chemistry
Computers and mobile device: Evaluating options for home and work
A PROPOSAL ON IoT climate sensor 2.docx
fsdffdghjjgfxfdghjvhjvgfdfcbchghgghgcbjghf
Lecture-3-Computer-programming for BS InfoTech
Nanokeyer nano keyekr kano ketkker nano keyer
Presentacion compuuuuuuuuuuuuuuuuuuuuuuu
Tcl Scripting for EDA.pdf
Prograce_Present.....ggation_Simple.pptx
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
A Clear View_ Interpreting Scope Numbers and Features
Presented by ATHUL KRISHNA.S_20250813_191657_0000.pdf

Lesson 09.ppt

  • 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