M = On input <B,w>
1. Simulate B on w
2. If B accepts, then ACCEPT
3. If B rejects, then REJECT
M = On input <A> where A is a DFA
1. Mark the starting state of A
2. Repeat until no more states can be marked this way:
a. Iterate over each marked state and mark the states that
are immediately adjacent to it
3. Check to see if every marked state is an accepting state,
if so, ACCEPT, if not, REJECT
R = "On input <M,k> where M is a TM and k >= 0,
1. For each x in {w | w is a string with |w| <= k}
a. Run M on x
b. If M accepts, then ACCEPT
2. REJECT"
R = "On input <M,k> where M is a TM and k >= 0,
1. For each n = 1, 2, 3, 4, ...
a. For each x in {w | w is a string with |w| <= k}
b. Run M on x for n steps
c. If M accepts, then ACCEPT
R = "On input <M,k> where M is a TM and k >= 0,
1. For each n = 1, 2, 3, 4, ...
a. For each x in {w | w is a string with |w| <= k}
i. Run M on x for n steps
ii. If M accepts, then ACCEPT
M_AB = On input w,
1. Nondeterministically choose a number, k, between 0...|w|
2. Let x:=w[:k] and y:=w[k:] (note that w = xy)
3. Simulate M_A on x and M_B on y in parallel---alternating steps
4. If both machines accept, then ACCEPT; otherwise REJECT
M_AB = On input w,
1. Nondeterministically choose a number, k, between 0...|w|
2. Let x:=w[:k] and y:=w[k:] (note that w = xy)
3. Simulate M_A on x and M_B on y in parallel---alternating steps
4. If both machines accept, then ACCEPT; otherwise REJECT
M_AB = On input w,
1. Nondeterministically choose a number, k, between 0...|w|
2. Let x:=w[:k] and y:=w[k:] (note that w = xy)
3. Simulate M_A on x and M_B on y in parallel---alternating steps
4. If both machines accept, then ACCEPT; otherwise REJECT
U = On input <M,w> where M is a Turing machine
1. Simulate M on w
2. If M halts, then ACCEPT
M_A = "On input <n>, an integer,
1. Run M_B on <n,2,0>
2. If M_B accepts, then ACCEPT
3. If M_B rejects, then REJECT"
M_A = "On input <n>, an integer,
1. Run M_B on <n,2,0>
2. If M_B accepts, then ACCEPT
3. If M_B rejects, then REJECT"
S = "On input <M,w> where M is a Turing machine,
1. Construct a Turing machine named M* from M and w
2. Run the machine R on <M*>
3. If R accepts, then ACCEPT; otherwise REJECT"
M* = "On input x,
1. If x != w, then ACCEPT
2. If x == w, then run M on w
3. If M halts, then ACCEPT; otherwise enter an infinite loop"