Results 1 to 2 of 2

Thread: Formal Language Theory Help Continued- Grammar

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

    Question Formal Language Theory Help Continued- Grammar

    I need help with these grammar problems:

    1- S AB
    2- A f
    3- A g
    4- B y
    5- B z


    Remember that the names of the non-terminal elements (the letters S, A, and B) are chosen arbitrarily, although by convention the letter S is used for the initial state of the string. This


    grammar describes a language defined over the alphabet {f, g, y, z}. Initially your string is
    S. A sample derivation for one of the strings this grammar can produce (gy) is given below:

    1- S is replaced by AB (using rule 1). So now instead of S we have AB.
    2- The A in AB is replaced by g (using rule 3). So now we have gB
    3- B is replaced by y (using rule 4). So now we have gy

    Obviously gy is not the only string this grammar can produce. There are a total of four strings that this grammar produces. The set of these four strings is the language defined by the given grammar. Write these four strings!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2010
    Posts
    2,530
    Thanks
    961

    Re: Formal Language Theory Help Continued- Grammar

    fy,gy,fz,gz
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Need Help With Formal Language Theory
    Posted in the Math Philosophy Forum
    Replies: 1
    Last Post: Jun 22nd 2017, 11:58 AM
  2. Replies: 2
    Last Post: Aug 9th 2013, 10:06 AM
  3. context-free language and grammar
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: Jun 28th 2010, 04:42 PM
  4. Formal Grammar and finite state acceptors
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: Apr 16th 2010, 05:21 AM
  5. Forming a language with Regular Grammar
    Posted in the Discrete Math Forum
    Replies: 5
    Last Post: Jan 26th 2010, 01:54 AM

Search Tags


/mathhelpforum @mathhelpforum