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
- Consider a language which uses the following set of characters: Prefix set: { a e i } Small set: { b c d} Large set: { B C D} Punctuation set: { x y } This language must follow the following rules: i. A series must start with a prefix character ii. A series must end with a punctuation characterarrow_forward5.4. Complete sentences include suppose, consider, etc. when necessaryarrow_forwardEliminate all useless productions from the grammar S→aS/AB A→bA B→AA What language does this grammar generate?arrow_forward
- Explain the Pythagorean Theorem, its proofs and applications. Requirements Between 200 - 500 words Must be free of plagiarism Proper grammar and no spelling mistakesarrow_forwardUsing the symbolization key given, translate each English-Language sentence into SL.M: Those beings are men in pajamasL: Those beings are lymers O: Those beings are orangutans 1) Those beings are not men in pajamas.2) Those beings are men in pajamas, or they are not.3) Those beings are either orangutans or lymers.4) Those beings are neither orangutans nor lymers.5) If those beings are lymers, then they are neither orangutans nor men in pajamas.6) Unless those beings are men in pajamas, they are either lymers or they are orangutans.arrow_forwardThe Martian language can be written in the familiar Roman alphabet, which has 21 consonants (B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Y, Z) and 5 vowels (A, E, I, O, U). All Martian nouns begin with a consonant, followed by one or more vowel-consonant pairs. However, no consonant can appear more than once in a single noun, and no vowel can appear more than once in a single noun. For example, VUX, DIYOK, and ZOBALUT are possible Martian nouns, but X, VUV, DIYIK, and ZEZELAL are not. How many Martian nouns are possible? Your answer must be a number. Briefly explain your answer. Recent expeditions to Mars have cast doubt on whether the Martian language can be written with exactly 21 consonants and 5 vowels. Suppose that Martian requires c consonants and v vowels, where c > 0, v > 0, and c > v. Express the number of possible Martian nouns in terms of c and v. Your answer need not be in closed form.arrow_forward
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning