CNF for S→bA|Ab, A→bAA|aS|a, B→aBB|bS|b
AnswerB is unreachable from S and can be removed. Introduce X→a, Y→b, D→AA. Then S→YA|AY; A→YD|XS|a; D→AA; X→a; Y→b. If the convention…
Read more →AnswerB is unreachable from S and can be removed. Introduce X→a, Y→b, D→AA. Then S→YA|AY; A→YD|XS|a; D→AA; X→a; Y→b. If the convention…
Read more →AnswerStart with bottom symbol Z. In push state p, for each input a or b and stack top X push that input…
Read more →AnswerUse one state q, initial stack S, empty-stack acceptance. With stack top written leftmost, add ε transitions replacing S by aABB or…
Read more →AnswerThe printed alphabet {a,b} conflicts with transitions on 0,1; the third transition uses undefined z. Assuming z means x, and the transition…
Read more →AnswerLiterally w∈(0+1) gives only 0c0 and 1c1. A finite-control TM can read the first bit, require c, match the stored bit and…
Read more →AnswerOnly tile 1 can begin, since tiles 2 and 3 have different initial symbols. After tile 1 the bottom has unmatched suffix…
Read more →AnswerType 3 regular grammars correspond to finite automata; type 2 context-free grammars to pushdown automata; type 1 context-sensitive grammars to linear bounded…
Read more →AnswerA context-free grammar is a tuple G=(V,Σ,P,S), with variables V, terminals Σ, productions P and start variable S. Each production has one…
Read more →AnswerThe diagram has initial q₀, final q₂, ε edge q₀→q₂, 1 edges in both directions between q₀ and q₁, 0 edges in…
Read more →AnswerA DFA has exactly one next state for every state and input symbol. An NFA can have zero, one or several next…
Read more →Ask a study question in English or Hindi. I will find relevant passages from our notes.