0

I started learning about NFA's and DFA's and stumbled across this question online in one of the Berkley PDF's on DFA's, but the question did not have a solution attached.

How would I be able to Show that there is an algorithm which receives as input a DFA M over the alphabet {a, b} and decides whether L(M) = {a} or L(M) =/= {a}?

Any guidance would be highly appreciated.

Erwin Bolwidt
  • 30,799
  • 15
  • 56
  • 79
Tal Zamirly
  • 117
  • 1
  • 11
  • 1
    Make an automaton which recognises the language {a} (pretty easy, isn't ?) and check if it has always the same output than M for the same input (Of course this solution is only theoretical, in practice there are infinite strings to be checked). Other way could be minimise both automatons and check if they are isomorph. – Manu343726 Apr 06 '14 at 06:55
  • 1
    hi @Manu343726, thats for the quick reply. I don't quite understand what you mean, could you try explain that a little differently? So my automation that recognises the language {a} would be the following DFA:? ->(q0)----a----((q1)) <--(finish/accepting state) – Tal Zamirly Apr 06 '14 at 09:50
  • @Zambot Just tell me how do you represent a language... in your question `{ a }` is finite but what about when you wants to proof L(M) is === { infinite set } ? How do you represent a set? -- We have algorithmic solutions to compare DFAs, or DFA with RE, Or DFA with regular grammars. – Grijesh Chauhan Apr 06 '14 at 18:56

1 Answers1

0

Given two DFAs D1 and D2, it's possible to decide whether L(D1) = L(D2) by minimizing each DFA and checking whether the resulting DFAs are identical (this works because for each language, there's a unique minimum-state DFA for that language).

Now, you're trying to check whether L(D1) = {a}. As a hint, can you construct a DFA whose language is exactly {a}? If so, could you then use the above algorithm to solve this problem?

Hope this helps!

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065