Representation of a Turing Machine that Recognizes the Language of n a's followed by n b's

Quadruples for anbn Turing Machine
 start  #  R  da
 checkb  #

 R
 halt
 da  a  #  slb
 da  #  R  checkb
 slb  #  R  lb?
 lb?  a  R  lb?
 lb?  b  R  lb?
 lb?  #  L  db
 d1  b  #  srb
 srb  #  L  rb?
 rb?  b  L  rb?
 rb?  a  L  rb?
 rb?  #  R  da
 

 The animation below shows this Turing Machine represented above recognizing the input string aabb.

Recognizing the string aabb

 

 

Topics-Part 1 | Machine Chapter

 © Charles F. Schmidt