Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

A DFA program that implements L = {ad, accd, bcd, bcccd,acecd}

daleykdaleyk Posts: 2Member
Hi Guys,

I am during a course called Theory of Computattion and have this assignment to do but need some help. I am to write a program that implement this language L = {ad, accd, bcd, bcccd,acecd}. Is there any one that can assist in writing this code. Thia automaton should accepts all and only the strings of the language.

Comments

  • DonotaloDonotalo Posts: 715Member
    : Hi Guys,
    :
    : I am during a course called Theory of Computattion and have this assignment to do but need some help. I am to write a program that implement this language L = {ad, accd, bcd, bcccd,acecd}. Is there any one that can assist in writing this code. Thia automaton should accepts all and only the strings of the language.
    :
    [purple]are there only five strings in the language? then the program is very easy. just take the input string, check whether it is "ad", if not then whether it is "accd", and so on. u need only five string comparisons at most.
    [/purple]
    [hr][purple]~Donotalo()[/purple]

  • daleykdaleyk Posts: 2Member
    : Hi Guys,
    :
    : I am during a course called Theory of Computattion and have this assignment to do but need some help. I am to write a program that implement this language L = {ad, accd, bcd, bcccd,acecd}. Is there any one that can assist in writing this code. Thia automaton should accepts all and only the strings of the language.
    :
    Can you write a quick code for me?
  • DonotaloDonotalo Posts: 715Member
    : : Hi Guys,
    : :
    : : I am during a course called Theory of Computattion and have this assignment to do but need some help. I am to write a program that implement this language L = {ad, accd, bcd, bcccd,acecd}. Is there any one that can assist in writing this code. Thia automaton should accepts all and only the strings of the language.
    : :
    : Can you write a quick code for me?
    :
    [code]
    #include
    using namespace std;

    int main()
    {
    char input[80];
    cout << "Enter input string: ";
    fgets(input, sizeof(input), stdin);

    //precess input
    return 0;
    }
    [/code]
    [hr][purple]~Donotalo()[/purple]

Sign In or Register to comment.