Two Fast Simulations Which Imply Some Fast String Matching and Palindrome-Recognition Algorithms