Creating DFAs from REGEX

93 Views Asked by At

I am currently studying DFAs and attempting to create a DFA that only allows strings that contain 'A' three times over the language ['A','B','C']. I have the following regex which is probably not correct: B* C* A(BC)* A(BC)* A(BC)*

I did a similar problem over the language ['A','B'] where I had to find any string containing two A's and came up with the following result: B* AB* AB*, is this even correct? The inclusion of 'C' in the first language is confusing me and I'm not exactly sure how to begin in creating a regular expression for it. Any tips would be greatly appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

First of all, you should say "over the alphabet" instead of "over the language" and keep the word "language" for a set of words (or strings).

Your second regular expression is correct. For the first one, you could take $$(B,C)^*A(B,C)^*A(B,C)^*A(B,C)^*$$