Prove that Dyck language is subset of grammar












1














last two days I am trying to prove, that Dyck language $L$ over the alphabet ${[, ]}$ is a subset of the language $L(G)$ generated by the grammar with rules ${S rightarrow [S]S | epsilon }$.



Recommended steps by our lector are:



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$, where $u,v$ $in$ $L$



b) prove with induction where i is number of '[' in $w$ that L $subseteq$ L(G), use a) in induction step



Thanks for any advice.




Edit: I have solved the problem from a, but I do not know, if its
valid proof and how to solve b.



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$,
where $u,v$ $in$ $L$:





  1. $D = ( {S'}, {[, ]}, { S rightarrow S'S' | [S'] | epsilon }, S' )$ is a grammer defining Dyck language over alphabet ${[,]}$.

  2. The only way to create $w in L$ where $|w| > 0$ is to apply rule ${S'rightarrow[S'] }$ at least once.


  3. $w_1$: $S' rightarrow [S'] rightarrow^* w_1 $


  4. $w_2$: $S rightarrow S'S' rightarrow^* S^i[S']S^j rightarrow^* w_2 $ where $i, j geq 0$

  5. In 3rd case, $w = [u]v$, where $v = epsilon$ and $u$ is generated from starting symbol, so $u, v in L$. In 4th case, you have $w = [u]v$ where $u, v$ is generated from starting symbol $S'$ so $u, v in
    L$












share|cite|improve this question




















  • 1




    Seems to me the language generated by [ and ] is larger than the language of proper pairings, It includes for example four [ 's and no ]'s. By Dyck language is there a restriction on what strings are in that language?
    – coffeemath
    Nov 29 '18 at 21:44






  • 2




    Dyck language (in our example) is a language, that is generated by grammar with rules S -> SS, S -> epsilon, S-> [S]
    – Tehryn
    Nov 29 '18 at 22:41






  • 2




    Your lector's advice seems pretty good to me. What is giving you trouble following it?
    – rici
    Nov 30 '18 at 2:56






  • 1




    Your definition of the Dyck language is not correct; you only provide the alphabet it uses.
    – Peter Leupold
    Nov 30 '18 at 8:28






  • 1




    @rici I have problem with induction. I was able somehow prove a). Also I was able to prove induction where number of '[' is equal to i where i is from interval <0, |w|>, but was not able to prove it for i+1
    – Tehryn
    Nov 30 '18 at 9:46
















1














last two days I am trying to prove, that Dyck language $L$ over the alphabet ${[, ]}$ is a subset of the language $L(G)$ generated by the grammar with rules ${S rightarrow [S]S | epsilon }$.



Recommended steps by our lector are:



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$, where $u,v$ $in$ $L$



b) prove with induction where i is number of '[' in $w$ that L $subseteq$ L(G), use a) in induction step



Thanks for any advice.




