Explore BrainMass
Share

Formal System: Syntax and Semantics: Validity of strings

Strings
Given the following grammar

S -> A
S -> B
A -> aCbA
A -> ab
B -> BCC
B -> a
C -> ba

which strings are valid?

a
ab
aba
abab
ababa
abababa
abababab
ababababab

© BrainMass Inc. brainmass.com July 16, 2018, 10:45 am ad1c9bdddf

Solution Preview

The solution of the Posting is in the attached ...

Solution Summary

Validity of strings is considered. Syntax and Semantics are also considered in the Formal System.
The solution is detailed and well presented.

$2.19