Final answer:
The string bbaba is accepted by the language while abaabb is not.
Step-by-step explanation:
In order to determine if the strings bbaba and abaabb are accepted by the given language, we need to check if they can be derived from the grammar G. Starting with the start symbol S, we can build a derivation tree by applying the production rules of the grammar until we reach the given strings.
The derivation tree for bbaba is as follows:
S
/ \
A B
| |
b b
Since the derivation tree can be built for bbaba using the grammar rules, it is accepted by the language. However, the string abaabb cannot be derived from the given grammar, so it is not accepted by the language.