Challeng in simplifying the Grammer

  • Context: Undergrad 
  • Thread starter Thread starter abdullahmogha
  • Start date Start date
  • Tags Tags
    Simplifying
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
abdullahmogha
Messages
2
Reaction score
0
challeng ! in simplifying the grammar

It is a challeng grammar to be simplified by removing all useless, unit, and epsilon (empty string)-productions:

S -> abAB |CD
A -> aBA |epsilon (empty string)
B -> ABb |A |epsilon (empty string)
C -> bb |CD
D -> bD


if no one answer it :smile:
 
Physics news on Phys.org


D is a useless symbol

The grammar produces all strings beginning with ab and followed any sequence of a and b symbols. An equivalent grammar follows:

S -> ab H
H -> Ha | Hb | epsilon