Match the word with its description. A → ε Choose... the sequence of substitutions to obtain a string Choose... removing a symbol from the stack Choose... a collection of substitution rules Choose... * Choose... writing a symbol on the stack Choose... u → v Choose... A → BC Choose... A → a a depiction of the derivation Choose... like nondeterministic finite automata but with a stack Choose... A → B Choose... a grammar generates the same string in several different ways Choose... provides additional memory beyond the finite amount available in the control Choose... contains the input string Choose... at every step the leftmost remaining variable is the one replaced Choose... Check
Added by Kimberly V.
Close
Step 1
Step 1: A → ε is the sequence of substitutions to obtain a string. Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 101 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Q 8. Consider the context-free grammar G with terminal symbols T = {x, y, e, -1, (, )}, non-terminal symbols N = {σ, F, B}, starting symbol σ, and production rules σ → Fσ | F F → B | B-1 B → x | y | e | (Fσ) Note that we are regarding -1 as a single symbol. The string B-1, for example, has length 2; it is the symbol B followed by the symbol -1. (a) Give leftmost derivations in G for each of the following strings. (i) e-1 (ii) y-1x-1 (iii) xyx-1y-1 (b) Use the method of Lecture 8B 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 y-1x-1. Your answer to (a)(ii) will be useful.
Adi S.
Akash M.
Design a pushdown automaton which accept strings of the form 1*0n1n and one which accepts strings which contain twice as many zeros as ones. Can pushdown automata accept sets of strings of the form: a) 0n1*[(0 + 11)*(1 + 00)*]*0*1n b) ww where w is a string of zeros and ones c) ww where w is a string of zeros Prove that acceptance by empty stack is equivalent to accepting by final state for pushdown automata. Provide pushdown machines that accept sets of strings composed of zeros and ones which are: a) of the form 1n 0n or 1n 02n. b) not of the form ww. Consider pushdown automata that write output on separate one directional tapes (that is, they never go back to change any of what they have written). This basically means that they may write a string as part of each instruction. Design a machine that changes infix arithmetic expressions to postfix expressions. Design a pushdown machine that generates output which will change postfix expressions into assembly language code. Define pushdown automata with two stacks. Prove that they can simulate Turing machines. When a pushdown machine executes an instruction and does not move its reading head, we say that it has made an epsilon move. Does this new capability add power to these automata? Why?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD