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

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ต.ค. 2021
  • 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.org
    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.

ความคิดเห็น • 38

  • @cristianiorga6393
    @cristianiorga6393 ปีที่แล้ว +18

    You are amazing! It`s a shame I only discovered your channel in the night before the exam :D

  • @ashwath2324
    @ashwath2324 2 ปีที่แล้ว +1

    simple and well explained

  • @christio02
    @christio02 ปีที่แล้ว

    Thank you so much! Very good explanation and procedure!

  • @dawidbania7903
    @dawidbania7903 ปีที่แล้ว +17

    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 4 หลายเดือนก่อน +1

      yes, this is very right. I was looking out for a comment that matches my thought. Thanks

    • @chongwan4712
      @chongwan4712 2 หลายเดือนก่อน

      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.

  • @Karim-nq1be
    @Karim-nq1be ปีที่แล้ว

    That was easy indeed and brilliantly explained.

  • @christianhackelman303
    @christianhackelman303 2 ปีที่แล้ว +1

    Awesome and explained clearly, thank you!

  • @MiguelMartinez-yj7yu
    @MiguelMartinez-yj7yu 2 ปีที่แล้ว

    You're amazing, man!

  • @moeyali123
    @moeyali123 ปีที่แล้ว

    Thanks I learnt a lot from your videos

  • @seiftarraf6213
    @seiftarraf6213 ปีที่แล้ว +4

    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?

  • @yuxiaoliu806
    @yuxiaoliu806 2 ปีที่แล้ว

    Thank you!

  • @supamdeepbains5172
    @supamdeepbains5172 2 ปีที่แล้ว

    Thank you, I'd request please more pumping lemmas problems :)

  • @raywei1701
    @raywei1701 3 หลายเดือนก่อน

    great explanation as always!

  • @benjaminwatkinson6464
    @benjaminwatkinson6464 2 ปีที่แล้ว +18

    If NFAs are like onions and ogres are like onions can you convert directly from NFAs to ogres?

    • @anthonyevans8536
      @anthonyevans8536 2 ปีที่แล้ว +8

      you're asking the right questions here!

  • @deepakjain4481
    @deepakjain4481 7 หลายเดือนก่อน

    thanks a lot thanks a lot you are my saviour i was so stressed

  • @NabeghMuhra
    @NabeghMuhra 2 หลายเดือนก่อน

    Thanks, very helpful!!

  • @carina.zip2002
    @carina.zip2002 6 หลายเดือนก่อน

    this made so much sense than you so much!! really helping me in my algo analysis class :))

  • @mix_tutorial_gaming2985
    @mix_tutorial_gaming2985 ปีที่แล้ว +1

    You are my savior.

  • @camdenwyeth316
    @camdenwyeth316 7 หลายเดือนก่อน

    Thanks! This was helpful :D

  • @golden-jungoo655
    @golden-jungoo655 4 หลายเดือนก่อน

    Thank you so much ^^

  • @dharmashah4832
    @dharmashah4832 ปีที่แล้ว

    Amazing thank u so so much

  • @twishaanshu8100
    @twishaanshu8100 ปีที่แล้ว

    how would you convert this to left linear grammar? with all the Epsilons?

  • @zeynepbasoglu3426
    @zeynepbasoglu3426 7 หลายเดือนก่อน

    great video 😍

  • @robzonefire
    @robzonefire ปีที่แล้ว

    THANK U MAN U ROCK

  • @bulentdayoglu7310
    @bulentdayoglu7310 3 หลายเดือนก่อน

    ty

  • @taha5539
    @taha5539 5 หลายเดือนก่อน

    Can we get rid of some of the epsilons?

  • @user-uz7xk8ov1i
    @user-uz7xk8ov1i ปีที่แล้ว

    this video will be my source for compiler class lmao

  • @CK-od6ig
    @CK-od6ig ปีที่แล้ว +1

    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 8 หลายเดือนก่อน

      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.

  • @KevinGarcia-ws1kt
    @KevinGarcia-ws1kt ปีที่แล้ว +1

    is the union and the Plus sign the same ??

    • @erky195
      @erky195 ปีที่แล้ว

      yes

  • @azerchniti9497
    @azerchniti9497 3 หลายเดือนก่อน

    barra yarham bouk

  • @user-yv1jr5oo8h
    @user-yv1jr5oo8h หลายเดือนก่อน

    Go to an indian teacher they are very good in teaching..

  • @ALIENGOATMESSI
    @ALIENGOATMESSI 2 หลายเดือนก่อน

    complicated thiongs

  • @azerchniti9497
    @azerchniti9497 3 หลายเดือนก่อน

    that was eazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzi