I'm supposed to show that the following language is decidable:
$\{\lt A \gt \mid A \text{ is a DFA and } L(A) \text{ is not empty}\}$
What I have
T = "On input $\lt A \gt$ where $A$ is a DFA:
- Mark the start state of $A$
Repeat until no new states gets marked
Mark any state that has a transition coming into it from any state that is already marked.- If an accept state is marked, accept. Otherwise reject.
Does this suffice to show that the language is decidable and did I make any mistakes?
The question in the title and the problem you then give are not the same. Not accepting the empty string is not the same as $L(A) \neq \emptyset$. Take for example a DFA that only accepts the empty string $\varepsilon$. Then $L(A) = \{\varepsilon\} \neq \emptyset$, but $A$ does accept the empty string.
However, the algorithm you have given is indeed enough to show that the language you have described in the question is decidable. If an accept state is ever marked, then the string that is obtained by going from the start state to that accept state must be in the language $L(A)$, and hence it is not empty. On the other hand, if no accept state is ever marked, then no string can be accepted, and hence $L(A)$ must be empty.