Number of states in NFA and DFA accepting strings from length 0 to n with alphabet Σ= {0,1} The question is in title. Let me repeat:


  What are the number of states in NFA and DFA accepting strings from length 0 to n with alphabet $\Sigma = {0,1}$


I feel both NFA and DFA will take following form:



and thus both have $n+1$ states. Am I correct with this? Or the DFA needs to take following form?



I feel its not necessary to have transitions defined for every symbol for every state, mainly because it does not eliminate "deterministic" nature of the automaton. Am I right?
You can define DFAs in both ways. One can require the transition function to be total, but it is indeed fine to define DFAs without this requirement. You (or your lecturer) just choose one definition and stick with it.