{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# day18 - REGISTER W FACTOR Click to edit Master subtitle...

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

Click to edit Master subtitle style 10/4/11 REGISTER W FACTOR

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

View Full Document
10/4/11 Dec 2, 2007/COT5310 © UCF (Charles E. Hughes) 22 Encoding a RM’s State This is a really easy one based on the fact that every member of Z+ (the positive integers) has a unique prime factorization. Thus all such numbers can be uniquely written in the form where the pi's are distinct primes and the ki's are non-zero values, except that the number 1 would be represented by 20. Let R be an arbitrary n-register machine, having m instructions. Encode the contents of registers r1,…,rn by the powers of p1, …pn . Encode rule number's 1…m by primes pn+1 ,…, pn+m 1 i 1 k p 2 i 2 k p j i j k p
10/4/11 Dec 2, 2007/COT5310 © UCF (Charles E. Hughes) 33 Simulation by FRS Now, the j-th instruction (1≤j≤m) of R has associated factor replacement rules as follows: j. INCr[i] pn+jx ° pn+iprx j. DECr[s, f] pn+jprx ° pn+sx pn+jx ° pn+fx We also add the halting rule associated with m+1 of pn+m+1xo x

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

View Full Document
10/4/11 Dec 2, 2007/COT5310 © UCF (Charles E.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

day18 - REGISTER W FACTOR Click to edit Master subtitle...

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

View Full Document
Ask a homework question - tutors are online