How to write a regular expression over $\sum=\{a,b\}$ such that there're at least $3$ occurrences of adjacent different letters? For example, $abab$ is a word in the language as is $babbbaaaaaba$.
I though of the following regular expression: $$ \sum^*(abab)^*(baba)^*\sum^*(ba+ab)\sum^*(ba+ab)\sum^*(ba+ab)\sum^* $$
The $(ba+ab)$ will result in either $ba$ or $ab$ in the resulting word. We need exactly three such combinations and anything can be in between of them.
How about $$aa^*bb^*aa^*b(a+b)^*+bb^*aa^*bb^*a(a+b)^*?$$