The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

asked in Theory of Computation by (15 points) | 26 views

2 Answers

0 votes
it will accept only {0} .if any string other than {0} will goes in infinite loop(i.e 00,000,000,0000).correct me if i am wrong?
answered by Active (2.3k points)
Please answer ques no 16
in question no. 16  i think no any option is correct because it accept only {0} other than this it will goes into infinite loop.check it by putting 0000 or 00000 or 00 etc.
0 votes



Here, first we find small string for hang.

we have 0,0,R and 0,0,L means if we have 0 input then we put 0 in stack and go to right and second one means is if we have 0 input then we put 0 in stack and go to left and if we get B(end i/p) then push B and go to right and finished.

So, if we have 00 string the we go fisrt right and then left then right .........continue never end so small string is o^2 then we say 0^n where n>=2.

and acceptable string is only "0"

answered by (63 points)
reshown by
Why not b) option
Because ,in B option only even length string occur but in answer all string which is greater than 2 are right answer.So right answer is C.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

47,005 questions
51,324 answers
66,668 users