Conversion of NFA to DFA

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • TOC: Conversion of Non-deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA).
    Topics discussed:
    1. This lecture shows how NFA and DFA are equivalent and how to convert an NFA to its equivalent DFA.
    2. Equivalence of NFA and DFA.
    3. Example of converting the NFA for a language that accepts all strings that starts with '0' to its equivalent DFA.
    Full Course on TOC: goo.gl/f4CmJw
    Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
    Follow me on Instagram: @jaiz_itech (bit.ly/2M3xyOa)
    Contribute: www.nesoacademy...
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy...
    Website ► www.nesoacademy...
    Forum ► forum.nesoacad...
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #TheoryOfComputation #TOCByNeso #NFAtoDFA #NFA #DFA #AutomataTheory

КОМЕНТАРІ • 310

  • @andrewschatz3949
    @andrewschatz3949 7 років тому +651

    You deserve an award. You've probably saved more lives than Superman.

    • @_johnakinola
      @_johnakinola 6 років тому +21

      Yes you are more than correct. After 3 weeks of classes in confusion, my questions were answered in 9 minutes

    • @himanshujain718
      @himanshujain718 5 років тому +3

      Please
      Construct an optimized DFA :
      0*1*(0/1)#

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

      Exactly

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

      are you an idiot??

    • @KM-sf6zy
      @KM-sf6zy 3 роки тому +2

      @@sohammaity7389 I think you're the one

  • @prajunathunt
    @prajunathunt 5 років тому +859

    A day before the exam at 2x speed.

  • @tr_olia695
    @tr_olia695 Рік тому +12

    I put aside my university study materials because they are useless (lack of explanation) for the sake of this course and instead of stomping around in one topic/exersize for a week, I have already gone through half the material in 3 days with examples. Thank you very much!

  • @LEARN-LEGENDS
    @LEARN-LEGENDS Рік тому +9

    From having no knowledge about my compiler engineering subject to kickoff the subject like a master , I've come a long way with your teaching sir .... THANK YOU SO MUCH !!!

  • @217-sritejrajulu6
    @217-sritejrajulu6 5 років тому +101

    u have made the subject which i feared look damn easy, thanks a lot for your teaching, stay blessed sir

  • @LuisHerrera-vr5fk
    @LuisHerrera-vr5fk 3 роки тому +37

    I learned more in 10 minutes than I have in 8 weeks paying $1K in class. GPA savior.

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

      then your class is shit.

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

      You need to change ur classes bro

    • @damianwysokinski3285
      @damianwysokinski3285 Рік тому +3

      Waste of money. Universities should not be paid by students.
      Especially useless subjects

  • @pallasepithet
    @pallasepithet 3 роки тому +9

    I've been reading comments under algorithm tutorial videos and I learned more ways to flatter than to program

  • @ArBasith
    @ArBasith 7 років тому +34

    Appreciate your work, helping me a lot with automata theory. Very simple and detailed work, keep continuing it.

  • @arashkeyghobadi
    @arashkeyghobadi 6 років тому +23

    Thanks a lot, man! got a headache reading my lecture notes to figure it out but you put it pretty nicely!

  • @Drummerboy19th7
    @Drummerboy19th7 6 років тому +28

    Today I also converted to a DFA:
    Definitely
    Fixing-for
    Academic Probation

  • @supersakib62
    @supersakib62 Рік тому +11

    Great videos! A correction maybe: In NFA the delta function goes from Q times sigma to P(Q). The power set. 2^|Q| is the cardinality of that set.

    • @Emily-fm7pt
      @Emily-fm7pt Рік тому +8

      Yeah, though a lot of textbooks and resources use 2^Q as the notation for the Power Set, so that's probably just what he was used to

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

      You’re the one that’s wrong. That notation is also used for the power set dumbass

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

    This is the best example ever. Thanks a lot sir...... Tomorrow is my test and your explaination help me a lot

  • @ropopal1094
    @ropopal1094 2 роки тому +5

    all your videos are good, easy to understand, well edited/produced. thank you. you are a good man!

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

    Really helpful! Thanks a bunch. You make it practically trivial to understand

  • @forgotaboutbre
    @forgotaboutbre 5 років тому +75

    This example is too simple as the NFA & DFA are nearly identical

    • @gena8414
      @gena8414 3 роки тому +9

      yeah, the main problem is when an NFA state has multiple transitions for the same symbol/

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

    thanks for saving my cs career

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

    Wow, your teaching style is a piece of cake.
    Thanks a bunch.

  • @Luna-fu7ix
    @Luna-fu7ix 6 років тому +5

    OMG.....BEST EXPLANATION EVER.........!!!!!! Sir i dont know how shoud i thank you....

    • @AkhzarFarhan
      @AkhzarFarhan 5 років тому +3

      Contribute: www.nesoacademy.org/donate

  • @AbhishekVerma-fe3wo
    @AbhishekVerma-fe3wo 2 роки тому +4

    This channel is a gem for engineering students.

  • @chandrashekharreddy4524
    @chandrashekharreddy4524 3 роки тому +6

    Today I wrote my exam and I'm going to pass just because of you...🧡

  • @ProfessionalTycoons
    @ProfessionalTycoons 6 років тому +5

    very clear-cut explanation

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

    good explanation sir

  • @vivienne_lavida
    @vivienne_lavida 7 років тому +20

    Why are there so many dislikes? I think this is an accurate video of NFA to DFA conversion.

    • @Jaqen_Hghar
      @Jaqen_Hghar 6 років тому +2

      Because some people always dislikes no matter how good the video is....

    • @kanav51
      @kanav51 6 років тому +3

      Because you cannot be successful if you don't have haters.

    • @mouradqqch1767
      @mouradqqch1767 5 років тому +12

      Because it is simply wrong. The example shows how to convert an incomplete DFA to a complete DFA. There is no nondeterminism in his automaton.

    • @patrickmutuku
      @patrickmutuku 5 років тому +3

      @@mouradqqch1767 Yes. Exactly the point.

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

      👌👌👌🙏

  • @urizoran
    @urizoran 5 років тому +85

    This is not the technique of how to convert a NFA to DFA, which is more complicated than this. This video shows the technique of converting a non-complete DFA to a complete DFA. I think the technique is explained well but it is misleading.

    • @lowzyyy
      @lowzyyy 5 років тому

      He basicaly did convert non complete NFA to complete NFA. Lol dislike

    • @urizoran
      @urizoran 5 років тому +15

      @@lowzyyy The "NFA" in the example has no non-determinism, which means it is basically a DFA. Since the transition function is not fully defined, it is a non-complete DFA. The generic technique of converting an actual NFA to a DFA involves simulating the many possibilities of states the automata can be in at any moment in the computation by using 2^|Q| states, each representing a set of states of the NFA.
      I am sure the intentions of the uploader were good, but the content does not actually teach the technique students are usually expected to understand when learning of NFA to DFA conversion.
      Hate to break it to you.

    • @Golha2505
      @Golha2505 5 років тому +1

      YES, its annoying that he didnt correct the video.

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

      @@Golha2505 @urizoran he has actually has more example videos you can check that out

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

      its NFA, you're misleading

  • @uttukoul
    @uttukoul 6 років тому +10

    literally reading this 3 hours before my end sem exam.

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

    Assignment ans: L2 -2 , L3 - 5 , L4 - 3 ,L5 - 5

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

    i just wanted to remember this from my previous sem toc subject cause this is asked in my compiler design subject and this video is real bomb.....

  • @declanleighncsu
    @declanleighncsu 7 місяців тому

    This was incredibly easy to understand.

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

    Wonderful explanation

  • @ariap9697
    @ariap9697 6 років тому +1

    Nesco is the best Tutorial Online Education (Thanks for being free I really cant afford even for Univercity easily)

  • @navaneeth2000-qc
    @navaneeth2000-qc 2 роки тому +1

    Thankyou very much. It is very useful.

  • @dishaenglishmediumschoolkantab

    Very Very Amazing Class For Me.... Thanks Alots Sir🙏❤️

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

    Best explanation. Go ahead!😍🥰

  • @nomimalik7025
    @nomimalik7025 2 місяці тому

    my teacher is big fan of you!!!!

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

    Wooow glory to the Lord Neso academy admin you save my money for awhole semster😅😅😅

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

    Wow. Brilliant 👏
    Very Good tutorial in few minutes. Thanks. Cheers

  • @guptav06
    @guptav06 Рік тому +2

    Sir, the example you have taken is not a NFA, but that is DFA itself.

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

    Why would I wanna convert? Is it because an NFA is easier to design but only a DFA can be implemented?

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

    thank you so much!

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

    Thanks for helping me before exams

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

    Thank you neso academy

  • @nitishrao2561
    @nitishrao2561 5 років тому +1

    Please make tutorials on compiler design.

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

    Sir plz tell me what is the correct answer for this question- Maximum number of states of a DFA converted from a NFA with n states is?

  • @skeitra6536
    @skeitra6536 6 років тому +2

    so basically, when it comes to NFAs that have only one next state for each symbol like the one in the video, it's equivalent DFA needs a specified transition for every alphabet symbol, can't just make it go nowhere (empty set)?

  • @joshuapaul652
    @joshuapaul652 5 років тому

    Your explanation is very nice

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

    every DFA is an NFA , then if we are asked to design both DFA and NFA for some language , isn't it enough to just only design the
    DFA ?

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

    So what to do if the NFA has an empty string or lambda? For Example, a NFA is; S state goes to 1 when it gets a, then state 1 goes to state 2 when it gets b, and state 2 goes to S state when it gets a lambda/ empty string.

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

    You're able to make everything look simple

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

    thankyou so so much sir...God Bless You

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

    Nice explanation of concept

  • @bhuppidhamii
    @bhuppidhamii 11 місяців тому

    love the intro.

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

    this subject is hell it is so tough to learn uff

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

    So converting using this state transition table.

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

    sir the first example you showed for set of all strings that start with 0,why it needs a dead state?
    If 1 comes to A ,can we show that it stays on A itself.

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

      If you use your suggestion the automaton will accept any string that has at least a zero. The string 10 would be accepted. Which is not part of L

  • @phumlanimbabela-thesocialc3285
    @phumlanimbabela-thesocialc3285 3 роки тому

    Thank you very much. Great video.

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

    Thank you sir❤️

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

    good lecture

  • @alihelmi
    @alihelmi 4 роки тому +4

    In this video, you considered Phi as a new dead state in the NFA transition table, while in the coming videos you didn't create a dead state in the transition table of DFA! Could you please explain why?

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

      phi in NFA means dead configuration (basically when a state does'nt goes anywhere after input ) in DFA it is then converted to dead state to make the DFA complete.

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

    Thanks

  • @Bellemere...
    @Bellemere... Рік тому

    Thank you so much Sir!

  • @كوكتيلسعودي-ج2و
    @كوكتيلسعودي-ج2و 3 роки тому

    tjanks bro this so helpfull

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

    The first explanation is not needed, it makes things sound very complicated. If shown first then explained theory it would make it much more easy to take it. Thank you.

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

    thank you do much neso acadmy

  • @eimaldorani
    @eimaldorani 7 років тому

    @Final state, in the bases of what did you decide that AB is the final state!?

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

    5*3 done

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

    this is great, thanks bro

  • @diogo98s
    @diogo98s 6 років тому +3

    Boa sorte para TCOM pessoal!

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

    assignment L1=4;L2=2;L3=5;L4=4;L5=5

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

    Thankyou sir

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

    How can I replace my incompetent professors with you? Thank you so much

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

    Really helpful! Thanks a bunch :)

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

    Awesome!

  • @dovic9181
    @dovic9181 2 місяці тому

    2 hours before exam up 24 hours and with 5 cups of coffee taken

  • @NishuTissue
    @NishuTissue 11 місяців тому

    What do you do if the same input is going to 2 different places. In one of my examples the 1 is going to A and B.

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

    Bahut badiya

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

    Tq very much

  • @soumyaranjansamalkiit
    @soumyaranjansamalkiit 11 місяців тому

    Kya chummeswari padha te hai sir 👌🏼

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

    Thanks alot sir

  • @NoName-jy4cv
    @NoName-jy4cv 3 роки тому

    Thank you!

  • @piotrekm7943
    @piotrekm7943 3 місяці тому

    First automaton is deterministic too!

  • @primakovch8332
    @primakovch8332 5 років тому +1

    can we take both 0 and 1 and go to the same state in case of DFA??

  • @kirantejaa74
    @kirantejaa74 7 років тому +2

    thanks sir!

  • @Leo-mq6ig
    @Leo-mq6ig 2 роки тому

    Sir.... In NFA any state have multiple transition for any input... But in ur Example where it is... State A has only 1 transition for ip 0 and B also.
    Is is NFA??

  • @vishalprasadgupta714
    @vishalprasadgupta714 5 років тому

    you are great sir

  • @Anwari70
    @Anwari70 5 років тому

    well explained

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

    thank you sir

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

    WARNING!!!!
    I barley comment on UA-cam but I would like to warn ALL of you that although these videos are great for what they are, they MAY OR MAY NOT be accepted by your Professor. Neso's pumping lemma and NFA to DFA tutorials were marked completely wrong by my professor. I'm currently struggling to learn my professors specific way of how he would like the answers/ solutions and I highly advise everyone should pull up an example problem from neso and see if your professor gives you a thumbs up. Mines didn't!

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

      What did your prof reject in-particular? The methods? The Answers were wrong? Are you justified with his specifics?

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

    Your NFA is already a DFA!

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

    mathematically every dfa is not an nfa. i do not know how to explain this because i cannot write mathemtical symbols here. But just go by the definition, and they are different. However NFA can be modified into a DFA

  • @riteshsharma9838
    @riteshsharma9838 Рік тому +2

    it was just wow!😱😱😱😱😱😱😱😱

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

    The day before exam and watching 1.75x . thanks man

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

    I love❤😘 this channel

  • @USITACADEMY
    @USITACADEMY 5 років тому

    thank you soo much dear .....respect and love for you

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

    sir , but u said that DFA should be linear and every state should have 1 next state then why do we have 2 states in A when we convert NFA to DFA sir ?

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

    You mixed the concepts of NFA and DFA

  • @yourgamersnews
    @yourgamersnews 2 місяці тому

    You are better than khan academy

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

    I don't understand... at 04:15 you say "it is NFA" because input 1 from A goes nowhere (so basically phi). But why is that any of our concern? Shouldn't we only handle THE INPUTS THAT WE SEE (sry for caps, no anger intended; just for highlighting). I mean we can say it is NFA only if we apply the function for (same state, same input) and get two differente results... right? I do not understand your justification of why that is NFA.

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

    Can you please specify a method to convert Dfa to anequivalent Nfa ?

  • @devi_dadisetti9366
    @devi_dadisetti9366 5 років тому +1

    Wt about dfa to nfa sir??is this same for that

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

    From where i can study computer organization and architecture??