Back to the 2019 paper

Module 2: Context-free languages and pushdown automata

20197m

Using the following grammar
S→AB∣BCS \to AB \mid BC
A→BA∣aA \to BA \mid a
B→CC∣bB \to CC \mid b
C→AB∣aC \to AB \mid a

use the CYK algorithm to determine whether the given string baababaaba is in L(G)L(G) or not.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.