0 votes 0 votes L= {(ap)* | p is a prime number} is this regular? if yes, then how? Prerna Chauhan asked Dec 23, 2016 Prerna Chauhan 776 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 7 votes 7 votes $L=(aa+aaa)^* = \Sigma^* - \{\epsilon, a\}$. So regular. Since 2 and 3 are prime, when we take closure of these two strings we get strings of any higher length. ManojK answered Dec 23, 2016 • selected Dec 24, 2016 by Arjun ManojK comment Share Follow See all 7 Comments See all 7 7 Comments reply Prerna Chauhan commented Dec 24, 2016 reply Follow Share you mean for any prime number we can choose from aa when p=2 or aaa when when p=3 or aaaaa like that? 1 votes 1 votes ManojK commented Dec 24, 2016 reply Follow Share Yes .You can take any prime number ,but by taking 2 and 3 as prime we are getting higher length string .This is the beauty of Kleene closure which makes languge regular. 1 votes 1 votes Prerna Chauhan commented Dec 24, 2016 reply Follow Share okay now i get it. thanks :) 1 votes 1 votes aik138463 commented Jun 16, 2017 reply Follow Share bro (aa+aaa)∗ is not equal to Σ∗−{ϵ,a} @ManojK ,@prerna chauhan the given problem can be solved as just complement of 'a' which will have all possible strings except 'a' i.e ( epsilon,a^2,a^3,a^4....) total 3 States minimum dfa @Arjun Sir old correct if wrong 0 votes 0 votes LeenSharma commented Jun 16, 2017 reply Follow Share aik138463 Both $(aa+aaa)^{*}$ and $\Sigma^* - \{\epsilon, a\}$ are equivalent. 0 votes 0 votes aik138463 commented Jun 17, 2017 reply Follow Share bro @Leen Sharma Σ∗−{ϵ,a} don't have epsilon but (aa+aaa)* has it how can they be equivalents? plz correct if wrng 0 votes 0 votes LeenSharma commented Jun 17, 2017 reply Follow Share yes,you are right 1 votes 1 votes Please log in or register to add a comment.