# context.quotkbaseb(k, b)¶

Generate a transducer that accepts numbers in base $b$ that are divisible by $k$, and computes the quotient of their division by $k$ in base $b$.

Preconditions:

• $2 \le b$
• the labelset has two tapes
• both labelsets have at least $b$ generators

Postconditions:

• the automaton has $k$ states

## Examples¶

In [1]:
import vcsn
c = vcsn.context('lat<lal_char(0-9), lal_char(0-9)>, b')
c.quotkbaseb(3, 2)

Out[1]:

The transducer gives the quotient of the division by $k$.

In [2]:
a = c.quotkbaseb(7, 10)
a.shortest(10)

Out[2]:
$\varepsilon|\varepsilon \oplus \mathit{0}|\mathit{0} \oplus \mathit{7}|\mathit{1} \oplus \mathit{00}|\mathit{00} \oplus \mathit{07}|\mathit{01} \oplus \mathit{14}|\mathit{02} \oplus \mathit{21}|\mathit{03} \oplus \mathit{28}|\mathit{04} \oplus \mathit{35}|\mathit{05} \oplus \mathit{42}|\mathit{06}$