Question: Give stack machines for the following languages: a. L(a*b*) b. {x ? {0, 1}* | the number of 0s in x is divisible by 3}
Give stack machines for the following languages:
a. L(a*b*)
b. {x ? {0, 1}* | the number of 0s in x is divisible by 3}
c. {x ? {0, 1}* | |x| is divisible by 3}
d. {x ? {0, 1}* | x is a binary representation of a numberdivisible by 3}
Please use the read, pop, push tableformat.
For example, the stack machine for the language{anbn} would be:
| read | pop | push | |
| 1 | a | S | S1 |
| 2 | ? | S | ? |
| 3 | b | 1 | ? |
Step by Step Solution
3.33 Rating (159 Votes )
There are 3 Steps involved in it
a Pushing each A for each a Popping each A for each b If more bs are ... View full answer
Get step-by-step solutions from verified subject matter experts
