Results 1 to 3 of 3

Math Help - context-free grammar

  1. #1
    Junior Member
    Joined
    May 2010
    Posts
    26

    context-free grammar

    Hey guys!


    I came across the question in my tutorial. Mind you the text book was no help. Any one who could help would be greatly appreciated!!!

    Find the context-free grammar for the follwoing language:
    L= {a^n b^m c^k : n +2m = k}
    with n≥0, m≥0, k≥0

    Thanx!!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by extatic View Post
    Hey guys!


    I came across the question in my tutorial. Mind you the text book was no help. Any one who could help would be greatly appreciated!!!

    Find the context-free grammar for the follwoing language:
    L= {a^n b^m c^k : n +2m = k}
    with n≥0, m≥0, k≥0

    Thanx!!
    I spent some time looking over the examples in this article on Wikipedia, and I think this works:

    S → aSc | A
    A → bAcc | ε

    Example 7 is pretty similar so it wasn't too hard.

    Fun problem!
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    May 2010
    Posts
    26
    Thankyou undefined. Your response has been most helpful!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Proof Please: Context Free Grammar
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: April 28th 2011, 07:10 PM
  2. Context free grammar question.
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: April 25th 2011, 04:09 PM
  3. context-free grammar
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: March 27th 2011, 11:51 AM
  4. Context-free grammar
    Posted in the Discrete Math Forum
    Replies: 16
    Last Post: June 29th 2010, 09:41 AM
  5. context-free language and grammar
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: June 28th 2010, 04:42 PM

Search Tags


/mathhelpforum @mathhelpforum