Q: 08 of 15Choose the right set of terminals from the given production rules of grammar as:S->(S) | aA | epsilonA-> A+B | aB-> B *C | bC -> cOptions :T= ( ,a,b,),+,*T= ( ,a,b,),+,*,cT= a,b,cNone of the above mentioned
Question
Q: 08 of 15Choose the right set of terminals from the given production rules of grammar as:S->(S) | aA | epsilonA-> A+B | aB-> B *C | bC -> cOptions :T= ( ,a,b,),+,T= ( ,a,b,),+,,cT= a,b,cNone of the above mentioned
Solution
The correct answer is: T= ( ,a,b,),+,*,c
This is because the terminals in a grammar are the symbols that do not appear on the left-hand side of any production. In this case, the terminals are the symbols that are not S, A, B, or C. These are (, a, b, ), +, *, and c.
Similar Questions
Consider the Grammar as follows S → aSAb | bSBc A → +AB | εB → *BC | εC → aC | d What is in FOLLOW(S) {b, c, +, *, $}{a, c, +, *, $}{a, b, d, *, $}{a, b, c, +, $}
A grammar G = (V, ∑∑, S, P) in which V represents:a)None of the mentionedb)Set of Non Teminalsc)Set of Terminalsd)Productione)Start symbols
Consider the Grammar, G, with the production rule: S-> aS | bS | ε Which of the following is generated by G? Options :{a n b m | m,n >=0}{w ∈ {a, b}*, w has equal number of a’s and b’s}{a, b}*{an |n >=0} ∪ {bn |n >=0} ∪ {anbn |n >=0}
Given grammar G:S->aS| ABA-> eB-> eD-> bReduce the grammar, removing all the e productions:ans.S->aS| AB| A| B, D-> bNone of the mentionedS->aS| AB| A| B| a, D-> bS->aS| AB| A| B Previous Marked for Review Next
Which representation of grammar corresponds to the a(aUb)*b expression?a)(1) S →→ bMa (2) M →→ eb (3) M →→ abM (4) M →→ baMb)(1) S →→ aMb(2) M →→ e(3) M →→ aMb(4) M →→ bMac)(1) S →→ aMb (2) M →→ e (3) M →→ aM (4) M →→ bMd)(1) S →→ baMab (2) M →→ ea (3) M →→ abM (4) M →→ baMe)(1) S →→ aMb(2) M →→ Mab(3) M →→ aM(4) M →→ bM
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.