SlideShare une entreprise Scribd logo
1  sur  11
Regular
Languages &
Regular
Expression
-Sampath Kumar S,
AP/CSE, SECE
Regular Languages & Regular
Expression
 A regular expression is a notation to
represent regular language, i.e. a set
of strings, where the set is
either finite or contains strings
that are generated using simple
recursive rules.
 The language represented by regular
expressions are called regular languages.
11/21/2017
Sampath Kumar S, AP/CSE, SECE
2
Regular Expression
Let ∑ be an alphabet which is used to denote the input
set. The regular expression over ∑ can be defined as
follows:
  is a Regular Expression denoting an empty
language or set. (L () = { })
 ε is a Regular Expression indicates the language
containing an empty string. (L (ε) = {ε})
 x is a Regular Expression where L={x}
11/21/20173
Sampath Kumar S, AP/CSE, SECE
Regular Expression (cont..,)
 If X is a Regular Expression denoting the
language L(X) and Y is a Regular Expression denoting
the language L(Y), then
 Union: X + Y is a RE corresponding to the language
L(X) ∪ L(Y) where L(X + Y) = L(X) ∪ L(Y).
 Concatenation: X . Y is a RE corresponding to the
language L(X) . L(Y) where L(X.Y)= L(X) . L(Y)
 Closure: R* is a RE corresponding to the
language L(R*)where L(R*) = (L(R))*
11/21/20174
Sampath Kumar S, AP/CSE, SECE
Some rules for language operations
Let r, s and t be languages over {0,1}
r +  =  + r = r
r + s = s + r (r or s)
r = r = r
r = r = 
r(s + t) = rs + rt
r+ = r.r*
11/21/2017
Sampath Kumar S, AP/CSE, SECE
5
Problems to Discuses:
22. Write the regular expression for the language
accepting all combinations for a’s over the set Σ =
{a}.
23. Write the regular expression for the language
accepting all combinations for a’s except the null
string over the set Σ = {a}.
24. Design RE for the language containing all the
strings containing any number of a’s and b’s.
25. Design RE for the language containing all the
strings containing any number of a’s and b’s
except null string.
11/21/20176
Sampath Kumar S, AP/CSE, SECE
Problems to Discuses:
26. Construct the r.e for the language accepting all
the strings which are ending with 00 over the set
Σ ={0,1}
27. Construct the r.e for the language accepting all
the strings which are starting with 1 and ending
with 0 over the set Σ ={0,1}
28. If L = {The language starting and ending with a
and any combination of b’s in between} then
what is r?
29. Write r.e to denote the language L over Σ* where
Σ={a,b,c} in which every string will be such that
any number of a’s followed by any number f b’s
and any number of c’s. Σ
11/21/20177
Sampath Kumar S, AP/CSE, SECE
Problems to Discuses:
30. Write r.e. to denote a language L which accepts
all the string which begins or end with either 00 or
11.
31. Write r.e. to denote a language L over Σ ={a,b}
such that the 3rd character from right end of string
is always a.
32. Construct the r.e for the language L which
accepts all the string with at least two b’s over Σ
={a,b}
33. Construct the r.e for the language L which
accepts all the string with exactly two b’s over Σ
={a,b}
11/21/20178
Sampath Kumar S, AP/CSE, SECE
Problems to Discuses:
34. Write r.e. to denote a language L having strings
which should have at least one 0 and at least one
1
35. Construct the r.e for the language L over Σ ={0}
having even length of string
36. Construct the r.e for the language L over Σ ={0}
having even odd length of string
37. Write r.e. to denote a language L over Σ={a,b}
such that all strings do not contain the substing
“ab”.
11/21/20179
Sampath Kumar S, AP/CSE, SECE
11/21/2017
Sampath Kumar S, AP/CSE, SECE
11
நன்றி
11/21/2017
Sampath Kumar S, AP/CSE, SECE
12

Contenu connexe

Tendances

Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expressionAnimesh Chaturvedi
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2shah zeb
 
Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfDrIsikoIsaac
 
3.1 intro toautomatatheory h1
3.1 intro toautomatatheory  h13.1 intro toautomatatheory  h1
3.1 intro toautomatatheory h1Rajendran
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
1 introduction
1 introduction1 introduction
1 introductionparmeet834
 
Chapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxChapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxDrIsikoIsaac
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of AutomataFarooq Mian
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4shah zeb
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languagesJohnDevaPrasanna1
 
Regular expressions h1
Regular expressions h1Regular expressions h1
Regular expressions h1Rajendran
 
Final formal languages
Final formal languagesFinal formal languages
Final formal languagesMegha Khanna
 

Tendances (20)

Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 
FLAT Notes
FLAT NotesFLAT Notes
FLAT Notes
 
Flat unit 1
Flat unit 1Flat unit 1
Flat unit 1
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Flat unit 2
Flat unit 2Flat unit 2
Flat unit 2
 
Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdf
 
SS UI Lecture 4
SS UI Lecture 4SS UI Lecture 4
SS UI Lecture 4
 
Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
 
3.1 intro toautomatatheory h1
3.1 intro toautomatatheory  h13.1 intro toautomatatheory  h1
3.1 intro toautomatatheory h1
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
1 introduction
1 introduction1 introduction
1 introduction
 
Chapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxChapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptx
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Language
LanguageLanguage
Language
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languages
 
Regular expressions h1
Regular expressions h1Regular expressions h1
Regular expressions h1
 
Theory of computation Lec1
Theory of computation Lec1Theory of computation Lec1
Theory of computation Lec1
 
Final formal languages
Final formal languagesFinal formal languages
Final formal languages
 

Similaire à 1.5 & 1.6 regular languages & regular expression

Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4shah zeb
 
2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammarSampath Kumar S
 
Hw2 2017-spring
Hw2 2017-springHw2 2017-spring
Hw2 2017-spring奕安 陳
 
Handout Regular expression with examples and lecture
Handout Regular expression with examples  and lecture Handout Regular expression with examples  and lecture
Handout Regular expression with examples and lecture mariajan8
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02hamzamughal39
 
1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.pptMarvin886766
 
Алексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВАлексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВMinsk Linux User Group
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxRaviAr5
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theorySampath Kumar S
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01 hamzamughal39
 
RegularLanguageProperties [Autosaved].pptx
RegularLanguageProperties [Autosaved].pptxRegularLanguageProperties [Autosaved].pptx
RegularLanguageProperties [Autosaved].pptxRaviAr5
 
01-Introduction&Languages.pdf
01-Introduction&Languages.pdf01-Introduction&Languages.pdf
01-Introduction&Languages.pdfTariqSaeed80
 

Similaire à 1.5 & 1.6 regular languages & regular expression (20)

L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar2.1 & 2.2 grammar introduction – types of grammar
2.1 & 2.2 grammar introduction – types of grammar
 
To lec 03
To lec 03To lec 03
To lec 03
 
Hw2 2017-spring
Hw2 2017-springHw2 2017-spring
Hw2 2017-spring
 
PART A.doc
PART A.docPART A.doc
PART A.doc
 
Handout Regular expression with examples and lecture
Handout Regular expression with examples  and lecture Handout Regular expression with examples  and lecture
Handout Regular expression with examples and lecture
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt1LECTURE 8 Regular_Expressions.ppt
1LECTURE 8 Regular_Expressions.ppt
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Алексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВАлексей Чеусов - Расчёсываем своё ЧСВ
Алексей Чеусов - Расчёсываем своё ЧСВ
 
Ch2 automata.pptx
Ch2 automata.pptxCh2 automata.pptx
Ch2 automata.pptx
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 
Cs419 lec3 lexical analysis using re
Cs419 lec3   lexical analysis using reCs419 lec3   lexical analysis using re
Cs419 lec3 lexical analysis using re
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theory
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
 
RegularLanguageProperties [Autosaved].pptx
RegularLanguageProperties [Autosaved].pptxRegularLanguageProperties [Autosaved].pptx
RegularLanguageProperties [Autosaved].pptx
 
Regular expression
Regular expressionRegular expression
Regular expression
 
01-Introduction&Languages.pdf
01-Introduction&Languages.pdf01-Introduction&Languages.pdf
01-Introduction&Languages.pdf
 

Plus de Sampath Kumar S

5.2 primitive recursive functions
5.2 primitive recursive functions5.2 primitive recursive functions
5.2 primitive recursive functionsSampath Kumar S
 
4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languagesSampath Kumar S
 
4.3 techniques for turing machines construction
4.3 techniques for turing machines construction4.3 techniques for turing machines construction
4.3 techniques for turing machines constructionSampath Kumar S
 
4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)Sampath Kumar S
 
3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on plSampath Kumar S
 
3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cflSampath Kumar S
 
3.1,2,3 pushdown automata definition, moves & id
3.1,2,3 pushdown automata   definition, moves & id3.1,2,3 pushdown automata   definition, moves & id
3.1,2,3 pushdown automata definition, moves & idSampath Kumar S
 
2.8 normal forms gnf & problems
2.8 normal forms   gnf & problems2.8 normal forms   gnf & problems
2.8 normal forms gnf & problemsSampath Kumar S
 
2.7 normal forms cnf & problems
2.7 normal forms  cnf & problems2.7 normal forms  cnf & problems
2.7 normal forms cnf & problemsSampath Kumar S
 
2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammarsSampath Kumar S
 
2.4 derivations and languages
2.4 derivations and languages2.4 derivations and languages
2.4 derivations and languagesSampath Kumar S
 
2.3 context free grammars and languages
2.3 context free grammars and languages2.3 context free grammars and languages
2.3 context free grammars and languagesSampath Kumar S
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular setsSampath Kumar S
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfaSampath Kumar S
 
1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressions1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressionsSampath Kumar S
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfaSampath Kumar S
 
1.4. finite automaton with ε moves
1.4. finite automaton with ε   moves1.4. finite automaton with ε   moves
1.4. finite automaton with ε movesSampath Kumar S
 

Plus de Sampath Kumar S (20)

5.2 primitive recursive functions
5.2 primitive recursive functions5.2 primitive recursive functions
5.2 primitive recursive functions
 
4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages4.7. chomskian hierarchy of languages
4.7. chomskian hierarchy of languages
 
4.6 halting problem
4.6 halting problem4.6 halting problem
4.6 halting problem
 
4.3 techniques for turing machines construction
4.3 techniques for turing machines construction4.3 techniques for turing machines construction
4.3 techniques for turing machines construction
 
4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)4.2 variantsof turing machines (types of tm)
4.2 variantsof turing machines (types of tm)
 
4.1 turing machines
4.1 turing machines4.1 turing machines
4.1 turing machines
 
3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl3.6 & 7. pumping lemma for cfl & problems based on pl
3.6 & 7. pumping lemma for cfl & problems based on pl
 
3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl
 
3.4 deterministic pda
3.4 deterministic pda3.4 deterministic pda
3.4 deterministic pda
 
3.1,2,3 pushdown automata definition, moves & id
3.1,2,3 pushdown automata   definition, moves & id3.1,2,3 pushdown automata   definition, moves & id
3.1,2,3 pushdown automata definition, moves & id
 
2.8 normal forms gnf & problems
2.8 normal forms   gnf & problems2.8 normal forms   gnf & problems
2.8 normal forms gnf & problems
 
2.7 normal forms cnf & problems
2.7 normal forms  cnf & problems2.7 normal forms  cnf & problems
2.7 normal forms cnf & problems
 
2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars2.5 ambiguity in context free grammars
2.5 ambiguity in context free grammars
 
2.4 derivations and languages
2.4 derivations and languages2.4 derivations and languages
2.4 derivations and languages
 
2.3 context free grammars and languages
2.3 context free grammars and languages2.3 context free grammars and languages
2.3 context free grammars and languages
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfa
 
