Is $L_4$ a CFL?
$begingroup$
Consider the following language: $$L_4 = {a^ib^jc^kd^l : i,j,k,l
ge0 wedge i=1 Rightarrow j=k=l}.$$
Prove or disprove: $L_4$ is a context-free language.
To me, it looks like $L_4$ can be accepted using a PDA, but I don't know how to construct it.
appreciate a hint here.
formal-languages automata context-free-grammar formal-grammar pumping-lemma
$endgroup$
add a comment |
$begingroup$
Consider the following language: $$L_4 = {a^ib^jc^kd^l : i,j,k,l
ge0 wedge i=1 Rightarrow j=k=l}.$$
Prove or disprove: $L_4$ is a context-free language.
To me, it looks like $L_4$ can be accepted using a PDA, but I don't know how to construct it.
appreciate a hint here.
formal-languages automata context-free-grammar formal-grammar pumping-lemma
$endgroup$
3
$begingroup$
The sub-language for $i=1$ is not context.free
$endgroup$
– Wuestenfux
Dec 22 '18 at 13:42
$begingroup$
Can you give me a hint of how to disprove it then?
$endgroup$
– Yotam Raz
Dec 22 '18 at 14:48
1
$begingroup$
The pumping lemma for context-free languages would do it.
$endgroup$
– Henning Makholm
Dec 22 '18 at 14:54
$begingroup$
is $w = ab^kc^kd^k$ a good choice? for $k$ being the constant from the pumping lemma.
$endgroup$
– Yotam Raz
Dec 22 '18 at 15:03
1
$begingroup$
More precisely, what the pumping lemma shows directly is @Wuestenfux's claim. To get all the way to $L_4$, note that "the sub-language for $i=1$" is the intersection of $L_4$ and a regular language.
$endgroup$
– Henning Makholm
Dec 22 '18 at 15:50
add a comment |
$begingroup$
Consider the following language: $$L_4 = {a^ib^jc^kd^l : i,j,k,l
ge0 wedge i=1 Rightarrow j=k=l}.$$
Prove or disprove: $L_4$ is a context-free language.
To me, it looks like $L_4$ can be accepted using a PDA, but I don't know how to construct it.
appreciate a hint here.
formal-languages automata context-free-grammar formal-grammar pumping-lemma
$endgroup$
Consider the following language: $$L_4 = {a^ib^jc^kd^l : i,j,k,l
ge0 wedge i=1 Rightarrow j=k=l}.$$
Prove or disprove: $L_4$ is a context-free language.
To me, it looks like $L_4$ can be accepted using a PDA, but I don't know how to construct it.
appreciate a hint here.
formal-languages automata context-free-grammar formal-grammar pumping-lemma
formal-languages automata context-free-grammar formal-grammar pumping-lemma
edited Jan 16 at 21:21
Yuval Filmus
48.8k472146
48.8k472146
asked Dec 22 '18 at 11:53
Yotam RazYotam Raz
235
235
3
$begingroup$
The sub-language for $i=1$ is not context.free
$endgroup$
– Wuestenfux
Dec 22 '18 at 13:42
$begingroup$
Can you give me a hint of how to disprove it then?
$endgroup$
– Yotam Raz
Dec 22 '18 at 14:48
1
$begingroup$
The pumping lemma for context-free languages would do it.
$endgroup$
– Henning Makholm
Dec 22 '18 at 14:54
$begingroup$
is $w = ab^kc^kd^k$ a good choice? for $k$ being the constant from the pumping lemma.
$endgroup$
– Yotam Raz
Dec 22 '18 at 15:03
1
$begingroup$
More precisely, what the pumping lemma shows directly is @Wuestenfux's claim. To get all the way to $L_4$, note that "the sub-language for $i=1$" is the intersection of $L_4$ and a regular language.
$endgroup$
– Henning Makholm
Dec 22 '18 at 15:50
add a comment |
3
$begingroup$
The sub-language for $i=1$ is not context.free
$endgroup$
– Wuestenfux
Dec 22 '18 at 13:42
$begingroup$
Can you give me a hint of how to disprove it then?
$endgroup$
– Yotam Raz
Dec 22 '18 at 14:48
1
$begingroup$
The pumping lemma for context-free languages would do it.
$endgroup$
– Henning Makholm
Dec 22 '18 at 14:54
$begingroup$
is $w = ab^kc^kd^k$ a good choice? for $k$ being the constant from the pumping lemma.
$endgroup$
– Yotam Raz
Dec 22 '18 at 15:03
1
$begingroup$
More precisely, what the pumping lemma shows directly is @Wuestenfux's claim. To get all the way to $L_4$, note that "the sub-language for $i=1$" is the intersection of $L_4$ and a regular language.
$endgroup$
– Henning Makholm
Dec 22 '18 at 15:50
3
3
$begingroup$
The sub-language for $i=1$ is not context.free
$endgroup$
– Wuestenfux
Dec 22 '18 at 13:42
$begingroup$
The sub-language for $i=1$ is not context.free
$endgroup$
– Wuestenfux
Dec 22 '18 at 13:42
$begingroup$
Can you give me a hint of how to disprove it then?
$endgroup$
– Yotam Raz
Dec 22 '18 at 14:48
$begingroup$
Can you give me a hint of how to disprove it then?
$endgroup$
– Yotam Raz
Dec 22 '18 at 14:48
1
1
$begingroup$
The pumping lemma for context-free languages would do it.
$endgroup$
– Henning Makholm
Dec 22 '18 at 14:54
$begingroup$
The pumping lemma for context-free languages would do it.
$endgroup$
– Henning Makholm
Dec 22 '18 at 14:54
$begingroup$
is $w = ab^kc^kd^k$ a good choice? for $k$ being the constant from the pumping lemma.
$endgroup$
– Yotam Raz
Dec 22 '18 at 15:03
$begingroup$
is $w = ab^kc^kd^k$ a good choice? for $k$ being the constant from the pumping lemma.
$endgroup$
– Yotam Raz
Dec 22 '18 at 15:03
1
1
$begingroup$
More precisely, what the pumping lemma shows directly is @Wuestenfux's claim. To get all the way to $L_4$, note that "the sub-language for $i=1$" is the intersection of $L_4$ and a regular language.
$endgroup$
– Henning Makholm
Dec 22 '18 at 15:50
$begingroup$
More precisely, what the pumping lemma shows directly is @Wuestenfux's claim. To get all the way to $L_4$, note that "the sub-language for $i=1$" is the intersection of $L_4$ and a regular language.
$endgroup$
– Henning Makholm
Dec 22 '18 at 15:50
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Since the context-free languages are closed under intersection with a regular language and under homomorphism, if $L_4$ were context-free then so would the following language be, for the homomorphism given by $h(a) = epsilon$ and $h(sigma) = sigma$ for $sigma neq a$:
$$
h(L_4 cap a(b+c+d)^*) = { b^nc^nd^n : n geq 0 }.
$$
However, the latter language is well-known not to be context-free.
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3049362%2fis-l-4-a-cfl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Since the context-free languages are closed under intersection with a regular language and under homomorphism, if $L_4$ were context-free then so would the following language be, for the homomorphism given by $h(a) = epsilon$ and $h(sigma) = sigma$ for $sigma neq a$:
$$
h(L_4 cap a(b+c+d)^*) = { b^nc^nd^n : n geq 0 }.
$$
However, the latter language is well-known not to be context-free.
$endgroup$
add a comment |
$begingroup$
Since the context-free languages are closed under intersection with a regular language and under homomorphism, if $L_4$ were context-free then so would the following language be, for the homomorphism given by $h(a) = epsilon$ and $h(sigma) = sigma$ for $sigma neq a$:
$$
h(L_4 cap a(b+c+d)^*) = { b^nc^nd^n : n geq 0 }.
$$
However, the latter language is well-known not to be context-free.
$endgroup$
add a comment |
$begingroup$
Since the context-free languages are closed under intersection with a regular language and under homomorphism, if $L_4$ were context-free then so would the following language be, for the homomorphism given by $h(a) = epsilon$ and $h(sigma) = sigma$ for $sigma neq a$:
$$
h(L_4 cap a(b+c+d)^*) = { b^nc^nd^n : n geq 0 }.
$$
However, the latter language is well-known not to be context-free.
$endgroup$
Since the context-free languages are closed under intersection with a regular language and under homomorphism, if $L_4$ were context-free then so would the following language be, for the homomorphism given by $h(a) = epsilon$ and $h(sigma) = sigma$ for $sigma neq a$:
$$
h(L_4 cap a(b+c+d)^*) = { b^nc^nd^n : n geq 0 }.
$$
However, the latter language is well-known not to be context-free.
edited Jan 19 at 16:43
answered Jan 16 at 21:23
Yuval FilmusYuval Filmus
48.8k472146
48.8k472146
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3049362%2fis-l-4-a-cfl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
3
$begingroup$
The sub-language for $i=1$ is not context.free
$endgroup$
– Wuestenfux
Dec 22 '18 at 13:42
$begingroup$
Can you give me a hint of how to disprove it then?
$endgroup$
– Yotam Raz
Dec 22 '18 at 14:48
1
$begingroup$
The pumping lemma for context-free languages would do it.
$endgroup$
– Henning Makholm
Dec 22 '18 at 14:54
$begingroup$
is $w = ab^kc^kd^k$ a good choice? for $k$ being the constant from the pumping lemma.
$endgroup$
– Yotam Raz
Dec 22 '18 at 15:03
1
$begingroup$
More precisely, what the pumping lemma shows directly is @Wuestenfux's claim. To get all the way to $L_4$, note that "the sub-language for $i=1$" is the intersection of $L_4$ and a regular language.
$endgroup$
– Henning Makholm
Dec 22 '18 at 15:50