224 views
0 votes
0 votes

Give algorithms to decide the following$:$

  1. Is $L(G)$ fi nite, for a given CFG  $G?$ Hint$:$ Use the pumping lemma.
  2. Does $L(G)$ contain  at least $100$ strings, for a given CFG $G?$ 
  3. Given a CFG $G$ and one of its variables $A,$ is there any sentential form in which $A$ is the rst symbol. Note$:$ Remember that it is possible for $A$ to appear first in the middle of some sentential form but then for all the symbols to its left to derive $\in.$ 

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
admin asked Apr 11, 2019
316 views
Modify the $CYK$ algorithm to report the number of distinct parse trees for the given input, rather than just reporting membership in the language$.$
0 votes
0 votes
0 answers
2
admin asked Apr 11, 2019
157 views
Show that in any $CNF$ grammar all parse trees for strings of length $n$ have $2n-1$ interior nodes $(i.e.,$ $2n-1$ nodes with variables for lables$).$
0 votes
0 votes
0 answers
3
admin asked Apr 11, 2019
259 views
Using the grammar $G$ of Example $7.34,$use the $CYK$ algorithm to determine whether each of the following strings is in $L(G):$$ababa$$baaab$$aabab$
0 votes
0 votes
0 answers
4