Question: ANSWER COMPLETE QUESTION 2. Question 2 a. Consider the following Context Free Grammar with nonterminals A and B, and terminal symbols: ' x ', '

 ANSWER COMPLETE QUESTION 2. Question 2 a. Consider the following Context

ANSWER COMPLETE QUESTION 2.

Question 2 a. Consider the following Context Free Grammar with nonterminals A and B, and terminal symbols: ' x ', ' y ' and ' z ': AABAzBxBYX i. If A is the starting symbol, then the string "zxxyyxz" can be derived from this context-free grammar. Give three other strings which can also be derived. [5 marks] ii. Explain what is meant by the term "left-recursive context free grammar" and explain whether the CFG given above is left recursive. [5 marks] iii. Draw a parse tree for the following string which can be derived by the above CFG: zxxyyxzz [5 marks] b. Consider the following NFA over alphabet {a,b} : i. Identify the start and final state(s) of the NFA. [2 marks] ii. Construct a Deterministic Finite Automaton (DFA) which is equivalent to the NFA by using the subset construction. [8 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!