The question itself:
Let us define a generalization of Turing Machines to include a finite memory of >size $n$.
We denote such a Turing Machine formally as:
$M_{mem} = (Q, Σ, γ, δ_{mem}, n, q_0, q_a, q_r)$
where all the definitions are identical to the standard Turing Machine except >that there is the finite memory size n and the transition function δmem. At each >step, the transition depends on the current state, the input on the tape and all the memory. The transition to the >next step can update the entire memory.
Formally: $δ_{mem} : Q × Γ × Γ^n → Q × Γ × Γ^n × {L, R}$.
Given a finite memory Turing Machine $M_{mem}$, define $formally$ a (standard) Turing Machine $M$ such that $L(M) = L(M_{mem})$. Namely, both Turing Machines accept the same language.
my approach
I am asked to give two different constructions of such a turing machine. The first way that I managed to come up with is to encode the memory into the states of the turing machine and I managed to do so. I thought that a second way to do it is to encode the memory into the tape itself by concating the string in the memory into the input char itself but this causes problems because the turing machine doesn't have access to the memory in such a way because it will write down the encoding and then move left or right so it won't see the encoding of the memory no more. please guide me with the second approach and/or suggest me another way to do it.