home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / EDUCATIO / TURING10.ZIP / EUCLID < prev    next >
Encoding:
Text File  |  1992-06-04  |  475 b   |  28 lines

  1. # this implements Euclid's Greatest Common Denominator
  2. # it is from the book "The Emperor's New Mind"
  3. #
  4. #  usage:   start the machine to the left of two unary
  5. #           numbers seperated by a space
  6. #
  7. 0,0->0,0,R
  8. 0,1->1,1,L
  9. 1,0->2,1,R
  10. 1,1->1,1,L
  11. 2,0->10,0,R
  12. 2,1->3,0,R
  13. 3,0->4,0,R
  14. 3,1->3,1,R
  15. 4,0->4,0,R
  16. 4,1->5,0,R
  17. 5,0->7,0,L
  18. 5,1->6,1,L
  19. 6,0->6,0,L
  20. 6,1->1,1,L
  21. 7,0->7,0,L
  22. 7,1->8,1,L
  23. 8,0->9,0,L
  24. 8,1->8,1,L
  25. 9,0->2,0,R
  26. 9,1->1,1,L
  27. 10,0->0,0,S
  28. 10,1->10,1,R