Verification of “Prove/Disprove that the language $L = { a^kba^{2k}ba^{3k} | k geq 0}$ is context free.”












0












$begingroup$


I attempt to show that the language $L = { a^kba^{2k}ba^{3k} | k geq 0}$ is not context free by applying the Pumping lemma for context-free languages.



This is achieved by a proof by contradiction by first assuming that $L$ is context free, in which case arbitrarily long strings in $L$ should be able to be "pumped" and still produce strings inside $L$. By "pumping" strings in $L$ to produce other strings which are not contained in $L$, then it cannot be true that the language $L$ is context free.





Progress so far:



The pumping lemma states that every string $s$ in $L$ can be written in the form



$ s = uvwxy$



with substrings $u, v, w, x, y$



such that




  1. $|vx| geq 1$

  2. $|vwx| leq p$


  3. $uv^nwx^ny in L$ for all $n geq 0$


so a suitable decomposition into the substrings $u, v, w, x, y$ must be found.



My informal approach is to consider on a case by case basis that each decomposition fails.



case 1:



If only the letter b is pumped, then there will be more than two b's the final string, which cannot be in L. For example:



$u = a^k, v = b, w = a^{2k}, x = b, y = a^{3k}$



by condition 3, $s = uv^nwx^ny notin L$ for $n = 2$



case 2:



If only the letter a is pumped, then the distribution of the letter a in the pumped string will no longer be valid. For example:



$u = varnothing, v = a^k, w = ba^{2k}b, x = a^{3k}, y = varnothing$



case 3:



If both the letters a and b are pumped, then the order of letters will be invalid in the pumped string.



For example:



$u = varnothing, v = a^kb, w = a^k, x = a^kb, y = a^{3k}$



case 4:



The case that neither the letter a nor the letter b is pumped fails because of the first condition.



