Answered step by step
Verified Expert Solution
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 ? ).
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) whereStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started