Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question is based on Turing machine and Computation Theory. Problem 6: Context-free grammars are sometimes used to model natural languages. In this problem you

This question is based on Turing machine and Computation Theory.

Problem 6:

image text in transcribed

Context-free grammars are sometimes used to model natural languages. In this problem you will model a fragment of the English language using context-free grammars. Consider the following English sentences: The girl is pretty. The girl that the boy likes is pretty. The girl that the boy that the clerk pushed likes is pretty. The girl that the boy that the clerk that the girl knows pushed likes is pretty. This is a special type of sentence built from a subject (The girl), a relative pronoun (that) followed by another sentence, a verb (is) and an adjective (pretty). (a) Give a context-free grammar G that models this special type of sentence. Your terminals should be words or sequences of words like pretty or the girl. (b) Is the language of G regular? If so, write a regular expression for it. If not, prove using the pumping lemma for regular languages. (c) Can you give an example of a sentence that is in G but does not make sense in common English

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the purpose of a business plan.

Answered: 1 week ago