# An algorithm that determines if regular language accepts all string of its alphabet [closed]

Let $L$ be a regular language with the alphabet $\Sigma$. I'm trying to find an algorithm to tell whether $L=\Sigma^{*}$, whether $L$ accepts all strings in its alphabet. I think this algorithm uses converting the language to a DFA, but I'm not sure what to do from there. I have only recently began learning about regular languages and complexity, so help would be appreciated

• This is not a research-level question in Theoretical Computer Science, therefore it is off-topic here. You may consider asking on cs.stackexchange.com instead. – Jan Johannsen Nov 16 '15 at 9:03

If we had an algorithm that decide whether $L(M)=\varnothing$ or not then it can be used for deciding whether for some $DFA$ like $M$ $L(M)=\Sigma^*$ or not,(by creating the DFA $M'$ from $M$ such that $L(M)=L(M')^c$).
For deciding whether $L(M)=\varnothing$ or not suppose $p$ is pumping lemma number for $M$, then check for every string in set $A=\left \{ x\in \Sigma^*: |x|<p+1 \right \}$ whether it is in $L(M)$ or not, If $A\cap L(M)\not =\varnothing$ then $L(M)\not = \varnothing$. If $A\cap L(M)=\varnothing$ then $L(M)=\varnothing$, because if there exists a string $x$ such that $|x|>p$ and $x\in L(M)$ then by pumping down on $x$ we can reach a string like $y$ such that $y\in A\cap L(M)$ and this leads to contradiction.