URM Problem

## Primary tabs

# URM Problem

Submitted by kouros on Sat, 10/05/2013 - 07:18

Forums:

I need to writhe a URM program that computes

(n,m)----> n-m, if m less or equal n

m, if n less than m

But I’m finding it hard to do . So far I have this program that computes the minimun of the two integers.

1 J(1,3,6)

2 J(2,3,5)

3 S(3)

4 J(1,1,1)

5 C(2,1)

Thank you in advance.

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections

## Unlimited Register Machine

I hadn’t heard of them before, but after some creative googling, I found this: http://code.google.com/p/urm-simulator/

Won’t necessarily help you with your problem directly, but it might help others answer the question!

## URM

No guarantees. Assumptions: n is in R1, m is in R2, all other registers contain 0.

1. J(2 ,3, 8)

2. J(1, 3, 5)

3. S(3)

4. J(1, 1, 1)

5. C(2, 4)

6. J(1, 2, 8)

7. J(1, 1, 14)

8. Z(3)

9. J(1, 2, 13)

10. S(2)

11. S(3)

12. J( 1, 1, 9)

13. C(3, 4)

14. C(4, 1)