# Type-0 grammar and terminal symbols

The question is pretty short, but I've been thinking about it quite some time: Are terminal symbols that are not in the defined alphabet still valid?

• Not a real answer here, so I write a comment. If you define a grammar $G = (N, \{a, b\}, P, S)$ and have a production rule like $\alpha \to \beta c \gamma$, one may say that this rule cannot be in $P$. But all in all the question is not really profound. Why should anyone define a grammar with such inconsistency? – ttnick Jun 8 '18 at 14:06
• @PHPNick because it's not mine :) – just_deko Jun 8 '18 at 15:06

No. The grammar is defined like this:

G = (V,SIGMA, R, S) where V is your set of variables (non-terminals) and SIGMA is your alphabet (terminals). All the symbols you are allowed to use in the substitution of a rule are the union of V and SIGMA. If you simply cannot use a symbol out of that set, since it does not exists in the context of your grammar.

• So if I have a production rule S -> a where S is a variable in the grammar but a isn't anywhere, than what chomsky type is the grammar? Non-existant? – just_deko Jun 8 '18 at 12:51
• Yes. It is not a valid grammar – Samuel Yvon Jun 8 '18 at 12:55