Number of words of length n in a context-free language










20












$begingroup$


Denote by $w_n$ the number of words of length $n$ in a (possibly ambiguous) context-free language.




What is known about $w_n$?




I'm sure this has been studied a lot, but I couldn't find anything at all on it.










share|cite|improve this question









$endgroup$







  • 4




    $begingroup$
    There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
    $endgroup$
    – Chandra Chekuri
    Nov 14 '18 at 15:15







  • 1




    $begingroup$
    For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
    $endgroup$
    – Martin Berger
    Nov 14 '18 at 19:10















20












$begingroup$


Denote by $w_n$ the number of words of length $n$ in a (possibly ambiguous) context-free language.




What is known about $w_n$?




I'm sure this has been studied a lot, but I couldn't find anything at all on it.










share|cite|improve this question









$endgroup$







  • 4




    $begingroup$
    There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
    $endgroup$
    – Chandra Chekuri
    Nov 14 '18 at 15:15







  • 1




    $begingroup$
    For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
    $endgroup$
    – Martin Berger
    Nov 14 '18 at 19:10













20












20








20


3



$begingroup$


Denote by $w_n$ the number of words of length $n$ in a (possibly ambiguous) context-free language.




What is known about $w_n$?




I'm sure this has been studied a lot, but I couldn't find anything at all on it.










share|cite|improve this question









$endgroup$




Denote by $w_n$ the number of words of length $n$ in a (possibly ambiguous) context-free language.




What is known about $w_n$?




I'm sure this has been studied a lot, but I couldn't find anything at all on it.







fl.formal-languages context-free






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 14 '18 at 10:29









domotorpdomotorp

8,9883080




8,9883080







  • 4




    $begingroup$
    There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
    $endgroup$
    – Chandra Chekuri
    Nov 14 '18 at 15:15







  • 1




    $begingroup$
    For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
    $endgroup$
    – Martin Berger
    Nov 14 '18 at 19:10












  • 4




    $begingroup$
    There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
    $endgroup$
    – Chandra Chekuri
    Nov 14 '18 at 15:15







  • 1




    $begingroup$
    For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
    $endgroup$
    – Martin Berger
    Nov 14 '18 at 19:10







4




4




$begingroup$
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
$endgroup$
– Chandra Chekuri
Nov 14 '18 at 15:15





$begingroup$
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
$endgroup$
– Chandra Chekuri
Nov 14 '18 at 15:15





1




1




$begingroup$
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
$endgroup$
– Martin Berger
Nov 14 '18 at 19:10




$begingroup$
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
$endgroup$
– Martin Berger
Nov 14 '18 at 19:10










1 Answer
1






active

oldest

votes


















26












$begingroup$

Every context-free language has either polynomial growth or exponential growth. In the notation of the question poser:



  • Either there is a polynomial $p$ so that $w_nle p(n)$ for all $n$

  • Or there exists a $c>1$, so that $w_nge c^n$ for infinitely many $n$.

This has been shown for instance in:




Roberto Incitti:

"The growth function of context-free languages"

Theoretical Computer Science 255 (2001), Pages 601-605



Martin R. Bridson, Robert H. Gilman:

"Context-Free Languages of Sub-exponential Growth"

Journal of Computer and System Sciences 64 (2002), Pages 308-310




And for a given context-free grammar, one can decide in polynomial time whether the generated language has polynomial or exponential growth:




Pawel Gawrychowski, Dalia Krieger, Narad Rampersad, Jeffrey Shallit:

"Finding the Growth Rate of a Regular or Context-Free Language in Polynomial Time.

International Journal of Foundations of Computer Science 21 (2010), Pages 597-618







share|cite|improve this answer











$endgroup$








  • 2




    $begingroup$
    Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
    $endgroup$
    – datell
    Nov 14 '18 at 16:59










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: "114"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2fcstheory.stackexchange.com%2fquestions%2f41878%2fnumber-of-words-of-length-n-in-a-context-free-language%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









26












$begingroup$

Every context-free language has either polynomial growth or exponential growth. In the notation of the question poser:



  • Either there is a polynomial $p$ so that $w_nle p(n)$ for all $n$

  • Or there exists a $c>1$, so that $w_nge c^n$ for infinitely many $n$.

This has been shown for instance in:




Roberto Incitti:

"The growth function of context-free languages"

Theoretical Computer Science 255 (2001), Pages 601-605



Martin R. Bridson, Robert H. Gilman:

"Context-Free Languages of Sub-exponential Growth"

Journal of Computer and System Sciences 64 (2002), Pages 308-310




And for a given context-free grammar, one can decide in polynomial time whether the generated language has polynomial or exponential growth:




