so im trying to create a DFA for a language that has an infinite number of possible strings over the alphabet {a,b}.
can i not just have one state (initial and final state) that loops a,b to itself?
thanks
so im trying to create a DFA for a language that has an infinite number of possible strings over the alphabet {a,b}.
can i not just have one state (initial and final state) that loops a,b to itself?
thanks
A DFA is defined as a tuple $\langle \Sigma,Q,\delta,q_0,F \rangle$, with $\Sigma$ a finite alphabet, $Q$ a set of states, $\delta$ a transition function, $q_0$ an initial state, and $F\subseteq Q$ a set of accepting states.
Take $Q=F=\{q_0\}$ with $\delta(q_0,\sigma)=q_0$ for every $\sigma$. This DFA accepts every string, since it's run is always of the form $q_0,q_0,q_0,...,q_0$, and $q_0\in F$.