Skip to main content
Fixes a typo and adds a clarifying comment.
Source Link
Raphael
  • 72.9k
  • 30
  • 181
  • 393

If the string read has a certain decimal value, then reading the next digit changes that value  : multiply by $10$ and add that digit. The DFA keeps track of that value modulo $43$. ThusThus, for $q\in \{0,1,\dots,42\}$ and $a\in \{0,1,\dots,9\}$, $\delta(q,a) = 10\cdot w + a \bmod 43$ you do

$\qquad \delta(q,a) = (10\cdot q + a) \bmod 43$.

Note that the DFA does not actually perform the computation; the transition is hard-coded.

If the string read has a certain decimal value, then reading the next digit changes that value  : multiply by $10$ and add that digit. The DFA keeps track of that value modulo $43$. Thus, for $q\in \{0,1,\dots,42\}$ and $a\in \{0,1,\dots,9\}$, $\delta(q,a) = 10\cdot w + a \bmod 43$.

If the string read has a certain decimal value, then reading the next digit changes that value: multiply by $10$ and add that digit. The DFA keeps track of that value modulo $43$. Thus, for $q\in \{0,1,\dots,42\}$ and $a\in \{0,1,\dots,9\}$ you do

$\qquad \delta(q,a) = (10\cdot q + a) \bmod 43$.

Note that the DFA does not actually perform the computation; the transition is hard-coded.

Source Link
Hendrik Jan
  • 31.1k
  • 1
  • 54
  • 108

If the string read has a certain decimal value, then reading the next digit changes that value : multiply by $10$ and add that digit. The DFA keeps track of that value modulo $43$. Thus, for $q\in \{0,1,\dots,42\}$ and $a\in \{0,1,\dots,9\}$, $\delta(q,a) = 10\cdot w + a \bmod 43$.