DFA to Regular Expression State Elimination Method || Lesson 36 | Finite Automata | Learning Monkey

  Рет қаралды 63,008

Learning Monkey

Learning Monkey

Күн бұрын

DFA to Regular Expression State Elimination Method
In this class, We discuss DFA to Regular Expression State Elimination Method.
The reader should have prior knowledge of regular expressions. Click Here.
We follow the steps for the state elimination method.
Step 1:
If there exists any incoming edge to the initial state, add a new initial state.
Example:
The below diagram has an incoming edge to the initial state.
Add a new state qi and move to state q0 using epsilon moves. Make qi as the initial state.
The below diagram shows the final diagram after adding a new initial state.
Step 2:
if there exists an outgoing edge to the final state, then create a new final state.
Example:
The below diagram has an outgoing edge to the final state.
We add a new final state qf, and make q2 as the non-final state.
From state q2, we move to qf using epsilon moves.
The below diagram shows the final diagram after adding a new final state.
Step 3:
if there exist multiple non-final states, make them non-final and create a new final state.
The below diagram has two final states q2 and q3.
We change q2 and q3 as non-final states and add a new final state qf.
The states q2 and q3 are joined to qf using epsilon moves.
The below diagram shows the modifications.
We understand a few examples.
Example 1:
The regular expression for the DFA is a*.
Example 2:
The regular expression for the DFA is (a + b)*
We take a or b. We stay on state q0, and we can repeat any number of times.
Example 3:
The regular expression for the DFA is aa.
Example 4:
The regular expression for the DFA is (a + b)
Example 5:
The regular expression for the DFA is (ab)*. We form a cycle with ab.
Now we take an example and find the regular expression using the state elimination method.
The below diagram is our DFA.
For the DFA, we need to add a new initial state and final state because the initial state has an incoming edge. And the final state has an outgoing edge.
The below diagram shows the final automata after adding the initial and final state.
Now we need to eliminate the states between initial and final states.
We can follow any order. We can eliminate q0 first, then q1 or vice versa.
Any order of elimination will give the same output expression.
We eliminate q0 first.
The below diagram shows the Finite automata after eliminating q0.
From state qi to state q1, we move using the expression b*a.
with input b, we move to state q0, and with a, we move to state q1.
Point to understand: we have input edge from state q1 to q0. after eliminating q0, we need to take care of that edge.
So on q1, we write a self-loop with the expression bb*a.
Now we have to eliminate state q1.
State q1 has two self-loops. So we use or condition.
If we eliminate state q1, we get the expression (a + bb*a)*
The final regular expression between state qi and qf is b*a(a + bb*a)*. Because q0 is having self loop.
Link for playlists:
/ @learningmonkey
Link for our website: learningmonkey.in
Follow us on Facebook @ / learningmonkey
Follow us on Instagram @ / learningmonkey1
Follow us on Twitter @ / _learningmonkey
Mail us @ learningmonkey01@gmail.com