In this solution I have neglected to consider both defining a pumping length $p$ ($p$ is still conceptually difficult for me and I don't know how to correctly define it) as well as the second condition of the pumping lemma.



I would be greatly appreciative for any assistance in this, as well as verifying/formalizing the above proposed solution.










share|cite|improve this question









$endgroup$

















    0












    $begingroup$


    I attempt to show that the language $L = { a^kba^{2k}ba^{3k} | k geq 0}$ is not context free by applying the Pumping lemma for context-free languages.



    This is achieved by a proof by contradiction by first assuming that $L$ is context free, in which case arbitrarily long strings in $L$ should be able to be "pumped" and still produce strings inside $L$. By "pumping" strings in $L$ to produce other strings which are not contained in $L$, then it cannot be true that the language $L$ is context free.





    Progress so far:



    The pumping lemma states that every string $s$ in $L$ can be written in the form



    $ s = uvwxy$



    with substrings $u, v, w, x, y$



    such that




    1. $|vx| geq 1$

    2. $|vwx| leq p$


    3. $uv^nwx^ny in L$ for all $n geq 0$


    so a suitable decomposition into the substrings $u, v, w, x, y$ must be found.



    My informal approach is to consider on a case by case basis that each decomposition fails.



    case 1:



    If only the letter b is pumped, then there will be more than two b's the final string, which cannot be in L. For example:



    $u = a^k, v = b, w = a^{2k}, x = b, y = a^{3k}$



    by condition 3, $s = uv^nwx^ny notin L$ for $n = 2$



    case 2:



    If only the letter a is pumped, then the distribution of the letter a in the pumped string will no longer be valid. For example:



    $u = varnothing, v = a^k, w = ba^{2k}b, x = a^{3k}, y = varnothing$



    case 3:



    If both the letters a and b are pumped, then the order of letters will be invalid in the pumped string.



    For example:



    $u = varnothing, v = a^kb, w = a^k, x = a^kb, y = a^{3k}$



    case 4:



    The case that neither the letter a nor the letter b is pumped fails because of the first condition.



    In this solution I have neglected to consider both defining a pumping length $p$ ($p$ is still conceptually difficult for me and I don't know how to correctly define it) as well as the second condition of the pumping lemma.



    I would be greatly appreciative for any assistance in this, as well as verifying/formalizing the above proposed solution.










    share|cite|improve this question









    $endgroup$















      0












      0








      0





      $begingroup$


      I attempt to show that the language $L = { a^kba^{2k}ba^{3k} | k geq 0}$ is not context free by applying the Pumping lemma for context-free languages.



      This is achieved by a proof by contradiction by first assuming that $L$ is context free, in which case arbitrarily long strings in $L$ should be able to be "pumped" and still produce strings inside $L$. By "pumping" strings in $L$ to produce other strings which are not contained in $L$, then it cannot be true that the language $L$ is context free.





      Progress so far:



      The pumping lemma states that every string $s$ in $L$ can be written in the form



      $ s = uvwxy$



      with substrings $u, v, w, x, y$



      such that




      1. $|vx| geq 1$

      2. $|vwx| leq p$


      3. $uv^nwx^ny in L$ for all $n geq 0$


      so a suitable decomposition into the substrings $u, v, w, x, y$ must be found.



      My informal approach is to consider on a case by case basis that each decomposition fails.



      case 1:



      If only the letter b is pumped, then there will be more than two b's the final string, which cannot be in L. For example:



      $u = a^k, v = b, w = a^{2k}, x = b, y = a^{3k}$



      by condition 3, $s = uv^nwx^ny notin L$ for $n = 2$



      case 2:



      If only the letter a is pumped, then the distribution of the letter a in the pumped string will no longer be valid. For example:



      $u = varnothing, v = a^k, w = ba^{2k}b, x = a^{3k}, y = varnothing$



      case 3:



      If both the letters a and b are pumped, then the order of letters will be invalid in the pumped string.



      For example:



      $u = varnothing, v = a^kb, w = a^k, x = a^kb, y = a^{3k}$



      case 4:



      The case that neither the letter a nor the letter b is pumped fails because of the first condition.



      In this solution I have neglected to consider both defining a pumping length $p$ ($p$ is still conceptually difficult for me and I don't know how to correctly define it) as well as the second condition of the pumping lemma.



      I would be greatly appreciative for any assistance in this, as well as verifying/formalizing the above proposed solution.










      share|cite|improve this question









      $endgroup$




      I attempt to show that the language $L = { a^kba^{2k}ba^{3k} | k geq 0}$ is not context free by applying the Pumping lemma for context-free languages.



      This is achieved by a proof by contradiction by first assuming that $L$ is context free, in which case arbitrarily long strings in $L$ should be able to be "pumped" and still produce strings inside $L$. By "pumping" strings in $L$ to produce other strings which are not contained in $L$, then it cannot be true that the language $L$ is context free.





      Progress so far:



      The pumping lemma states that every string $s$ in $L$ can be written in the form



      $ s = uvwxy$



      with substrings $u, v, w, x, y$



      such that




      1. $|vx| geq 1$

      2. $|vwx| leq p$


      3. $uv^nwx^ny in L$ for all $n geq 0$


      so a suitable decomposition into the substrings $u, v, w, x, y$ must be found.



      My informal approach is to consider on a case by case basis that each decomposition fails.



      case 1:



      If only the letter b is pumped, then there will be more than two b's the final string, which cannot be in L. For example:



      $u = a^k, v = b, w = a^{2k}, x = b, y = a^{3k}$



      by condition 3, $s = uv^nwx^ny notin L$ for $n = 2$



      case 2:



      If only the letter a is pumped, then the distribution of the letter a in the pumped string will no longer be valid. For example:



      $u = varnothing, v = a^k, w = ba^{2k}b, x = a^{3k}, y = varnothing$



      case 3:



      If both the letters a and b are pumped, then the order of letters will be invalid in the pumped string.



      For example:



      $u = varnothing, v = a^kb, w = a^k, x = a^kb, y = a^{3k}$



      case 4:



      The case that neither the letter a nor the letter b is pumped fails because of the first condition.



      In this solution I have neglected to consider both defining a pumping length $p$ ($p$ is still conceptually difficult for me and I don't know how to correctly define it) as well as the second condition of the pumping lemma.



      I would be greatly appreciative for any assistance in this, as well as verifying/formalizing the above proposed solution.







      proof-verification computer-science context-free-grammar pumping-lemma






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 13 at 17:09









      OscarOscar

      351111




      351111






















          0






          active

          oldest

          votes











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3072254%2fverification-of-prove-disprove-that-the-language-l-akba2kba3k-k%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3072254%2fverification-of-prove-disprove-that-the-language-l-akba2kba3k-k%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Human spaceflight

          Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

          張江高科駅