Intersection of two languages (Formal Languages and Automata Theory)

446 Views Asked by At

So, I've seen on here this example:

$L_1 = \{a^n b^{2m} \mid n,m \geqslant 1 \}$

$L_2 = \{a^n b^{3n} \mid n \geqslant 0 \}$

$L_1 \cap L_2 = \{a^{2n} b^{6n} \mid n \geqslant 1 \}$

And I understood why: count(b) has to be divisible by 6, and count(a) is 3 times smaller than count(b).

But in this case:

$L_1 = \{a^n b^ma \mid n \geqslant 1, m \geqslant 0\}$

$L_2=\{a^n b^2 a^{2m} \mid n,m \geqslant 0 \}$

can we calculate the intersection as the last $a$ is odd in $L_1$ and even in $L_2$?