SlideShare a Scribd company logo
1 of 21
1
Recap lecture 10
Definition of GTG, examples of GTG accepting
the languages of strings:containing aa or bb,
beginning with and ending in same letters,
beginning with and ending in different letters,
containing aaa or bbb,
Nondeterminism, Kleene’s theorem (part I, part
II, part III), proof of Kleene’s theorem part I
2
Kleene’s Theorem continued …
Proof(Kleene’s Theorem Part II)
To prove part II of the theorem, an algorithm
consisting of different steps, is explained
showing how a RE can be obtained
corresponding to the given TG. For this purpose
the notion of TG is changed to that of GTG i.e.
the labels of transitions are corresponding REs.
3
Kleene’s Theorem part II
continued …
Basically this algorithm converts the given TG to
GTG with one initial state along with a single
loop, or one initial state connected with one final
state by a single transition edge. The label of the
loop or the transition edge will be the required
RE.
Step 1 If a TG has more than one start states,
then introduce a new start state connecting the
new state to the old start states by the transitions
labeled by Λ and make the old start states the
non-start states. This step can be shown by the
following example
4
Example
aa
b
bb
a
1-
2-
3+
4+
b
a
5
Example Continued ...
aa
b
bb
a
1
2
3+
4+
-
Λ
Λ
b
a
6
Kleene’s Theorem part II
continued …
Step 2:
If a TG has more than one final states, then
introduce a new final state, connecting the old
final states to the new final state by the
transitions labeled by Λ.
This step can be shown by the previous
example of TG, where the step 1 has already
been processed
7
Example
aa
b
bb
a
1
2
3+
4+
-
b
a
Λ
Λ
8
Example continued …
aa
b
bb
a
1
2
3
4
-
+
Λ
Λ
Λ
Λ
b
a
9
Kleene’s Theorem part II
continued …
Step 3:
If a state has two (more than one) incoming
transition edges labeled by the corresponding
REs, from the same state (including the
possibility of loops at a state), then replace all
these transition edges with a single transition
edge labeled by the sum of corresponding REs.
This step can be shown by a part of TG in the
following example
10
Example
r2
r1
4 5
r3
…. ….
r4
r1
+r2
4 5
r3
+r4
…. ….
The above TG can be reduced to
11
Note
The step 3 can be generalized to any finite
number of transitions as shown below
The above TG can be reduced to
5
r1
….
…
.
rn
r2
….
5
r1
+r2
+ +rn
…. ….
…
12
Kleene’s Theorem part II
continued …
Step 4 (bypass and state elimination)
If three states in a TG, are connected in
sequence then eliminate the middle state and
connect the first state with the third by a single
transition (include the possibility of circuit as
well) labeled by the RE which is the
concatenation of corresponding two REs in the
existing sequence. This step can be shown by a
part of TG in the following example
13
Example
4 5
r3
…. ….6
r4
r2
4 6….
r2
r3
*
r4 ….
To eliminate state 5 the above can be reduced to
Consider the following example containing a circuit
14
Example
Consider the part of a TG, containing a circuit at
a state, as shown below
To eliminate state 3 the above TG can be
reduced to
r4
4
r3
3
r2
2
r1 ….….
2 4….
r1
r2
*
r3 ….
r4
r2
*
r3
15
Example
Consider a part of the following TG
To eliminate state 3 the above TG can be
reduced to
r9
r8
4
r7
3
r5
r4
r3
2
r1
r2
r6
…. ….
16
Example continued ...
2
To eliminate state 4 the above TG can be
reduced to
42
r2
+r3
r5
*
r7
r6
+r8
r5
*
r4
(r1
+r3
r5
*
r4
)+(r2
+r3
r5
*
r7
)(r9
+r8
r5
*
r7
)*
(r6
+r8
r5
*
r4
)
r1
+r3
r5
*
r4 r9
+r8
r5
*
r7
…. ….
…. ….
17
Note
It is to be noted that to determine the RE
corresponding to a certain TG, four steps have
been discussed. This process can be explained
by the following particular examples of TGs
18
Example
Consider the following TG
To have single final state, the above TG can be
reduced to the following
bba
aaa
2+
3+
ab,ba
-
aa,b
1
19
Example continued …
To eliminate states 2 and 3, the above TG can
be reduced to the following
The above TG can be reduced to the following
bba
aaa
2
3
ab+ba
-
aa+b
1
4+
Λ
Λ
ab+ba
-
aa+b
1 4+aaa Λ+bbaΛ
20
Example continued …
To eliminate state 1 the above TG can be
reduced to the following
Hence the required RE is (ab+ba)
(aa+b)*
(aaa+bba)
- +
(ab+ba)(aa+b)*
(aaa+bba)
21
Summing Up
proof of Kleene’s theorem part II (method with
different steps), particular examples of TGs to
determine corresponding Res.

