I want to write a Markov algorithm to compute f(x)=x/2 with remainder in set А={|, , =, /}
. For example if the input is |||||/||=
output should be |||||/||=||*|
.
Best I could get was a simple algorithm that shows the result and the remainder, but it's missing the first part where the numerator should be.
*||->|*
*|/||=+>*|
|*/||=+>|
->/||=*
Input is|||||/||=
and output is /||=||*|
Do not delete the | but rather mark them and then move their info to the right: