Let Σ = {a}, and let L be the language
L={an :nisamultipleof3butnisNOTamultipleof5}.
Is L a regular language? HINT: Maybe instead of an explicit DFA or regular expression, you can find another argument.
L is a^n where n is multiple of 3 but not multiple of 5. So n can be 3,6,9,12 but not 15 . Then 18,21,24,27 but not 30 and so on.
So one thing you can observe is that n is multiple of 3 and not multiple of 15 . It means all those numbers which are divisible by 3 but not by 5 are multiples of 15 . So we can draw a DFA for this as below
This DFA accepts strings in which n is 3 ,6,9,12 then it dont accept 15 as you can see 15 is not final state. Then again it accepts 18,21,24,27 then not accept 30 and so on.
So since there exist a DFA for language L it means language L is a regular language.
Get Answers For Free
Most questions answered within 1 hours.