# A DFA recognizing my name

How can I know if my DFA is implemented correctly? For example, I need to build a DFA, and then minimize it which will recognize my name. Language which describe my name is: L = {pustai, marius}

I came with this solution:

>(0)--p-->(1)--u-->(2)--s-->(3)--t-->(4)--a-->(5)--i-->(6)(goto state 0)
|
(7)--m-->(8)--a-->(9)--r-->(10)--i-->(11)--u-->(12)--s-->((13)) (final state)


How can I know if this is implemented correctly? And about minimization of this automate I think is impossible.

• This is not a DFA since it seems one can go from state 0 to state 7 without any input, though it is close to a DFA. Also, it repeats your last name an arbitrary number of times (including zero), before going to your fist name. It does not correspond to your definition of L. – babou Jun 30 '14 at 12:24