C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
A DFA program that implements L = {ad, accd, bcd, bcccd,acecd} Posted by daleyk on 3 Feb 2006 at 10:00 PM
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.
Report
Re: A DFA program that implements L = {ad, accd, bcd, bcccd,acecd} Posted by Donotalo on 4 Feb 2006 at 1:59 AM
: 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.
:
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.


~Donotalo()

Report
Re: A DFA program that implements L = {ad, accd, bcd, bcccd,acecd} Posted by daleyk on 4 Feb 2006 at 6:55 AM
: 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?
Report
Re: A DFA program that implements L = {ad, accd, bcd, bcccd,acecd} Posted by Donotalo on 4 Feb 2006 at 10:27 AM
: : 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?
:
#include <iostream>
using namespace std;

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

    //precess input
    return 0;
}


~Donotalo()




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.