Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(b) In this question, we consider CFGs in which we take S to be the initial variable. For each of the following statements, state whether

image text in transcribedimage text in transcribed

(b) In this question, we consider CFGs in which we take S to be the initial variable. For each of the following statements, state whether they are true or false. Correct answers are awarded 4 marks; wrong answers are penalised by 1 mark (to a minimum of O marks for this question). Omitted answers do not contribute positively or negatively to your grade. [16 marks] i. The CFG over the alphabet {a,b,=, +, 1,; } with reductions S +A;S|A a=E|A+b=E E + E +6E+1E+V+V True or false: the language of this CFG is infinite (meaning: contains infinitely many strings). ii. The CFG over the alphabet {(x)} with reductions S +(5) | S + (SS) | S +() True or false: the language of this CFG is precisely the set of non-empty strings over {()} with balanced brackets, including e.g. (),(0), (000)),... iii. The CFG over the alphabet {()} with reductions $+(1) | S +T(T) | S +(T((T)T)) | Sne | T +S True or false: the language of this CFG is precisely the set of (possibly empty) strings over {(,)} with balanced brackets, including e.g. 0, 0), (000)),.... iv. The CFG over the alphabet {a,!} with reductions S + HSHS S AH!! S + | H+SHS True or false: the CFG is left-recursive

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

Step: 3

blur-text-image

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

Which of the following is NOT a relational operator? 1. =

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago