Form of strings in $\{a^nb^n | n \geq 0 \}^*$ vis-a-vis $(a^nb^n)^*$

26 Views Asked by At

Form of strings in $\{a^nb^n | n \geq 0 \}^*$ vis-a-vis $(a^nb^n)^*$

I am getting confused in understanding the type of strings in both the expressions. Both look similar to me. I have recently started studying automata theory on my own. Kindly help me in understanding this

$(a^nb^n)^*$ = $(a^nb^n)$ any number of times but what is value of n?

1

There are 1 best solutions below

2
On BEST ANSWER

When you write $(a^nb^n)^*$, $n$ is supposed to be a fixed integer. So, for instance, $(a^2b^2)^*$ is the set of words that are powers of the word $a^2b^2$, that is, $\{1, a^2b^2, a^2b^2a^2b^2, a^2b^2a^2b^2a^2b^2, \dots \}$.

The language $\{a^nb^n \mid n \geq 0\}^*$ is the set of words of the form $u_1u_2 \dots u_k$ such that $k \geq 0$ and $u_1, u_2, \ldots, u_k \in \{a^nb^n \mid n \geq 0\}$. It contains words like $1$, $a^4b^4$, $a^5b^5a^2b^2$, $a^3b^3abab$, etc.