One student suggested the following algorithm to test a string of a's and b's to see if

Question:

One student suggested the following algorithm to test a string of a's and b's to see if it is a word in S*. where S = {aa ba aba abaab}. Step 1, cross off the longest set of characters from the front of the string that is a word in S. Step 2, repeat step 1 until it is no longer possible. If what remains is the string A. the original string was a word in S*. If what remains is not A (this means some letters are left, but we cannot find a word in S at the beginning), the original string was not a word in S*. Find a string that disproves this algorithm.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: