L1 = { w ∈ {0,1}* | w does not contain the substring 11 }.
L2 = { 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 L1 = { anbm | n > m ≥ 0 } by proving these two statements by induction:
A → aAb | ε
S ⇒* w if and only if w ∈ L1Make 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 ∈ { anbn | n ≥ 0 }
L2 = { an bm ck | n = m or m ≠ k }.Remember to document your grammar!
L3 = { w ∈ {a, b}* | the number of a's in w does not equal the number of b's in w }Note: L3 contains strings not in a*b*, for example, aba ∈ L3. Also, there might be more a's than b's or more b's than a's.
L4 = { w ∈ {a, b}* | the number of a's in w is twice the number of b's in w }Note: L4 contains strings not in a*b*, for example, abaaaaabb ∈ L4.
B = { w ∈ {0,1}* | w has odd length and the middle symbol of w is 1 }.
L2 = { ai bj ck | 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.)
L2 = { ai bj ck | 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.
ATM = { 〈 M, w 〉 | M is a TM and M accepts w }Show that ATM ≤m-reduces to the language K17 defined below:
K17 = { 〈 M 〉 | L(M) contains at least 17 strings }
Note: as a consequece K17 is undecidable.
ATM = { 〈 M, w 〉 | M is a TM and M accepts w }Show that ATM ≤m-reduces to the language K17 defined below:
K17 = { 〈 M 〉 | L(M) contains at least 17 strings }
Note: as a consequece K17 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 = { < M1, M2 > | M1 and M2 are TM's and L(M1) = L(M2). }
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 = { < M1, M2 > | M1 and M2 are TM's and L(M1) = L(M2). }
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}