Context Free Grammar (eliminate the unit of production rules)

  • Level: Undergrad 
  • Thread starter Thread starter zulkifli
  • Start date Start date
  • Tags Tags
    Rules Unit
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 3K views
zulkifli
Messages
4
Reaction score
0
I have grammar

S → ABaC | BaC | AaC | ABa | aC | Aa | Ba | a
A → B | C | BC
B → b
C → D
D → d

Can someone please help me to eliminate all the rules of grammar production unit. Thanks for help! :biggrin:
 
Physics news on Phys.org
zulkifli said:
I have grammar

S → ABaC | BaC | AaC | ABa | aC | Aa | Ba | a
A → B | C | BC
B → b
C → D
D → d

Can someone please help me to eliminate all the rules of grammar production unit. Thanks for help!

Welcome to PF, zulkifli! :smile:

Did you try anything?
What do you think you should do?
We can help you better if we can tell what it is you're having difficulties with...
 
Hey zulkifli and welcome to the forums.

Some quick hints is to simplify the last three tokens (as they just point to single elements and can be substituted) and then to simplify the OR statements by recognizing duplicate entities and other simplifications.