How to write formal languages for sets $A^2$ and $B^2$?

38 Views Asked by At

I have:

$$A = \{ab,c\}$$

$$B = \{c,ca\}$$

which represent two formal languages for the alphabet

$$\Sigma = \{a,b,c\}$$

How should I write

$$A^2 \cup B^2$$

and

$$A^2 \setminus B^2$$

I am more confused about squares, not about the operations themselves. It is ok if I will be downvoted, because I only want understand :)

1

There are 1 best solutions below

0
On BEST ANSWER

The square denotes concatenation. We define $AB = \{w_1w_2 : w_1 \in A, w_2 \in B \}$, and then $A^2 = AA$.

In your example then, $A^2$ would be $\{abab, abc, cab, cc \}$.