Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 13 - Section 13.5 - Turing Machines - Writing Projects - Page 903: 17

Answer

Constructing a Turing machine that recognizes the set {0^n 1^n 2^n | n ≥ 0}.

Work Step by Step

a Turing machine that recognizes the set {0^n 1^n 2^n | n ≥ 0} is (s0, B, s9, B, L), (s0, 0, s1, 0, L), (s1, B, s2, E, R), (s2, M, s2, M, R), (s2, 0, s3, M, R), (s3, 0, s3, 0, R), (s3, M, s3, M, R), (s3, 1, s4, M, R), (s4, 1, s4, 1, R), (s4, M, s4, M, R), (s4, 2, s5, M, R), (s5, 2, s5, 2, R), (s5, B, s6, B, L), (s6, M, s8, M, L), (s6, 2, s7, 2, L), (s7, 0, s7, 0, L), (s7, 1, s7, 1, L), (s7, 2, s7, 2, L), (s7, M, s7, M, L), (s7, E, s2, E, R), (s8, M, s8, M, L), (s8,E, s9,E,L) where M and E are markers, with E marking the left end of the input
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.