Header Ads

  • Highlights

    👩🏻‍💻 Hello Readers 🧑🏻‍💻!!! Would you like to Explore more ? Hit on ⓘ(Ads)... ✨🌹

    Do you know what Is The Difference Between The Strings And The Words Of A Language in TOC?


    Difference Between The Strings And The Words Of A Language?

    A basic understanding of the known difference between String and Words of language is quite important to have the fundamentals of the theory of computation. 

    In a simple manner, if we have to answer about this we can say that, 

    A string is any combination of the letters of an alphabet whereas the words of a language are the strings that are always made according to certain rules used to define that language. For example, if we take

    Alphabet Σ = { a, b }  Here a, b are the letters of this alphabet.

    As you have observed, we can derive a lot of strings from the letters a and b whether it's meaningful or not.

    For example a,b,aa,ab,ba,bb,aaa,aab,aba,baa,…………………… and so on.

    But when we define a language we have to give some conditions over it, like the alphabet's having no a’s and only an odd number of b's. Then the words of this language would have only those strings that have an only odd number of b’s and no a’s.some example words of our defined language are b, bbb, bbbbb, bbbbbbb,……………………………..and so on.

    So we can say that all the words are strings but all the strings may not be the words of a language. Hence strings are any combination of letters of an alphabet and the words of a language are strings made according to some rule.

     

    No comments

    Post Bottom Ad

    Powered by Blogger.