More Related Content

What's hot

Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4shah zeb
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4shah zeb
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2shah zeb
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Srimatre K
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Turing Machine
Turing MachineTuring Machine
Turing MachineRajendran
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theoryNYversity
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1Abdul Khan
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsShiraz316
 
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 ProblemsRushabh2428
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computationprasadmvreddy
 
8-Practice problems on operator precedence parser-24-05-2023.docx
8-Practice problems on operator precedence parser-24-05-2023.docx8-Practice problems on operator precedence parser-24-05-2023.docx
8-Practice problems on operator precedence parser-24-05-2023.docxvenkatapranaykumarGa
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphsArham Khan G
 

What's hot (20)

Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theory
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Turing machines
Turing machinesTuring machines
Turing machines
 
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
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
 
8-Practice problems on operator precedence parser-24-05-2023.docx
8-Practice problems on operator precedence parser-24-05-2023.docx8-Practice problems on operator precedence parser-24-05-2023.docx
8-Practice problems on operator precedence parser-24-05-2023.docx
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphs
 

Similar to Lesson 11

Cryptography Using Laplace Transform
Cryptography Using Laplace TransformCryptography Using Laplace Transform
Cryptography Using Laplace TransformIJERA Editor
 
Unit 3-Laplace Transforms.pdf
Unit 3-Laplace Transforms.pdfUnit 3-Laplace Transforms.pdf
Unit 3-Laplace Transforms.pdfJeancyMbolela
 
A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...
A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...
A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...Ealwan Lee
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1mkazree
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1Hattori Sidek
 
Chapter Five(2)
Chapter Five(2)Chapter Five(2)
Chapter Five(2)bolovv
 
A simplified thermal model for the three way catalytic converter (1)
A simplified thermal model for the three way catalytic converter (1)A simplified thermal model for the three way catalytic converter (1)
A simplified thermal model for the three way catalytic converter (1)Varun Pandey
 
J2006 termodinamik 1 unit3
J2006 termodinamik 1 unit3J2006 termodinamik 1 unit3
J2006 termodinamik 1 unit3Malaysia
 
On Laplace Transform.ppt
On Laplace Transform.pptOn Laplace Transform.ppt
On Laplace Transform.pptAwaisAsghar31
 
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...Abrar Hussain
 
Algorithm Analysis
Algorithm AnalysisAlgorithm Analysis
Algorithm AnalysisMegha V
 
packed absorption and stripping column
packed absorption and stripping columnpacked absorption and stripping column
packed absorption and stripping columnVivek Faldu
 
hsu-Chapter 6 Laplace transform.pdf
hsu-Chapter 6 Laplace transform.pdfhsu-Chapter 6 Laplace transform.pdf
hsu-Chapter 6 Laplace transform.pdfYasraAyman
 
Comparison of sbr_and_cstr
Comparison of sbr_and_cstrComparison of sbr_and_cstr
Comparison of sbr_and_cstrasad_014
 

Similar to Lesson 11 (19)

Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
PRINCEPPTFINAL.pptx
PRINCEPPTFINAL.pptxPRINCEPPTFINAL.pptx
PRINCEPPTFINAL.pptx
 
2706264.ppt
2706264.ppt2706264.ppt
2706264.ppt
 
Cryptography Using Laplace Transform
Cryptography Using Laplace TransformCryptography Using Laplace Transform
Cryptography Using Laplace Transform
 
Unit 3-Laplace Transforms.pdf
Unit 3-Laplace Transforms.pdfUnit 3-Laplace Transforms.pdf
Unit 3-Laplace Transforms.pdf
 
FinalReport
FinalReportFinalReport
FinalReport
 
Ch17 ssm
Ch17 ssmCh17 ssm
Ch17 ssm
 
A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...
A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...
A Refined Skew Matrix Model of the CIM3 in the Up-Mixer Extending the Duality...
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1
 
Chapter Five(2)
Chapter Five(2)Chapter Five(2)
Chapter Five(2)
 
A simplified thermal model for the three way catalytic converter (1)
A simplified thermal model for the three way catalytic converter (1)A simplified thermal model for the three way catalytic converter (1)
A simplified thermal model for the three way catalytic converter (1)
 
J2006 termodinamik 1 unit3
J2006 termodinamik 1 unit3J2006 termodinamik 1 unit3
J2006 termodinamik 1 unit3
 
On Laplace Transform.ppt
On Laplace Transform.pptOn Laplace Transform.ppt
On Laplace Transform.ppt
 
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
 
Algorithm Analysis
Algorithm AnalysisAlgorithm Analysis
Algorithm Analysis
 
packed absorption and stripping column
packed absorption and stripping columnpacked absorption and stripping column
packed absorption and stripping column
 
