Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Context Free Grammar (eliminate the unit of production rules)

  1. Jun 30, 2012 #1
    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:
     
  2. jcsd
  3. Jun 30, 2012 #2

    I like Serena

    User Avatar
    Homework Helper

    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...
     
  4. Jul 3, 2012 #3

    chiro

    User Avatar
    Science Advisor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Context Free Grammar (eliminate the unit of production rules)
  1. Free Product (Replies: 22)

  2. Free Products II (Replies: 16)

Loading...