Regular and not regular based on the value of n

15 Views Asked by At

If $L = \{a^nb^n, n \leq 100\}$ is regular, is $L_2 = \{a^nb^n, n > 100\}$ also regular?

$L$ is regular because we can draw an FA(finite automata) for it. It's not possible to draw an FA for $L_2$, right?

1

There are 1 best solutions below

0
On BEST ANSWER

The language $L_1$ is regular since it's finite. The language $L_1 \cup L_2 = \{a^n b^n : n \geq 0\}$ is classically not regular. If $L_2$ were regular then so would $L_1 \cup L_2$ be (why?), so $L_2$ cannot be regular.