Artificial intelligent assistant

Enumerator printing out strings from a language Write down the algorithm of an enumerator that prints out EXACTLY ONCE every string in the language L = {7m+ 2 | m ∈ N} over the alphabet A = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. In regards, to the enumerator, it prints out L when L accepts. How is the alphabet connected to the language, is it the input into the language? or is it the output from the language?

So, the algorithm asks you to list out every number of the form $L = \\{7m + 2 ~\vert~ m \in \mathbb N\\}$.

Note that since we should just print each number once, let's check if by iterating over the different values of $m$, if we can get the same number.

\begin{align*} 7a + 2 = 7b + 2 \\\ 7 (a - b) = 0 \\\ a = b \end{align*}

That is, if $(7a + 2 = 7b + 2)$, then $(a = b)$. So, we can literally _enumerate_ all numbers and be guaranteed that we won't repeat values.

If you know how to read python, the algorithm would be:


def listL():
i = 0
while True:
print(7 * i + 2)
i += 1

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 026977a1fd74c7fadbfd8ff923ceea3e