Edit: I have solved the problem from a, but I do not know, if its
valid proof and how to solve b.



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$,
where $u,v$ $in$ $L$:





  1. $D = ( {S'}, {[, ]}, { S rightarrow S'S' | [S'] | epsilon }, S' )$ is a grammer defining Dyck language over alphabet ${[,]}$.

  2. The only way to create $w in L$ where $|w| > 0$ is to apply rule ${S'rightarrow[S'] }$ at least once.


  3. $w_1$: $S' rightarrow [S'] rightarrow^* w_1 $


  4. $w_2$: $S rightarrow S'S' rightarrow^* S^i[S']S^j rightarrow^* w_2 $ where $i, j geq 0$

  5. In 3rd case, $w = [u]v$, where $v = epsilon$ and $u$ is generated from starting symbol, so $u, v in L$. In 4th case, you have $w = [u]v$ where $u, v$ is generated from starting symbol $S'$ so $u, v in
    L$












share|cite|improve this question




















  • 1




    Seems to me the language generated by [ and ] is larger than the language of proper pairings, It includes for example four [ 's and no ]'s. By Dyck language is there a restriction on what strings are in that language?
    – coffeemath
    Nov 29 '18 at 21:44






  • 2




    Dyck language (in our example) is a language, that is generated by grammar with rules S -> SS, S -> epsilon, S-> [S]
    – Tehryn
    Nov 29 '18 at 22:41






  • 2




    Your lector's advice seems pretty good to me. What is giving you trouble following it?
    – rici
    Nov 30 '18 at 2:56






  • 1




    Your definition of the Dyck language is not correct; you only provide the alphabet it uses.
    – Peter Leupold
    Nov 30 '18 at 8:28






  • 1




    @rici I have problem with induction. I was able somehow prove a). Also I was able to prove induction where number of '[' is equal to i where i is from interval <0, |w|>, but was not able to prove it for i+1
    – Tehryn
    Nov 30 '18 at 9:46














1












1








1


1





last two days I am trying to prove, that Dyck language $L$ over the alphabet ${[, ]}$ is a subset of the language $L(G)$ generated by the grammar with rules ${S rightarrow [S]S | epsilon }$.



Recommended steps by our lector are:



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$, where $u,v$ $in$ $L$



b) prove with induction where i is number of '[' in $w$ that L $subseteq$ L(G), use a) in induction step



Thanks for any advice.




Edit: I have solved the problem from a, but I do not know, if its
valid proof and how to solve b.



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$,
where $u,v$ $in$ $L$:





  1. $D = ( {S'}, {[, ]}, { S rightarrow S'S' | [S'] | epsilon }, S' )$ is a grammer defining Dyck language over alphabet ${[,]}$.

  2. The only way to create $w in L$ where $|w| > 0$ is to apply rule ${S'rightarrow[S'] }$ at least once.


  3. $w_1$: $S' rightarrow [S'] rightarrow^* w_1 $


  4. $w_2$: $S rightarrow S'S' rightarrow^* S^i[S']S^j rightarrow^* w_2 $ where $i, j geq 0$

  5. In 3rd case, $w = [u]v$, where $v = epsilon$ and $u$ is generated from starting symbol, so $u, v in L$. In 4th case, you have $w = [u]v$ where $u, v$ is generated from starting symbol $S'$ so $u, v in
    L$












share|cite|improve this question















last two days I am trying to prove, that Dyck language $L$ over the alphabet ${[, ]}$ is a subset of the language $L(G)$ generated by the grammar with rules ${S rightarrow [S]S | epsilon }$.



Recommended steps by our lector are:



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$, where $u,v$ $in$ $L$



b) prove with induction where i is number of '[' in $w$ that L $subseteq$ L(G), use a) in induction step



Thanks for any advice.




Edit: I have solved the problem from a, but I do not know, if its
valid proof and how to solve b.



