Regular Languages

Sdílet
Vložit
  • čas přidán 20. 12. 2016
  • TOC: Regular Languages in Theory of Computation.
    Topics Discussed:
    1. Regular Languages in TOC.
    2. Non-Regular Languages in TOC.
    3. Examples of languages which are not regular.
    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.org/donate
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy.org/recommende...
    Website ► www.nesoacademy.org/
    Forum ► forum.nesoacademy.org/
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #TheoryOfComputation #TOCByNeso #RegularLanguages #AutomataTheory

Komentáře • 141

  • @BossLikesShenanigans
    @BossLikesShenanigans Před 6 lety +28

    Why is the first example not a regular language? If the language just consists of one string then can't you just have all the states of the machine be Q ={a, ab, abb...} and then the transition function for each state would be whether the next symbol is seen, and if it isn't, we send the machine to a dead state?
    EDIT: I just saw your reply to a different comment. I didn't understand the example. For those wondering the example was about whether it can detect if a string repeated itself.

  • @Bananainacar
    @Bananainacar Před rokem +15

    Wonderful video! Everything is explained in such a clear and efficient way. You're the best.

  • @hectorg362
    @hectorg362 Před 5 lety +18

    I freaken love you and this channel for this content!

  • @cindychaba
    @cindychaba Před rokem +7

    Amazing content.Keep up the good work.

  • @KiimzB
    @KiimzB Před 5 lety +10

    This was such a good video. Very clear. Thank you

  • @nguyentuananhphan8644
    @nguyentuananhphan8644 Před 5 měsíci +1

    Thank you sir for your clear explanation, this series really saves me!!! God bless you!

  • @shavkat95
    @shavkat95 Před 3 lety +53

    the first example can be modelled in a FSM. First u make a tree structured DFM with 'a' for left and 'b' for right. then wherever u end up at the fifth character, u continue accordingly.

    • @AabhusanAryalOfficial
      @AabhusanAryalOfficial Před 3 lety +6

      Exactly!

    • @np1525
      @np1525 Před rokem +2

      U could also make an NFA ith an epsilon transition back to the start after reading ababb

    • @leonh2140
      @leonh2140 Před rokem +2

      Yeah I also found that :( It really confused me

    • @acturk_
      @acturk_ Před rokem +1

      i think this is true only if the alphabet is equal to {a,b}. if the alphabet includes more symbols your solution would be wrong

    • @Amy-mo9ki
      @Amy-mo9ki Před rokem

      yes

  • @vipinsclasses9354
    @vipinsclasses9354 Před 3 lety +5

    i like your lectures , brother. you got one more subscriber.

  • @hassanhashemi6478
    @hassanhashemi6478 Před 6 lety +4

    i love they way you explain things.

  • @azeemqureshi4963
    @azeemqureshi4963 Před 4 lety

    wow what a nice video you made very clear and very easy...

  • @zerobit778
    @zerobit778 Před 2 lety +22

    To be clear.
    Let S to be a string. We could have DFA to recognize S* just simply by loop to the beginning after a full match. What Neso mean is just that we could not have a DFA to find a arbitrary S's repetition. To recognize a specific string's repetition is a different story with arbitrary string's repetition!!!

    • @whiteheadiceprince1506
      @whiteheadiceprince1506 Před rokem +2

      if ababb needs to be repeated exactly n times then we increase the number of states (copy the FM n times) wouldn't that work?
      ((A))-a->((B))-b->((C))-a->((D))-b->((E))-b->(((F))) - - a - -> ((B)) - -
      NFA for any non-integer repetition.
      (A)-a->(B)-b->(C)-a->(D)-b->(E)-b->(F)- - a - ->(B2)-b->(C2)-a->(D2)-b->(E2)-b->((F2))
      NFA for exactly 2 repetitions.

    • @zerobit778
      @zerobit778 Před rokem +2

      ​@@whiteheadiceprince1506 This string you mean "ababa" is a specific one. You can have DFA for this specific string for any repetition of times.
      But the DFA you constructed for "ababa" may not work for other string like "abcabc".
      What Neso mean is you can not have DFA works for all types of string with repetitions.

    • @whiteheadiceprince1506
      @whiteheadiceprince1506 Před rokem

      @@zerobit778 ohh ok thank you

  • @shivrajkhose7875
    @shivrajkhose7875 Před 7 lety +2

    very helpful

  • @pailguy7157
    @pailguy7157 Před 4 lety +85

    The first Eg. (ababbababb) repeats only 2 times, so without saving it we can simply construct a DFA that gets all inputs as a sequence of alphabets. In this case isn't it regular language?

    • @ohaRega
      @ohaRega Před 4 lety +3

      Pail guy and Calvin, you're both correct

    • @tapajkumardas9973
      @tapajkumardas9973 Před 4 lety +57

      If the repeating part of the string is of finite length, I think we can construct DFA for it.
      I think what he meant to say is that, we can't construct a DFA that accepts all strings that are arbitrary repetition of a smaller string.

    • @rohandesai4585
      @rohandesai4585 Před 4 lety +6

      But can't we construct a DFA for any number of ababb substring to occur?

    • @georgiosargyris3073
      @georgiosargyris3073 Před 4 lety +6

      For the first example (ababb)* is a regular expression that generates the string of the first example. Since there is a regular expression, there is also a finite machine. Instead, my language accepts even when ababb is repeated n times (n greater or equal to 0). Maybe, the guy on video implies what Tapaj says.

    • @Rohith_E
      @Rohith_E Před 4 lety +8

      The rule for language 1 is: 'The first n Symbols repeat once'. These n symbols can be anything. Just as an example he mentioned ababb.

  • @sudiptacoachingcentre4118

    Totally helpful

  • @vikaspanthi663
    @vikaspanthi663 Před 5 lety

    Awesome video...

  • @ijazkhans5521
    @ijazkhans5521 Před 4 měsíci +2

    The expression ( ababbababb ) that you discussed earlier in this lecture is regular expression and you say: it's not a regular

  • @naavedali7303
    @naavedali7303 Před 6 lety +1

    thank you sir

  • @bayyareddy8614
    @bayyareddy8614 Před 2 lety +2

    Thanks

  • @miro-hristov
    @miro-hristov Před 3 lety +2

    You said that a language is regular if it can be recognized by FSM. RegEx has a lot of modifiers that allow it to count repetition or use memory. Eg. "{2}" is a quantifier - Match 2 of the preceding token. Or "\1" is Backreference - matches the result of capture group #1. Does that make Regular Expressions not a regular language? I'm a little confused...

  • @omkarsuralkar8099
    @omkarsuralkar8099 Před rokem

    Thank You

  • @hakanyalcn6826
    @hakanyalcn6826 Před 6 lety +3

    can you explain that why ababbababb is not recognizing with FSM ? i can create ababbababb by using 10 state(one state point to dead conditions) simply.

    • @gamereplayhq
      @gamereplayhq Před 6 lety +7

      Yes, although you can make it, the question here is, suppose you want user to just input "ababb" and insert rest of the values yourself to generate the result, such action would be possible if we have some sort of memory from which we could retrieve the values and use them as input to run our machine further on its own without user intervention, however in FSM, user must give some input to move states, there is no dedicated memory bank that could provide input to machine.

  • @dhanushsivajaya1356
    @dhanushsivajaya1356 Před 3 lety +1

    Thankyou sir

  • @stefanwullems
    @stefanwullems Před 3 lety +4

    I'm missing the explaination why finite state automata cannot count or store strings. Maybe an example where we try to build a fsm that tries process these langages but fails would have been useful.

    • @Nano-ih3ig
      @Nano-ih3ig Před 3 lety +1

      It doesn't store any previous input of the string that has been provided. You only move forward with the current input. For eg. if w is a string with symbol {a, b} so to recognize ww, you need to store w first, which is not possible in FSM.

  • @Oneminutecover-dx8re
    @Oneminutecover-dx8re Před 4 měsíci +1

    Don't get how FSM can't store strings when in the previous lectures of DSM we transfer all string to next state(or that's how I understood it )

  • @eva42sh
    @eva42sh Před 2 lety

    The degree of complexity and the way of performing the functions
    characteristic. Automatic Grade 1

  • @sparshsondhi1424
    @sparshsondhi1424 Před 5 lety +2

    Respected Sir
    In the second example, can we not make a DFA with an infinite number (limited only by total memory available) of states in a line, each moving forward on input A and back on input B? That way we can keep our initial and final state the same and still have a way to count the number of A's and b's.

    • @eeshaan1539
      @eeshaan1539 Před 5 lety

      it shouldn't be of the form ababab, but should be aaaa....bbbb....

    • @sparshsondhi1424
      @sparshsondhi1424 Před 5 lety

      @@eeshaan1539 Agreed, but what trying to imply is making a ladder.... Ababab strings would never reach the initial/final (because they're the same) state without having an equal number of A's and b's... Imagine going up 3 steps and coming down 3 steps as an analogy

    • @sparshsondhi1424
      @sparshsondhi1424 Před 5 lety

      Now that I think about it.... This is quite impractical. A DFA needs full information about all states and I can't define how the start and end states would be structured

  • @elevated_existence
    @elevated_existence Před rokem +2

    By the way is a language over {a,b} that contains aabb in itself regular or not

  • @deadoralivecowboy1401
    @deadoralivecowboy1401 Před 4 lety +30

    Please make a video of the proof of the first theorem you wrote !! I have an exam in two days , I know it is too late for me but for other generations maybe not so late :)

  • @MaxAndHisBike
    @MaxAndHisBike Před 5 lety +10

    Theoretically you could build a state Machine which recognizes the second language, as long as you can build a machine with 2*n-states

  • @AhamedKabeer-wn1jb
    @AhamedKabeer-wn1jb Před 3 lety

    Thank you..

  • @naseerrahi7597
    @naseerrahi7597 Před 5 lety +2

    What r various models to represent regular language

  • @nirmalasanapthi7548
    @nirmalasanapthi7548 Před 6 lety +9

    Respected sir
    By using 6 states + 1 dead state we can construct a dfa for ababbababb

    • @handleh
      @handleh Před 5 lety +3

      Your dfa only accepts ababbababb but it should accept any ww where w is a string thats why we cant use dfa

    • @kasozivincent107
      @kasozivincent107 Před 4 lety

      I doubt if 6 suffices, we need 10 + 1 dead state.

  • @limishavyas2496
    @limishavyas2496 Před 7 lety +1

    costruct regular grammer for language is avalible or not......?

  • @jainlokesh318
    @jainlokesh318 Před 5 lety

    amazing

  • @cvismenu
    @cvismenu Před 6 lety +1

    Awesome

  • @studentstudent1237
    @studentstudent1237 Před 4 lety +1

    Thank you Sir for explaining this ,is regular language same as regular expression?

  • @Alkis05
    @Alkis05 Před 2 lety +3

    A video of what is regular language that shows examples only of non-regular languages. Don't you think it would be a good idea to illustrate that regular language is?

  • @AhamedKabeer-wn1jb
    @AhamedKabeer-wn1jb Před 3 lety

    THANKS..

  • @graffitiabcd
    @graffitiabcd Před 7 lety +3

    What if you define the language in the first example as follows:
    L = {V, S, T, P}
    where,
    V = {a, b, S, A}
    T = {a, b}
    P = {S->Ab, A->AbAb, A->abab}
    Would that not make the example a regular language, unlike the second one in which a memory of N is required?

    • @matamorosa
      @matamorosa Před 4 lety

      yeah I also don't think his first example is valid

  • @manasuniyal4250
    @manasuniyal4250 Před 5 lety +1

    The first language is regular as it can be represented L={(ababb)^n : n>=1), provided lambda is not accepted, for which a DFA can be constructed.

  • @sajalchhetri2476
    @sajalchhetri2476 Před rokem +1

    why is second one not a regular language in when in previous video we designed a dfa fo aabb which follows the structure aNbN n=2?

    • @niburX
      @niburX Před 3 měsíci

      I think it's because in this video, it's not only n=2, but for all natural numbers (i.e.: n≥1).

  • @LorenzoLeonardini
    @LorenzoLeonardini Před 4 lety +1

    Actually ababbababb is a regular language
    If the language is just that you can have a simple machine which recognizes the string.
    If the language is "ababb" repeated n times you can still have a machine which recognizes it: just 5 states to recognize the basic string, only the last state is a final state and if you are in the final state and read an "a" you start over from the first state

    • @purveshdubey7562
      @purveshdubey7562 Před 4 lety

      I also think so, we can easily construct nfa for that

    • @heroslippy6666
      @heroslippy6666 Před rokem +1

      It is not asking if you can check if the string "ababb" is repeating.
      It is asking us to check if we need to memorize an arbitrary string. Our Finite Acceptors can only remember a singular state so it would require an infinite amount of nodes to remember every possible arbitrary string.

  • @1234Christodoulos
    @1234Christodoulos Před 2 lety

    how do we know how to split the "aaaaaaabbbbbb" into x y z ? is it just random

  • @fnaticbwipo1222
    @fnaticbwipo1222 Před rokem

    more formal way to define a regular language would be that it can be described by a regular expression.

  • @henriquepavani88
    @henriquepavani88 Před rokem

    And what if its a language that start with a and finish with b ?

  • @M-ABDULLAH-AZIZ
    @M-ABDULLAH-AZIZ Před 5 lety +3

    Is this language {(0^n)(1^m)|(n+m)is even} regular or not?

    • @raulcalvomartin2979
      @raulcalvomartin2979 Před 5 lety +3

      Is not regular because you need to count n and m to know that the sum is even.

    • @NLogSpace
      @NLogSpace Před 4 lety +3

      @@raulcalvomartin2979 No, it is regular! Checking whether n+m is even does not require you to remember n and m completely, it is enough to remember the remainder modulo 2, which can be done with finitely many states.

  • @arturo7392
    @arturo7392 Před 5 lety +14

    you forgot to put an example of a regular language... almost a perfect video

    • @J4WAD
      @J4WAD Před 3 lety +1

      all the 4 examples before are regular languages, yall lazy.

  • @nabhavlogs371
    @nabhavlogs371 Před 5 lety

    example 1 is a string, not language,which we can represent using DFA

    • @ziliestarrive
      @ziliestarrive Před 5 lety

      It's for recognizing M1M2, where M1 is a string and M1=M2, that's the rule for the language.

  • @manasimukhi9124
    @manasimukhi9124 Před 3 lety +1

    if Σ=(0,1) then describe Σ* 1Σ*
    Answer pls?

  • @ManpreetSingh-pn2hu
    @ManpreetSingh-pn2hu Před rokem

    watching all the videos one day before the exam on 2x

  • @gabrielpereiramendes3463

    #Excelent!

  • @madhabkafle8072
    @madhabkafle8072 Před 2 lety

    List some examples of regular language's

  • @shubhamkohli7719
    @shubhamkohli7719 Před 3 lety +1

    I don't understand practically about regular expression i just understand the theory.

  • @devmahad
    @devmahad Před rokem

    Regular Language -> if some FSM recogonizes it.
    FSM -> Very low memory.

  • @shinigamiryuk4183
    @shinigamiryuk4183 Před 2 lety

    my teacher plays your videos in lectures

  • @daleeps
    @daleeps Před 5 lety +3

    finally found a good video, jesus...

  • @hygieia5672
    @hygieia5672 Před 8 měsíci

    Good but spoiled a bit by specifying five letters specifically and not N letters. With five (or some other constant) letters the language is finite and you can construct a DFA for it, it is regular. If it is some arbitrary number of letters than you cannot.

  • @apporvaarya
    @apporvaarya Před 4 lety

    didn't get much idea

  • @himalatalukdar5597
    @himalatalukdar5597 Před 6 lety

    Is this lecture value for gate and other competitive exams?

    • @mdnaiyerhoda9853
      @mdnaiyerhoda9853 Před 6 lety +3

      this lecture is very fruitful for concept on regular language. a good concept can only make one solve questions

  • @danielnunes3598
    @danielnunes3598 Před 4 lety

    fix the audio, please

  • @swagatsekhar4973
    @swagatsekhar4973 Před 2 lety

    Can u provide ur class notes

  • @logiclassan7115
    @logiclassan7115 Před 6 lety +136

    set the speed to 2x

    • @fupopanda
      @fupopanda Před 5 lety +16

      It's good that he goes slow, allowing you to speed the video up when you need to, and leave it as it is when necessary as well.

    • @Farahat1234
      @Farahat1234 Před 4 lety +3

      Why?????????

  • @bdjeosjfjdskskkdjdnfbdj

    is there a proof for repetition --> non regular? seems like a bit of a leap for me!

  • @ravikumarpal662
    @ravikumarpal662 Před 5 lety +13

    speed of 1.5 is sufficient for beginners

  • @neiljohn2637
    @neiljohn2637 Před 2 lety

    8 like Shaun Tait!

  • @smarter_by_bit9346
    @smarter_by_bit9346 Před 3 lety

    But provided that language is finite,it will be regular....please mention it

  • @DolaLado
    @DolaLado Před 5 lety

    I didn't understand the first example. ababbababb. I think we can design a DFA for it.

    • @eeshaan1539
      @eeshaan1539 Před 5 lety +1

      The language is { ww : w is a string over Sigma} i.e. the first and second halves of the string must be same. ababbababb is one of the strings in this language, but it's not the only one.

  • @saikishan1000
    @saikishan1000 Před 6 lety +4

    lol I have final exam next week let's see if ness will make me pass

    • @sunnynavani5314
      @sunnynavani5314 Před 6 lety

      now i have final exam next week so can you tell that are you pass or fail? :D :P

    • @tallle2
      @tallle2 Před 6 lety

      what happened?

    • @HafizMohammede
      @HafizMohammede Před 4 lety

      I hav xam nxt morning and found this video only now time :12:45am

  • @iqrahkhan2138
    @iqrahkhan2138 Před 3 lety

    video bht achi h but urdu me hoti to or be achi hoti

  • @vinayaksharma-ys3ip
    @vinayaksharma-ys3ip Před 3 lety

    👍👍👍

  • @zahidqureshi8128
    @zahidqureshi8128 Před 5 lety +2

    sorry sir, but first example is incorrect ...if L is regular and L^2 is also regular ...refrence introduction to FLA edition 5th by peter linz Fig 2.7 page 46

    • @peymanmohsenikiasari8564
      @peymanmohsenikiasari8564 Před 5 lety +2

      I think he meant to find strings that are in the form of XX (that X could be any string), which is impossible to be found by a finite state machine.

  • @nitinjain1325
    @nitinjain1325 Před 6 lety +1

    kaisa machine hai jo ek count ko bhi store nahi kar sakta hai

  • @vaigyanick5171
    @vaigyanick5171 Před 3 lety

    1.75x,, you are welcome

  • @dailydoseofact
    @dailydoseofact Před 3 lety +1

    Any KECian😂

  • @yili5761
    @yili5761 Před rokem

    「どうやってやるの?」、

  • @soul9126
    @soul9126 Před 3 lety +4

    Any vitian😅

  • @_BE-A_SaurabhNehe
    @_BE-A_SaurabhNehe Před 3 lety

    Thanks alot sir

  • @shakarwshyar2980
    @shakarwshyar2980 Před 8 měsíci

    Thanks