Questions: Closure Properties of Regular Languages

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

To prove that regular languages are closed under complement, you take an NFA for language L and swap its accepting and non-accepting states. Does this correctly produce the complement language?

AYes — swapping accept states always computes the complement for any finite automaton
BNo — this construction only works for a DFA, not an NFA, because an NFA may have multiple paths for the same string, some accepting and some not
CNo — complement closure requires building an entirely new automaton from scratch using a different algorithm
DYes, but only if the NFA has no epsilon-transitions
Question 2 Multiple Choice

You have a regular language L1 of valid email address formats and a regular language L2 of reserved system strings. You want to recognize valid email addresses that are NOT reserved strings. Which closure properties do you need?

AUnion only — combine both languages and filter the result afterward
BConcatenation — append L2 to L1 to exclude those combinations
CComplement and intersection: L1 ∩ complement(L2) gives valid addresses that are not reserved strings
DKleene star applied to the difference between L1 and L2
Question 3 True / False

If L is a regular language recognized by an NFA, you can compute the complement of L by swapping the NFA's accepting and non-accepting states.

TTrue
FFalse
Question 4 True / False

Closure under intersection can be proved directly from closure under union and complement, without constructing a product automaton.

TTrue
FFalse
Question 5 Short Answer

Why do the closure properties of regular languages under union, concatenation, and Kleene star correspond exactly to the three operators in regular expressions?

Think about your answer, then reveal below.