L_{1} = { w ∈ {0,1}^{*} | w does not contain the substring 11 }.
L_{2} = { w ∈ {0,1}^{*} | w contains an even number of 0's and at most one 1 }.
B = { x ∈ { a, b, c }^{*} | the number of a's in x plus the number of b's in x equals the number of c's in x }.
B = { x ∈ { a, b, c }^{*} | the number of a's in x plus the number of b's in x equals the number of c's in x }.
CMSC451:
S → aS | aAShow that L(G) is equal to L_{1} = { a^{n}b^{m} | n > m ≥ 0 } by proving these two statements by induction:
A → aAb | ε
S ⇒^{*} w if and only if w ∈ L_{1}Make sure that you state the induction hypothesis, prove the base case and prove both directions of the "if and only if" for each statement.
A ⇒^{*} w if and only if w ∈ { a^{n}b^{n} | n ≥ 0 }
L_{2} = { a^{n} b^{m} c^{k} | n = m or m ≠ k }.Remember to document your grammar!
L_{3} = { w ∈ {a, b}^{*} | the number of a's in w does not equal the number of b's in w }Note: L_{3} contains strings not in a^{*}b^{*}, for example, aba ∈ L_{3}. Also, there might be more a's than b's or more b's than a's.
L_{4} = { w ∈ {a, b}^{*} | the number of a's in w is twice the number of b's in w }Note: L_{4} contains strings not in a^{*}b^{*}, for example, abaaaaabb ∈ L_{4}.
B = { w ∈ {0,1}^{*} | w has odd length and the middle symbol of w is 1 }.
L_{2} = { a^{i} b^{j} c^{k} | i ≠ j or j ≠ k }Note: a high-level English description of your PDA has comments like "push X whenever a 0 is read."
(a+a)*a+aAt main points in the execution of the PDA where the stack changes, show the content of the stack, the position of the input head and describe the rules used to change the content of the stack. (You can ignore the transitions into the special states whose sole purpose is to push symbols on the stack. Just show the contents of the stack after the PDA is done pushing.)
L_{2} = { a^{i} b^{j} c^{k} | i ≠ j or j ≠ k }Note: a high-level English description of your PDA has comments like "push X whenever a 0 is read."
CMSC451
{ w ∈ Σ* | there exist x ∈ A and y ∈ B such that w = xy }.There is no marker between x and y. Also, the Turing machine recognizing A or B need not halt when the input string is not in its language.
{ w ∈ Σ* | there exist x ∈ A and y ∈ B such that w = xy }.There is no marker between x and y. Also, the Turing machine recognizing A or B need not halt when the input string is not in its language.
A_{TM} = { ⟨ M, w ⟩ | M is a TM and M accepts w }Show that A_{TM} ≤_{m}-reduces to the language K_{17} defined below:
K_{17} = { ⟨ M ⟩ | L(M) contains at least 17 strings }
Note: as a consequece K_{17} is undecidable.
A_{TM} = { ⟨ M, w ⟩ | M is a TM and M accepts w }Show that A_{TM} ≤_{m}-reduces to the language K_{17} defined below:
K_{17} = { ⟨ M ⟩ | L(M) contains at least 17 strings }
Note: as a consequece K_{17} is undecidable.
COF = { < M > | M is a TM and L(M) is cofinite}Place COF and EQUIV in the Kleene Hierarchy by formulating the set using first-order quantifiers and a decidable predicate.
EQUIV = { < M_{1}, M_{2} > | M_{1} and M_{2} are TM's and L(M_{1}) = L(M_{2}). }
COF = { < M > | M is a TM and L(M) is cofinite}Place COF and EQUIV in the Kleene Hierarchy by formulating the set using first-order quantifiers and a decidable predicate.
EQUIV = { < M_{1}, M_{2} > | M_{1} and M_{2} are TM's and L(M_{1}) = L(M_{2}). }
COF = { < M > | M is a TM and L(M) is cofinite}Prove that FIN ≤_{m} COF. That is FIN reduces to COF via a many-one reduction (a.k.a. a "mapping" reduction).
FIN = { < M > | M is a TM and L(M) is finite}