SlideShare a Scribd company logo
10
PART B
1. Show that L = {0n2 / n is an integer, n > 1} is not regular. (or) Show that the set
L = {0i2 |i > 1} not regular.(Nov/Dec2015) (Nov/Dec2014) (May/June2014)
SOLUTION:
Let i = n2 and L = { 0i / i > 1}.
The number of states is i > n.
Take string w = 0i
The length of the string |w| = i > n.
Assume xy = 0m, y = 0j , z = 0i-m
xykz = xy(y)k-1z
= 0m. 0j(k-1). 0i-m
= 0i. 0j(k-1)
Apply i = n2 xykz = 0n2 + j(k-1)
Apply k = 0 xykz = 0n2 – j L
Apply k = 0 xykz = 0n2 + j L
Thus the Language L is not a regular Language.
2. Discuss on regular Expression.(May/June 2016) (May/June2013)
REGULAR EXPRESSION:
The Language accepted by finite automata are easily described by simple
expression called regular expression. A regular expression is a string that describes
the whole set of strings according to certain syntax rules. These expressions are used
by many text editors and utilities to search bodies of text for certain patterns etc.
Let Σ be an alphabet. The regular expression over Σ and the sets they denote
are:
i. ε is a R.E, denotes empty set and Language L(ε) = { ε}.
ii. pie is a R.E denotes the set { } and Language L(pie) = { pie}.
iii. A variable represented in upper case like L is any language.
i. For each ‘a’ in Σ , ‘a’ is a R.E and denotes the set {a}.
11
ii. If r and s are regular expression, then
i. If ‘r’ and ‘s’ are R.E denoting the languages R and S respectively
then (r+s),
ii. (rs) and (r*) are R.E that denote the sets RUS, RS and R*
respectively..
3. Write a regular expression for set of strings that consist of alternating 0’s and
1’s. (May/June 2016)
Consider the regular expression for the language consisting of a single string 01.
The star operator is used to get an expression of all strings of the form 0101…01
The basic rules for RE tells us that 0 and 1 are expressions denoting the languages
{0} and {1}, respectively. If we concatenate the two expressions, we get a regular
expression for the language {01};
RE = 01
Now, to get all strings consisting of zero or more occurrences of 01,
Regular expression (01)* and get L(01)*.
Since it only includes strings beginning with 0. To account for strings that starts with
1 and strings that end with 0 or with 1:
(01)* + (10)*+ 0 (10)*+ 1(01)*
4. Prove that the following languages are not regular (May/June2013)
(Nov/Dec2013)
1. {02n | n > 1}
SOLUTION:
Let L be a regular language. The number of states are 2n > n.
Let w = 0i, i > 1 where, i = 2n.
w = xyz
|w| = 2n > n.
Assume xy = 0m, y = 0j, z = 0i-m
xykz = xy(y)k-1z
12
= 0m. 0j(k-1). 0i-m
= 0i + j(k-1)
Apply i = 2n xykz = 02n + j(k-1)
Apply k = 0 xykz = 02n - j L
Apply k = 1 xykz = 02n L
Apply k = 2 xykz = 02n + j L
Thus Language L = {02n | n > 1} is not a regular.
5. {ambnam+n | m > 1 and n > 1} (or) L = { 0m1n0m+n | m > 1 and n > 1}
SOLUTION:
Let L be a regular language. The number of states are 2m+2n > n.
.
w = ambnam+n
|w| = 2m+2n > n.
Assume xy = am, y = aj, z = an-m. bn1. am+n1
xykz = xy(y)k-1z
= am . aj(k-1) . an-m. bn1. am+n1
xykz = an + j(k-1) . bn1. am+n1
Apply k = 0 xykz = an - j . bn1. am+n1 L
Apply k = 1 xykz = an. bn1. am+n1 L
Apply k = 2 xykz = an + j . bn1. am+n1 L
Thus Language L = {ambnam+n |m>=1 and n>=1} is not a regular.
13
6. Construction of - NFA from a regular expression
Basis: Automata for , and ‘a’ are (a),(b) and (c) respectively.
a) Accepting  b) Accepting  c) Accepting a
Induction: Automata for P+Q, PQ and P* are (d), (e) and (f) respectively.
d) P+Q
e) PQ
f) P*
Example: Construct -NFA for the regular expression (a|b)*|c
Solution: using Thompson's Construction. First we construct the union of a and b:
Next we construct the Kleene Star of the previous union:
Finally we create the union between this and the next symbol c:
7. Construction of regular expression from Finite Automata:
Arden’s theorem: Let P and Q be two regular expression over ∑. If ‘P’ does not contain 
then
the equation in R=Q+RP has unique solution (i.e only one solution) given by R=QP*
Method for finding regular expression of Finite automata in transition diagram
representation using Arden’s theorem:
The following assumptions are made regarding the finite automata.
i. The finite automaton does not have  - moves.
ii. It has only one initial state, say q0.
iii. It’s states are q0,q1.....qn
i) Qi is the regular expression representing the set of string accepted by the automata even
through qi is a final state.
ii)  ij denotes the regular expression representation the set of labels of edges from vi to vj when
there is no such edge  ij= .Consequently, we can get the following set of equation in Q1,
….Qn
Q1= Q1 11+ Q2 21+….+ Qn n1+
Q2= Q1  12+ Q2  22+….+ Qn  n2
……………………………………………..
.
……………………………………………..
Qn= Q1 1n+ Q2 2n+…..+ Qn nn
By repeatedly applying substitutions and Arden’s theorem we can express Ri in terms of  ij’s for
getting the set of strings recognized by the automata, we have to take union of all Ri’sCorresponding
to final states.
Example1:
Derive a regular expression from the following given FA?
Sol:
q1= +q10................(1)
q2=q11+q21...............(2)
q3=q20+q30+q31 ..........(3)
(2)  q2=q11+q21
q2=q1
11* ...........(4)
(1)  q1= +q10 (Apply Arden’s theorem)
q1=0*
q1=0*
(4) q2=0*11*
q2=0*1*

More Related Content

Similar to unit 2 part b.docx

RegularExpressions.pdf
RegularExpressions.pdfRegularExpressions.pdf
RegularExpressions.pdf
ImranBhatti58
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
Dr. Maamoun Ahmed
 
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
Srimatre K
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
parmeet834
 
QB104541.pdf
QB104541.pdfQB104541.pdf
QB104541.pdf
MrRRajasekarCSE
 
Lecture5
Lecture5Lecture5
Lecture5
Atner Yegorov
 
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
Theory of Computation Regular Expressions, Minimisation & Pumping LemmaTheory of Computation Regular Expressions, Minimisation & Pumping Lemma
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
Rushabh2428
 
Imc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutionsImc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutions
Christos Loizos
 
re1.ppt
re1.pptre1.ppt
re1.ppt
PEzhumalai
 
Re1 (3)
Re1 (3)Re1 (3)
Re1 (3)
pepe3059
 
re1.ppt
re1.pptre1.ppt
RegularExpressions-theory of computation and formal language
RegularExpressions-theory of computation and formal languageRegularExpressions-theory of computation and formal language
RegularExpressions-theory of computation and formal language
mohdfareeduddin5
 
re1.ppt
re1.pptre1.ppt
regular expression
regular expressionregular expression
regular expression
RohitKumar596173
 
Sequences
SequencesSequences
Sequences
Abdur Rehman
 
Unit ii
Unit iiUnit ii
Unit ii
TPLatchoumi
 
Excel Homework Help
Excel Homework HelpExcel Homework Help
Excel Homework Help
Excel Homework Help
 
Imc2017 day1-solutions
Imc2017 day1-solutionsImc2017 day1-solutions
Imc2017 day1-solutions
Christos Loizos
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Ratnakar Mikkili
 
Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2
Abhimanyu Mishra
 

Similar to unit 2 part b.docx (20)

RegularExpressions.pdf
RegularExpressions.pdfRegularExpressions.pdf
RegularExpressions.pdf
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
 
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
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
QB104541.pdf
QB104541.pdfQB104541.pdf
QB104541.pdf
 
Lecture5
Lecture5Lecture5
Lecture5
 
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
Theory of Computation Regular Expressions, Minimisation & Pumping LemmaTheory of Computation Regular Expressions, Minimisation & Pumping Lemma
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
 
Imc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutionsImc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutions
 
re1.ppt
re1.pptre1.ppt
re1.ppt
 
Re1 (3)
Re1 (3)Re1 (3)
Re1 (3)
 
re1.ppt
re1.pptre1.ppt
re1.ppt
 
RegularExpressions-theory of computation and formal language
RegularExpressions-theory of computation and formal languageRegularExpressions-theory of computation and formal language
RegularExpressions-theory of computation and formal language
 
re1.ppt
re1.pptre1.ppt
re1.ppt
 
regular expression
regular expressionregular expression
regular expression
 
Sequences
SequencesSequences
Sequences
 
Unit ii
Unit iiUnit ii
Unit ii
 
Excel Homework Help
Excel Homework HelpExcel Homework Help
Excel Homework Help
 
Imc2017 day1-solutions
Imc2017 day1-solutionsImc2017 day1-solutions
Imc2017 day1-solutions
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2
 

Recently uploaded

LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
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
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Leena Ghag-Sakpal
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
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
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 

Recently uploaded (20)

LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
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
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
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
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 

unit 2 part b.docx

  • 1. 10 PART B 1. Show that L = {0n2 / n is an integer, n > 1} is not regular. (or) Show that the set L = {0i2 |i > 1} not regular.(Nov/Dec2015) (Nov/Dec2014) (May/June2014) SOLUTION: Let i = n2 and L = { 0i / i > 1}. The number of states is i > n. Take string w = 0i The length of the string |w| = i > n. Assume xy = 0m, y = 0j , z = 0i-m xykz = xy(y)k-1z = 0m. 0j(k-1). 0i-m = 0i. 0j(k-1) Apply i = n2 xykz = 0n2 + j(k-1) Apply k = 0 xykz = 0n2 – j L Apply k = 0 xykz = 0n2 + j L Thus the Language L is not a regular Language. 2. Discuss on regular Expression.(May/June 2016) (May/June2013) REGULAR EXPRESSION: The Language accepted by finite automata are easily described by simple expression called regular expression. A regular expression is a string that describes the whole set of strings according to certain syntax rules. These expressions are used by many text editors and utilities to search bodies of text for certain patterns etc. Let Σ be an alphabet. The regular expression over Σ and the sets they denote are: i. ε is a R.E, denotes empty set and Language L(ε) = { ε}. ii. pie is a R.E denotes the set { } and Language L(pie) = { pie}. iii. A variable represented in upper case like L is any language. i. For each ‘a’ in Σ , ‘a’ is a R.E and denotes the set {a}.
  • 2. 11 ii. If r and s are regular expression, then i. If ‘r’ and ‘s’ are R.E denoting the languages R and S respectively then (r+s), ii. (rs) and (r*) are R.E that denote the sets RUS, RS and R* respectively.. 3. Write a regular expression for set of strings that consist of alternating 0’s and 1’s. (May/June 2016) Consider the regular expression for the language consisting of a single string 01. The star operator is used to get an expression of all strings of the form 0101…01 The basic rules for RE tells us that 0 and 1 are expressions denoting the languages {0} and {1}, respectively. If we concatenate the two expressions, we get a regular expression for the language {01}; RE = 01 Now, to get all strings consisting of zero or more occurrences of 01, Regular expression (01)* and get L(01)*. Since it only includes strings beginning with 0. To account for strings that starts with 1 and strings that end with 0 or with 1: (01)* + (10)*+ 0 (10)*+ 1(01)* 4. Prove that the following languages are not regular (May/June2013) (Nov/Dec2013) 1. {02n | n > 1} SOLUTION: Let L be a regular language. The number of states are 2n > n. Let w = 0i, i > 1 where, i = 2n. w = xyz |w| = 2n > n. Assume xy = 0m, y = 0j, z = 0i-m xykz = xy(y)k-1z
  • 3. 12 = 0m. 0j(k-1). 0i-m = 0i + j(k-1) Apply i = 2n xykz = 02n + j(k-1) Apply k = 0 xykz = 02n - j L Apply k = 1 xykz = 02n L Apply k = 2 xykz = 02n + j L Thus Language L = {02n | n > 1} is not a regular. 5. {ambnam+n | m > 1 and n > 1} (or) L = { 0m1n0m+n | m > 1 and n > 1} SOLUTION: Let L be a regular language. The number of states are 2m+2n > n. . w = ambnam+n |w| = 2m+2n > n. Assume xy = am, y = aj, z = an-m. bn1. am+n1 xykz = xy(y)k-1z = am . aj(k-1) . an-m. bn1. am+n1 xykz = an + j(k-1) . bn1. am+n1 Apply k = 0 xykz = an - j . bn1. am+n1 L Apply k = 1 xykz = an. bn1. am+n1 L Apply k = 2 xykz = an + j . bn1. am+n1 L Thus Language L = {ambnam+n |m>=1 and n>=1} is not a regular.
  • 4. 13 6. Construction of - NFA from a regular expression Basis: Automata for , and ‘a’ are (a),(b) and (c) respectively. a) Accepting  b) Accepting  c) Accepting a Induction: Automata for P+Q, PQ and P* are (d), (e) and (f) respectively. d) P+Q e) PQ f) P* Example: Construct -NFA for the regular expression (a|b)*|c Solution: using Thompson's Construction. First we construct the union of a and b: Next we construct the Kleene Star of the previous union:
  • 5. Finally we create the union between this and the next symbol c: 7. Construction of regular expression from Finite Automata: Arden’s theorem: Let P and Q be two regular expression over ∑. If ‘P’ does not contain  then the equation in R=Q+RP has unique solution (i.e only one solution) given by R=QP* Method for finding regular expression of Finite automata in transition diagram representation using Arden’s theorem: The following assumptions are made regarding the finite automata. i. The finite automaton does not have  - moves. ii. It has only one initial state, say q0. iii. It’s states are q0,q1.....qn i) Qi is the regular expression representing the set of string accepted by the automata even through qi is a final state. ii)  ij denotes the regular expression representation the set of labels of edges from vi to vj when there is no such edge  ij= .Consequently, we can get the following set of equation in Q1, ….Qn Q1= Q1 11+ Q2 21+….+ Qn n1+ Q2= Q1  12+ Q2  22+….+ Qn  n2 …………………………………………….. .
  • 6. …………………………………………….. Qn= Q1 1n+ Q2 2n+…..+ Qn nn By repeatedly applying substitutions and Arden’s theorem we can express Ri in terms of  ij’s for getting the set of strings recognized by the automata, we have to take union of all Ri’sCorresponding to final states. Example1: Derive a regular expression from the following given FA? Sol: q1= +q10................(1) q2=q11+q21...............(2) q3=q20+q30+q31 ..........(3) (2)  q2=q11+q21 q2=q1 11* ...........(4) (1)  q1= +q10 (Apply Arden’s theorem) q1=0* q1=0* (4) q2=0*11* q2=0*1*