A devise a cfg that generates any subset of these options


Consider optional symbols X1 ......Xn as described in Exercise 11.

(a) Devise a CFG that generates any subset of these options. That is, the symbols can occur in any order, any symbol can be missing, and no symbol is repeated.

(b) What is the relation between the size of your grammar and n, the number of options?

(c) How is your solution affected if symbols Xi and Xj are present only if j?

Exercise 11

Section 4.3 describes extended BNF notation for optional and repeated symbol sequences. Suppose the grammar symbols X1........Xn represent a set of options. What is the effect of the following grammar with regard to how the options can appear?

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: A devise a cfg that generates any subset of these options
Reference No:- TGS01474526

Expected delivery within 24 Hours