Number of words of length n in a context-free language
up vote
17
down vote
favorite
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
add a comment |
up vote
17
down vote
favorite
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
4
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
– Chandra Chekuri
Nov 14 at 15:15
1
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
– Martin Berger
Nov 14 at 19:10
add a comment |
up vote
17
down vote
favorite
up vote
17
down vote
favorite
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
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
fl.formal-languages context-free
asked Nov 14 at 10:29
domotorp
8,5243075
8,5243075
4
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
– Chandra Chekuri
Nov 14 at 15:15
1
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
– Martin Berger
Nov 14 at 19:10
add a comment |
4
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
– Chandra Chekuri
Nov 14 at 15:15
1
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
– Martin Berger
Nov 14 at 19:10
4
4
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
– Chandra Chekuri
Nov 14 at 15:15
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
– Chandra Chekuri
Nov 14 at 15:15
1
1
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
– Martin Berger
Nov 14 at 19:10
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
– Martin Berger
Nov 14 at 19:10
add a comment |
1 Answer
1
active
oldest
votes
up vote
23
down vote
accepted
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
2
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?
– datell
Nov 14 at 16:59
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
23
down vote
accepted
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
2
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?
– datell
Nov 14 at 16:59
add a comment |
up vote
23
down vote
accepted
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
2
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?
– datell
Nov 14 at 16:59
add a comment |
up vote
23
down vote
accepted
up vote
23
down vote
accepted
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
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
edited Nov 14 at 13:00
answered Nov 14 at 12:24
Gamow
3,52431129
3,52431129
2
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?
– datell
Nov 14 at 16:59
add a comment |
2
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?
– datell
Nov 14 at 16:59
2
2
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?
– datell
Nov 14 at 16:59
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?
– datell
Nov 14 at 16:59
add a comment |
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%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
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
4
There is a quasi-polynomial time randoimized algorithm to approximate $w_n$ to within a $(1+epsilon)$ approximation. sciencedirect.com/science/article/pii/S0890540197926213
– Chandra Chekuri
Nov 14 at 15:15
1
For unambiguous CFLs, the classic Chomsky–Schützenberger enumeration theorem should be of interest.
– Martin Berger
Nov 14 at 19:10