Question

Can you check on this: https://dl.dropbox.com/u/25439537/finite%20automata.png

This is a checked homework, so don't worry. I just want to clarify whether my answer is correct or not, because it is marked by my teacher as incorrect.

My answer is ((a+b)(a+b))*a The first (a+b) signifies the upper arrows. The second (a+b) signifies the lower arrows. The last 'a' tells us that it should always end in 'a'.

I just want to record evidences from a lot of experts so that I can give it to my teacher.

Was it helpful?

Solution

I believe your answer is correct.

Let's consider the whole process as two parts: (1) start with start, and go back to start; and (2) go from start to end and accept. Obviously, the (1) part is a loop.

For (1), starting with start, either accept b or a. For b, it's b(a+b) to go back. For a, it's a(a+b) to go back. So (1) is b(a+b) + a(a+b) which is (a+b)(a+b).

For (2), it's a'.

So, the final result is (loop in (1))* (2) i.e. ( (a+b)(a+b) )* a.

Follow the description above, you can also come up with a proof of the equivalence between the two. Proof part (a) every sequence accepted by the automata is in the set ((a+b)(a+b))*a; part (b) every sequence in the set ((a+b)(a+b))*a is accepted by the automata.

OTHER TIPS

Your answer is wrong, because it doesn't provide for strings starting with b.

The path (start) -> b -> a+b -> a -> (end) is accepted by your finite automaton, but not by your regex. The simplest counterexample to your answer being correct is the regex's rejection of the string "baba".

By the way, if the teacher gave you that regex without the "end" state having two concentric circles (to indicate being an accept state) it was probably a trick question. Having no accept state means your automaton rejects everything. The best way to describe that would be to just write down {} (the empty set).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top