0

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.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202

2 Answers2

0

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.

Xiao Jia
  • 4,169
  • 2
  • 29
  • 47
0

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).

Wayland Smith
  • 1,060
  • 8
  • 9
  • In our discussion, (a+b) is equivalent to 'a' OR 'b', okay? so I can actually start at b in my regex since I can choose 'b' in my first (a+b) expression. – user1846682 Nov 25 '12 at 03:40
  • 'baba' CANNOT be accepted in both finite automata and regular expression. try it out. it would just end at the start position. – user1846682 Nov 25 '12 at 03:41
  • Regular expressions containing a+ typically indicate aa*. That's one instance of a, followed by a*, representing zero to infinite consecutive instances of a (see: http://en.wikipedia.org/wiki/Kleene_star). a OR b is usually represented as a|b in a written regex, but in a drawn FA, it tends to be two edges with common source and destination nodes, one labeled a, and the other labeled b.. The notation in your class is unlike anything I've seen in relation to finite automata (though I've seen + used as inclusive OR in boolean algebra). – Wayland Smith Dec 11 '12 at 01:16