Wednesday, 5 December 2012

DFSA and NFSA

I find this funny: for NFSA, there can be one state which when meeting an input, it can go to two different states. I think this is just like writing a recursive function, which only returns true or false, and only use return statement. I remember doing this in CSC148 for a littile while, and I got really confused by then, and still now. But NFSA draws out the picture and explains it more clearly.

Although have not encountered with this kind of question, but if in the final exam, there is a question that gives you a NFSA, and a really long string asks you to determine if the NFSA accepts this string. Then the second part of the question gives you a regular expression and you have to argue if the regular expression can be represented as the NFSA given. This kind of question would be really hard to argue, since there will be tons of cases each time you have two paths to choose from, and each path have more sub-paths to follow, and it goes on. I just hope this won't happen at the final exam.....

Also we talked about that any two or more DFSA combined can be represented by one NFSA, but letting the start point have an epsilon transition to another state, which is the start point of the second DFSA. So we can break a big question to chunks of small and easier parts, and using the appropriate transition to combine them, and this can be done since we are drawing a NFSA not a DFSA. But then even the smaller chunk of the regular expression may not be so easy, so I think all we can do is practice more.

Also a3 comes out. The first question involves something we have not specifically learnt in class, but a combination of things we have learnt. I think using a contradiction to prove it will be the easiest way doing so. Question 2 and 4 involves loops, which I hate! But just follow the course notes would not be so hard, but just a lot of typing and work. Question 3 can be found inside the course textbook(?), and just follow the steps it shows will give us the right answer.


No comments:

Post a Comment