50 likes | 226 Views
L HALT = {<M,w> | TM M halts on w}. M A. accept. accept. <M,w>. S. reject. start. M HALT. Acc. reject. OR. reject. S simulates M on input w M HALT will reject those inputs that don’t halt If input does halt, simulation started and result is output
E N D
LHALT = {<M,w> | TM M halts on w} MA accept accept <M,w> S reject start MHALT Acc. reject OR reject • S simulates M on input w • MHALT will reject those inputs that don’t halt • If input does halt, simulation started and result is output • So, input <M,w> rejected if M rejects w or if M doesn’t halt on w
LHALT Proven Undecidable • The real issue is that MHALT cannot exist • If it did, then we could decide MA • Even if MA could be built, it cannot be decided • That was proven earlier via the diagonalization method • Therefore, contradiction: LHALT is not decidable
L{} = {<M> | L(M) = { } } MA accept <M,w> reject <M’> B M{} reject accept M’ accept w A x (any arbitrary string) M R reject • B constructs M’ as follows • M’ throws x away internally, but appears to accept or reject it depending on how M deals with w • M{} will accept if L(M’) = {} which implies M rejects w • M{} will reject if L(M’) != {} which implies M accepts w • So, L(M’) hinges on how M deals with w
LP = {<M> | L(M) has property P } MA accept <M,w> accept <M’> A MP reject reject M’ w A A M start A x MQ R R • A constructs M’ as follows • MQ is a language known to have property P • So, if M accepts w, it runs x through MQ and L(M’) = L(MQ) • If M rejects w, L(M’) = {} (Note: we will assume without loss of generality that {} does not have property P) • Therefore M’ will have property P if and only if M accepts w
LREG = {<M> | L(M) is regular } MA accept <M,w> accept <M’> T MREG reject reject M’ A A OR w MQ x A R M • T constructs M’ as follows • Establish L(MQ) = 0n1n which, of course, is not regular • If MQ rejects x, then M is run on w • If M accepts w, then M’ accepts everything (so L(M’) is regular) • If M rejects w, L(M’) = 0n1n (i.e. L(M’) is not regular) • Therefore L(M’) is regular if and only if M accepts w start R