Results 1 to 2 of 2

Thread: Writing Grammar Problems

  1. #1
    Junior Member
    Joined
    Jun 2017
    From
    San Diego
    Posts
    25
    Thanks
    1

    Question Writing Grammar Problems

    I have a grammar problem that I just re-did and I'd like to hear your feed back on it:

    Given the alphabet {a, b} write a grammar for the following language:
    The language that has/accepts all strings that start with an a

    Answer:

    1. S → AB
    2. A→ a
    3. B→ b
    4. A → Aa
    5. B → Bb
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2010
    Posts
    2,706
    Thanks
    1033

    Re: Writing Grammar Problems

    This will give only strings that start with a string of $a$'s and end with a string of $b$'s. There is no way to get, for example, $aba$
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. More Grammar Problems
    Posted in the Math Philosophy Forum
    Replies: 13
    Last Post: Jun 24th 2017, 05:10 AM
  2. Word problems/ Writing and solving equations
    Posted in the Algebra Forum
    Replies: 2
    Last Post: Jun 19th 2016, 05:58 AM
  3. Simplification grammar
    Posted in the Discrete Math Forum
    Replies: 17
    Last Post: Jun 30th 2010, 05:16 AM
  4. Grammar problem
    Posted in the Discrete Math Forum
    Replies: 12
    Last Post: Jun 29th 2010, 05:42 AM
  5. Writing Word Problems
    Posted in the Algebra Forum
    Replies: 1
    Last Post: Jan 2nd 2008, 12:01 PM

Search Tags


/mathhelpforum @mathhelpforum