Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Write a TM which computes the function f(x) = 2x, where x is represented in unary notation.
- 0 1 # r 1R
- 0 # # r 0
- 0 _ _ l 4L
- 1R 1 1 r 1R
- 1R # # r 1R
- 1R _ # l 1L
- 1L # # l 1L
- 1L 1 1 l 1L
- 1L _ _ r 0
- 2R # # r 2R
- 2R 1 # r 1R
- 2R _ _ r 3L
- 3L # # l 3L
- 3L _ _ r 0
- 4L # # l 4L
- 4L _ _ r 4R
- 4R # 1 r 4R
- 4R _ _ r halt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement