I am reading Cutland's "Computability: An Introduction to Recursive Function Theory". In Exercise 3 of Page 22, Cutland asks to prove that the function $f(x)=\left[ 2x/3 \right]$ is computable on Unlimited Register Machine.
Here's my idea of my program: Given a $x$, we consider the URM with initial configuration $$x \; 0\; 0 \; \ldots$$ We can then double up the value at register $R_1$. $$2x \; 0 \; 0 \; \ldots$$ Then we initialise the registers in the following way: $$2x \; 0\;1\; 3\; 0 \; 0 \;\ldots$$ Now if $2x$ is bigger than the value at $R_4$ i.e. $2x<3$, then we return the value of $R_2$ i.e. $0$, else, we increment $R_2$ by 1, $R_3$ by $1$ and $R_4$ by $3$. If "else" is satisfied, we have $$2x \; 1 \; 2 \; 6 \; \ldots$$ Now if $2x$ is bigger than the value at $R_4$ i.e. $2x<6$, then we return the value of $R_2$ i.e. $1$, else, we increment $R_2$ by 1, $R_3$ by $1$ and $R_4$ by $3$. If "else" is satisfied, we have $$2x \; 2 \; 3 \; 9 \; \ldots$$ We repeat the above procedure until we are done.
The only problem in implementing this is that it will be very long with Zero, Successor, Transfer and Jump instructions. Is there an alternative way of implementing this program? Hints will be appreciated!