Question: You are to provide the algorithm and the TM (the transition diagram) for the following question. a. Input: a sequence of O's and 1's Output:

You are to provide the algorithm and the TM (the transition diagram) for the following question. a. Input: a sequence of O's and 1's Output: replace every other 1 with a blank, starting with the first 1 found, and leave O's alone. Example 1 Input : 111 Output: b1b Example 2 Input : 10110010 Output: b01b0010 Example 3 Input :00 Output: 00 Hint: your states have to know if the next 1 is to be replaced or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
