Let L be the set of exactly those strings over the alphabet \Sigma = {a, b, c, g}, that satisfy all of the following properties: the length of the string is equal to 5n+3, for some natural number n greater or equal than 0; all of the first (leftmost) 2n symbols are elements of the set {b, c, g}; all of the last (rightmost) 3n symbols are elements of the set {a, b}; the symbols at position 2n+1, 2n+2, and 2n+3 (from the left, i.e., after the first 2n symbols but before the last 3n symbols) are elements of the set {c, g}; Write a complete formal definition of a context free grammar that generates L. If such a context free grammar does not exist, state that the context free grammar does not exist, and prove it.

Answers

Answer 1

Answer:

S -> LSR

S -> M

M -> YYY

Y -> c | g

L -> XX

X -> b | c | g

R -> ZZZ

Z -> a | b

Explanation:

This is a long time ago, but I think this does what you want.

Start symbol S expands to LSR and allows you to grow L and R on either side as much as you want. Ultimately S must be replaced by M. Then you have a pattern like LLLLLMRRRRR.

We can then further break down L into 2 times b, c or g, and similar for M and R.


Related Questions

In the header element, insert a navigation list containing an unordered list with the items: Home, Race Info, and FAQ. Link the items to the dr _index.html, dr_info.html, and dr_ faq.html files respectively.
Home
Race info
FAQ

Answers

Answer:

Explanation:

The following is a barebones HTML document that contains the Unordered List inside the header tag as requested. The list items are also wrapped around links so that they link to the requested pages and take you there when they are clicked. These html files need to be in the same folder as this code in order for it to take you to those pages. The code can be seen below.

<!DOCTYPE html>

<html>

<head>

<ul>

   <li><a href="dr _index.html">Home</a></li>

   <li><a href="dr_info.html">Race Info</a></li>

   <li><a href="dr_ faq.html">FAQ</a></li>

</ul>

</head>

<body>

</body>

</html>

Other Questions
PLEASE HELP! I WILL GIVE BRAINLIEST!?! Attorney General A. Mitchell Palmer is best known for his association with theA Lindbergh kidnapping case.B Scopes Monkey Trial.C Teapot Dome Scandal.D Red Scare. Please answer help me here PLEASE HELP Makayla owns a small business selling used books. She knows that in the last week 58 customers paid cash, 25 customers used a debit card, and 2 customers used a credit card.Based on these results, express the probability that the next customer will pay with a debit card as a fraction in simplest form. the pattern continues, what would be the eighth number in the pattern?4. 25, 28, 32, 37, 43 ______ PLS HELP ME Rosc has $500 in her savings account. She carnis simple interest at 5%Calculate the interest she carnis after two year. What is the rapid change in a membrane's potential caused by the depolarization of a neuron? Keith played the first 22 minutes of soccer game lohan then replaced him for the rest of half logan started the second half and was replaced by wilson with 18 minutes left in the game if each half is 40 minutes ling how long did logan play during the second half Help pls help pls help pls Which number is equivalent to 2^3x = 10 given the figure below find the value of x and z Advancements in technology often make computerhardware and software more convenient to use aswell as able to fit a variety of budgets. Astechnology advances, it usually getssmaller and less expensive.larger and more expensive. Which of the layers has the most interaction with the other spheres of Earth?MantleInner CoreCrustOuter Core Wilcox, chief executive officer and chairman of the board of directors, owned 60 percent of the shares of Sterling Corporation. When the market price of Sterlings shares was $22 per share, Wilcox sold all of his shares in Sterling to Conrad for $29 per share. The minority shareholders of Sterling brought suit against Wilcox demanding a pro rata share of the amount Wilcox received in excess of the market price. a. What are the arguments to support the minority shareholders claim for a pro rata share of the amount Wilcox received in excess of the market price? b. What are the arguments to reject the minority shareholders claim for a pro rata share of the amount Wilcox received in excess of the market price? c. Which side should prevail? Find the height of the pyramid. What is the purpose of the lines that are underlined?O These are answers to topic questions, and theparagraphs after them explain the answers.O These are summary points so that the reader couldjust read these lines and understand the passage.O These are conclusions that summarize all of theinformation in the paragraphs before them.O These are headings that give titles to the topics beingdiscussed in the paragraphs after them. What is the surface area of the cylinder with height 4 in and radius 5 in? Round your answer to the nearest thousandth . please help! I cant get a bad grade on this!Read Hakeem's thesis statement from his biographical essay on Queen Elizabeth I.Queen Elizabeth I of England proved that a woman could be a strong and effective monarch.Which evidence is best for Hakeem to include in the body paragraphs of his essay?quotes about Queen Elizabeth struggling with illness from smallpoxmaps that show where Queen Elizabeth was born and where she diedexamples of ways that Queen Elizabeth changed her country for the betterexplanations of why Queen Elizabeth is a role model for young people today what challenges did the civil right Movment face What is the Importance of sales promotion