I am studying for a test in computer science, and am encountering difficulties with regular expression. Here is example of a question I don't understand.
I managed to solve the following question:
Give a regular expression for the language of all words over $\{a,b\}$ which contains one of $aa,bb$ as a subword.
My solution: $$(a ∪ b)^*(aa ∪ bb)^*(a ∪ b)^*.$$
I am having trouble with the following question:
Give a regular expression for the language of all words over $\{0,1\}$ which contains $010$ as a subword.