-1

I'm kinda new in this topic and I don't know how to figure out the rules to make a CFG out of this language, if anyone could give me an idea or hint so I can try to solve it knowing that, I would be very thankful.

Thank you for yout time.

frabala
  • 801
  • 4
  • 11
  • 1
    Please don't re-post questions. You posted this question this question previously: https://cs.stackexchange.com/q/124126/755. It was closed as a dup, and you deleted it and re-posted it. That's discouraged here. – D.W. Apr 15 '20 at 05:15

1 Answers1

0

Ignore $b^m$ at first. Once you have the rest figured out, adding it in will be easy.

Try to build a CFG for $a^k c^k$. This is a classic CFG problem, so you've probably seen it in class.

Then, try to modify your CFG to generate $a^k c^{2k}$. This is a relatively small change.

Now, modify this new CFG to generate $a^k c^n \mid n \leq 2k$. You should only need to add new production rules, without deleting or modifying your existing ones.

Finally, add in the $b^m$. This part should be a trivial change.

Good luck! I hope this helps!

Draconis
  • 7,098
  • 1
  • 17
  • 27