jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
ε a aa aaa bc bbc cbc bcbc bbbc ccbc
anonymous
  • anonymous
how are "ε", "cbc", "bcbc" and "ccbc" generated by this grammar? looks to me like it is any number of "a"s (including none) followed by any number of "b"s (at least one) followed by any number of "c"s (at least one)
anonymous
  • anonymous
yes you are kinda right from S you can get only AB, I treated it as A|B, sorry

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
However you can get cbc S->AB->εcB->εcbc->cbc You can get any number of a's (including zero) followed by any number of b's or c's and ending with bc
anonymous
  • anonymous
so bc abc aaaabc aabbbbbcccbcbcbcbcbc bcbbbbbbbbbcbbc ccccccbc
anonymous
  • anonymous
also as I understand question should be written as to distinguish literals -> -> a | ε -> b | c | bc
anonymous
  • anonymous
I still have a problem with "cbc" I don't see any way to get a "c" in the middle of the "b"s S->AB->εB->εBc-> εbBc OR εBcc OR εbcc
anonymous
  • anonymous
oh damn again I interpreted it wrongly :/ sorry I thought it's b | c | bc you can't get cbc

Looking for something else?

Not the answer you are looking for? Search for more explanations.