Question: Using the language haskell. also, provide a handwritten state-transition (i.e., bubble) diagram. CIS 252 Intro to Computer Science 1. Write a Turing machine that takes
CIS 252 Intro to Computer Science 1. Write a Turing machine that takes a (possibly empty) string containing as and ys, and provides a unary count (as a series of 1s) of the number of times the sequence ayya appears in that string. The count should appear immediately to the right of the original string. For example, if the original input is aayyaaaayyayyayyyya (underlining included just to make it easier to visualize), then the final output should be aayyaaaayyayyayyyya111. (Note that one occurrence of a contributes to two different occurrences of the string ayya in this example.) If the original input is ayyyyaayaa, then the final output should be ayyyyaayaa
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
