Question: When we apply the CYK algorithm to the grammar S -> AB A -> BB | a B -> AA | b and the input

When we apply the CYK algorithm to the grammar

S -> AB

A -> BB | a

B -> AA | b

and the input babba,

What is the value of X24, that is, the set of variables that derive the string from positions 2 to 4 of the input? (Check all and only the members of X24).

A

B

S

unanswered

The following questions are based on the following grammar:

S -> AB | b

A -> aA |

B -> CD

C -> bA | AA

D -> AB | BC

For each question, to get credit you must check all and only the symbols that have the stated property.

(a) Check all and only the nullable symbols.

S

A

B

C

D

unanswered

(b) Check all and only the variables that derive a terminal string.

S

A

B

C

D

unanswered

Now, modify the grammar to eliminate all productions that involve one or more symbols that do not derive a terminal string.

(c) Check all and only the variables that appear in some sentential form derived from S using this modified grammar.

S

A

B

C

D

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!