26 views

asked | 26 views

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)
0
0
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.

(16)C:->on,n>=2

(17)B:->{0}

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
0
Why not b) option
0
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.

+1 vote
1
2