Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the state diagram of a DFA recognizing the language A = L(0?1 ?2 ? ). 2. (10 points). In class (Monday April 29), we

Consider the state diagram of a DFA recognizing the language A = L(0?1 ?2 ? ). image text in transcribed

2. (10 points). In class (Monday April 29), we proved that every regular set is PDA-recognizable by modifying the state diagram of an NFA to get a PDA. In the book on page 107, the top paragraph describe:s a procedure for converting DFA to CFGs You can convert any DFA M-(190, . . . ,Yn), ?, ?, q0, F) into an equivalent CFG as follows. Make a variable Ri for each state q Of the DFA. Add the rule Ri ? aR, to the CFG if ?((qi,a)) qi is a transition in the DFA. Add the rule Ri ? if qi is an accept state of the DFA. Make Ro the start variable of the grammar Consider the state diagram of a DFA recognizing the language A- L(0"1*2*) 0 qo q2 a. What would the input alphabet of a PDA recognizing the complement of A be? What would the stack alphabet of a PDA recognizing the complement of A be? Draw the state diagram of this PDA recognizing the complement of A b. Use the process above to build a CFG G generating the complement of A. Specifically, fill in the blanks below: G (V, ?, R, S) where 2. (10 points). In class (Monday April 29), we proved that every regular set is PDA-recognizable by modifying the state diagram of an NFA to get a PDA. In the book on page 107, the top paragraph describe:s a procedure for converting DFA to CFGs You can convert any DFA M-(190, . . . ,Yn), ?, ?, q0, F) into an equivalent CFG as follows. Make a variable Ri for each state q Of the DFA. Add the rule Ri ? aR, to the CFG if ?((qi,a)) qi is a transition in the DFA. Add the rule Ri ? if qi is an accept state of the DFA. Make Ro the start variable of the grammar Consider the state diagram of a DFA recognizing the language A- L(0"1*2*) 0 qo q2 a. What would the input alphabet of a PDA recognizing the complement of A be? What would the stack alphabet of a PDA recognizing the complement of A be? Draw the state diagram of this PDA recognizing the complement of A b. Use the process above to build a CFG G generating the complement of A. Specifically, fill in the blanks below: G (V, ?, R, S) where

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions