We are interested in the language consisting of the set of all strings which are true English statements about elephants

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

We are interested in the language consisting of the set of all strings which are true English statements about elephants

Post by answerhappygod »

We are interested in the language consisting of the set of all
strings which are true English statements about elephants. The
tokens of the language are fly, die, are, elephants, big, small,
tiny, miniscule, eat and !. Sentences in the language include
{elephants die, elephants eat, elephants are big, elephants are big
big big!}. Sentences not in the language include {elephants are
tiny, elephants fly, tiny big elephants fly, tiny tiny, are die big
tiny}
a. Write a context free grammar for this language using BNF or
EBNF. Document any assumptions you make.
b. Was your grammar ambiguous?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply