40 likes | 114 Views
#2: Does TM M ever enter the 5 th cell on the tape?. M C5. Acc. Acc. <M,w>. <M,w>. U. Rej. Rej. U simulates M on input w for 5qg 5 steps. U accepts if M enters the 5 th cell, rejects if M accepts, rejects, or infinitely loops before the end of the steps.
E N D
#2: Does TM M ever enter the 5th cell on the tape? MC5 Acc Acc <M,w> <M,w> U Rej Rej • U simulates M on input w for 5qg5steps. U accepts if M enters the 5th cell, rejects if M accepts, rejects, or infinitely loops before the end of the steps. • MC5 is decidable since U is decidable and run once.
#4: Given <M,w>, does TM M traverse a path from state x to state y with input w? MAcc Acc Acc <M,w> <M,w> <M,w,x,y> Q F Rej Rej • Q receives a TM M and input w, and outputs <M, w, x, y> with x = start state and y = accept state. • F (our TM) receives <M, w, x, y> and accepts if M traverses a path from x to y, rejects if not. • MAcc is decidable since Q and F are decidable and run once.
#5a: Turing-recognizable languages are closed under union. MRU Acc <M,w> Acc U OR <M,N,w> Acc U <N,w> • U simulates TM M on string w, and TM N on string w • If w is in either L(M) or L(N), then MRU will accept w
#5b: Turing-decidable languages are closed under union. MDU Acc <M,w> Acc U OR Rej <M,N,w> Acc Rej U Rej <N,w> • U simulates TM M on string w, and TM N on string w • If w is in either L(M) or L(N), then MDU will accept w. If w is in neither L(M) nor L(N), then MDU will reject w.