Reputation: 65
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 /||=||*|
Upvotes: 1
Views: 620
Reputation: 1212
Do not delete the | but rather mark them and then move their info to the right:
Upvotes: 0