Let $\Sigma = \{a, b\}$ and $L = \{aa, bb\}$. Use set notation to describe $\overline L$

Let $$\Sigma = \{a, b\}$$ and $$L = \{aa, bb\}$$. Use set notation to describe $$\overline L$$.

This is exercise 6 (page 28) from "An Introduction to Formal Languages and Automata" by Peter Linz. The author provides the following answer: $$\overline L = \{\lambda, a, b, ab, ba\} \cup \{ w \in \{a, b\}^+ : |w|\geq 3\}$$. Mine on the other hand is the following: $$\overline L = \Sigma^* - L = \{w \in \Sigma^* : w \neq aa, w \neq bb\}$$. Is my answer wrong? Thanks in advance.

• What is meant by "set notation"? Your answer is what I would write. Anyway, representation is definitely not unique and I wouldn't care that much about it.
– user114966
Feb 14, 2021 at 21:40
• Your answer is not wrong, but the book's answer makes it easier to write a regular expression or regular grammar.
– rici
Feb 14, 2021 at 21:55
• Alright then. Thanks! Feb 14, 2021 at 22:01

I would say his is more accurate IF you are not allowed to use $$L$$ or $$\Sigma$$, as it is often the case in exercise text books.