Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Theory of Computation: Finite State Machines
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
blackrobe




PostPosted: Tue Mar 16, 2010 1:37 am   Post subject: Theory of Computation: Finite State Machines

Hey, I need someone to help me with this..I'm dying to find out what this DFA do:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

I've simplified it to this:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

I just want to know what exactly does it accept (what kind of strings)??

I was thinking something like this:

- If there are no a's then number of b's is divisible by 3
- If there are no b's then number of a's is divisible by 3

or something like:

- Number of a's is number of b's mod 3 and vice versa.

Not sure. Any ideas?

Thanks
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue Mar 16, 2010 3:02 am   Post subject: RE:Theory of Computation: Finite State Machines

It looks like you used JFlap for the minimization, it will also give you the regex and regular grammar:

S -> E
S -> bB
S -> aA
A -> aB
A -> bS
B -> bA
B -> bS


(ab | (b | aa)(ba)*(a | bb))*


I don't see any easily recognizable patters off the top of my head but it is 4:00am. However i did notice this:

a = number of As
b = number of Bs
x >= 0
a >= 0
b >= 0

b = 3x + (a % 3)


This is all assuming your minimization is correct.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Prabhakar Ragde




PostPosted: Tue Mar 16, 2010 12:08 pm   Post subject: RE:Theory of Computation: Finite State Machines

Hint: in the original diagram, rewrite n as the ordered pair (n mod 3, n div 3).
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: