(0, A, A, S, halt) (0, a, X, R, 1) (0, Y, Y, R, 3) accept A mark a with X no more a's (2, a, a, L, 2) Scan back left looking for X: X not found yet (2, Y, Y, L, 2) X not found yet (2, X, X, R, 0) X found, turn around Scan right looking for b to pair with a: (1, a, a, R, 1) b not found yet Scan right looking for A and halt: (1, Y, Y, R, 1) b not found yet (3, Y, Y, R, 3) (1, b, Y, L, 2) mark b with Y (3, A, A, S, halt) This TM does not accept the string aaabb. Why? Put your reason in the following box. You cannot simply say the number of a's is not the same as the number of b's. The TM cannot tell if the number of a's is not the same as the number of b's. It would reject a string only if it reaches a point that it cannot proceed any further and the state is not the ‘halt' state.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 10PE: Redo Programming Exercise 8 using dowhile loops.
icon
Related questions
Question
(0, A, A, S, halt)
(0, a, X, R, 1)
(0, Y, Y, R, 3)
accept A
mark a with X
no more a's
(2, a, a, L, 2)
Scan back left looking for X:
X not found yet
(2, Y, Y, L, 2)
X not found yet
(2, X, X, R, 0)
X found, turn
around
Scan right looking for b to pair
with a:
(1, a, a, R, 1)
b not found yet
Scan right looking for A and
halt:
(1, Y, Y, R, 1)
b not found yet
(3, Y, Y, R, 3)
(1, b, Y, L, 2)
mark b with Y
(3, A, A, S, halt)
This TM does not accept the string aaabb. Why? Put your reason in the
following box. You cannot simply say the number of a's is not the same as
the number of b's. The TM cannot tell if the number of a's is not the same
as the number of b's. It would reject a string only if it reaches a point that it
cannot proceed any further and the state is not the ‘halt' state.
Transcribed Image Text:(0, A, A, S, halt) (0, a, X, R, 1) (0, Y, Y, R, 3) accept A mark a with X no more a's (2, a, a, L, 2) Scan back left looking for X: X not found yet (2, Y, Y, L, 2) X not found yet (2, X, X, R, 0) X found, turn around Scan right looking for b to pair with a: (1, a, a, R, 1) b not found yet Scan right looking for A and halt: (1, Y, Y, R, 1) b not found yet (3, Y, Y, R, 3) (1, b, Y, L, 2) mark b with Y (3, A, A, S, halt) This TM does not accept the string aaabb. Why? Put your reason in the following box. You cannot simply say the number of a's is not the same as the number of b's. The TM cannot tell if the number of a's is not the same as the number of b's. It would reject a string only if it reaches a point that it cannot proceed any further and the state is not the ‘halt' state.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning