home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / eduhm01h / anbn.t < prev    next >
Encoding:
Text File  |  1996-08-14  |  241 b   |  22 lines

  1. # This program will determine if a string of As and Bs
  2. # is of the form aNbN - it outputs T or halts 
  3. aaabbb
  4. 16
  5. 0 a 1 a
  6. 1 a 2 c
  7. 2 c 2 >
  8. 2 a 2 >
  9. 2 d 2 >
  10. 2 b 3 d
  11. 3 d 3 <
  12. 3 d 3 <
  13. 3 a 3 <
  14. 3 c 1 >
  15. 1 d 4 >
  16. 4 d 4 >
  17. 4 - 5 <
  18. 5 d 5 >
  19. 5 - 6 >
  20. 6 - 6 T
  21.  
  22.