Conversion of NFA to DFA (Example 1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • TOC: Problem Number 1 on Conversion of Non-deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA).
    Topics discussed:
    This lecture shows how to convert an NFA that accepts all binary strings over (0,1) that end with '1' to its equivalent DFA using Subset Construction Method.
    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

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

  • @sruthir1236
    @sruthir1236 3 ปีที่แล้ว +168

    You are providing service to the students, which no one can provide.

  • @n1ghtglare
    @n1ghtglare 3 ปีที่แล้ว +24

    Thank you! I have my exams in a few days and was having a hard time wrapping my head around this because every other guide uses random unnecessary symbols and all. Thank you for making it so simple and to-the-point!

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

      @volt jax Yes and yes, are you someone I know? Hit me up on Telegram, @fushinari

  • @lavishgarg4274
    @lavishgarg4274 3 ปีที่แล้ว +22

    Congratulations for 1M subscribers do 1m golden play button , whenever it comes,you deserve it.

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

    My lectures and notes are a mind numbing mess of symbols. Thank you for explaining this in simple, regular language!

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

    Best explanation ever.. keep going, when I encounter any difficulty, I immediately go for your videos

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

    It was very helpful. Your calm manner of your instructing is very effective.

  • @mrreddy1107
    @mrreddy1107 5 ปีที่แล้ว +7

    I could not sleep for 2 days watched 5min of this video and fell asleep... Thanks for this... nice explaination.. Thnks for my sleep 💟

  • @sathyasubrahmanyam4166
    @sathyasubrahmanyam4166 3 ปีที่แล้ว +6

    This is the best lecture I've heard so far.Thank you so much sir🙏🙏🙏

  • @maty1a
    @maty1a 5 ปีที่แล้ว +13

    It´s correct. I have this exact example in my book. Point is NFA simply "know" when to move to the final state. Book however noted AB as B again.

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

      It doesn't simply "know" when to move to the final state but rather when it faces a situation where it must chose to go to 2 different states, it branches out into 2 branches and moves forward in both directions and so on, but when one branch reaches Final state, the rest will be abandoned and it will be considered as "accepted".
      That's why in NFA it is said that "If there is any way to run the machine that ends in any set of states out of which at least one state is a final state, then the NFA 'accepts' ".
      Although this is the theoretical explanation behind it, it cannot be implemented as is without the use of some other ways and finally representing the same in DFA form.

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

    thank you very much for having subtitles enabled. i have a lot easier of a time processing speech when i have a visual aspect to go along with it, so the subtitles help a lot. the tutorial's very clear and to the point, and i'm able to use it to get ahead on my homework early. thank you.

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

    Please take some complex example with states more than 4 and explain those so that we can clearly understand the concepts with such complex example since simple NFA are easier to convert to DFA than that of complex NFA

  • @HoracioMiguelGomez
    @HoracioMiguelGomez 6 ปีที่แล้ว +19

    In the transition table for DFA it seems you should not put the {...} because the image of the transition function is Q, not P(Q) for DFA. Doing that makes more intuitive why you need to create the combined state AB \in Q instead of using {A, B} \in P(Q) from the NFA.

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

    Thank you, Neso Academy!

  • @boblewis1287
    @boblewis1287 3 ปีที่แล้ว +20

    All my college professors should be fired

    • @unknowwn-en3ps
      @unknowwn-en3ps 3 หลายเดือนก่อน +1

      My collage one should be first one

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

    One day before the exam here. Thank you so much for saving us(students)

  • @AlexVer1738
    @AlexVer1738 3 หลายเดือนก่อน +1

    25 minutes before exam, thank you

  • @toufique3390
    @toufique3390 9 หลายเดือนก่อน +7

    How did you determine that AB is a final state?

    • @JunaidAnsari-my2cx
      @JunaidAnsari-my2cx 5 หลายเดือนก่อน

      For future Reference, In original NFA, B was final state, therfore any states with B in dfa is final state

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

    6:50 why does he say "ab will be my final state" twice instead of actually explaining why it is the final state?

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

    I have absent for this tutorial,but I have understood the concept.Tq for helping me,the best way of teaching tqsm🙏

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

    bhai kitna easly samjhaya hai yaar

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

    Sir I hope your the great teacher .. thank you sir ...

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

    How is AB decided as final state?

    • @adarshkumarjha2097
      @adarshkumarjha2097 6 หลายเดือนก่อน

      As we can see B is the final state in NFA , so all the combinations with B in it , becomes the Final State in the DFA

  • @umangkochar4590
    @umangkochar4590 3 ปีที่แล้ว +2

    Dislikers are the teachers who don't know how to teach

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

      You hits the truth😂😂

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

    these are killer tutorials :)

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

    5:37 please share that video of that union operation video.

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

    😍😍😍😍I am from Yemen
    thank you for helping me 😍😍😍 thank you very much

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

    but in the DFA we can take the state C for the null state .......?
    need reply pls

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

    Thank You sir

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

    Thank you. Excellent presentation.

  • @vedanshsharma1156
    @vedanshsharma1156 3 ปีที่แล้ว +2

    how do we know that AB is the final state
    there can be more states in the transition table

  • @deepupattanayak
    @deepupattanayak 3 ปีที่แล้ว +2

    Happy Teachers day sir

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

    Why will we take AB as a final State in case of dfa?

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

      Suppose in NFA, X is the final state.
      Now, after converting to DFA, from state transition table, all state that has X in them will be final state in DFA.
      Eg: In DFA Transition table, states are: A, B, AX, CX, ACX
      Then AX, CX, ACX all will be final states.

    • @arunjithr5984
      @arunjithr5984 10 หลายเดือนก่อน

      ​@@supersakib62thanks for your valuable explanation ❤️

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

    meeku naa hrudaya poorvaka namaskaralu guru gaaru

  • @Shadow43375
    @Shadow43375 7 ปีที่แล้ว +6

    Like several commenters, I am confused as to why the DFA table features "AB" instead of "B?" Is this just a naming convention or is there a deeper principle here? In what way would it change the meaning of the DFA table if I used "B" instead of "AB?"

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

      On input 1, it can either choose to stay at A or move on to B as shown in the diagram.

    • @nehagupta-qd7dg
      @nehagupta-qd7dg 4 ปีที่แล้ว

      @@successsimplified3654 it would have been help if u could mention it here

  • @harshadtiwari3156
    @harshadtiwari3156 3 ปีที่แล้ว +2

    Why have u not taken dead configuration as dead state here as in previous example ?
    Plz explain sir !

  • @compilerrun5516
    @compilerrun5516 3 ปีที่แล้ว +6

    6:57 how can you say that 'AB' is our final state.

    • @pcv910
      @pcv910 3 ปีที่แล้ว +7

      Because in AB, we have the final state B so AB is final state ..

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

    Sir why should we don't put 0,1 in the final stage

  • @Quiet_Wanderer015
    @Quiet_Wanderer015 3 ปีที่แล้ว +2

    A getting input 0 will stay in A and A getting input 1 goes to B. B getting input 0 gets back to A and B getting input 1 stays in B. Can't this be done for DFA.

  • @vishwanath-ts
    @vishwanath-ts 5 ปีที่แล้ว +3

    Thanks a lot sir...

  • @zackcarl7861
    @zackcarl7861 2 ปีที่แล้ว +3

    Why didn't we mention B transation state in the transaction table

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

      beacuse state B is not reachable from previous states

  • @accidentalGamer69
    @accidentalGamer69 7 ปีที่แล้ว +3

    please upload each topic of engineering specially from RGPV, you are damn good, you can succeed more that that Khan academy

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

    thank you
    sir

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

    Thank you, sir!!

  • @BoharaNaresh377
    @BoharaNaresh377 3 ปีที่แล้ว

    Love from Nepal sir

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

    sirr plzzz make videos on design and analysis of algorithms plzzz

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

    Before these videos student's grades are F, after that videos all of A s.

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

    Thank you sir😊

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

    I like how the videos are bite sized
    Just chunks of 5-10 minute videos

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

    why AB ? can't it be B ?

  • @booleandilemma
    @booleandilemma 3 ปีที่แล้ว

    thank you so much

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

    good lecture

  • @Droneman12338
    @Droneman12338 5 ปีที่แล้ว

    Brilliant video

  • @Raphaelshreds
    @Raphaelshreds 6 ปีที่แล้ว

    AB on input 0 - AF
    AB on input 1 should give you ABF (AB and a failure state because has no other transitions on state B)
    Then AF on 0 - AF
    AF on 1 - ABF
    ABF on 0 - AF
    ABF on 1 - ABF
    However, I will admit that including the failure states may not be necessary and some professors do not include them. It comes down to preference and acceptable practices for your class.

  • @akileshwarchandran1307
    @akileshwarchandran1307 3 ปีที่แล้ว

    sir I have a small doubt why was dead state not introduced here?

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

    sir, why ab is finish state?

  • @dhanushsivajaya1356
    @dhanushsivajaya1356 3 ปีที่แล้ว

    Thankyou sir

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

    if something is supposed to end in 1 like the first example, it should accept something like "011111" as well as just "01" no? like the wording of these examples in almost all of these videos is so... wrong and vague at times that it makes me do it "incorrectly" based on his interpretation of the example.
    it would be much more clear if he said it accepts "the set of all strings over (0, 1) that ends in ONE '1'" but he doesn't say that, it just says ending in 1, which i interpret to mean any 0*1*, or any number of 0s and 1s assuming that it still ends in 1.
    also doesn't this NFA not work if it gets a string like '0101'? THAT ends in a 1, but it isn't accepted because when it gets to the 2nd 0, it goes to phi and then can't get back to the accept state. whereas the DFA WILL accept '0101'.

  • @NaveenKumar-os8dv
    @NaveenKumar-os8dv 11 หลายเดือนก่อน

    wait, if state B in NFA get's 0 again, then it goes back to A right? why is it empty state?

  • @afraimlevi9871
    @afraimlevi9871 3 ปีที่แล้ว

    Big Thank U

  • @heshammohamed9179
    @heshammohamed9179 5 ปีที่แล้ว

    Thanks man!

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

    I have a doubt I took three states for NFA..
    (A)--1,0--(B)--1---((C)) (Here C is my final state )..
    How to I convert it to DFA...!

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

    Syntactically, is {AB} the same as {A∪B}?

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

    if u cant directly design the DFA so first design NFA then convert it/ *SMORT*/

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

    Very well explained. But repetitive examples again and again. It would be nicer if you have different problems.

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

    Good

  • @8089525315
    @8089525315 7 ปีที่แล้ว

    Thanks

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

    What does AB state represents

  • @ronak._kumar
    @ronak._kumar 3 ปีที่แล้ว

    Thankyou🙏🙏🙏🙏🙏

  • @devmahad
    @devmahad 11 หลายเดือนก่อน

    subset contruction method

  • @apoorvebhargava7959
    @apoorvebhargava7959 6 ปีที่แล้ว +2

    in NFA B on getting input 1 can go to B?

    • @karanpuri1617
      @karanpuri1617 5 ปีที่แล้ว +2

      Same Doubt

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

      No, as for A we have considered that case, that is if any 0 or 1 comes before the last 1 it stays in state A itself.

    • @nisithpati6167
      @nisithpati6167 4 ปีที่แล้ว

      @@prateeksengar6634 yeah, point

  • @agamgill9563
    @agamgill9563 6 ปีที่แล้ว

    Thank u sr

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

    Hello! So when we need to design a DFA do we always first design NFA and then convert it to DFA?

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

    wont AB also be the initial state ?

  • @hemanthkumar5097
    @hemanthkumar5097 7 ปีที่แล้ว +5

    which accepts string that ends with b length less than 2

  • @boblewis1287
    @boblewis1287 3 ปีที่แล้ว

    Nice

  • @joshuathomas5062
    @joshuathomas5062 6 ปีที่แล้ว

    what does phi Φ mean the context of union and concatenation? is it equivalent to the null set Ø in set theory?

    • @roberthoffenheim7861
      @roberthoffenheim7861 3 ปีที่แล้ว +2

      Yes, it’s the null state which is an element of the superset of Sigma

  • @gauravbhandari1184
    @gauravbhandari1184 5 ปีที่แล้ว

    great

  • @neenadkambli3168
    @neenadkambli3168 5 ปีที่แล้ว

    In the example in dfa can we write state AB as B

  • @yummycandy1703
    @yummycandy1703 3 ปีที่แล้ว

    sir,why can't we give 1 to b its also true know then why can't we do so pls reply sir

    • @sadkiratsingh4465
      @sadkiratsingh4465 3 ปีที่แล้ว

      those cases will be covered since we also input 1 to A

  • @narcogamer8220
    @narcogamer8220 6 ปีที่แล้ว

    why there is no dead trap in converted dfa?

  • @ThemisTheotokatos
    @ThemisTheotokatos 4 ปีที่แล้ว

    what happened to b?

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

    In NFA when B get's an input of 1 doesn't it have to stay in B instead of going into the null state.

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

      No, since B checks for the last character. There's nothing after the last character, so anything after that goes to death configuration.

  • @codewithedraak
    @codewithedraak 5 ปีที่แล้ว

    you nailed it

  • @aduandrewtat
    @aduandrewtat 4 ปีที่แล้ว

    nnice bro just for it

  • @continnum_radhe-radhe
    @continnum_radhe-radhe ปีที่แล้ว +1

    ❤❤❤

  • @sougatajana2277
    @sougatajana2277 5 ปีที่แล้ว

    Please tell the acceptance of these NFA and DFA .. as you asked in assignment.. I can't find the answer

  • @josephblessingh2384
    @josephblessingh2384 6 ปีที่แล้ว +14

    The reason why B is not in the DFA table is that there is no way B is connected to A or AB. Had B been connected to AB or A, it would be shown in the state table. Don't make the assumption that all states from NFA are to be shown in the DFA State transition Table and Diagram!!! That assumption of yours is wrong. I agree he should have explained it properly, but he didn't!

    • @javaexpertsa8947
      @javaexpertsa8947 6 ปีที่แล้ว +5

      chill, he explained everything perfect.

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

      I actually didn’t get why until @JOSEPH Blessingh said something. Thanks

  • @mvsmaneesh7461
    @mvsmaneesh7461 5 ปีที่แล้ว

    how to determine a final state in converted dfa when we got new states

    • @ck_naik
      @ck_naik 5 ปีที่แล้ว

      Every state which contains final state of NFA is stated as final state for dfa

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

    I wish I could see you earlier, I found you only on my final day! 😢

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

    GOD SAVE U

  • @abhisektiwari7541
    @abhisektiwari7541 7 ปีที่แล้ว

    how AB will be final state?How do i know?

    • @Broekmanium
      @Broekmanium 6 ปีที่แล้ว +6

      A bit late but for anyone new: in the NFA, B is the final state. We say that a state or set of states is final if ONE of the members is final. AB contains the B, hence it is final.

    • @ariap9697
      @ariap9697 6 ปีที่แล้ว

      Can I have three State?Does it matter?

    • @sasindusahanweerakkodi7561
      @sasindusahanweerakkodi7561 3 ปีที่แล้ว

      @@Broekmanium thanks🤜🤛

  • @eshwarreddy4969
    @eshwarreddy4969 6 ปีที่แล้ว

    send b

  • @yashwanthd1998
    @yashwanthd1998 5 ปีที่แล้ว

    Sakkaga chepra neee

  • @parulaktersumi3873
    @parulaktersumi3873 6 หลายเดือนก่อน

    V

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

    O

  • @ekinuygar2275
    @ekinuygar2275 3 ปีที่แล้ว

    cCc

  • @Amitkrdas17
    @Amitkrdas17 6 ปีที่แล้ว +2

    every explanation is really good....but your examples are really boring....

    • @desoforos9196
      @desoforos9196 5 ปีที่แล้ว

      just speed it up to x1.25 brotha

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

    sweet 16😚😚

  • @mohansai7169
    @mohansai7169 7 ปีที่แล้ว +8

    it's wrong

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

      Mohan Sai will u explain it???

    • @mohansai7169
      @mohansai7169 7 ปีที่แล้ว +8

      +Himanshu Suryawanshi
      yes come to my home

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

      for subset construction i don't think he is necessarily wrong, but he did cut out a few steps. from what i've read on sub-set construction method: you create a powerset of the set of states Q and then, starting from the start state, map out all the reachable states and reduce.

    • @ProfessionalTycoons
      @ProfessionalTycoons 6 ปีที่แล้ว +2

      whats your address LOL

    • @Raphaelshreds
      @Raphaelshreds 6 ปีที่แล้ว

      This gentlemen is mostly correct in that it partially wrong.
      AB on input 0 - AF
      AB on input 1 should give you ABF (AB and a failure state because has no other transitions on state B)
      Then
      AF on 0 - AF
      AF on 1 - ABF
      ABF on 0 - AF
      ABF on 1 - ABF
      However, I will admit that including the failure states may not be necessary and some professors do not include them. It comes down to preference and acceptable practices for your class.

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

    thank you so much