# Justifying regular language

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?

• 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. – David Richerby Aug 1 '18 at 13:02

## 2 Answers

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.

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.