automata theory - How to construct a grammar that generates language L? -


i'm in formal languages class , have grammar quiz coming up. i'm assuming appear.

consider alphabet ∑ = {a, b, c}. construct grammar generates language l = {bab^nabc^na^p : n ≥ 0, p ≥ 1}. assume start variable s.

it long time since worked formal languages last time, so, please, forgive rustyness, language: divide s prefix variable (a) , suffix variable (b). then, handle prefix , suffix separately, both of them have possible rule of further recursion, , end sign of empty, no occurrence required , constant @ least occurrence required.

{bab^nabc^na^p : n ≥ 0, p ≥ 1}  s -> asb -> babaabc -> {empty} b -> ba b -> 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -