Ambiguous Grammar

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 มี.ค. 2017
  • TOC: Ambiguous Grammar
    This Lecture shows what are Ambiguous Grammars and shows an example of an Ambiguous Grammar
    Contribute: www.nesoacademy.org/donate
    Website ► www.nesoacademy.org/
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Pinterest ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    • Axol x Alex Skrindo - ...

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

  • @RiaziMohandesi
    @RiaziMohandesi 3 ปีที่แล้ว +90

    A context-free grammar G is said to be ambiguous if there exists some w ∈ L (G) that has at least two distinct derivation trees. Alternatively, ambiguity implies the existence of two or more leftmost or rightmost derivations.
    Introduction To Formal Languages And Automata, 6 Edition
    Peter Linz

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

      oho guruji. video me to kuch aur hi btaya hai

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

      A grammar that has more than one rightmost derivation for some string in the language generated by the grammar is called a right-recursive grammar. Right-recursive grammars are not necessarily ambiguous

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

      SRM se ho?

    • @ayaredattatraya327
      @ayaredattatraya327 6 หลายเดือนก่อน +2

      Video me right derivation tree ke baare me nahi mention kiya hai.
      @@humaneBicycle

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

      ​@@humaneBicyclegawar ho kya? English padhna nhi aata?

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

    Sir please mention this also as a note that language with two or more right derivation for same sentence is also ambiguous.

    • @ibrahim47
      @ibrahim47 5 ปีที่แล้ว +15

      i think it's a trivial and redundant conclusion.

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

      Yes either more than one right most derivation tree or left most derivation tree

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

      left or right doesn't matter, the two derivations just need to have the same structure.

  • @samikshagarhewal1645
    @samikshagarhewal1645 8 หลายเดือนก่อน +18

    Basically if anyone still finds ambiguous questions hard to solve just remember that prove that question through both right most deviations and left most deviations

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

      If one is built on left derivation and other is right derivation, can we say it is ambiguous.. ??

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

      @@naveenkumargembali3494yes

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

      Nope, you have to derive the string only with the left derivation tree​@@naveenkumargembali3494

  • @sumitaggarwal9477
    @sumitaggarwal9477 7 ปีที่แล้ว +22

    i am watching these videos serially... and this is the best resource available on this topic

  • @arsha1625
    @arsha1625 3 ปีที่แล้ว +48

    Now I am preparing lecture notes using your lectures from beginning..I will finish the whole toc lectures in few more days..I will score better marks for toc exam❤️

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

    thanks man, i'm studying designing compilers and this a good insight of the ambiguity topic thanks again

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

    You are very good work for providing free toc class

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

    You are brilliant man!! Keep doing what you're doing, will refer many people to your videos :)

  • @tube-rp1nb
    @tube-rp1nb 4 ปีที่แล้ว +2

    this series is really amazing . 10Q man

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

    thank u sir, your videos are helpful.

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

    Thanks very well explained.

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

    In place of 2 or more derivative tree... simply we can use more than 1 derivations....I think this is very easy to remember

  • @zio.h4344
    @zio.h4344 7 ปีที่แล้ว +9

    hello ! can we have a course about push down automata, thanks X)

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

    Thank you so much sir

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

    Sir upload the lecture on communication systems and electromagnetic theory

  • @shikhasolanki2689
    @shikhasolanki2689 7 ปีที่แล้ว +11

    tomorrow is my paper of TOC i learnt so many things from your videos..
    but pushdown automata and turing machine..is not in your 77 videos..
    but anyway THANKYOU SIR...

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

    Brilliant Explanation Dear Brother

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

    Big fan of your work💟

  • @Gameplay-pq6hk
    @Gameplay-pq6hk 7 ปีที่แล้ว

    thanks a lot sir !

  • @Rahul-bb5zd
    @Rahul-bb5zd 5 หลายเดือนก่อน

    Very helpful 👍Thank you sir !!

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

    Thank You Sir

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

    this is a saviour...!thank you sir!

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

    really its very useful to me

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

    record some lectures about checking if the language is regular or not, about top-down parsing and the opposite.

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

    thank you

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

    Concept is correct but in 2nd line of S--> S*S , I think it should be (S+S)*S = S*S+S*S

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

      yesi feel same

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

      Yes I think 🤔.u r right

  • @AhamedKabeer-wn1jb
    @AhamedKabeer-wn1jb 3 ปีที่แล้ว

    Thank you..

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

    Thanks sir!

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

    Good Explanation

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

    thanks sir

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

    Please add more about discrete mathematics

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

    Tysm sir ☺it's really very helpful for me😃 thank u so much

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

      My pleasure

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

    hi, very interesting lectures ! i had an subject 'formal languages and compilation methods' and we had a exercise on the exam : we had a grammar and we had to check if this language is ambigous . How to do It ?

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

    good effort

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

    In the question its mentioned as S*S and at 2:42 you mention S into S. Are both the things the same?

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

    Please make a video converting ambiguous to unambiguous

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

    Some grammars are just like my future: Ambiguous.

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

    Tq so muchh sir

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

    Sir i have a question what if the example was a+a +b would it then be ambiguous or no?

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

    great explanation...thank you!

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

    What is two or more right derivation trees

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

    Thanks so much sir.next week my toc University exam.your video is my book.more helpfully notes thanks allot

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

      (0+1)*(0+1)01 I have doubt in this sum to change as minimization of DFA please slove this sum sir

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

    I will donate you at the end of my semester for your videos. Thank you isn't enough

  • @58harshverma57
    @58harshverma57 8 หลายเดือนก่อน +1

    What is a+b means in the notation?

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

    sir please add further topics on these videos

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

    sir please upload feedback amplifier

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

    we are talking about tree so why we are not making it??

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

    Hey @neso u havent added the closing brackets at 01:49. Pls re-upload

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

    You said in previous video for left d tree we have to expand left most possible alphabet but here you are expanding the right one.. Why?

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

    شکریہ سر

  • @SandeepKaur-su4it
    @SandeepKaur-su4it 4 ปีที่แล้ว

    👏 👏👏sir your teaching way is vry easy and understandable.... i really impressed by you ... god bless you🌹🌹 sir and thx

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

    A grammer is said to be ambiguous if there exists two or more derivation tree for a string W.

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

    two or more right-derivation trees is ambiguous too?

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

    The grammar in the last lecture was also ambiguous, right ?

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

    hi where can i find more examples

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

    derivation tree means parse tree ??

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

    1:00 you said 'no' if there is one left and one right., but can it be ambiguous if we get 2 or more right trees? Is that possible?

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

      yes, it is

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

      Yes a language is ambiguous if it can generate at-least one sentence from two left most derivation or two right most derivation. The following statements are equivalent.
      • A CFG is ambiguous if some sentence it generates has more than one
      derivation tree
      • A CFG is ambiguous if there is a some sentence it generates with more
      than one left-most derivation
      • A CFG is ambiguous if there is a some sentence it generates with more
      than one right-most derivation

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

      if there exist multiple right-most or left-most derivation for some string generated from grammar it's ambiguous

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

    In 2nd tree you first replaced right S with (S*S) which contradicts the rule of LMD, please explain.

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

    0:20

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

    there is a mistake, in S*S you have directly written S+S*S but it should be (S+S)*S

    • @AmitSingh-1916
      @AmitSingh-1916 3 ปีที่แล้ว

      @Tech RK really?? is it right method?

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

    In second tree
    S is replaced by (s+s)*s....
    s+s*s where did that come from..

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

      Suraj Bhatt Instead start with S+S and replace first S with S*S , then u have S*S + S, now out a,b appropriately. Hope it helps u out cuz Sir did a mistake in the video

  • @mr.lonely4595
    @mr.lonely4595 2 ปีที่แล้ว

    in our country only thing we know about india is bollywood
    but now as a computer engineering student i would say big respect for you and i would FAİL all my exams if not you and another indian channels
    F

  • @harshsha0562
    @harshsha0562 12 วันที่ผ่านมา

    ❤❤

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

    What if we are not given a string but only a grammar. How would we go about trying to find a string that can be obtained by two different left derivation trees?

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

      Philiey pick an string to demonstrate

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

    i love you

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

    why (s+s)*s is not equal to s*s +s*s instead of s+s*s tommorow is my exam someone plz tell me

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

    If one is built on left derivation and other is right derivation, can we say it is ambiguous..

  • @vinayaksharma-ys3ip
    @vinayaksharma-ys3ip 3 ปีที่แล้ว

    👍👍👍👍👍

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

    how are both derivation trees left? i guess first one was right and second was left.. please explain!!!

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

      That's mine doubt too 😎

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

    can any body help me?
    A grammar has the following productions: S --> aSSb | a | bSa
    Which of the following sentences are in the language that is generated by this grammar?
    a) aabbaabb
    b) aaaaabb
    c) bbbaabbaa
    d) none of the answers above are correct

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

      its b)
      S -> aSSb
      aSSb -> aSaSSbb (S -> aSSb)
      aSaSSbb -> aaaSSbb (S -> a)
      aaaSSbb -> aaaaSbb (S -> a)
      aaaaSbb -> aaaaabb (S -> a)

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

    unambiguous?

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

      if only one left derivation tree exists,then its unambiguous

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

    After watching this lecture I thought why I am paying lakhs in my college

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

    I am more focused on bracket mismatch 1:12 😅😅

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

    im not able to understand this pls anyone explain i hv toc exam next week......

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

    S -> SS+ | SS* | a . Why this grammar is not Ambiguous help me please.

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

    4:25 you write s->s*s -> s+s*s But I think that's should be s->s*s -> (s+s)*s.

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

    In the ambiguity video by @gatesmasher, he mentions that whether it's LMD or RMD, if we obtain two derivation trees simultaneously, it is considered ambiguous. However, in your lecture, you assert that it should be only LMD with two derivation trees. Now, I am confused about whose perspective is accurate - yours or gatesmasher's.

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

    Open bob