Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(d) This question is about CFGS (= context free grammars). For each of the following statements, state whether they are true or false. Each correct
(d) This question is about CFGS (= context free grammars). For each of the following statements, state whether they are true or false. Each correct answer gives 4 marks, each wrong answer gets -2 marks, omitted answers get O marks. Overall marks are capped from below to 0. Consider the following CFGs. In all cases S is the initial variable. i. The CFG over the alphabet {()} with reductions S + (S) S SS True or false: the language of this CFG are exactly the strings over the alphabet {()} that feature only balanced brackets, including e.g. ,0,00.0), (000),.... ii. The CFG over the alphabet {()} with reductions $+(T) | S +TT | S + | T +S True or false: the language of this CFG are exactly the strings over the alphabet {()} that feature only balanced brackets, including e.g. , (),00.0), (000)), .... iii. The CFG over the alphabet {(), +, *, -,0, 1} with reductions S + (S) S+S | S*S-S | 0 | 1 True or false: the CFG is ambiguous. iv. The CFG over the alphabet {()} with reductions S + (T) | S + TT S + | T +S True or false: the CFG is left-recursive
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started