Give context-free grammars generating the following languages. A a. The set of strings over the alphabet {a,b}
Question:
Give context-free grammars generating the following languages.
Aa. The set of strings over the alphabet {a,b} with more a’s than b’s
b. The complement of the language {anbn| n ≥ 0}
Ac. {w#x| wR is a substring of x for w, x ∈ {0,1}*}
d. {x1#x2# · · · #xk| k ≥ 1, each xi ∈ {a, b}*, and for some i and j, xi = xRj
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 88% (9 reviews)
A a S a S b Sa b S a ...View the full answer
Answered By
Dennis Nyangau
I have been tutoring for several years now, and I absolutely love it! I love being able to help students one-on-one and see them succeed. It is so gratifying to see a student understand a concept that they were struggling with before. I also enjoy getting to know my students and helping them to reach their full potential.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Give context-free grammars that generate the following languages. In all parts, the alphabet is {0,1}. Aa. {w| w contains at least three 1s} b. {w| w starts and ends with the same symbol} c. {w| the...
-
Give a counterexample to show that the following construction fails to prove that the class of context-free languages is closed under star. Let A be a CFL that is generated by the CFG G = (V, ,R, S)....
-
For each of the following languages, give two strings that are members and two strings that are not membersa total of four strings for each part. Assume the alphabet = {a,b} in all parts. a. a * b *...
-
Various statistical software packages tend to provide different measures of association. Use statistical software to calculate the Goodman-Kruskal gamma, Somers D, or Kendalls tau-a for the space...
-
(A) Find the slope of the line that passes through the give, points. (B) Find the standard form of the equation of the Hue. (C) Find the slope-intercept form of the equation of the lint (2.0) and...
-
An object of mass 5.00 kg, attached to a spring scale, rests on a frictionless, horizontal surface as in Figure P6.21. The spring scale, attached to the front end of a boxcar, has a constant reading...
-
Modify the scheme (7.39) for the Burgers equation by changing the central difference approximation of the convective term to the upwind approximation. Assume that \(u\) is always positive. How does...
-
Mortonson Company has not yet prepared a formal statement of cash flows for the 2012 fiscal year. Comparative balance sheets as of December 31, 2011 and 2012, and a statement of income and retained...
-
A writer of a call option will want the value of the underlying asset to ________ and a buyer of a put option will want the value of the underlying asset to ________. A. decrease, increase B....
-
A packing crate of mass 40 kg must be moved to the left along the floor without tipping. Knowing that the coefficient of static friction between the crate and the floor is 0.35, determine (a) The...
-
Give informal descriptions and state diagrams of pushdown automata for the languages in Exercise 2.4. Exercise 2.4. Answer each part for the following context-free grammar G. R XRX | S S aT b | bT...
-
Give informal English descriptions of PDAs for the languages in Exercise 2.6. Exercise 2.6. Answer each part for the following context-free grammar G. R XRX | S S aT b | bT a T XTX | X | X a | b...
-
An analysis of transactions for Foley & Co. was presented in E18. Assume that August is the companys first month of business. In E18, An analysis of the transactions made by Foley & Co., a certified...
-
All income and losses are allocated in a ratio of 3 : 2 : 1 . 2 . At the time of liquidation, their balance sheet showed the following: ABC Partnership Balance Sheet December 3 1 , 2 0 2 3 . Assets...
-
What is the present value of a $1,300 payment made in five years when the discount rate is 10 percent? (Do not round intermediate calculations. Round your answer to 2 decimal places.) Present value
-
Calculate the two-sided 95% confidence interval for the population standard deviation (sigma) given that a sample of size n=5 yields a sample standard deviation of 18.45. Your answer: 0.99 < sigma <...
-
What is the daily revenue? What is the staffing level? What would be the profits per hour? How many defects would there be in one million units? To what level would they have to reduce the standard...
-
Bell Inc.'s tax rate was 25% last year. Last year, the company realized $1,500,000 in operating income (EBIT). Its annual interest expense is $1,000,000. What was the company's net income for the...
-
1. An investor deposits $100 on the first day of each month in an account that pays 2% interest, compounded monthly. The balance A in the account at the end of 5 years is A = 100 (1 + 0.02 / 12)1 + ....
-
Will the prediction interval always be wider than the estimation interval for the same value of the independent variable? Briefly explain.
-
Describe an implementation of the positional list methods addLast and addBefore realized by using only methods in the set {isEmpty, first, last, before, after, addAfter, addFirst}.
-
The add method for a dynamic array, as described in Code Fragment 7.5, has the following inefficiency. In the case when a resize occurs, the resize operation takes time to copy all the elements from...
-
Suppose we are maintaining a collection C of elements such that, each time we add a new element to the collection, we copy the contents of C into a new array list of just the right size. What is the...
-
Service Revenue H&R Wholesalers is a retailer providinglow cost, bulk items to small companies. Companies must pay anannual membership fee of $200 to access H&R's warehouses.H&R receive 2 answers
-
Steve,following extensive injuries in an auto accident , was dearedmentally incompetent. he imagined himself to me in command of alarge army engagedin protecting the country. Steve ordered several 2...
-
HELP ME ASAP Calculating Average Operating Assets, Margin, Turnover, and Return on Investment East Mullett Manufacturing earned operating income last year as shown in the following income statement:...
Study smarter with the SolutionInn App