Question

8. Give an implementation of the macroinstruction searchleft (a, ,), which indicates that the machine is to search its tape t
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

The macro instruction can be broken down as follows: look at the tape symbol. If it matches a, go to state q_i. If it matches a blank, which is denoted by B, go to q_j. Otherwise, keep moving left and do not change the state.

Hence, let the state when the macro starts is q. The transitions are:

\delta(q, a) = (q_i, a, S)
5GI. B) = (qi, B. S)
\delta(q, \gamma) = (q, \gamma, L), \gamma \neq a, B .

Here, S means stay i.e. don't move the head.

Add a comment
Know the answer?
Add Answer to:
8. Give an implementation of the macroinstruction searchleft (a, ,), which indicates that the machine is to search its tape to the left of the current position for the first occurrence of the sym...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT