Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Find the strings constructed using the derivation trees shown here.

Short Answer

Expert verified

A large mathematician hope wildly is the string constructed using the first derivative tree.

“+987” is the string construct using the second derivative tree.

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

Definition of derivative tree

A derivation in the language generated by a context-free grammar can be represented graphically using an ordered rooted tree, called a derivation, or parse tree.

02

Firstly, using the phrase-structure grammars.

Suppose \(G = \left( {V, T, S, P} \right)\) is a phrase structure grammar with the starting symbol

\(S = sentence, the set of terminuses.\)

\(T = \left\{ {large, mathematician, hops, a, wildly} \right\}\)

The set of non-terminals

N = {noun phrase, verb phrase, article, adjective, noun, verb, adverb} and productions are

\(\begin{aligned}S \to m, \hfill \\m \to wa \hfill \\l \to h \hfill \\ \end{aligned} \)

(sentence): = (noun phrase)

(Sen tense): = (noun phrase) (verb phrase)

(Noun phrase): = (article noun)

(Transitive verb phrase): = (transitive verb)

(Intransitive verb phrase): = (adverb)

(article): = a

(adjective): = Large

(noun): =mathematician

(Transitive verb): = hops

(adverb): = wildly

03

Now, we shall find the strings constructed using the derivation trees.

A derivation in the language generated by a context free grammar can be represented graphically using an ordered rooted tree. The root of this tree represents the starting symbol. The internal vertices of the tree represent the non-terminals that arise in the derivation. The leaves of the tree represent the terminal symbols that arise. If the production A à W arises in the derivation, where W is a word, the vertex A has children’s vertices that represent each symbol in W, in order from left to right.

“A large mathematician hope wildly is the string constructed using the above derivative tree.

Hence, “+987” is the string construct using the above derivative tree.

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Find a phrase-structure grammar for each of these languages.

a) the set consisting of the bit strings 10, 01, and 101.

b) the set of bit strings that start with 00 and end with one or more 1s.

c) the set of bit strings consisting of an even number of 1s followed by a final 0.

d) the set of bit strings that have neither two consecutive 0s nor two consecutive 1s.

Construct a derivation of \({{\bf{0}}^{\bf{3}}}{{\bf{1}}^{\bf{3}}}\) using the grammar given in Example 5.

a)what is the language generated by a phrase-structure grammar G?

b)What is the language generated by the grammar Gwith vocabulary{S,0,1}, set of terminals T= {0,1}, starting symbol S, and productions S→000S, S→1?

c)Give a phrase-structure grammar that generates the set \({\bf{\{ 0}}{{\bf{1}}^{\bf{n}}}{\bf{|n = 0,1,2}}....{\bf{\} }}\).

For each of these strings, determine whether it is generated by the grammar for infix expressions from Exercise 40. If it is, find the steps used to generate the string.

\(\begin{array}{*{20}{l}}{{\bf{a) x + y + z}}}\\{{\bf{b) a/b + c/d}}}\\{{\bf{c) m*}}\left( {{\bf{n + p}}} \right)}\\{{\bf{d) + m - n + p - q}}}\\{{\bf{e) }}\left( {{\bf{m + n}}} \right){\bf{*}}\left( {{\bf{p - q}}} \right)}\end{array}\)

Suppose that A is a subset of\({{\bf{V}}^{\bf{*}}}\)where V is an alphabet.Prove or disprove each of these statements.

\(\begin{array}{l}{\bf{a)}}\,\,{\bf{A}} \subseteq {{\bf{A}}^{\bf{2}}}\\{\bf{b)}}\,\,{\bf{if}}\,{\bf{A = }}{{\bf{A}}^{\bf{2}}}{\bf{,then}}\,{\bf{\lambda }} \in {\bf{A}}\\{\bf{c)}}\,\,{\bf{A\{ \lambda \} = A}}\\{\bf{d)}}\,\,{{\bf{(}}{{\bf{A}}^{\bf{*}}}{\bf{)}}^{\bf{*}}}{\bf{ = }}{{\bf{A}}^{\bf{*}}}\\{\bf{e)}}\,\,{{\bf{A}}^{\bf{*}}}{\bf{A = }}{{\bf{A}}^{\bf{*}}}\\{\bf{f)}}\,\,\left| {{{\bf{A}}^{\bf{n}}}} \right|{\bf{ = }}{\left| {\bf{A}} \right|^{\bf{n}}}\end{array}\)

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free