-2
$\begingroup$

I have been given the question "Is the language 010 ∪ 101 regular? Justify your answer."

It is regular and as it can be accepted by an NFA (Draw NFA). Is this correct?

$\endgroup$
1
  • $\begingroup$ OK, so you've given us a question and answered it. What part are you unsure about? What are you looking for help with? Grading your solutions is a job for your TA or professor. $\endgroup$ Commented Aug 1, 2018 at 13:02

2 Answers 2

2
$\begingroup$

A language is regular if it is accepted by a DFA.

It is also regular if it is accepted by a NFA (as every NFA can be converted into an equivalent DFA).

I suggest look here to know what constitutes a regular language.

$\endgroup$
1
$\begingroup$

A language is regular if and only if it can be written as a regular expression (the CS kind, not the Perl kind you see in most programming languages). Equivalently, if and only if it can be recognized by a DFA, or if and only if it can be recognized by an NFA; all three of these are equivalent.

In this case, the regular expression 010+101 expresses your language. Thus the language is regular.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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