Finite Automata

Design context-free grammars for the following languages: the set of all strings with twice as many 0’s as 1’s.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is this homework?
Also it doesn't have anything to do with finite automata, which are "regular languages" and can't do that.
It is a well known grammar

S --> S1S0S0S | S0S1S0S | S0S0S1S | e

proving it does the job of course is a different matter.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

I can't claim this, I found it but take a look......

S --> S1S0S0 | S0S1S0 | S0S0S1 | e
   generate this string      001001010100010
       S -->  S0S1S0
          --> S0S0S10S1S0
          --> 0010S1S0
          --> 0010S0S1S0S1S0
          --> 001001S0S1S00S1S0
          --> 00100101S0S1S000S1S0
   Generate the string 111000000
        S --> S1S0S0
           --> S1S1S0S00S0
           --> S1S1S1S0S00S00S0
           --> 111000000
NeilHK,  You have copied and pasted my answer?
GwynforWeb, Just an example of your answer Gwyn. As I said, I can not take credit for it.
S  -> S1 | S2 | S3
S1 -> 001S | 001 (lambda)
S2 -> 010S | 010(lambda)
S3 -> 100S | 100(lambda)
I've requested that this question be deleted for the following reason:

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Not enough information to confirm an answer.

If you feel this question should be closed differently, post an objection and a moderator will read all objections and then close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Auto Deleter
GwynforWeb's answer is correct.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Math / Science

From novice to tech pro — start learning today.