The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
83 views
For the given Grammar

S->aA|bB

A->bC|aS

B->aC|bS

C->aB|bA

 

Construct DFA I am getting confused in understanding how to take the final state.
in Theory of Computation by Active (2.3k points) | 83 views
0
can you generate any string by using this grammer???.there is no any terminal symbol.
0
a and b are terminal symbols but yes this is the grammar given,it is a test series question.I know generally this forum doesn't entertain test series questions,but I want to clear misconceptions.
0

The language generated by a grammar may be infinite. But string generated by a grammar should always be of finite length.

 

0
So is the question wrong cause it is supposed to check if grammar generates even number of a's or b's
0
Yes.

This is not the grammar generating even no. of a's and b's..it is not halting. :/
0
It is a test series question :)p  but I wanted to clarify for conceptual clarity.Super Thanks.

1 Answer

0 votes
w:aaaabbbbaaaa

for any random string if the given grammar generate it,then we definitely can draw DFA,otherwise not.

and since the grammar doesnot have any terminating condition ,therefore,it is not possible.
by (131 points)

Related questions

0 votes
1 answer
5
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
50,092 questions
55,276 answers
190,803 comments
86,086 users