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
2. Find five other valid sentences, besides those given in Exercise 1.
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+ITS APPL. (LL)-W/A
- There are only three basic constructs in Prolog: facts, rules, and queries. A collection of facts and rules is called a knowledge base (or a database). If we have given multiple facts like male(harry). female(jess). parent_of(jack,jess). Can you make the rules about? 1. father_of(X,Y):- 2. mother_of(X,Y):- 3. grandfather_of(X,Y):- 4. grandmother_of(X,Y):-arrow_forwardConsider the grammar, with start symbol VO, for which N = {VO, V1, V2) (set of non- terminal symbols) T = {a,b,c} (set of terminal symbols) and the production rules are 1. VO a V1 3. VO-> b 5. V1 C 7. V1 bcV1 9. V2-> V0a V1 2. VO bV2 4. V1 -> C V1 6. V1 -> bV0 8. V2-> a V2 10. V2bV1 In the space below, show that the string ac²b³ac is in the language defined by the grammar, by producing a derivation of the string. State the production rule used at each stage of the derivation Paragraph V B I U A V 5 GO + v ... 11.arrow_forwardI don’t understandarrow_forward
- Using the following translation key, translate each of the sentences of English, (i)-(vi), into PL.P: There is alien lifeQ: Humans are the only intelligent lifeformsR: Dogs are intelligentS: God existsT: Humans evolved(i) Either God exists and humans are the only intelligent lifeforms, or God doesn’t exist and there is alien life(ii) There is alien life only if God doesn’t exist(iii) Humans are the only intelligent lifeforms unless either there is alien life or dogs are intelligent(iv) God doesn’t exist just in case both humans evolved and they are the only intelligent lifeforms(v) If God exists and humans evolved, then if God exists then humans are not the only intelligent lifeformsarrow_forwardWhat statement is equivalent to "It is not the case that, my high school encouraged creativity and diversity."? (Write in both, symbolic form and word)arrow_forwardТOPIC In not more than five sentences, discuss one of the characteristics of mathematics as a language. Provide examples if needed.arrow_forward
- The fill option in ggplot is part of the grammar of graphics. It is considered: Select one: a. Geometrics b. Aesthetics c. Themes d. facets e. Statisticsarrow_forwardImagine that num_orders and num_instock are particular values, such as might occur during execution of a computer program. Write negations for the following statements. (num_orders > 100 and num_instock <= 500) ornum_instock < 200arrow_forwardWrite 5 quantified statements together with its negation regarding the latest news/ issue/trends in our countries. Quantified Statement Negationarrow_forward
- 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