# RM-FRS - Maintain one prime per RM instruction Instruction...

This preview shows pages 1–8. Sign up to view the full content.

Register Machines ≤ Factor Replacement Systems Chris Ellis Bruce Meeks, Jr.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Register Machines Natural numbers stored in finite set of registers (result in n th register) Finite length programs of instructions labeled 1 to m Two types of instructions: INC r [i] : Increment value of register r by 1, jump to instruction 1 DEC r [p,z] : If register r > 0, decrement by 1 and jump to p, otherwise jump to z
Factor Replacement Systems Single natural number x used for information storage (multiple values encoded as exponents of prime numbers, result stored as exponent of 2) “Instructions” stored as list of rational numbers a / b First fraction a / b for which x is divisible by b is multiplied by x, which replaces the value of x by xa / b

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
RM ≤ FRS Show that RMs are no more powerful than FRS Encode state of RM as natural number Simulate behavior of RM by FRS
Encoding RM State as FRS State Convert value of all registers to a single natural number (prime factorization) <r 0 , r 1 , r 2 , … , r n > p 1 r 0 p 2 r 1 p 3 r 2 …p n r n

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Maintain one prime per RM instruction Instruction 1,2,…,m p n+1 ,p n+2 ,…,p n+m Keep one last prime to represent halt state p n+m+1 Simulating Behavior of RM For each instruction 1 ≤ j ≤ m If j is an INC instruction (j. INC k [ l ]) Add FRS rule p n+j x p n+ l p k x If j is a DEC instruction (j. DEC k [p,z]) Add FRS rule p n+j p k x p n+p x Add FRS rule p n+j x p n+z x Clean-up rules 0 ≤ i ≤ n-1 p n+m+1 p i x p n+m+1 x Finally p n+m+1 x x Example – Limited Subtraction Register Machine r2 r1 – r2, if r1 ≥ r2; 0, otherwise Factor Replacement System Input: 3 x 5 y Output: 2 z where z = x – y, if x ≥ y; 0, otherwise Example – Limited Subtraction 1. DEC2[2,3] 2. INC1[1] 3. DEC3[4,5] 4. DEC1[3,3] 5. 3*7x 11x 7x 13x 11x 2*7x 5*13x 17x 13x 19x 2*17x 13x 17x 13x Associated Primes 7 11 13 17 19...
View Full Document

## This note was uploaded on 07/14/2011 for the course COT 4610 taught by Professor Dutton during the Fall '10 term at University of Central Florida.

### Page1 / 8

RM-FRS - Maintain one prime per RM instruction Instruction...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online