a) Prove that every nonepmty $w in L$ can be written as $w = [u]v$,
where $u,v$ $in$ $L$:





  1. $D = ( {S'}, {[, ]}, { S rightarrow S'S' | [S'] | epsilon }, S' )$ is a grammer defining Dyck language over alphabet ${[,]}$.

  2. The only way to create $w in L$ where $|w| > 0$ is to apply rule ${S'rightarrow[S'] }$ at least once.


  3. $w_1$: $S' rightarrow [S'] rightarrow^* w_1 $


  4. $w_2$: $S rightarrow S'S' rightarrow^* S^i[S']S^j rightarrow^* w_2 $ where $i, j geq 0$

  5. In 3rd case, $w = [u]v$, where $v = epsilon$ and $u$ is generated from starting symbol, so $u, v in L$. In 4th case, you have $w = [u]v$ where $u, v$ is generated from starting symbol $S'$ so $u, v in
    L$









induction formal-languages formal-grammar






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 5 '18 at 15:44







Tehryn

















asked Nov 29 '18 at 21:17









TehrynTehryn

62




62








  • 1




    Seems to me the language generated by [ and ] is larger than the language of proper pairings, It includes for example four [ 's and no ]'s. By Dyck language is there a restriction on what strings are in that language?
    – coffeemath
    Nov 29 '18 at 21:44






  • 2




    Dyck language (in our example) is a language, that is generated by grammar with rules S -> SS, S -> epsilon, S-> [S]
    – Tehryn
    Nov 29 '18 at 22:41






  • 2




    Your lector's advice seems pretty good to me. What is giving you trouble following it?
    – rici
    Nov 30 '18 at 2:56






  • 1




    Your definition of the Dyck language is not correct; you only provide the alphabet it uses.
    – Peter Leupold
    Nov 30 '18 at 8:28






  • 1




    @rici I have problem with induction. I was able somehow prove a). Also I was able to prove induction where number of '[' is equal to i where i is from interval <0, |w|>, but was not able to prove it for i+1
    – Tehryn
    Nov 30 '18 at 9:46














  • 1




    Seems to me the language generated by [ and ] is larger than the language of proper pairings, It includes for example four [ 's and no ]'s. By Dyck language is there a restriction on what strings are in that language?
    – coffeemath
    Nov 29 '18 at 21:44






  • 2




    Dyck language (in our example) is a language, that is generated by grammar with rules S -> SS, S -> epsilon, S-> [S]
    – Tehryn
    Nov 29 '18 at 22:41






  • 2




    Your lector's advice seems pretty good to me. What is giving you trouble following it?
    – rici
    Nov 30 '18 at 2:56






  • 1




    Your definition of the Dyck language is not correct; you only provide the alphabet it uses.
    – Peter Leupold
    Nov 30 '18 at 8:28






  • 1




    @rici I have problem with induction. I was able somehow prove a). Also I was able to prove induction where number of '[' is equal to i where i is from interval <0, |w|>, but was not able to prove it for i+1
    – Tehryn
    Nov 30 '18 at 9:46








1




1




Seems to me the language generated by [ and ] is larger than the language of proper pairings, It includes for example four [ 's and no ]'s. By Dyck language is there a restriction on what strings are in that language?
– coffeemath
Nov 29 '18 at 21:44




Seems to me the language generated by [ and ] is larger than the language of proper pairings, It includes for example four [ 's and no ]'s. By Dyck language is there a restriction on what strings are in that language?
– coffeemath
Nov 29 '18 at 21:44




2




2




Dyck language (in our example) is a language, that is generated by grammar with rules S -> SS, S -> epsilon, S-> [S]
– Tehryn
Nov 29 '18 at 22:41




Dyck language (in our example) is a language, that is generated by grammar with rules S -> SS, S -> epsilon, S-> [S]
– Tehryn
Nov 29 '18 at 22:41




2




2




Your lector's advice seems pretty good to me. What is giving you trouble following it?
– rici
Nov 30 '18 at 2:56




Your lector's advice seems pretty good to me. What is giving you trouble following it?
– rici
Nov 30 '18 at 2:56




1




1




Your definition of the Dyck language is not correct; you only provide the alphabet it uses.
– Peter Leupold
Nov 30 '18 at 8:28




Your definition of the Dyck language is not correct; you only provide the alphabet it uses.
– Peter Leupold
Nov 30 '18 at 8:28




1




1




@rici I have problem with induction. I was able somehow prove a). Also I was able to prove induction where number of '[' is equal to i where i is from interval <0, |w|>, but was not able to prove it for i+1
– Tehryn
Nov 30 '18 at 9:46




@rici I have problem with induction. I was able somehow prove a). Also I was able to prove induction where number of '[' is equal to i where i is from interval <0, |w|>, but was not able to prove it for i+1
– Tehryn
Nov 30 '18 at 9:46










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%2f3019233%2fprove-that-dyck-language-is-subset-of-grammar%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%2f3019233%2fprove-that-dyck-language-is-subset-of-grammar%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

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei