you teached it wrong, the correct answer is given below: Consider an example, where, TM T is defined as; T = ({q1, q2, q3}, {a, b} {a, b, B}, δ, q1, B, F), where δ is defined as δ(q1, b) = (q3, a, R) m1 δ(q3, a) = (q1, b, R) m2 δ(q3, b) = (q2, a, R) m3 δ(q3, B) = (q3, b, L) m4 Now, using the encoding function s defined above, as the rule, we have S(q1) = 000 S(q2) = 0000 S(q3) = 00000 S(a1) = 00 considering a1 = a & a2 = b S(a2) = 000 S(B) = 0 S(R) = 000 S(L) = 00 S(S) = 0 Now, encoding for rules e (m1) = S(q1) 1 S(b)1 S(q3)1 S(a)1 S(R) = 00010001000001001000 e (m2) = S(q3) 1 S(a)1 S(q1)1 S(b)1 S(R) = 00000100100010001000 e (m3) = S(q3) 1 S(b)1 S(q2)1 S(a)1 S(R) = 000001000100001001000 e (m4) = S(q3) 1 S(B)1 S(q3)1 S(b)1 S(L) = 00000101000001000100 Now the code for TM T is e(m1)11e(m2)11e(m3)11e(m4)=00010001000001001000 110000010010001000100011000001000100001001000 1100000101000001000100 For this machine T, for any input w, where w= ab, the code will be e(T)111e(w) Where e(w)= s(a)1s(b)=001000
@neelavathysangeetha7100Ай бұрын
i dont know what you have written above, but she is correct.