0
$\begingroup$

My attempt at solution-:

enter image description here

Solution by a teacher-:

enter image description here Both are giving same answer, is the one that I made correct?

$\endgroup$
4
  • 2
    $\begingroup$ Your DFA doesn't accept $\epsilon$, whilst your teacher's does accept it $\endgroup$
    – nir shahar
    Oct 31 '21 at 10:58
  • $\begingroup$ ah makes sense, attention to detail. thanks. $\endgroup$
    – axhbagi
    Oct 31 '21 at 11:08
  • $\begingroup$ There are infinitely many DFAs accepting any given regular language. However, there is a unique minimal DFA. $\endgroup$ Oct 31 '21 at 11:50
  • $\begingroup$ We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. $\endgroup$
    – D.W.
    Oct 31 '21 at 22:40
1
$\begingroup$

Your DFA doesn't match the empty string.

Note that if $L$ is regular, then infinitely many DFAs accept $L$. There is no unique answer for "DFA that accepts $L$". However, there is a canonical answer: there is a unique DFA with the minimum number of states that accepts $L$, known as the minimal DFA. Your teacher drew the minimal DFA for your language.

(Curiously, there is no "minimal NFA": there are regular languages for which there are several inequivalent NFAs with the minimum number of states.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.