Computer Science, asked by amitcool980, 11 months ago

What is the language of the following grammar?S→AB∣BA∣A∣B
A→aAa∣aAb∣bAa∣bAb∣a
B→aBa∣aBb∣bBa∣bBb∣b

Answers

Answered by Raghav1330
0

Answer:this is context free grammar. ALSO known as CFG

Explanation:to solve the given expression we have to put to use various sub expression.

For this we have:

S-> AB∣BA∣A∣B

A→aAa∣aAb∣bAa∣bAb∣a

B→aBa∣aBb∣bBa∣bBb∣b

S->aAa

S->abAaa putting S as bAa

A->abAba putting A as bAb

B->abBaa putting B as bBa

A->abaaa Putting A as a

B-> abbaa Putting B as bad

Now S->abaaaabbaa or abbaaabaaa

There are two possible in this deduction value hence context free grammar

Answered by pratikpmendheit
0

Answer:

hsyhjsjkdiuwndodowokwkdikd

Similar questions