4. Pushdown Automata, Conversion of CFG to PDA and Reverse Conversion

Поделиться
HTML-код
  • Опубликовано: 19 сен 2024

Комментарии • 41

  • @cristianocolangelo9920
    @cristianocolangelo9920 2 года назад +63

    Funny how the writer of the book I have on my left is also giving me a lecture at the same time.

  • @jasonhuang2270
    @jasonhuang2270 5 месяцев назад +4

    Studying for midterm by binging these videos, these are amazing

  • @MehbubulHasanAlQuvi
    @MehbubulHasanAlQuvi 2 года назад +8

    Legend Sipser!

  • @jeremiahsimisi5204
    @jeremiahsimisi5204 6 месяцев назад +2

    Very helpful. Thanks for the input, sir. Much appreciated.

  • @esepecesito
    @esepecesito 2 года назад +5

    @22:30 there is a 3rd meaning: the boy saw (as cut in half with a saw) the girl...

    • @annafebland4460
      @annafebland4460 2 года назад +4

      I thought that too, but it would be improper grammar. The proper way to say it would be “The boy sawed the girl with the mirror.”

    • @johneliasmojado
      @johneliasmojado Год назад +3

      the ambiguity that he was referring to is on the structure of the sentence and not on the meaning of the words

  • @qqqqqqqqqqqqqqq67
    @qqqqqqqqqqqqqqq67 2 года назад +5

    42:20 prof sipser a real one

    • @gloverelaxis
      @gloverelaxis Год назад +1

      I kinda understood the notation after he explained it but I have no idea *why* we're using this notation - it has so little connection with the conventional meanings of the symbols used, and is so insufficient to describe the functionality of the machine. the use of Greek symbols instead of natural English names, and the use of an extremely ambiguous/overloaded math syntax instead of something more like a programming language with a very simple and regular syntactic structure is infuriating

    • @w0nnafight
      @w0nnafight Год назад +7

      @@gloverelaxis skill issue

  • @drxyd
    @drxyd 2 года назад

    14:48 EE -> TT -> FF -> aa. You could interpret a* as exponentiation but I think that in general this leads to ambiguity if you're interpreting the CFG as a model for arithmetic.

  • @Emrox
    @Emrox 2 года назад +2

    49:35 I don't think this example language actually does require nondeterminism? If you just pop everything that matches the current input and push everything that doesn't, and accept if the stack is empty at the end, it should still work. For example, the stack for the sample input (011110) would go 0 -> 01 -> 0 -> 01 -> 0 -> empty. I would try and write out the mathematical notation but I don't have the best grasp on that yet...

    • @jaiminvaghela4576
      @jaiminvaghela4576 2 года назад +8

      This approach is wrong. If we take your model and give input 1100, at the end of the string, the stack will be empty but given string is not part of the language still it is accepted. And nondeterminism is required to check at which symbol w has been ended and reverse of the w has been started.

    • @Emrox
      @Emrox 2 года назад +3

      @@jaiminvaghela4576 ahhhh makes sense!

  • @plortopod9908
    @plortopod9908 2 года назад +6

    Anthropomorphizing the machine

  • @billybarnes6961
    @billybarnes6961 11 месяцев назад

    40:50 Here, I thought when epsilon is on the right side of the transition function, it means we popped the top from the stack, not that it was unchanged and that we didn’t write. I thought unchanged is when it’s the same symbol as the one on the left

    • @dtung2008
      @dtung2008 9 месяцев назад

      I think the definition of (deterministic) PA is every transition needs to either push or pop stack, to add epsilon to stake is to remove such constraint to support nondeterministic PA. I guess the epsilon of stack on the left hand size means you don't need to pop (read) to transition state, and the epsilon on the right hand side means you don't need to push (write) to transition. If you read the examples in the textbook it will be more clear.

  • @Mahsun23
    @Mahsun23 10 месяцев назад +2

    The boy saw the girl with the mirror.
    meaning number 3: you can read it as he cut her in half with a mirror. : )

  • @jmm5765
    @jmm5765 7 месяцев назад +1

    57:15 Sipser's a funny guy

  • @anonviewerciv
    @anonviewerciv 2 года назад +2

    28:28 Pushdown automata.

  • @MayankGoel447
    @MayankGoel447 Год назад +1

    I think one flaw with PDA while checking whether a string is in a CFL or not is that CFL can be infinite. So essentially the checking process might not ever terminate.

    • @dtung2008
      @dtung2008 9 месяцев назад

      You have to distinguish two types of meaning, one way is infinite as you describe, another is given any number said n we can show result is true. In here we show the proof in the sense of the second meaning.

  • @bowlingfanatikzzz
    @bowlingfanatikzzz 2 года назад +5

    Very helpful to future students! Great work! Thank you!

  • @MayankGoel447
    @MayankGoel447 Год назад +1

    23:43 a + a + a actually doesn't belong to G2. Then how are L(G2) = L(G3)

    • @dtung2008
      @dtung2008 9 месяцев назад

      a + a + a is in G2, try to use the first rule to generate 3 terms and reduce from there.

  • @wasikhan8221
    @wasikhan8221 Год назад

    Till 27:24

  • @davidskelding7384
    @davidskelding7384 Год назад

    "The boy saw the girl with the mirror" could specify the location of the girl with respect to a particular mirror.

    • @br1584
      @br1584 8 месяцев назад

      or could mean saw as in cutting with a saw lol

  • @rezab314
    @rezab314 2 года назад

    @1:08:20 Here a student states that NFA and DFA are equivalent. Prof Siper states that this is not true. In the last lecture ( ruclips.net/video/KAySmSEGc9U/видео.html ) he states this IS true. And in fact we showed that we can model a NFA by using the powerset on the states of a DFA. Even empty strings can be substituted. I was wondering if I got this wrong or whether he just wanted to state that the "general" functionality of a DFA and NFA are different in principal.

    • @mursalinhabib8922
      @mursalinhabib8922 2 года назад +21

      NFA and DFA _are_ equivalent. However, an NFA with a stack (a non-deterministic pushdown automaton) is not equivalent to a DFA with a stack (a deterministic pushdown automaton). Does this help?

  • @maddison0
    @maddison0 2 года назад +1

    4:10 Can G₁ be simplified to S → 0S1 | ε?

    • @ndeoligence8
      @ndeoligence8 2 года назад +3

      It looks like he kept the R rule separate because it has a different variable. Since CFGs are tied to their variables (as defined in CFG - Formal Definition @ 8:20).
      So although your compact version produces the same language, but it's a different CFG - since it doesn't have an R rules.

    • @maddison0
      @maddison0 2 года назад +1

      @@ndeoligence8 That makes a lot of sense, thank you!

    • @benjamindavid7371
      @benjamindavid7371 2 года назад

      Yes!

    • @avichaldubey2199
      @avichaldubey2199 Год назад

      Yes, That's a simplified CFG without a NULL production rule.

  • @amirentezari
    @amirentezari Год назад +2

    21:36
    Another meaning can be that the boy saw(🪚) the girl using the mirror.

    • @james-fy1ms
      @james-fy1ms Год назад +1

      But it's not grammatically correct. Should be 'saws'

  • @safdarkhan5483
    @safdarkhan5483 6 месяцев назад +2

    I'm shocked... I just realized that the book included in my course by Michael sipser & I'm getting lecture py same professor....🫢🫢🫢❤❤❤