Concept explainers
Exercises 1-3 refer to the grammar with start symbol sentence, set of terminals T = {the, sleepy, happy, tortoise, hare, passes, runs, quickly, slowly}, set of non-terminals N = {noun phrase, transitive verb phrase, intransitive verb phrase, article, adjective, noun, verb, adverb), and productions:
sentence ? noun phrase transitive verb phrase noun phrase sentence ? noun phrase intransitive verb phrase noun phrase ? article adjective noun noun phrase ? article noun transitive verb phrase ? transitive verb intransitive verb phrase ? intransitive verb adverb intransitive verb phrase ? intransitive verb
article ? the
adjective ? sleepy
adjective ? happy
noun ? tortoise
noun ? hare
transitive verb ? passes
intransitive verb ? runs
adverb ? quickly
adverb ? slowly
1. Use the set of productions to show that each of these sentences is a valid sentence.
a) the happy hare runs
b) the sleepy tortoise runs quickly
c) the tortoise passes the hare
d) the sleepy hare passes the happy tortoise
Want to see the full answer?
Check out a sample textbook solutionChapter 13 Solutions
Discrete Mathematics and Its Applications ( 8th International Edition ) ISBN:9781260091991
- Algebra for College StudentsAlgebraISBN:9781285195780Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage LearningIntermediate AlgebraAlgebraISBN:9781285195728Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage LearningHolt Mcdougal Larson Pre-algebra: Student Edition...AlgebraISBN:9780547587776Author:HOLT MCDOUGALPublisher:HOLT MCDOUGAL
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningAlgebra: Structure And Method, Book 1AlgebraISBN:9780395977224Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. ColePublisher:McDougal Littell