30 likes | 230 Vues
L and L’ are Turing-recognizable, prove L is Turing-decidable. M TR. <w>. accept. w. B. accept. w. accept. reject. A. B checks if string w is in L, A checks if w is in L’ M TR halts because w is in either L or L’; B and A are run once.
E N D
L and L’ are Turing-recognizable, prove L is Turing-decidable MTR <w> accept w B accept w accept reject A • B checks if string w is in L, A checks if w is in L’ • MTR halts because w is in either L or L’; B and A are run once
Exercise 4.3MS* = {<Z> | Z is a DFA, L(Z) = S*} MS* accept <Z> reject <Z> MEQdfa reject <E> accept F • F creates DFA E such that L(E) = S* • MEQdfa accepts if L(Z) = L(E), rejects otherwise. • MS* accepts if and only if L(Z) = L(E) if and only if L(Z) = S* • MS* halts because F, MEQdfa are decidable and run only once
Exercise 4.2: MT = {<B,E> | B is a DFA, E is a regular expression and B = E } MT <B,E> <B> accept accept MEQdfa reject <F> <E> reject D • D converts regular expression E into equivalent DFA F • MEQdfa accepts if L(B) = L(F), rejects otherwise • MT accepts if and only if L(B) = L(F) if and only if L(B) = L(E) • MT halts since D and MEQdfaare deciable and run once