How would I describe from finite automata to regular expressions?
I know how I would describe it if there were to be just one or more number of a's and b's using + but I'm not sure how to go about it to make it exactly 2.
So far my thought process has been:
These are the possibilities of the strings with 2 a's and 2 b's: aabb, abab, bbaa, abab, abba, baab. Now I need to add in the c's, but it doesn't matter where it is placed - so it would be c*?
To summarise what others have already put in the comments: this regular expression will do the job:
c*ac*ac*bc*bc*|c*ac*bc*ac*bc*|c*bc*ac*ac*bc*|c*ac*bc*bc*ac*|c*bc*ac*bc*ac*|c*bc*bc*ac*ac*