0

I'm trying to construct a PDA or a CFG that accepts all words where E is the most common letter. Cheese and tee would be in the language for example. I'm pretty sure this language is context free but I cannot seem to construct a PDA for it. Is this possible?

Ryan B
  • 1

1 Answers1

0

Yes it is possible, but it would be a pretty fat grammar, for an alphabet with the three letters {d, e, f} it will look something like this:

S-> ES | dJ | fK | E

J -> SJ | fL | ES

K -> SK | dL | ES

L -> SL | ES

E -> eE | e

Community
  • 1
  • 1
user2268997
  • 1,263
  • 2
  • 14
  • 35