Closure Properties & Language Hierarchy


Answer & solution
Answer: False; ⋃_{n≥0}{0ⁿ1ⁿ} is nonregular although each singleton is regular. (no official key was published)
False. For every n≥0 define Ln={0n1n}. Each Ln contains one fixed finite word and is regular: a finite chain of states accepts exactly that word, or the word itself is a regular expression. However, the infinite union ⋃_{n≥0}Ln={0n1n:n≥0} is not regular.
For completeness, suppose this union has pumping length p. The word w=0p1p belongs to it. Every legal decomposition w=xyz with |xy|≤p and |y|≥1 puts y entirely in the first block of zeros, say y=0d with d≥1. Pump down to i=0. The resulting xz=0p−d1p has unequal numbers of zeros and ones and is not in the union, contradicting the pumping lemma.
This is a countably infinite family of regular languages with a nonregular union, enough to disprove arbitrary infinite-union closure. Closure under two-way union, and hence any finite union, is not in conflict: the usual product/NFA constructions use finitely many component automata, whereas this family requires unboundedly many distinct word lengths. Some infinite unions do happen to be regular, for example ⋃_{n≥0}{0n}=0*. The statement fails because not every infinite union is regular.