1 Answer

$L_2$ = $\left \{ (a^{n})^{m}.b^{n}|n,m\geq 1 \right \} =\{a^+.b \ |n=1,m \geq1\} \cup \ \{a^n.b^n |n\geq1,m=1\}\cup \ \{a^{2n}.b^n |n\geq1,m=2\}\cup \ \{a^{3n}.b^n |n\geq1,m=3\}...$
According to me, It looks like CFL.
But it's not CFL. It's CSL.
CFL is not closed under infinite union.
Of course, it's not DCFL so DPDA can't be sufficient.
As Union is infinite and No. of states in NPDA is finite so NPDA is also not sufficient for it.

Take this example.. We know that {$a^nb^nc^n | n \geq 1$} is Non-CFL CSL. And We also know that the language {$a^nb^nc^n | n \geq 1$} is Countably Infinite (Because we know that $\Sigma^*$ is itself countably infinite and every subset of Countably infinite is also Countably Infinite).

Now, Take each string of above language i.e. {$a^nb^nc^n | n \geq 1$} and make into languages of One string Only.

One more thing we only told Regular language is not closed under infinite union

But it is not told All language are not closed under infinite union

I said "All Language Families" i.e. All the Standard families like Set of Regular languages, Set of Context free languages, Set of context sensitive languages, Set of Recursive languages, Set of RE languages, Set of NOT RE languages.......All such sets...None of them is closed under Infinite Union.

Of course, Set of all languages i.e. $2^{\Sigma^*}$ will be closed under every operation which produces a language.