World's most popular travel blog for travel bloggers.

[Solved]: Does a context-free grammar with multiple variables have a "starting" point?

, , No Comments
Problem Detail: 

So lets consider the following grammar

$$ \begin{align*} S &\to 0 \mid 0A \\ A &\to 1 \end{align*} $$

would the string "1" be accepted by the language or must the language start with $S$?

Asked By : Moddah

Answered By : sashas

No $1$ will not be a part of the grammar, as only those strings generated by starting from the start variable $S$ are part of the grammar.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/57351

0 comments:

Post a Comment

Let us know your responses and feedback