Regex to NFA Conversion Isn't Hard! (Sipser 1.28a)

  Рет қаралды 46,840

Easy Theory

Easy Theory

Күн бұрын

Here we do an example of the regular expression to nondeterministic finite automaton (NFA) conversion. The basic idea is to make a small NFA for the "indivisible" pieces, then combine them using union, concatenation, and star as the case may be.
Easy Theory Website: www.easytheory...
Discord: / discord
If you like this content, please consider subscribing to my channel: / @easytheory
▶SEND ME THEORY QUESTIONS◀
ryan.e.dougherty@icloud.com
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.

Пікірлер: 39
@cristianiorga6393
@cristianiorga6393 Жыл бұрын
You are amazing! It`s a shame I only discovered your channel in the night before the exam :D
@dawidbania7903
@dawidbania7903 Жыл бұрын
There is a mistake in constructing the expression (abb)*. With the way you described it, you can make expressions that are of form (abb)^n where n>=1. There should be a returning loop between last state (that we get into by reading 'b' for the second time) and the state before we read 'a' with 'epsilon' read. And there should be a forward path from starting state to end state with 'epsilon' read.
@rusokemarvin
@rusokemarvin 6 ай бұрын
yes, this is very right. I was looking out for a comment that matches my thought. Thanks
@chongwan4712
@chongwan4712 5 ай бұрын
I think what Easy Theory had was correct. First, you're saying that "There should be a returning loop between last state (that we get into by reading 'b' for the second time) and the state before we read 'a' with 'epsilon' read" but this is equivalent to linking the last state to the beginning state because epsilon transitions don't take up any string. Second, responding to the statement "And there should be a forward path from starting state to end state with 'epsilon' read.", this is redundant because the starting state is already a final state, so we don't need the epsilon transition to the end state. Please correct me if you think I am wrong.
@benjaminwatkinson6464
@benjaminwatkinson6464 2 жыл бұрын
If NFAs are like onions and ogres are like onions can you convert directly from NFAs to ogres?
@anthonyevans8536
@anthonyevans8536 2 жыл бұрын
you're asking the right questions here!
@annafebland4460
@annafebland4460 3 күн бұрын
Thank you! Very easy to understand ❤❤❤
@seiftarraf6213
@seiftarraf6213 2 жыл бұрын
Very helpful. Thank you. This converted the regex into an epsilon-NFA. Now I could convert this epsilon-NFA into an NFA but this would take even more time. Do you have any tips on how to convert this regex into an NFA without epsilon-transitions?
@mix_tutorial_gaming2985
@mix_tutorial_gaming2985 Жыл бұрын
You are my savior.
@deepakjain4481
@deepakjain4481 9 ай бұрын
thanks a lot thanks a lot you are my saviour i was so stressed
@carina.zip2002
@carina.zip2002 8 ай бұрын
this made so much sense than you so much!! really helping me in my algo analysis class :))
@chackelman
@chackelman 2 жыл бұрын
Awesome and explained clearly, thank you!
@christio02
@christio02 Жыл бұрын
Thank you so much! Very good explanation and procedure!
@raywei1701
@raywei1701 5 ай бұрын
great explanation as always!
@Karim-nq1be
@Karim-nq1be Жыл бұрын
That was easy indeed and brilliantly explained.
@ashwath2324
@ashwath2324 2 жыл бұрын
simple and well explained
@supamdeepbains5172
@supamdeepbains5172 2 жыл бұрын
Thank you, I'd request please more pumping lemmas problems :)
@NabeghMuhra
@NabeghMuhra 5 ай бұрын
Thanks, very helpful!!
@CK-od6ig
@CK-od6ig Жыл бұрын
If we had the regular expression a(abb)* U c and instead of b we put c in place of the corresponding b in the NFA how would the NFA accept for example the string αc ?
@pedromartins5695
@pedromartins5695 11 ай бұрын
It doesn't. The strings accepted would be {EMPTY, c, a, aabb, aabbabb,...}. It's the union of the unitary string 'c' and the strings generated bu the regular expression a(abb)*, that is, string that start with 'a' and has any amount of 'abb's, even none.
@MUSHIN_888
@MUSHIN_888 2 жыл бұрын
Thanks I learnt a lot from your videos
@bulentdayoglu7310
@bulentdayoglu7310 6 ай бұрын
ty
@MiguelMartinez-yj7yu
@MiguelMartinez-yj7yu 2 жыл бұрын
You're amazing, man!
@golden-jungoo655
@golden-jungoo655 6 ай бұрын
Thank you so much ^^
@camdenwyeth316
@camdenwyeth316 9 ай бұрын
Thanks! This was helpful :D
@taha5539
@taha5539 7 ай бұрын
Can we get rid of some of the epsilons?
@zeynepbasoglu3426
@zeynepbasoglu3426 9 ай бұрын
great video 😍
@최현아-i4n
@최현아-i4n Жыл бұрын
this video will be my source for compiler class lmao
@twishaanshu8100
@twishaanshu8100 Жыл бұрын
how would you convert this to left linear grammar? with all the Epsilons?
@yuxiaoliu806
@yuxiaoliu806 2 жыл бұрын
Thank you!
@dharmashah4832
@dharmashah4832 Жыл бұрын
Amazing thank u so so much
@robzonefire
@robzonefire Жыл бұрын
THANK U MAN U ROCK
@KevinGarcia-ws1kt
@KevinGarcia-ws1kt Жыл бұрын
is the union and the Plus sign the same ??
@erky195
@erky195 Жыл бұрын
yes
@azerchniti9497
@azerchniti9497 5 ай бұрын
barra yarham bouk
@THEoneandonlystika
@THEoneandonlystika 4 ай бұрын
complicated thiongs
@azerchniti9497
@azerchniti9497 5 ай бұрын
that was eazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzi
@user-yv1jr5oo8h
@user-yv1jr5oo8h 3 ай бұрын
Go to an indian teacher they are very good in teaching..
What is the NFA to DFA conversion? (Sipser 1.17 Solution)
7:05
Easy Theory
Рет қаралды 7 М.
NFA to Regular Expression Conversion, and Example
14:46
Easy Theory
Рет қаралды 94 М.
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 105 МЛН
나랑 아빠가 아이스크림 먹을 때
00:15
진영민yeongmin
Рет қаралды 19 МЛН
Regular Expression (Regex) to NFA Conversion
10:39
Easy Theory
Рет қаралды 31 М.
Regular Expression Examples
10:49
Easy Theory
Рет қаралды 8 М.
Regular Expression to NFA
13:57
Josh Beatty Vlog
Рет қаралды 11 М.
1. Introduction, Finite Automata, Regular Expressions
1:00:34
MIT OpenCourseWare
Рет қаралды 347 М.
An Exact Formula for the Primes: Willans' Formula
14:47
Eric Rowland
Рет қаралды 1,4 МЛН
The World's Best Mathematician (*) - Numberphile
10:57
Numberphile
Рет қаралды 7 МЛН
Why This All Matters
8:42
Easy Theory
Рет қаралды 3,2 М.
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 105 МЛН