NFA to Regular Expression Conversion, and Example

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 230

  • @EasyTheory
    @EasyTheory  4 роки тому +30

    Thanks to my supporters Yuri, vinetor, Ali (UA-cam) and Bruno, Timmy, Micah (Patreon) for making this video possible! If you want to contribute, links are in the video description.

  • @alisonlee8153
    @alisonlee8153 3 роки тому +31

    Wish textbooks had more examples because they help a lot more compared to just text and theorems. Thanks so much!

    • @EasyTheory
      @EasyTheory  3 роки тому +7

      I'm writing a textbook! See my latest video.

  • @davidlancaster5804
    @davidlancaster5804 4 роки тому +112

    College professor spent 2 hours explaining this. Watched this video on double speed in 7 minutes.

  • @kalastasgamingshack
    @kalastasgamingshack 3 роки тому +7

    I have a test tomorrow and didn't understand anything from my Lecturer . This video is a gold mine. Thank you!!!

    • @EasyTheory
      @EasyTheory  3 роки тому +1

      You're very welcome!

    • @gan7940
      @gan7940 6 місяців тому

      Same, 3y later

  • @laurenlin2
    @laurenlin2 3 роки тому +36

    Thank you so much for this easy to follow explanation! Was so confused by my professor but you're a life saver

  • @cagla3360
    @cagla3360 4 дні тому

    Thank you soooo so much!! I didn't understand what my professor was doing in the lecture because he didn't explain what he did and why he did it. You saved me !

  • @michaeltaylor3552
    @michaeltaylor3552 2 роки тому +6

    Dude... I love you. The in and out list made this so easy. My college professor was just having us send it and I couldn't get it, you legitimately just saved me for my mid term. I wish you were my professor, thank you!

  • @Computerix
    @Computerix 3 роки тому +4

    Didn't understand anything from my professor's book, watched this and understood everything thanks !

  • @kavinanand5742
    @kavinanand5742 4 роки тому +9

    This is a fantastic explanation. The In/Out decomposition really helped!

  • @ThangNguyen-ko5ze
    @ThangNguyen-ko5ze 4 роки тому +3

    I have an exam tomorrow and this just saved my life. Thank you for making my Computer Science life a bit easier.

    • @EasyTheory
      @EasyTheory  4 роки тому +1

      Good luck on your exam, and thanks!

  • @SatvikAryabcs
    @SatvikAryabcs 4 роки тому +1

    Thank u sir from INDIA, there r very few utubers who have covered this topic but from all those, ur explanation is outstanding.

  • @aadarshrajesh7485
    @aadarshrajesh7485 10 місяців тому +2

    searched entire youtube for such an example, thankyou so much 👍😁

  • @hashimmahmood3704
    @hashimmahmood3704 10 місяців тому

    hands down the best tutorial on FA to RE conversion using GNFAs

  • @ayushsharma397
    @ayushsharma397 6 місяців тому +1

    Hats off, tried 10+ resource and now this is the only video i will refer in future as well for NFA->RE. The Best, thanks

  • @luissuarez4773
    @luissuarez4773 3 роки тому +2

    I was reading the textbook like crazy and could not understand it at all but your video allowed me to grasp this much better . Thank you so much!!

  • @ahmedbadre5409
    @ahmedbadre5409 2 роки тому +1

    اقسم بالله فنان اول مره افهم التحويل بالسهولة دي ❤❤❤ Thanks. Your explanation is amazing

  • @carloslisboa7402
    @carloslisboa7402 7 місяців тому +2

    im gonna buy you an eraser
    thank you for the videos saving me in college

  • @mehrdadkiani8476
    @mehrdadkiani8476 3 роки тому +2

    Finally, I found a clear explanation for these kinds of questions, thank you.

  • @azncookie1546
    @azncookie1546 3 роки тому +2

    My textbook's explanation for this was terrible, thank you so much this made so much sense!

  • @19MusicIsLife95
    @19MusicIsLife95 4 роки тому +5

    Very nicely explained, thanks from Sweden!

  • @CoolEngineering-nm7mi
    @CoolEngineering-nm7mi Рік тому

    I have a midterm tomorrow and this video literally are saving me!! thank you

  • @trojanhorse8278
    @trojanhorse8278 2 роки тому

    You explained it better than my college professor. U are amazing.

  • @egeergul3548
    @egeergul3548 Рік тому

    broo you really simplified it for me. thank you for saving me hours of unnecessary studying 👏

  • @lonangeng115
    @lonangeng115 3 роки тому

    Marvelous video for DFA to regex! thx! I cant find such a vivid teaching video on Chinese Internet at all!

  • @engineerfonz
    @engineerfonz 3 роки тому +1

    Huge thanks for this example. A much better explanation than my professor!

  • @raz9006
    @raz9006 2 роки тому +1

    WOW !! thanks a lot! I have an exam soon and it was very helpful!!!

  •  2 роки тому +1

    Thank you so much! 😊
    I've finished the implementation of this using the IN-OUT trick 🥳

  • @bettyteng8761
    @bettyteng8761 4 роки тому +1

    Thank you so much. This is the easiest one to understand among all the other videos about this.

  • @ClaudioBOsorio
    @ClaudioBOsorio 3 роки тому +1

    Incredible. You are a great professor. I like it when you put it into steps. It is really easy theory. I think the biggest challenge is just explaining it and you do a very good job at it.

  • @henrygilchrist3793
    @henrygilchrist3793 Рік тому

    Really good video! Love the way you break things down into normal English. Appreciate it!

  • @victorrodriguezdorta1843
    @victorrodriguezdorta1843 4 місяці тому

    the best video i found, thanks, hello from spain

  • @karundawadi876
    @karundawadi876 3 роки тому

    OMG! This is a lot easy than the language in the book. Thanks!

  • @abel5545
    @abel5545 4 роки тому +6

    Such a vivid and clear explanation ! Thank you so much for making this

    • @EasyTheory
      @EasyTheory  4 роки тому

      Thanks so much! Don't forget to check out our theory lectures series playlist.

  • @tsvmanojturlapati4492
    @tsvmanojturlapati4492 2 роки тому

    Super Sir
    ALMIGHTY bless you with all kinds of wealth

  • @simsoutou2141
    @simsoutou2141 4 роки тому

    Thank you so much! I have review the lecture and read the book more than 2 hours in order to undertand the GNFA, but I failed. I have watched this video about 7 mins, I figured it out.

    • @EasyTheory
      @EasyTheory  4 роки тому

      Thanks very much! Make sure to watch the other theory videos I've made

  • @AngelOrtizMartinez-u2y
    @AngelOrtizMartinez-u2y Рік тому

    i love you so much, all your videos make so much sense and it will be the reason i pass this class

  • @pranavkulkarni2023
    @pranavkulkarni2023 Місяць тому

    Finally, I got it. Thank you very much.

  • @zhunxue1719
    @zhunxue1719 2 роки тому

    Thanks a ton! got more out of this 14 min than the 1 hour lecture

  • @bangvu2127
    @bangvu2127 Рік тому

    Many thanks. I owe my Automata & Compiler paper's credits to you

  • @hursantb7957
    @hursantb7957 3 роки тому +10

    Love this
    RIP Kleene Algorithm and Ardens rule

  • @eceaknc7523
    @eceaknc7523 4 роки тому

    You are the best! I almost spend 2 hours to understand the ripping from the theory of computation book :(

  • @CarlosMagno-uz8de
    @CarlosMagno-uz8de Рік тому

    Thank you so much! You are gifted at teaching!

  • @kmunkhuu
    @kmunkhuu Рік тому

    You are AWESOME! I am so so glad I found your channel!

  • @sajjadalvandkoohi2397
    @sajjadalvandkoohi2397 4 місяці тому

    it was helpful & clear, you saved my time & life😀thanks

  • @Coplanersirtax9
    @Coplanersirtax9 Місяць тому +1

    Damn nice vid man!

  • @misskoalapiano681
    @misskoalapiano681 3 роки тому +1

    Very good explanation. Thank you!

  • @jixster1566
    @jixster1566 3 роки тому

    Thank you so much. you are saving me in my discrete 2 class.

  • @guney4420
    @guney4420 4 роки тому +7

    best method that I ever seen! thanks for the explanation!! thank you so much ^^

  • @carlantoine3312
    @carlantoine3312 3 роки тому

    Thank you very much this has helped me understand how to use GNFA.

  • @tommy_saxton
    @tommy_saxton 3 роки тому +1

    this was SO HELPFUL

  • @jamaluddin9158
    @jamaluddin9158 4 роки тому +3

    Hello this is a great technique! I had a doubt though. What to do in case we have a trap state? How to "rip" that state out? I don't see how to do this since trap state never comes in the path to final state. My gut is telling me to just ignore the path to trap state but I'm not sure if that's right.
    Edit: I figured it out! Since this method is agnostic to whether this is a DFA or NFA, we can just ignore the trap states before hand!

    • @stormanderson7942
      @stormanderson7942 Рік тому +1

      I had the same question. Thank you for coming back to your own question

  • @svhxxy8695
    @svhxxy8695 4 роки тому

    sir, you are better than my professor

    • @EasyTheory
      @EasyTheory  4 роки тому +1

      Lol thanks! I should be your professor instead ;) kidding.

  • @kevinthomas2326
    @kevinthomas2326 7 місяців тому +1

    You are a godsend mate

  • @taijin1369
    @taijin1369 Місяць тому

    ILL SAY IT AGAIN YOU ARE THE GOAT!

  • @davideconiglio1574
    @davideconiglio1574 4 роки тому +1

    Great explanation, thank you!

  • @Etko1104
    @Etko1104 3 роки тому

    Thanks for this clear explanation!

  • @marctreal
    @marctreal Рік тому

    Fantastic! Just one issue: the audio levels are quite low, it would be helpful if you brought them up

  • @codyelhard8012
    @codyelhard8012 4 роки тому +2

    Excellent video, too bad it doesn't have that many views

    • @EasyTheory
      @EasyTheory  4 роки тому

      Cody Elhard thanks! I hope it can get more popular too!

  • @ankitasingh723
    @ankitasingh723 3 роки тому

    Thank you so much for making this!! Such a clear explanation!

  • @julisvipe
    @julisvipe 4 роки тому

    This explanation was great! Thank you very much,

  • @johann_reimann_2077
    @johann_reimann_2077 4 роки тому

    Thanks for the best explanation!

  • @christianschmidt3065
    @christianschmidt3065 3 роки тому

    great video ! thanks from Germany !

  • @julr89
    @julr89 4 роки тому +1

    Great explanation!

    • @EasyTheory
      @EasyTheory  4 роки тому

      Julian Rahahleh thanks Julian :)

  • @awsafrafin1467
    @awsafrafin1467 Рік тому

    It was really helpful and very easy

  • @zzzpr
    @zzzpr Рік тому

    Thank you this was so helpful!!

  • @bazzi780553743
    @bazzi780553743 3 роки тому

    Great explanation, thank you so much.

  • @abhishekkumar-ef1xj
    @abhishekkumar-ef1xj 4 роки тому +1

    wao man :) pictorial representation with great explanation makes it clearly understandable . Thanku :)

    • @EasyTheory
      @EasyTheory  4 роки тому

      abhishek kumar you're very welcome!

  • @britneywangwc
    @britneywangwc 4 роки тому

    thank you for the explanation! really easy to follow and understand :)

  • @shahbodshs6693
    @shahbodshs6693 2 роки тому

    thanks for the great explanation

  • @arminsafiri4031
    @arminsafiri4031 3 роки тому

    thank you!! very comprehensive

  • @lionsenator
    @lionsenator 3 роки тому +3

    Thanks for the nice explanation. Why do you ignore the transition from q1 -> q2 -> q3 -> F when you're ripping q3? I think it doesn't make a difference but I just wonder because later you consider "longer" paths.

    • @EasyTheory
      @EasyTheory  3 роки тому +5

      Because of transitivity. If we know how to get from q2 to f, then we know how to get from q1 to f because that's just concatenating the two regexes along the way.

    • @bloodthirstybutcher8365
      @bloodthirstybutcher8365 2 роки тому

      @@EasyTheory kinda late to the party, but what if I considered this path? instead of only a*, it would be a* + (aba*)?

    • @khoadiep3774
      @khoadiep3774 16 днів тому

      Same question

  • @djtygre
    @djtygre 2 роки тому

    thank you for this cogent explanation. I hope that dog has calmed down in the video???

  • @sungod9797
    @sungod9797 2 роки тому

    Amazing video, thank you.

  • @miliu99
    @miliu99 2 роки тому +1

    Thank you very much for your clear explanation. I have a question though. You mentioned that you can pick any state to get started. However, elimination states in different order will likely produce a different RE. E.g. if I eliminate states in this order: q2, q1, q3, q0, I will get the result as (a(bUaa))*(a(abUe)a*), where e is epsilon. Is there a way to convert that RE to a((bUaa)a)*(a*Uaba*) which is what you get? or prove those two are basically same?

    • @Persa12
      @Persa12 Рік тому

      i get same result as you

  • @SystemZombies
    @SystemZombies Місяць тому

    Love from India❤🇮🇳

  • @ericskelton5191
    @ericskelton5191 4 роки тому +1

    Great video, helped my understanding a lot. I was just wondering what happens if the only outgoing state is itself, do we just ignore it as it cannot lead us to the final state (this is not the final/accept state).

  • @lukescurrenthobby4179
    @lukescurrenthobby4179 3 роки тому +1

    yeah this video is a good one. thanks man!

  • @MS-gt9yu
    @MS-gt9yu 3 роки тому

    Thank for the explanation

  • @SeaTurtle1122
    @SeaTurtle1122 2 роки тому

    You’re a literal god

  • @pranavsingh1081
    @pranavsingh1081 3 роки тому

    thank you my prof just complicated things via using phi transition also.

  • @sgerodes
    @sgerodes 4 роки тому

    this ecplanation is brilliant

  • @hulohulo5286
    @hulohulo5286 3 роки тому

    Dude you're a legend

  • @ademcapan4831
    @ademcapan4831 4 роки тому +1

    this is absolutely the best

  • @redx121
    @redx121 7 місяців тому +1

    God I wish you were my professor

  • @zeitgeist18
    @zeitgeist18 3 роки тому +1

    How do you know when to combine different paths from a state to another state with a union? There were times where there were alternative paths from one state to another but they weren't included in the union. For example at 6:03, to go from q2 to F we could've taken the that q2 -> q0 -> q1 -> q3 -> F but we only chose the path shown in the video. I'm not sure if this is just intuition or there is some algorithmic and definitive way of doing this. At 7:15 you did a union here but I'm not sure why union wasn't done in the other case I mentioned?
    In other words how do you know which paths to choose to get from one state to another? There are some other paths you could've taken from one state to another but chose not to.

    • @EasyTheory
      @EasyTheory  3 роки тому +2

      You don't worry about that. You only focus on length-2 paths: the ones that go through the state you're trying to remove.

  • @kritzelbrabp
    @kritzelbrabp 3 роки тому +1

    Great video, thanks! One question: How do I build pairs in the In-&-Out-list if there is a state with several Ins and several Outs? Do I have to treat this a cartesian product so that every In builds a pair with every Out?

    • @EasyTheory
      @EasyTheory  3 роки тому +3

      It's not exactly the Cartesian product, but some kind of product, yes (it's possible to formulate it as Cartesian though - the problem lies with the results being concatenations, not ordered tuples as the Cartesian product would give.)
      But yes, every "in" goes with an "out".

    • @kritzelbrabp
      @kritzelbrabp 3 роки тому

      @@EasyTheory Thank you!

  • @alengospodinov
    @alengospodinov Рік тому +1

    Question: Is Union equivalent to "+". In my classes we use the + sign and not the U. If they are can i directly substitute to get the desired answer from my Uni?

  • @alperdonmez6214
    @alperdonmez6214 3 роки тому

    Great work, thanks a lot!

  • @ameliawissink8352
    @ameliawissink8352 2 роки тому

    You are my favorite person

  • @vincentwu2325
    @vincentwu2325 2 роки тому

    explained very well

  • @Mo__
    @Mo__ 3 роки тому

    Awesome Video !!

  • @uroosaimtiaz
    @uroosaimtiaz Рік тому

    Wow! Amazing! Ty so much :D

  • @Pro-sj1kh
    @Pro-sj1kh 6 місяців тому +1

    you are unique one

  • @salmansaleem8891
    @salmansaleem8891 4 роки тому

    Great video sir

  • @Dzozew.
    @Dzozew. День тому

    What if I have multiple final states? Let's say q3 and q2 are finital state, then both goes to F?

  • @suryaprakash18ms
    @suryaprakash18ms 3 роки тому

    Love from India!!!

  • @none1712
    @none1712 Місяць тому

    lots of love ❤❤💐💐

  • @sidharthgiri1610
    @sidharthgiri1610 3 роки тому

    Greattt video dude!

  • @Omar45
    @Omar45 Рік тому

    Perfect, thank you

  • @sorayaanvari5906
    @sorayaanvari5906 2 роки тому

    so helpful, thanks