Regular expression tutorial Theory of Automata (TOA) Theory of Computation (TOC)
More Videos:
1. regular expression tutorial in automata TOC • regular expression tutorial in automa...
2. Regular Expressions Examples in automata TOC • Regular Expressions Examples in autom...
3. Regular Expressions Examples in automata TOC part 2 • Regular Expressions Examples in autom...
4. Finite Automata • Finite Automata
5. finite automata examples • finite automata examples
6. Finite Automata Even Even Language • Finite Automata Even Even Language
7. nfa vs dfa • nfa vs dfa
8. transition graph in automata • transition graph in automata
9. kleene's theorem (Part 1) • kleene's theorem (Part 1)
10. kleene's theorem (Part 2) • kleene's theorem (Part 2)
11. kleene's theorem (Part 3 Rule 1) • kleene's theorem (Part 3 Rule 1)
12. Kleene's theorem (Part 3 Rule 2) Union or Sum of Two FA with Transition Table • Kleene's theorem (Part 3 Rule 2) Unio...
13. Kleene's theorem (part 3 rule 3) concatenation of two FAs • Kleene's theorem (part 3 rule 3) conc...
14. Kleene's theorem ( part 3 rule 4 ) Kleene closure of an FA | Automata Theory • Kleene's theorem ( part 3 rule 4 ) Kl...
15. Moore and Mealy Machines | Finite Automata With output • Moore and Mealy Machines | Finite Aut...
16. convert moore machine to mealy machine • convert moore machine to mealy machine
17. convert mealy machine to Moore machine • convert mealy machine to Moore machine
18. push down automata • push down automata
Summary of the Lecture:
Regular Expressions Theory of computations or automata
Why the theory of computations and automata?
We use this theory to process any textual data (natural languages and programming languages.) It is the pre-requisite for the compiler construction.
Today’s Topic is Regular Expressions.
We use Regular Expressions to represent a set of words (language)
Let’s dive into it.
Superscript * Means zero to n
Superscript + Means 1 to n (at least one)
Or (we have to pick one letter from the given list of letters)
Examples
A+={A, AA,AAA,AAAA,AAAAA,AAAAAA, ……… so on}
A*={null, A, AA,AAA,AAAA,AAAAA,AAAAAA, ……… so on} // when * is zero, it will generate null.
Here we can say that
A+ = AA*
(a+b) = {a,b}
(1+2)(a+b) = {1a, 1b,2a,2b}
(a+b)(a+b) = {aa,ab,ba,bb}
(a+b)(a+b)(a+b) = now how many words can we generate here?
We have 2 options at first place, 2 options at second place and 2 options at third place. So 2 x 2 x 2 = 8 this language contains 8 words.
(a+b)(a+b)(a+b) = { aaa,aba,baa,bba, aab,abb,bab,bbb }
Now we are going to write a very regular expression that will be used in subsequent lectures as well.
(a+b)*
Here as discussed earlier, the superscript plus + means (1 to n)
Lets see, how many words can be generated from this regular expression
(a+b)* = {(a+b)null, , (a+b)1 , (a+b)2 , (a+b)3 , (a+b)4 , (a+b)5 , (a+b)6 , (a+b)7 , (a+b)8 , …………………………………… }
Here
• (a+b)null = NULL,
• (a+b)1 = (a+b) = {a,b}
• (a+b)2 = (a+b)(a+b) = {aa,ab,ba,bb}
• (a+b)3 = (a+b)(a+b)(a+b) = { aaa,aba,baa,bba, aab,abb,bab,bbb }
So
(a+b)* can generate literally any word from the letter a and b including null.
(a+b)+ = (a+b)(a+b)*
Sur cette page du site, vous pouvez voir la vidéo en ligne regular expression tutorial in automata TOC durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Dr. Rehan Choudhry 15 juin 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 244 fois et il a aimé 5 téléspectateurs. Bon visionnage!