Пікірлер
@madisenv3989
@madisenv3989 Жыл бұрын
Great explanation! Simple and straightforward!
@dinatjahanmilitasnim4614
@dinatjahanmilitasnim4614 Жыл бұрын
views are less, but he is good
@g.jayanna4375
@g.jayanna4375 24 күн бұрын
I have watched many videos on this topic but I couldn't understand a single bit... but you saved my day😊 (tom is my exam...)
@LearningMonkey
@LearningMonkey 24 күн бұрын
All the best for your exam. Have a great learning in CSE
@RamashankarSah-o4b
@RamashankarSah-o4b 4 ай бұрын
Sir , this video is very help full for me. thanku so, much for this video sir.
@LearningMonkey
@LearningMonkey 4 ай бұрын
Have a great learning in CSE
@kareemAhmed-nn6ox
@kareemAhmed-nn6ox 8 ай бұрын
جامد يا واد ي00:03 تحويل DFA إلى تعبير عادي باستخدام طريقة إزالة الحالة 01:17 إنشاء حالة نهائية جديدة في DFA 03:12 تعمل طريقة إزالة الحالة على أتمتة تحويل التعبير العادي. 04:57 طريقة إزالة الحالة لـ DFA للتعبير العادي 06:17 طريقة إزالة الحالة لتحويل DFA إلى تعبير عادي 07:26 طريقة إزالة الحالة في DFA لتحويل التعبير العادي 09:07 طريقة إزالة الحالة في DFA لتحويل التعبير العادي 10:27 طريقة البطل المخترع للبقاء متسقًا
@Gamer31explore
@Gamer31explore 23 күн бұрын
Your explanation is ao good sir ,change the thumbnail of this video sir definately you will get views
@LearningMonkey
@LearningMonkey 22 күн бұрын
Soon we change. Thank you Have a great learning in CSE
@sahilbaylr1939
@sahilbaylr1939 2 жыл бұрын
thanks man.its first time that i understand a lesson from indian guy.respect
@Elsa_2245
@Elsa_2245 6 ай бұрын
Tommorow is my exam....I could complete this topic in 15 minutes ...thank you sir
@LearningMonkey
@LearningMonkey 6 ай бұрын
All the best
@SimplyWOW
@SimplyWOW Жыл бұрын
Thank you so much for your explanation. Struggled a lot with other channals videos but could easily understand yours, Hatsoff.
@LearningMonkey
@LearningMonkey Жыл бұрын
Thankyou have a great learning in CSE
@HYDRODROPS
@HYDRODROPS Жыл бұрын
Boss u r a legend 😎
@suryodhan3060
@suryodhan3060 2 ай бұрын
saved my time and exam !
@ankitt1009
@ankitt1009 5 ай бұрын
You saved my day!! Thank you sir!!
@LearningMonkey
@LearningMonkey 5 ай бұрын
Have a great learning in CSE
@sourodipdutta8753
@sourodipdutta8753 10 ай бұрын
Your concepts and the way of explanation us very good....❤
@LearningMonkey
@LearningMonkey 10 ай бұрын
Tq Have a great learning in CSE
@udhayakiran1664
@udhayakiran1664 Ай бұрын
Excellent explanation 🫡
@LearningMonkey
@LearningMonkey Ай бұрын
Have a great learning in CSE
@SandipDas-qd1sq
@SandipDas-qd1sq 2 жыл бұрын
Superb explanation👍
@mmllllmm5671
@mmllllmm5671 Жыл бұрын
Best one on KZbin
@LearningMonkey
@LearningMonkey Жыл бұрын
Thank you have a great learning in CSE
@manum5032
@manum5032 Ай бұрын
Nice explanation
@chandankumarmguthur4356
@chandankumarmguthur4356 10 ай бұрын
Thanks a lot ❤
@LearningMonkey
@LearningMonkey 10 ай бұрын
Have a great learning in CSE
@NadeemAkhtar-h1t
@NadeemAkhtar-h1t 9 ай бұрын
Too much nice Sir thank You soo much From Pakistan
@LearningMonkey
@LearningMonkey 9 ай бұрын
Have a great learning in CSE
@manupreethgowda476
@manupreethgowda476 Ай бұрын
Thank you sir Great explanation , but less views improve in thumbnail sir
@sarthshah5947
@sarthshah5947 4 ай бұрын
amazing explanation, thanks a lot!!
@LearningMonkey
@LearningMonkey 4 ай бұрын
Have a great learning in CSE
@Ilovepotatofr
@Ilovepotatofr 7 ай бұрын
Thanks 👍
@forthemvps
@forthemvps 3 ай бұрын
🐐
@WinningEmpire
@WinningEmpire 8 ай бұрын
bee, bee star, ye 😁
@rohanwarghade7111
@rohanwarghade7111 20 күн бұрын
lol
@RISHITSTATUS
@RISHITSTATUS 6 ай бұрын
Thanks big brother ❤
@LearningMonkey
@LearningMonkey 6 ай бұрын
Welcome
@kareemAhmed-nn6ox
@kareemAhmed-nn6ox 8 ай бұрын
جامد يا واد يا هندي
@YasirAli-gw8ry
@YasirAli-gw8ry Жыл бұрын
Thank u so much brother!
@motesmarnissi9600
@motesmarnissi9600 Жыл бұрын
thanks
@pannagabm2100
@pannagabm2100 2 жыл бұрын
Thanks a lot sir ❤
@carloscordero9466
@carloscordero9466 Жыл бұрын
So great ¡¡¡¡¡
@anaums413
@anaums413 Жыл бұрын
thank you sir
@CodeComet00
@CodeComet00 2 жыл бұрын
I am kind of confused. Does dfa have the epsilon transition?
@LearningMonkey
@LearningMonkey 2 жыл бұрын
Dfa do not have epsilon. Taking dfa and converting equal finite automata with epsilon
@Lilyofc
@Lilyofc 2 ай бұрын
🐐🙇
@TechnomancerBop
@TechnomancerBop 9 ай бұрын
Looked into my soul @ 10:34
@giwrgoscy294
@giwrgoscy294 Жыл бұрын
THANKS MOM
@CW-dt2xk
@CW-dt2xk 2 жыл бұрын
Nice
@udaykiranrh
@udaykiranrh 10 ай бұрын
At second step ,is it outgoinge edge from final state or outgoing edge to final state i am confused,can you please explain this sir
@LearningMonkey
@LearningMonkey 10 ай бұрын
Out going edge from final state
@LearningMonkey
@LearningMonkey 10 ай бұрын
Have a great learning in CSE
@LearningMonkey
@LearningMonkey 10 ай бұрын
Out going edge from final state
@shahzadawahed2579
@shahzadawahed2579 Жыл бұрын
❤️
@moinundin1221
@moinundin1221 6 ай бұрын
yee
@dibyanshumohanty
@dibyanshumohanty 4 ай бұрын
ye
@KhureshiAbraam9999
@KhureshiAbraam9999 5 ай бұрын
What if same final and start state
@LearningMonkey
@LearningMonkey 5 ай бұрын
Move on to next video you will get clarity
@LearningMonkey
@LearningMonkey 5 ай бұрын
Move on to the next video you will get clarity
@xxdanxnad2032
@xxdanxnad2032 11 ай бұрын
d
@sreeharisujith7250
@sreeharisujith7250 2 ай бұрын
thanks
NFA to Regular Expression Conversion, and Example
14:46
Easy Theory
Рет қаралды 111 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Minimization of DFA (Example 1)
15:56
Neso Academy
Рет қаралды 1,7 МЛН
The 7 Levels of Math Symbols
14:03
The Unqualified Tutor
Рет қаралды 68 М.
NFA to Regular Expression Conversion
13:37
Neso Academy
Рет қаралды 984 М.
DFA to Regular Expression Conversion
6:19
Neso Academy
Рет қаралды 1,2 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН