555 views
0 votes
0 votes
Is the following language CFL :
{ ww | w in (a+b)* and |w| <1000 }

1 Answer

1 votes
1 votes

Answer is Yes. If we don’t have the condition |w| < 1000 it is not a CFL. And we are adding a restriction of length to it it will make the language finite and hence regular and CFL. 

https://stackoverflow.com/questions/42611602/is-ww-where-w-belongs-to-a-b-a-context-free-language

edited by

Related questions

0 votes
0 votes
1 answer
1
practicalmetal asked Mar 15, 2023
515 views
Is the following language context free:The set of all strings with number of a’s equal to number of b’s and the sum of a’s and b’s to be divisible by 3.
0 votes
0 votes
1 answer
4
hrcule asked Mar 21, 2018
680 views
Is true..? In an unambiguous grammar every string has exactly one derivation.