Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45910
Kernel: Python 3

context.quotkbaseb(k, b)

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

Preconditions:

  • 2b2 \le b

  • the labelset has two tapes

  • both labelsets have at least bb generators

Postconditions:

  • the automaton has kk states

See also:

Examples

import vcsn c = vcsn.context('lat<lal_char(0-9), lal_char(0-9)>, b') c.quotkbaseb(3, 2)
Image in a Jupyter notebook

The transducer gives the quotient of the division by kk.

a = c.quotkbaseb(7, 10) a.shortest(10)

εε00710000070114022103280435054206\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}