Consider the regular expression ((AB)* (C(A*) |B))*
Give three words (over the alphabet {A,B,C}) that are in the language of this expression, and three that are not (and label them accordingly).
Translate the language into an NFA.
I got ABABCAAB, ABABCAAAAB and ABCABABCABABCAB for words that are in the language and :
ABC, ABCCAB and ABCCABBB for words that are not in the language. Am i correct? also not sure which language is being referred to , to translate into an NFA
thank you all , i see where i went wrong
Stars represent any number of occurrences of what precedes, including zero.
In your language, each of your examples of attempts of words which are not included in the language are incorrect.
$(~~(AB)^*~~(C(A^*)~|~B)~~)^*$
Since zero occurrences of something with a star is allowed., here are a few more examples of words that are included in your language.
$\varepsilon,~B,~C,~AB,~CA,~ABB,~ABC,~BAB,~BBB,~BBC,~BCA,~BCB,~BCC,~CAA,~CAB,~CAC,\dots$
And the list continues.
Now... most of these letters can follow most of the other letters... however there are some catches. If an $A$ appears, it must satisfy one of three conditions, it either immediately precedes a $B$, it immediately follows an $A$, or it immediately follows a $C$.
Examples of words which do not follow this rule:
$A,~AA,~BA,~AAA,~AAB,~AAC,~ABA,~BAA,\dots$