S = "On input <M,w>,
1. Using M and w, construct a new TM named M_w
2. Run R on <M_w>
3. If R accepts, then ACCEPT; otherwise REJECT
M_w = "On input x,
1. If x = 01, then ACCEPT
2. Else if x = 10, then
a. Run M on w
b. If it accepts, then ACCEPT; otherwise REJECT
3. Else REJECT
M_A = " On input w,
1. Compute f(w)
2. Run M_B on f(w) and output whatever it does"
M_f = On input <M, w>
1. Construct a Turing machine description M_w by:
M_w = "On input x,
1. If x = 01, then ACCEPT
2. Else if x = 10, then
a. Run M on w
b. If it accepts, then ACCEPT; otherwise REJECT"
2. Return <M_w>"