.. -*- coding: utf-8; -*-
=============================
Baum-Sweet文字列
=============================
| 初期文字 :math:`A` , :math:`B` , :math:`C` , :math:`D` による :math:`n` 番目のBaum-Sweet文字列
.. raw:: html
・BS(n) = dummy
・BS(n) = dummy
| **注** ::math:`n` を大きい数にするとおかしくなります.(入力制限で :math:`n<20` としています)
定義
=========================================
:math:`n` 番目の **Baum–Sweet文字列** *(Baum–Sweet Word)* :math:`BS_n` を以下のような定義で生成する.
:math:`BS_n` は, :math:`BS_{n-1}` に対して次の規則に従った変換を行うことにより生成できる.
ただし, :math:`BS_0 = A` とする.
- :math:`A → AB`
- :math:`B → CB`
- :math:`C → BD`
- :math:`D → DD`
この生成された文字列に対して以下の変換を行ったものがBaum–Sweet sequenceとなる.
- :math:`A → 1`
- :math:`B → 1`
- :math:`C → 0`
- :math:`D → 0`
性質
========================
アルゴリズム集
=========================================
参考文献
--------
Baum, Leonard E., and Melvin M. Sweet. "Continued fractions of algebraic power series in characteristic 2." The Annals of Mathematics 103.3 (1976): 593-610.
Allouche, Jean-Paul, and Jeffrey Shallit. Automatic sequences: theory, applications, generalizations. Cambridge university press, 2003.