1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressions1.8. equivalence of finite automaton and regular expressions
1.8. equivalence of finite automaton and regular expressions
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
 
1.4. finite automaton with ε moves
1.4. finite automaton with ε   moves1.4. finite automaton with ε   moves
1.4. finite automaton with ε moves
 

Dernier

4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 

Dernier (20)

4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 

1.5 & 1.6 regular languages & regular expression

  • 2. Regular Languages & Regular Expression  A regular expression is a notation to represent regular language, i.e. a set of strings, where the set is either finite or contains strings that are generated using simple recursive rules.  The language represented by regular expressions are called regular languages. 11/21/2017 Sampath Kumar S, AP/CSE, SECE 2
  • 3. Regular Expression Let ∑ be an alphabet which is used to denote the input set. The regular expression over ∑ can be defined as follows:   is a Regular Expression denoting an empty language or set. (L () = { })  ε is a Regular Expression indicates the language containing an empty string. (L (ε) = {ε})  x is a Regular Expression where L={x} 11/21/20173 Sampath Kumar S, AP/CSE, SECE
  • 4. Regular Expression (cont..,)  If X is a Regular Expression denoting the language L(X) and Y is a Regular Expression denoting the language L(Y), then  Union: X + Y is a RE corresponding to the language L(X) ∪ L(Y) where L(X + Y) = L(X) ∪ L(Y).  Concatenation: X . Y is a RE corresponding to the language L(X) . L(Y) where L(X.Y)= L(X) . L(Y)  Closure: R* is a RE corresponding to the language L(R*)where L(R*) = (L(R))* 11/21/20174 Sampath Kumar S, AP/CSE, SECE
  • 5. Some rules for language operations Let r, s and t be languages over {0,1} r +  =  + r = r r + s = s + r (r or s) r = r = r r = r =  r(s + t) = rs + rt r+ = r.r* 11/21/2017 Sampath Kumar S, AP/CSE, SECE 5
  • 6. Problems to Discuses: 22. Write the regular expression for the language accepting all combinations for a’s over the set Σ = {a}. 23. Write the regular expression for the language accepting all combinations for a’s except the null string over the set Σ = {a}. 24. Design RE for the language containing all the strings containing any number of a’s and b’s. 25. Design RE for the language containing all the strings containing any number of a’s and b’s except null string. 11/21/20176 Sampath Kumar S, AP/CSE, SECE
  • 7. Problems to Discuses: 26. Construct the r.e for the language accepting all the strings which are ending with 00 over the set Σ ={0,1} 27. Construct the r.e for the language accepting all the strings which are starting with 1 and ending with 0 over the set Σ ={0,1} 28. If L = {The language starting and ending with a and any combination of b’s in between} then what is r? 29. Write r.e to denote the language L over Σ* where Σ={a,b,c} in which every string will be such that any number of a’s followed by any number f b’s and any number of c’s. Σ 11/21/20177 Sampath Kumar S, AP/CSE, SECE
  • 8. Problems to Discuses: 30. Write r.e. to denote a language L which accepts all the string which begins or end with either 00 or 11. 31. Write r.e. to denote a language L over Σ ={a,b} such that the 3rd character from right end of string is always a. 32. Construct the r.e for the language L which accepts all the string with at least two b’s over Σ ={a,b} 33. Construct the r.e for the language L which accepts all the string with exactly two b’s over Σ ={a,b} 11/21/20178 Sampath Kumar S, AP/CSE, SECE
  • 9. Problems to Discuses: 34. Write r.e. to denote a language L having strings which should have at least one 0 and at least one 1 35. Construct the r.e for the language L over Σ ={0} having even length of string 36. Construct the r.e for the language L over Σ ={0} having even odd length of string 37. Write r.e. to denote a language L over Σ={a,b} such that all strings do not contain the substing “ab”. 11/21/20179 Sampath Kumar S, AP/CSE, SECE
  • 10. 11/21/2017 Sampath Kumar S, AP/CSE, SECE 11

Notes de l'éditeur

  1. School of EECS, WSU