-1

I'm trying to study for the summer ahead of class I saw this question, please how do I go about it?

Find NFA/DFA for the language $L = \{0^n1^n : n \in N\}$

Evil
  • 9,455
  • 11
  • 31
  • 52
  • 3
    What exactly is your question? What have you tried? What have you read? Where did you get stuck? Are you sure that DFA/NFA will be able to solve this? – Evil Jun 03 '16 at 16:46
  • 2
    Probably a trick exercise. Did you already read about the pumping lemma? Then try to apply it to show that $L$ is not regular. – Bakuriu Jun 03 '16 at 19:05

2 Answers2

4

That language is not regular, thus no finite automaton, be it a DFA, NFA or εNFA, is sufficiently powerful to express it.

To express this language, you'll need a context-free grammar, a push down automaton, or a Turing machine.

Alexander
  • 516
  • 2
  • 7
1

This language has infinite index, thus needs an infinite number of states according to the Myhill–Nerode theorem. You can't have a finite state automaton for it.

Evil
  • 9,455
  • 11
  • 31
  • 52
Pavel
  • 1
  • 3
  • 13
  • 3
    This answer is correct, but somebody who can't instantly recognize that ${0^n1^n\mid n\in\mathbb{N}}$ is non-regular probably doesn't know enough to use Myhill-Nerode. – David Richerby Jun 03 '16 at 17:29
  • @DavidRicherby Yes, but it does give something OP can look into or further inquire about – Alexander Jun 03 '16 at 17:35
  • 1
    @AMomchilov sounds like you are thinking of some other definition of index. Just read this: http://engineering.dartmouth.edu/~d25559k/ENGS122_files/Lectures_Notes/Henzinger-Nerode-7.pdf – Pavel Jun 03 '16 at 17:42
  • 1
    I note that you are trying to help people -- that's great, thanks! However, you may want to be aware of our reference questions that cover many standard problems; there is often no need to give the same answer an upteenth time. – Raphael Jun 03 '16 at 22:50
  • Thanks for your contribution guys, I clearly have a lot more to study – Martins D. Okoi Jun 08 '16 at 10:24