hsu-Chapter 6 Laplace transform.pdf
hsu-Chapter 6 Laplace transform.pdfhsu-Chapter 6 Laplace transform.pdf
hsu-Chapter 6 Laplace transform.pdf
 
Comparison of sbr_and_cstr
Comparison of sbr_and_cstrComparison of sbr_and_cstr
Comparison of sbr_and_cstr
 

Recently uploaded

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
(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
 
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
 
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
 
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
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
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
 

Recently uploaded (20)

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(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...
 
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
 
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...
 
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
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
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
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
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
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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
 

Lesson 11

  • 1. 1 Recap lecture 10 Definition of GTG, examples of GTG accepting the languages of strings:containing aa or bb, beginning with and ending in same letters, beginning with and ending in different letters, containing aaa or bbb, Nondeterminism, Kleene’s theorem (part I, part II, part III), proof of Kleene’s theorem part I
  • 2. 2 Kleene’s Theorem continued … Proof(Kleene’s Theorem Part II) To prove part II of the theorem, an algorithm consisting of different steps, is explained showing how a RE can be obtained corresponding to the given TG. For this purpose the notion of TG is changed to that of GTG i.e. the labels of transitions are corresponding REs.
  • 3. 3 Kleene’s Theorem part II continued … Basically this algorithm converts the given TG to GTG with one initial state along with a single loop, or one initial state connected with one final state by a single transition edge. The label of the loop or the transition edge will be the required RE. Step 1 If a TG has more than one start states, then introduce a new start state connecting the new state to the old start states by the transitions labeled by Λ and make the old start states the non-start states. This step can be shown by the following example
  • 6. 6 Kleene’s Theorem part II continued … Step 2: If a TG has more than one final states, then introduce a new final state, connecting the old final states to the new final state by the transitions labeled by Λ. This step can be shown by the previous example of TG, where the step 1 has already been processed
  • 9. 9 Kleene’s Theorem part II continued … Step 3: If a state has two (more than one) incoming transition edges labeled by the corresponding REs, from the same state (including the possibility of loops at a state), then replace all these transition edges with a single transition edge labeled by the sum of corresponding REs. This step can be shown by a part of TG in the following example
  • 10. 10 Example r2 r1 4 5 r3 …. …. r4 r1 +r2 4 5 r3 +r4 …. …. The above TG can be reduced to
  • 11. 11 Note The step 3 can be generalized to any finite number of transitions as shown below The above TG can be reduced to 5 r1 …. … . rn r2 …. 5 r1 +r2 + +rn …. …. …
  • 12. 12 Kleene’s Theorem part II continued … Step 4 (bypass and state elimination) If three states in a TG, are connected in sequence then eliminate the middle state and connect the first state with the third by a single transition (include the possibility of circuit as well) labeled by the RE which is the concatenation of corresponding two REs in the existing sequence. This step can be shown by a part of TG in the following example
  • 13. 13 Example 4 5 r3 …. ….6 r4 r2 4 6…. r2 r3 * r4 …. To eliminate state 5 the above can be reduced to Consider the following example containing a circuit
  • 14. 14 Example Consider the part of a TG, containing a circuit at a state, as shown below To eliminate state 3 the above TG can be reduced to r4 4 r3 3 r2 2 r1 ….…. 2 4…. r1 r2 * r3 …. r4 r2 * r3
  • 15. 15 Example Consider a part of the following TG To eliminate state 3 the above TG can be reduced to r9 r8 4 r7 3 r5 r4 r3 2 r1 r2 r6 …. ….
  • 16. 16 Example continued ... 2 To eliminate state 4 the above TG can be reduced to 42 r2 +r3 r5 * r7 r6 +r8 r5 * r4 (r1 +r3 r5 * r4 )+(r2 +r3 r5 * r7 )(r9 +r8 r5 * r7 )* (r6 +r8 r5 * r4 ) r1 +r3 r5 * r4 r9 +r8 r5 * r7 …. …. …. ….
  • 17. 17 Note It is to be noted that to determine the RE corresponding to a certain TG, four steps have been discussed. This process can be explained by the following particular examples of TGs
  • 18. 18 Example Consider the following TG To have single final state, the above TG can be reduced to the following bba aaa 2+ 3+ ab,ba - aa,b 1
  • 19. 19 Example continued … To eliminate states 2 and 3, the above TG can be reduced to the following The above TG can be reduced to the following bba aaa 2 3 ab+ba - aa+b 1 4+ Λ Λ ab+ba - aa+b 1 4+aaa Λ+bbaΛ
  • 20. 20 Example continued … To eliminate state 1 the above TG can be reduced to the following Hence the required RE is (ab+ba) (aa+b)* (aaa+bba) - + (ab+ba)(aa+b)* (aaa+bba)
  • 21. 21 Summing Up proof of Kleene’s theorem part II (method with different steps), particular examples of TGs to determine corresponding Res.