Pawel Gawrychowski, Dalia Krieger, Narad Rampersad, Jeffrey Shallit:

"Finding the Growth Rate of a Regular or Context-Free Language in Polynomial Time.

International Journal of Foundations of Computer Science 21 (2010), Pages 597-618







share|cite|improve this answer











$endgroup$








  • 2




    $begingroup$
    Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
    $endgroup$
    – datell
    Nov 14 '18 at 16:59















26












$begingroup$

Every context-free language has either polynomial growth or exponential growth. In the notation of the question poser:



  • Either there is a polynomial $p$ so that $w_nle p(n)$ for all $n$

  • Or there exists a $c>1$, so that $w_nge c^n$ for infinitely many $n$.

This has been shown for instance in:




Roberto Incitti:

"The growth function of context-free languages"

Theoretical Computer Science 255 (2001), Pages 601-605



Martin R. Bridson, Robert H. Gilman:

"Context-Free Languages of Sub-exponential Growth"

Journal of Computer and System Sciences 64 (2002), Pages 308-310




And for a given context-free grammar, one can decide in polynomial time whether the generated language has polynomial or exponential growth:




Pawel Gawrychowski, Dalia Krieger, Narad Rampersad, Jeffrey Shallit:

"Finding the Growth Rate of a Regular or Context-Free Language in Polynomial Time.

International Journal of Foundations of Computer Science 21 (2010), Pages 597-618







share|cite|improve this answer











$endgroup$








  • 2




    $begingroup$
    Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
    $endgroup$
    – datell
    Nov 14 '18 at 16:59













26












26








26





$begingroup$

Every context-free language has either polynomial growth or exponential growth. In the notation of the question poser:



  • Either there is a polynomial $p$ so that $w_nle p(n)$ for all $n$

  • Or there exists a $c>1$, so that $w_nge c^n$ for infinitely many $n$.

This has been shown for instance in:




Roberto Incitti:

"The growth function of context-free languages"

Theoretical Computer Science 255 (2001), Pages 601-605



Martin R. Bridson, Robert H. Gilman:

"Context-Free Languages of Sub-exponential Growth"

Journal of Computer and System Sciences 64 (2002), Pages 308-310




And for a given context-free grammar, one can decide in polynomial time whether the generated language has polynomial or exponential growth:




Pawel Gawrychowski, Dalia Krieger, Narad Rampersad, Jeffrey Shallit:

"Finding the Growth Rate of a Regular or Context-Free Language in Polynomial Time.

International Journal of Foundations of Computer Science 21 (2010), Pages 597-618







share|cite|improve this answer











$endgroup$



Every context-free language has either polynomial growth or exponential growth. In the notation of the question poser:



  • Either there is a polynomial $p$ so that $w_nle p(n)$ for all $n$

  • Or there exists a $c>1$, so that $w_nge c^n$ for infinitely many $n$.

This has been shown for instance in:




Roberto Incitti:

"The growth function of context-free languages"

Theoretical Computer Science 255 (2001), Pages 601-605



Martin R. Bridson, Robert H. Gilman:

"Context-Free Languages of Sub-exponential Growth"

Journal of Computer and System Sciences 64 (2002), Pages 308-310




And for a given context-free grammar, one can decide in polynomial time whether the generated language has polynomial or exponential growth:




Pawel Gawrychowski, Dalia Krieger, Narad Rampersad, Jeffrey Shallit:

"Finding the Growth Rate of a Regular or Context-Free Language in Polynomial Time.

International Journal of Foundations of Computer Science 21 (2010), Pages 597-618








share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 14 '18 at 13:00

























answered Nov 14 '18 at 12:24









GamowGamow

4,06931733




4,06931733







  • 2




    $begingroup$
    Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
    $endgroup$
    – datell
    Nov 14 '18 at 16:59












  • 2




    $begingroup$
    Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
    $endgroup$
    – datell
    Nov 14 '18 at 16:59







2




2




$begingroup$
Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
$endgroup$
– datell
Nov 14 '18 at 16:59




$begingroup$
Very interesting connection: The term growth rate is a well known one in group theory and heavily studied. However virtually free groups have exponential growth rate and we know by Muller and Schupp (1983) that word problems of virtually free groups are deterministic context-free. Do you know if there is further work about the growth rate of deterministic context-free languages?
$endgroup$
– datell
Nov 14 '18 at 16:59

















draft saved

draft discarded
















































Thanks for contributing an answer to Theoretical Computer Science 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%2fcstheory.stackexchange.com%2fquestions%2f41878%2fnumber-of-words-of-length-n-in-a-context-free-language%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







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

Museum of Modern and Contemporary Art of Trento and Rovereto