how to prove that L is not context free
$begingroup$
Given $sum_2$ = {$begin{bmatrix} 0 \ 0 end{bmatrix}$, $begin{bmatrix} 0 \ 1 end{bmatrix}$,$begin{bmatrix} 1 \ 0 end{bmatrix}$,$begin{bmatrix} 1 \ 1end{bmatrix}$} , and a language $L$ = {$w$ $in$ $sum_2^*$ | $Top(w)$ = $Bott(w)^R$ $wedge$ $|w|_0$ = $|w|_1$} where
$Top(w)$ is the top row and $bott(w)$ is the bottom row.
For example, $w$ = $begin{bmatrix} 1 \ 0 end{bmatrix}$ $begin{bmatrix} 0 \ 1 end{bmatrix}$ then $Top(w)$ = $10$ and $bottom(w)$ = $01$.
I want to prove that $L$ isn't context free language.
I have tried to do so with pumping lemme and could not find a word that would get me to the needed contradiction (I assumed L is indeed context free).
Any help will do.
Thanks in advance.
computer-science formal-languages automata
$endgroup$
add a comment |
$begingroup$
Given $sum_2$ = {$begin{bmatrix} 0 \ 0 end{bmatrix}$, $begin{bmatrix} 0 \ 1 end{bmatrix}$,$begin{bmatrix} 1 \ 0 end{bmatrix}$,$begin{bmatrix} 1 \ 1end{bmatrix}$} , and a language $L$ = {$w$ $in$ $sum_2^*$ | $Top(w)$ = $Bott(w)^R$ $wedge$ $|w|_0$ = $|w|_1$} where
$Top(w)$ is the top row and $bott(w)$ is the bottom row.
For example, $w$ = $begin{bmatrix} 1 \ 0 end{bmatrix}$ $begin{bmatrix} 0 \ 1 end{bmatrix}$ then $Top(w)$ = $10$ and $bottom(w)$ = $01$.
I want to prove that $L$ isn't context free language.
I have tried to do so with pumping lemme and could not find a word that would get me to the needed contradiction (I assumed L is indeed context free).
Any help will do.
Thanks in advance.
computer-science formal-languages automata
$endgroup$
$begingroup$
The two conditions by themselves definitely result in context-free languages; palindromes are even linear, counting one letter against the other is easy with a stack. Does the $|w|_0 = |w|_1$ refer to the "sum" of the bottom and top rows or to just one of them?
$endgroup$
– Peter Leupold
Dec 19 '18 at 5:01
add a comment |
$begingroup$
Given $sum_2$ = {$begin{bmatrix} 0 \ 0 end{bmatrix}$, $begin{bmatrix} 0 \ 1 end{bmatrix}$,$begin{bmatrix} 1 \ 0 end{bmatrix}$,$begin{bmatrix} 1 \ 1end{bmatrix}$} , and a language $L$ = {$w$ $in$ $sum_2^*$ | $Top(w)$ = $Bott(w)^R$ $wedge$ $|w|_0$ = $|w|_1$} where
$Top(w)$ is the top row and $bott(w)$ is the bottom row.
For example, $w$ = $begin{bmatrix} 1 \ 0 end{bmatrix}$ $begin{bmatrix} 0 \ 1 end{bmatrix}$ then $Top(w)$ = $10$ and $bottom(w)$ = $01$.
I want to prove that $L$ isn't context free language.
I have tried to do so with pumping lemme and could not find a word that would get me to the needed contradiction (I assumed L is indeed context free).
Any help will do.
Thanks in advance.
computer-science formal-languages automata
$endgroup$
Given $sum_2$ = {$begin{bmatrix} 0 \ 0 end{bmatrix}$, $begin{bmatrix} 0 \ 1 end{bmatrix}$,$begin{bmatrix} 1 \ 0 end{bmatrix}$,$begin{bmatrix} 1 \ 1end{bmatrix}$} , and a language $L$ = {$w$ $in$ $sum_2^*$ | $Top(w)$ = $Bott(w)^R$ $wedge$ $|w|_0$ = $|w|_1$} where
$Top(w)$ is the top row and $bott(w)$ is the bottom row.
For example, $w$ = $begin{bmatrix} 1 \ 0 end{bmatrix}$ $begin{bmatrix} 0 \ 1 end{bmatrix}$ then $Top(w)$ = $10$ and $bottom(w)$ = $01$.
I want to prove that $L$ isn't context free language.
I have tried to do so with pumping lemme and could not find a word that would get me to the needed contradiction (I assumed L is indeed context free).
Any help will do.
Thanks in advance.
computer-science formal-languages automata
computer-science formal-languages automata
asked Dec 18 '18 at 17:22
Avishai YanivAvishai Yaniv
173
173
$begingroup$
The two conditions by themselves definitely result in context-free languages; palindromes are even linear, counting one letter against the other is easy with a stack. Does the $|w|_0 = |w|_1$ refer to the "sum" of the bottom and top rows or to just one of them?
$endgroup$
– Peter Leupold
Dec 19 '18 at 5:01
add a comment |
$begingroup$
The two conditions by themselves definitely result in context-free languages; palindromes are even linear, counting one letter against the other is easy with a stack. Does the $|w|_0 = |w|_1$ refer to the "sum" of the bottom and top rows or to just one of them?
$endgroup$
– Peter Leupold
Dec 19 '18 at 5:01
$begingroup$
The two conditions by themselves definitely result in context-free languages; palindromes are even linear, counting one letter against the other is easy with a stack. Does the $|w|_0 = |w|_1$ refer to the "sum" of the bottom and top rows or to just one of them?
$endgroup$
– Peter Leupold
Dec 19 '18 at 5:01
$begingroup$
The two conditions by themselves definitely result in context-free languages; palindromes are even linear, counting one letter against the other is easy with a stack. Does the $|w|_0 = |w|_1$ refer to the "sum" of the bottom and top rows or to just one of them?
$endgroup$
– Peter Leupold
Dec 19 '18 at 5:01
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
This answer assumes that $|w|_sigma$ is the total number of $sigma$'s in both rows of $w$.
Suppose that $L$ were context-free. Then so would be
$$
L' = L cap
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^* =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^a
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^b
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^c
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^d : \(011)^a(11)^b(01)^c(000)^d = (011)^d (11)^c (01)^b (000)^a, \
4(a+d) + (b+c) = 2(a+d) + 3(b+c)
right}.
$$
The first constraint implies that $a=d$ and $b=c$, simplifying the second constraint to $4a+b=2a+3b$, which in turn implies that $a=b$. Therefore
$$
L' =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^n :
n geq 0
right}.
$$
Let $h$ be the homomorphism which maps $begin{bmatrix}0\0end{bmatrix}$ to $a$, $begin{bmatrix}1\1end{bmatrix}$ to $b$, and the other two letters to $epsilon$. If $L'$ were context-free then so would be
$$
L'' = h(L') = { a^n b^{2n} a^n : n geq 0 }.
$$
Let $kcolon {a,b,c}^* to {a,b}^*$ be the homomorphism given by $k(a) = k(c) = a$ and $k(b) = bb$. If $L''$ were context-free then so would be
$$
L''' = k^{-1}(L'') cap a^*b^*c^* = {a^n b^n c^n : n geq 0}.
$$
However, $L'''$ 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%2f3045430%2fhow-to-prove-that-l-is-not-context-free%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$
This answer assumes that $|w|_sigma$ is the total number of $sigma$'s in both rows of $w$.
Suppose that $L$ were context-free. Then so would be
$$
L' = L cap
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^* =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^a
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^b
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^c
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^d : \(011)^a(11)^b(01)^c(000)^d = (011)^d (11)^c (01)^b (000)^a, \
4(a+d) + (b+c) = 2(a+d) + 3(b+c)
right}.
$$
The first constraint implies that $a=d$ and $b=c$, simplifying the second constraint to $4a+b=2a+3b$, which in turn implies that $a=b$. Therefore
$$
L' =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^n :
n geq 0
right}.
$$
Let $h$ be the homomorphism which maps $begin{bmatrix}0\0end{bmatrix}$ to $a$, $begin{bmatrix}1\1end{bmatrix}$ to $b$, and the other two letters to $epsilon$. If $L'$ were context-free then so would be
$$
L'' = h(L') = { a^n b^{2n} a^n : n geq 0 }.
$$
Let $kcolon {a,b,c}^* to {a,b}^*$ be the homomorphism given by $k(a) = k(c) = a$ and $k(b) = bb$. If $L''$ were context-free then so would be
$$
L''' = k^{-1}(L'') cap a^*b^*c^* = {a^n b^n c^n : n geq 0}.
$$
However, $L'''$ is well-known not to be context-free.
$endgroup$
add a comment |
$begingroup$
This answer assumes that $|w|_sigma$ is the total number of $sigma$'s in both rows of $w$.
Suppose that $L$ were context-free. Then so would be
$$
L' = L cap
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^* =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^a
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^b
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^c
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^d : \(011)^a(11)^b(01)^c(000)^d = (011)^d (11)^c (01)^b (000)^a, \
4(a+d) + (b+c) = 2(a+d) + 3(b+c)
right}.
$$
The first constraint implies that $a=d$ and $b=c$, simplifying the second constraint to $4a+b=2a+3b$, which in turn implies that $a=b$. Therefore
$$
L' =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^n :
n geq 0
right}.
$$
Let $h$ be the homomorphism which maps $begin{bmatrix}0\0end{bmatrix}$ to $a$, $begin{bmatrix}1\1end{bmatrix}$ to $b$, and the other two letters to $epsilon$. If $L'$ were context-free then so would be
$$
L'' = h(L') = { a^n b^{2n} a^n : n geq 0 }.
$$
Let $kcolon {a,b,c}^* to {a,b}^*$ be the homomorphism given by $k(a) = k(c) = a$ and $k(b) = bb$. If $L''$ were context-free then so would be
$$
L''' = k^{-1}(L'') cap a^*b^*c^* = {a^n b^n c^n : n geq 0}.
$$
However, $L'''$ is well-known not to be context-free.
$endgroup$
add a comment |
$begingroup$
This answer assumes that $|w|_sigma$ is the total number of $sigma$'s in both rows of $w$.
Suppose that $L$ were context-free. Then so would be
$$
L' = L cap
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^* =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^a
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^b
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^c
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^d : \(011)^a(11)^b(01)^c(000)^d = (011)^d (11)^c (01)^b (000)^a, \
4(a+d) + (b+c) = 2(a+d) + 3(b+c)
right}.
$$
The first constraint implies that $a=d$ and $b=c$, simplifying the second constraint to $4a+b=2a+3b$, which in turn implies that $a=b$. Therefore
$$
L' =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^n :
n geq 0
right}.
$$
Let $h$ be the homomorphism which maps $begin{bmatrix}0\0end{bmatrix}$ to $a$, $begin{bmatrix}1\1end{bmatrix}$ to $b$, and the other two letters to $epsilon$. If $L'$ were context-free then so would be
$$
L'' = h(L') = { a^n b^{2n} a^n : n geq 0 }.
$$
Let $kcolon {a,b,c}^* to {a,b}^*$ be the homomorphism given by $k(a) = k(c) = a$ and $k(b) = bb$. If $L''$ were context-free then so would be
$$
L''' = k^{-1}(L'') cap a^*b^*c^* = {a^n b^n c^n : n geq 0}.
$$
However, $L'''$ is well-known not to be context-free.
$endgroup$
This answer assumes that $|w|_sigma$ is the total number of $sigma$'s in both rows of $w$.
Suppose that $L$ were context-free. Then so would be
$$
L' = L cap
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^*
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^* =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^a
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^b
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^c
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^d : \(011)^a(11)^b(01)^c(000)^d = (011)^d (11)^c (01)^b (000)^a, \
4(a+d) + (b+c) = 2(a+d) + 3(b+c)
right}.
$$
The first constraint implies that $a=d$ and $b=c$, simplifying the second constraint to $4a+b=2a+3b$, which in turn implies that $a=b$. Therefore
$$
L' =
left{
left(
begin{bmatrix} 0 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 1 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 0 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 1 \ 1 end{bmatrix}
right)^n
left(
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 1 end{bmatrix}
begin{bmatrix} 0 \ 0 end{bmatrix}
right)^n :
n geq 0
right}.
$$
Let $h$ be the homomorphism which maps $begin{bmatrix}0\0end{bmatrix}$ to $a$, $begin{bmatrix}1\1end{bmatrix}$ to $b$, and the other two letters to $epsilon$. If $L'$ were context-free then so would be
$$
L'' = h(L') = { a^n b^{2n} a^n : n geq 0 }.
$$
Let $kcolon {a,b,c}^* to {a,b}^*$ be the homomorphism given by $k(a) = k(c) = a$ and $k(b) = bb$. If $L''$ were context-free then so would be
$$
L''' = k^{-1}(L'') cap a^*b^*c^* = {a^n b^n c^n : n geq 0}.
$$
However, $L'''$ is well-known not to be context-free.
answered Jan 16 at 21:59
Yuval FilmusYuval Filmus
48.6k471144
48.6k471144
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%2f3045430%2fhow-to-prove-that-l-is-not-context-free%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
$begingroup$
The two conditions by themselves definitely result in context-free languages; palindromes are even linear, counting one letter against the other is easy with a stack. Does the $|w|_0 = |w|_1$ refer to the "sum" of the bottom and top rows or to just one of them?
$endgroup$
– Peter Leupold
Dec 19 '18 at 5:01