Question
S->aB|bA, A->a|as|bAA, B->b|bs|aBB
generates strings of terminals that have
a.
odd number of a’s and odd number of b’s
b.
even number of a’s and even number of b’s
c.
equal number of a’s and b’s
d.
not equal number of a’s and b’s
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. The following CFG S->aB|bA, A->a|as|bAA, B->b|bs|aBB generates strings of terminals that have
Similar Questions
Discover Related MCQs
Q. Match the following :
(i) Regular Grammar (a) Pushdown automaton
(ii) Context free Grammar (b) Linear bounded automaton
(iii) Unrestricted Grammar (c) Deterministic finite automaton
(iv) Context Sensitive Grammar (d) Turing machine
(i) (ii) (iii) (iv)
View solution
Q. Which one of the following statement is false?
View solution
Q. Which of the following grammar is LR (1)?
View solution
Q. Context-free Grammar (CFG) can be recognized by
View solution
Q. A context free grammar is:
View solution
Q. Let e: B˄m→B˄n is a group code. The minimum distance of ‘e’ is equal to:
View solution
Q. A WFF that is equivalent to the WFF x=>y is:
View solution
Q. The regular expression given below describes:
r=(1+01)*(0+λ)
View solution
Q. Which of the following language is regular?
View solution
Q. Which of the regular expressions corresponds to this grammar ?
S → AB / AS, A → a / aA, B → b
View solution
Q. Which of the following strings is in the language defined by grammar S→0A, A→1A/0A/1
View solution
Q. The logic of pumping lemma is a good example of:
View solution
Q. Let A = {x | -1< x< 1} = B. The function f(x)=x/2 from A to B is:
View solution
Q. Which sentence can be generated by S→d/bA, A→d/ccA:
View solution
Q. Regular expression a+b denotes the set:
View solution
Q. Which of the following is not true?
View solution
Q. Identify the language which is not context - free.
View solution
Q. The context-free languages are closed for:
(i) Intersection (ii) Union
(iii) Complementation (iv) Kleene Star
View solution
Q. Grammars that can be translated to DFAs:
View solution
Q. The language accepted by a Push down Automata:
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Theory of Computation(TOC)? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!