After having to search for hours to find a clear and simple explanation of NFA to regex with state eliminaiton, your video clearly beats everything else! Thank you very much and continue your amazing job!
@rushilpunya25522 жыл бұрын
Dude you are an absolute beast. Thanks so much for helping me get through CSE 355
@adityap613 Жыл бұрын
Amazing video, understood how to do the conversion in 5 minutes.
@NuggzBii3 жыл бұрын
In your example around the 2 minute mark, you claim the automaton is a DFA. That is incorrect, because in a DFA, a state can never transition on two of the same symbol. I.e., q_2, cannot self loop, and transition to q_0 on the same input. That implies the automaton has guessing power, which is a prime characteristic of an NFA
@skmanoop Жыл бұрын
It is a typo. the self loop on q_2 is for input b instead of a.
@Baraa_ali622 жыл бұрын
Thanks , Great job
@jussef20572 жыл бұрын
That intro is a banger
@supamdeepbains51723 жыл бұрын
Great video!!
@vimalathithand91710 ай бұрын
Awesome !
@elmerfuddpt2Ай бұрын
thank you so much !!!!
@volkanulker64323 жыл бұрын
So clear
@fpsgod7259 Жыл бұрын
Great video :)
@vincenzoriccardo1384 ай бұрын
good job fratm
@MLOasis9 ай бұрын
Shouldn't it be (b U (b a*)*) since we can loop as many times as we wish over q0 after removing q2 ?
@Lexaugd4 жыл бұрын
I love your videos! I'd also like to ask a question: If the start state is also an accepting state and there is no more accepting states, do we draw an arrow from the universe to this start/accept state and back to the universe (Start/Finnish states)?
@EasyTheory4 жыл бұрын
Thanks! What do you mean by "universe"?
@Lexaugd4 жыл бұрын
@@EasyTheory start is the state that goes to the accept state(state q0) with the empty string and the Finnish state to which the accept state arrives at with an empty string.
@EasyTheory4 жыл бұрын
@@Lexaugd Ok then yes that's true. If the original NFA's start state was final, then in the "fixed" NFA there will be an epsilon transition from this state to a *brand new* final state. The reason to do this is that whatever the final state is, it cannot have any transitions "leaving" it.
@Lexaugd4 жыл бұрын
@@EasyTheory thank you, I really appreciate your response!
@Kbro9110 күн бұрын
What if the original initial state was also a final state?
@yusufaksoy36932 жыл бұрын
Super.💪🤟
@satvikarya5694 жыл бұрын
In 7:00 why it is not ( b* U ba*a)???
@selinamartinez80672 жыл бұрын
It's quite late, but I will answer it for you! In 7:00 , you should write b instead of b*. The reason is because it is still on the self loop transition(which is from qo to qo)! The sign '*' means that you're gonna use it instead of self loop transaction! You can use ( b U ba*a)* instead of ( b U ba*a) when you rip q0. Then now you can use * on the whole thing 'b U ba*a'. But 'b*' instead of 'b' what you said, can't be!
@rohanhaldiya6890 Жыл бұрын
@@selinamartinez8067 Can you explain more?
@siddhantdash49554 жыл бұрын
Is there any way to find minimal regex?
@EasyTheory4 жыл бұрын
Good question! This is actually quite complicated, but there is: first, generate a regex for the corresponding NFA (and convert this NFA into an equivalent DFA D). Then, enumerate all possible regexes that are smaller than the one generated. For each, convert them to an equivalent DFA, and then check if the language of this DFA is the same as D's. Then keep the smallest regex that you found to be equivalent to D. The "interesting" question is whether we can make this algorithm faster. It turns out that, unless P = NP, there is no polynomial-time algorithm to find the smallest regex. In fact, the smallest regex *cannot even be approximated* in polynomial time.
@siddhantdash49554 жыл бұрын
@@EasyTheory wow!! Thanks.
@rheabhatia66074 жыл бұрын
How do you find regex given an nfa with multiple accepting states?
@EasyTheory4 жыл бұрын
Rhea Bhatia good question! The idea is to put epsilon transitions from all accepting states to a new accepting state, and make all of the other accepting states now non-accepting. Should be easy to prove that it works.
@ezhilvathani46693 жыл бұрын
Sir why did you put whole * in last step (rip q0) but why no * for a in Rio q1
@EasyTheory3 жыл бұрын
There was no self-loop for q1, so no * is added there.
@TheAmazingLife19Ай бұрын
goat 🐐🐐🐐
@barisonearth4 жыл бұрын
Hello, can anyone tell me how i can write regex for the trap states ??? Do i just omit them and not take them into account ?
@beyinforum4 жыл бұрын
Can we do this for DFA`s?
@beyinforum4 жыл бұрын
you are the best lol
@EasyTheory4 жыл бұрын
@@beyinforum Thanks! And yes you can. Just use the same idea as this video (the machine doesn't have to be deterministic)
@bloodthirstybutcher83652 жыл бұрын
I ripped q1 first and got a shorter, different result: (b∪ba*a)*a is it wrong?