m***@email.com
2006-11-03 21:58:19 UTC
Let A and B be two sets of words (strings) from S*, for some alphabet
of symbols S. Suppose that B is a
subset of A. Which of the following statements must always be true of A
and B ?
I. If A is finite, then B is finite.
II. If A is regular, then B is regular.
III. If A is context-free, then B is context-free.
The answer key gives the answer "I. only".
II. I thought this statement is true because a regular grammar is
restricted to rules from some set of forms. (see
http://en.wikipedia.org/wiki/Regular_grammar). Thus, any subset of a
regular grammar will still have rules restricted to that set of forms.
III. I don't see how taking a subset of a grammar can cause it to have
context.
Why are II and III wrong? Thanks
of symbols S. Suppose that B is a
subset of A. Which of the following statements must always be true of A
and B ?
I. If A is finite, then B is finite.
II. If A is regular, then B is regular.
III. If A is context-free, then B is context-free.
The answer key gives the answer "I. only".
II. I thought this statement is true because a regular grammar is
restricted to rules from some set of forms. (see
http://en.wikipedia.org/wiki/Regular_grammar). Thus, any subset of a
regular grammar will still have rules restricted to that set of forms.
III. I don't see how taking a subset of a grammar can cause it to have
context.
Why are II and III wrong? Thanks