(b) What is the shortest word in * accepted by P? Show that your chosen word...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(b) What is the shortest word in Σ* accepted by P? Show that your chosen word is accepted. (c) Is the language L(P) accepted by P a regular language? If so, give a regular expression. If not, explain why not. -1 Q 9. Consider the context-free grammar G with terminal symbols T- {. y.c.¹, (,)}, non-terminal symbols N = {o. F. B), starting symbol o, and production rules F→BB-¹ B→ o + Fo | F →x|ye| (Fo) Note that we are regarding 1 as a single symbol. The string B1, for example, has length 2; it is the symbol B followed by the symbol -¹. (a) Give leftmost derivations in G for each of the following strings. (i) ee (ii) (ry)-¹(iii) gry-¹ (iv) x(er)-¹ (b) Use the method of Lecture SB to draw the transition diagram of a PDA accepting the language generated by G. State the input alphabet and the stack alphabet of your PDA. (c) Show how your PDA in (b) accepts the string (ay)-¹. Your answer to (a)(ii) will be useful. Q 10. Design a PDA accepting (021n | ne No}. You should specify your PDA with a transition diagram, and also clearly state your chosen stack alphabet. The following question is a proof question. It will be worth 2% of your final mark, so you are strongly advised to attempt it. (b) What is the shortest word in Σ* accepted by P? Show that your chosen word is accepted. (c) Is the language L(P) accepted by P a regular language? If so, give a regular expression. If not, explain why not. -1 Q 9. Consider the context-free grammar G with terminal symbols T- {. y.c.¹, (,)}, non-terminal symbols N = {o. F. B), starting symbol o, and production rules F→BB-¹ B→ o + Fo | F →x|ye| (Fo) Note that we are regarding 1 as a single symbol. The string B1, for example, has length 2; it is the symbol B followed by the symbol -¹. (a) Give leftmost derivations in G for each of the following strings. (i) ee (ii) (ry)-¹(iii) gry-¹ (iv) x(er)-¹ (b) Use the method of Lecture SB to draw the transition diagram of a PDA accepting the language generated by G. State the input alphabet and the stack alphabet of your PDA. (c) Show how your PDA in (b) accepts the string (ay)-¹. Your answer to (a)(ii) will be useful. Q 10. Design a PDA accepting (021n | ne No}. You should specify your PDA with a transition diagram, and also clearly state your chosen stack alphabet. The following question is a proof question. It will be worth 2% of your final mark, so you are strongly advised to attempt it.
Expert Answer:
Answer rating: 100% (QA)
Answer Part 1 Reviewing CFGs and PDAs CFGs ContextFree Grammars Define the structure and generation rules for strings in a language They consist of Te... View the full answer
Related Book For
Posted Date:
Students also viewed these mathematics questions
-
How much of the return in Problem 1 came from dividend yield and how much came from capital gain?
-
How much of the smooth transition, if any, do you think comes from both companies glossing over real differences in an effort to make the merger work?
-
Caro Manufacturing has two production departments, Machining and Assembly, and two service departments, Maintenance and Cafeteria. Direct costs for each department and the proportion of service costs...
-
Let F = [F] lb. a) Determine the force Fp acting at roller D. b) Determine the force FE acting at pin E. F 4 ft B 600 lb. ft -3 ft C -3 ft OD -2 ft- E
-
Which aqueous solution has the lower boiling point, 0.10 m KCl or 0.10 m CaCl2?
-
Nomo Co. follows the practice of recording prepaid expenses and unearned revenues in balance sheet accounts. The companys annual accounting period ends on October 31, 2011. The following information...
-
Can you present a graphic that presents the payroll disbursement amounts by date for the contact employee who has been terminated but has been paid after termination (i.e., ghost employees)?
-
Entries for Held-to-Maturity Securities on January 1, 2009, Roosevelt Company purchased 12% bonds, having a maturity value of $500,000, for $537,907.40. The bonds provide the bondholders with a 10%...
-
Phelps competed at the Olympics. He won several gold medals and cash prizes, all worth $300,000. In addition, in the year that Phelps competed in the Olympics, he received several commercial...
-
Fill in the missing reagents below. Me OEt ?| Br Me SH OEt OMe OEt CN
-
2. Write a query to display the checkout number, check out date, and due date for all books that has ever been checked out, sorted by checkout number. (See the figure below for first part of the...
-
Which statement is true? a) The utility of a plasma TV is greater than the utility of a 2001 Honda Accord. b) A $50 ticket to a Broadway show provides the ticket-holder with more utility than a $100...
-
Which statement is true? a) All monopolists products have close substitutes. b) Most fi rms in the United States are monopolies. c) There are no monopolies in the United States. d) A monopoly is a...
-
If food were free in your school cafeteria, you would keep eating until _____. a) your total utility was zero. b) your marginal utility was zero. c) your consumer surplus was zero. d) you were sick.
-
A firm will operate in the short run as long as _______ are greater than __________; a firm will operate in the long run as long as ____________are greater than ________.
-
Price gouging will _____. a) raise consumer surplus b) lower consumer surplus c) have no effect on consumer surplus
-
redundancy. Part 2 (4 pts): Write pseudocode for E. Make sure your pseudocode is structured and accomplishes the same tasks as the flowchart segment. The pseudocode needs to be simplified d. U No V...
-
The Zwatch Company manufactures trendy, high-quality moderately priced watches. As Zwatch's senior financial analyst, you are asked to recommend a method of inventory costing. The CFO will use your...
-
NoGrowth Corporation currently pays a dividend of $0.50 per quarter, and it will continue to pay this dividend forever. What is the price per share of NoGrowth stock if the firms equity cost of...
-
You are an entrepreneur starting a biotechnology firm. If your research is successful, the technology can be sold for $30 million. If your research is unsuccessful, it will be worth nothing. To fund...
-
Which do you prefer: a bank account that pays 5% per year (EAR) for three years or a. an account that pays 2.5% every six months for three years? b. an account that pays 7.5% every 18 months for...
-
A cylinder of mass \(M\), moment of inertia \(I\) about the cylindrical axis and radius \(R\) rolls on a horizontal surface without slipping. (a) Express the no-slip constraint in differential form....
-
A block of mass \(m\) slides without friction on a larger block of mass \(M\) and is attached to a pin in this block by a massless spring with spring constant \(k\). All motion is in one dimension....
-
A bead of mass \(m\) is threaded without friction on a massless wire hoop of radius \(R\) that is forced to oscillate vertically in a fixed vertical plane at angular frequency \(\omega\) and with...
Study smarter with the SolutionInn App