81
Mix-Automatic Sequences (LATA 2013) 2013上半期オフライン論文読み/紹介し会 新屋良磨@東工大D1 (2013/7/12)

"Mix Automatic Sequences"(LATA'13) の紹介

Embed Size (px)

DESCRIPTION

2013/7/12に東工大で行なった「2013上半期オフライン論文読み/紹介し会」での発表資料です. http://partake.in/events/7289fbce-7b7d-4d6f-9b1d-0946803f881e *このスライドには正規表現は全く出て来ません Thue-Morse sequenceの紹介だけでも面白いと思います.

Citation preview

Page 1: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences (LATA 2013)

2013上半期オフライン論文読み/紹介し会

新屋良磨@東工大D1

(2013/7/12)

Page 2: "Mix Automatic Sequences"(LATA'13) の紹介

読み手の紹介しんやりょうま@sinya8282

東工大首藤研D1

首藤研のテーマはP2Pや分散システム

僕は形式言語(オートマトン)やってます

正規表現が好きです

Page 3: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences (LATA 2013)

2013上半期オフライン論文読み/紹介し会新屋良磨@東工大D1

Page 4: "Mix Automatic Sequences"(LATA'13) の紹介

Automatic Sequences?無限列 “Sequence” に対するクラス

形式言語理論は有限長文字列の(無限)

集合,つまり“言語”が元々の対象

Automatic sequenceは無限長文字列に対する興味から始まった.

Page 5: "Mix Automatic Sequences"(LATA'13) の紹介

発表の流れ

Introduction to !ue-Morse seqeunce.

Introduction to Automatic Sequences

Automatic Sequences and Zip-Specifications (LICS’12)

Mix-Automatic Sequences (LATA’13)

Page 6: "Mix Automatic Sequences"(LATA'13) の紹介

Introduction to Thue-Morse sequence

Axel Thue (1863–1922)

5 / 55

Marston Morse (1892–1977)

6 / 55

Page 7: "Mix Automatic Sequences"(LATA'13) の紹介

Thue-Morse Seqeunce Axel Thue (1863–1922)

5 / 55

Marston Morse (1892–1977)

6 / 55

Axel !ue(1863-1922)

Maston Morse(1892-1977)

Page 8: "Mix Automatic Sequences"(LATA'13) の紹介

Thue-Morse SeqeunceDefinition (1)

!ue-Morse sequence is defined as

Page 9: "Mix Automatic Sequences"(LATA'13) の紹介

Thue-Morse SeqeunceDefinition (1)

!ue-Morse sequence is defined as

Chapter 1

The Thue–Morse Word

This chapter introduces the Thue-Morse word and presents several equiva-lent characterizations. We end with a novel application of the Thue-Morseword to construct magic squares.

1.1 The Thue–Morse word

Recall that a binary word is a word over the alphabet {0, 1}.

Definition 1.1. The Thue-Morse word t = t0t1t2 · · · is the binary wordt : N ! {0, 1} defined recursively by: t0 = 0; and for n " 0, t2n = tn andt2n+1 = tn, where a = 1 # a for a $ {0, 1}. (See Figure 1.1.)

t = t0 t1 t2 t3 · · · tm · · · t2m t2m+1 · · ·= 0 1 1 0 · · · a · · · a a · · · .

Figure 1.1: The Thue-Morse word t. Here a $ {0, 1}.

Example. Here are the first forty letters of the Thue–Morse word,

t = 0110100110010110100101100110100110010110 · · ·

Our first characterization of the Thue-Morse word is in terms of binaryexpansions of nonnegative integers. For every n $ N, let d2(n) denote thesum of the digits in the binary expansion of n.

Proposition 1.2. For all n $ N, we have tn = d2(n) mod 2.

83

Page 10: "Mix Automatic Sequences"(LATA'13) の紹介

Thue-Morse SeqeunceDefinition (1)

!ue-Morse sequence is defined as

Chapter 1

The Thue–Morse Word

This chapter introduces the Thue-Morse word and presents several equiva-lent characterizations. We end with a novel application of the Thue-Morseword to construct magic squares.

1.1 The Thue–Morse word

Recall that a binary word is a word over the alphabet {0, 1}.

Definition 1.1. The Thue-Morse word t = t0t1t2 · · · is the binary wordt : N ! {0, 1} defined recursively by: t0 = 0; and for n " 0, t2n = tn andt2n+1 = tn, where a = 1 # a for a $ {0, 1}. (See Figure 1.1.)

t = t0 t1 t2 t3 · · · tm · · · t2m t2m+1 · · ·= 0 1 1 0 · · · a · · · a a · · · .

Figure 1.1: The Thue-Morse word t. Here a $ {0, 1}.

Example. Here are the first forty letters of the Thue–Morse word,

t = 0110100110010110100101100110100110010110 · · ·

Our first characterization of the Thue-Morse word is in terms of binaryexpansions of nonnegative integers. For every n $ N, let d2(n) denote thesum of the digits in the binary expansion of n.

Proposition 1.2. For all n $ N, we have tn = d2(n) mod 2.

83

Chapter 1

The Thue–Morse Word

This chapter introduces the Thue-Morse word and presents several equiva-lent characterizations. We end with a novel application of the Thue-Morseword to construct magic squares.

1.1 The Thue–Morse word

Recall that a binary word is a word over the alphabet {0, 1}.

Definition 1.1. The Thue-Morse word t = t0t1t2 · · · is the binary wordt : N ! {0, 1} defined recursively by: t0 = 0; and for n " 0, t2n = tn andt2n+1 = tn, where a = 1 # a for a $ {0, 1}. (See Figure 1.1.)

t = t0 t1 t2 t3 · · · tm · · · t2m t2m+1 · · ·= 0 1 1 0 · · · a · · · a a · · · .

Figure 1.1: The Thue-Morse word t. Here a $ {0, 1}.

Example. Here are the first forty letters of the Thue–Morse word,

t = 0110100110010110100101100110100110010110 · · ·

Our first characterization of the Thue-Morse word is in terms of binaryexpansions of nonnegative integers. For every n $ N, let d2(n) denote thesum of the digits in the binary expansion of n.

Proposition 1.2. For all n $ N, we have tn = d2(n) mod 2.

83

Page 11: "Mix Automatic Sequences"(LATA'13) の紹介

Thue-Morse SeqeunceDefinition (2)

!en, !ue-Morse sequence is defined as

Page 12: "Mix Automatic Sequences"(LATA'13) の紹介

Definition (3)For every , let denote the sum of the digits in the binary expansion of .!en, !ue-Morse sequence is defined as

Thue-Morse Seqeunce

ホワイトボードで!

Page 13: "Mix Automatic Sequences"(LATA'13) の紹介

他にも定義は一杯(らしい).

「円周率 やネイピア数 並の普遍的存在」

Thue-Morse Seqeunce

by Je#rey Shallit (Shallit先生)

Page 14: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

DefinitionA square is a string of the form for some string .

Page 15: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

DefinitionA square is a string of the form for some string .

A word is square-free if it contains no subword that is square.

Page 16: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

DefinitionA square is a string of the form for some string .

A word is square-free if it contains no subword that is square.

An overlap is a string of the form for some

string and some single letter .

Page 17: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

DefinitionA square is a string of the form for some string .

A word is square-free if it contains no subword that is square.

An overlap is a string of the form for some

string and some single letter .

A word is overlap-free if it contains no subword that is overlap.

Page 18: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

DefinitionA square is a string of the form for some string .

A word is square-free if it contains no subword that is square.

An overlap is a string of the form for some

string and some single letter .

A word is overlap-free if it contains no subword that is overlap.

(証明は省略.結構ややこしい)!ue-Morse sequence is overlap-free.

Fact

Page 19: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

ホワイトボードで!

!eorem!ere are no square-free binary strings of length

Page 20: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

Page 21: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

文字が2種類の場合は,square-freeなsequenceは存在しない.

では文字が3種類の場合は?

Page 22: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceにおける「繰り返し」

文字が2種類の場合は,square-freeなsequenceは存在しない.

では文字が3種類の場合は?

「square-freeでなるべく長い文字列を生成するバックトラックベースのプログラムを動かすとどうも止まらないっぽい.」らしい

Page 23: "Mix Automatic Sequences"(LATA'13) の紹介

QuestionDoes there exists a square-free sequence

over the alphabet

Avoidability in words という分野の芽吹き

Page 24: "Mix Automatic Sequences"(LATA'13) の紹介

QuestionDoes there exists a square-free sequence

over the alphabet Axel Thue (1863–1922)

5 / 55

Axel !ue

存在する.!ue-Morse sequence を使って構成できる.

Avoidability in words という分野の芽吹き

Page 25: "Mix Automatic Sequences"(LATA'13) の紹介

ホワイトボードで!

!eorem (!ue)

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

For n # 1, define cn to be the number of 1’s between the n-thand (n + 1)-th occurence of 0 in the Thue-Morse sequence t.Then the seqeunce c = 210201 · · · is a square-free sequenceover the alphabet !3.

1

Avoidability in words という分野の芽吹き

Page 26: "Mix Automatic Sequences"(LATA'13) の紹介

Avoidability in words という分野の芽吹き

最近でも色々activeに研究されてるらしい.

詳しくはShallit先生による解説スライド “!e Ubiquitous !ue-Morse Sequence” をチェック!

https://cs.uwaterloo.ca/~shallit/Talks/green3.pdf

Page 27: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceと級数84 CHAPTER 1. THE THUE–MORSE WORD

Proof. Note that d2 satisfies the following recurrence relations: d2(0) = 0;d2(2n) = d2(n); and d2(2n + 1) = d2(n) + 1. Since d2(n) mod 2 satisfies thesame recurrences defining tn, we have tn = d2(n) mod 2.

Exercise 1.1. If t = t0t1t2 · · · is the Thue-Morse word, show that

!

n!0

(!1)tnxn = (1 ! x)(1 ! x2)(1 ! x4)(1 ! x8) · · · .

Exercise 1.2 ([AS1999]). Let t = t0t1t2 · · · be the Thue-Morse word andlet sn = (!1)tn for n " 0. Compute the following.

"1

2

#s0"

3

4

#s1"

5

6

#s2

· · ·"

2i + 1

2i + 2

#si

· · · .

(Hint: Let P =$

n!0

%2n+12n+2

&sn

, Q =$

n!1

%2n

2n+1

&sn

. Show that PQ = Q2P .)

1.2 The Thue–Morse morphism

Definition 1.3. The Thue-Morse morphism is the map µ : {0, 1}" #{0, 1}" defined by µ(0) = 01 and µ(1) = 10.

The Thue-Morse morphism µ is an example of a 2-uniform morphism:a morphism ! of words over an alphabet A is a k-uniform morphism if!(a) is a word of length k for all a $ A. Chapter 2.1 will have more to sayabout k-uniform morphisms.

If s is an infinite word over the alphabet {0, 1}, then let s be the imageof s under the endomorphism defined by 0 %# 1 and 1 %# 0. This morphismis often called the exchange morphism. Note that µ(s) = µ(s) for anyfinite or infinite word s over {0, 1}.

Proposition 1.4. The Thue-Morse word t is a fixed point of the Thue-Morse morphism µ, i.e., µ(t) = t. Moreover, t and t are the only fixedpoints of µ.

Proof. Suppose s is a binary word. Since µ maps each a $ {0, 1} to aa, itfollows that (µ(s))2n = sn and (µ(s))2n+1 = sn for all n " 0. So if µ(s) = s,then s2n = sn and s2n+1 = sn. If s0 = 0, then s = t; and if s0 = 1, thens = t. Therefore, t and t are the only fixed points of µ.

The above result characterizes the Thue-Morse word as the infinite bi-nary word beginning with 0 that is a fixed point of µ. Defining infinite words

Definition(3)から成り立つことが自明.

Page 28: "Mix Automatic Sequences"(LATA'13) の紹介

数列

は収束するか?

!ue-Morse sequenceを使って解く

おまけ: Thue-Morse sequenceと級数

Page 29: "Mix Automatic Sequences"(LATA'13) の紹介

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · ·

where sn = (!1)tn .

1

先ほどの数列の極限は

と!ue-Morse sequenceによる級数で表現可能.

と置いて, について求める.

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

として P について求める.

1

おまけ: Thue-Morse sequenceと級数

Page 30: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceと級数

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

PQ =1

2

!!

n"0

"n

n + 1

#sn

=1

2

!!

n"0

"2n + 1

2n + 2

#s2n+1 !!

n"1

"2n

2n + 1

#sn

=1

2· Q

P.

1

Page 31: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceと級数

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

PQ =1

2

!!

n"0

"n

n + 1

#sn

=1

2

!!

n"0

"2n + 1

2n + 2

#s2n+1 !!

n"1

"2n

2n + 1

#sn

=1

2· Q

P.

1

よって   となり   .

Page 32: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceと級数

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

PQ =1

2

!!

n"0

"n

n + 1

#sn

=1

2

!!

n"0

"2n + 1

2n + 2

#s2n+1 !!

n"1

"2n

2n + 1

#sn

=1

2· Q

P.

1

よって   となり   .

ところでこの

は何?有理数?無理数?

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

PQ =1

2

!!

n"0

"n

n + 1

#sn

=1

2

!!

n"0

"2n + 1

2n + 2

#s2n+1 !!

n"1

"2n

2n + 1

#sn

=1

2· Q

P.

1

Page 33: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceと級数

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

PQ =1

2

!!

n"0

"n

n + 1

#sn

=1

2

!!

n"0

"2n + 1

2n + 2

#s2n+1 !!

n"1

"2n

2n + 1

#sn

=1

2· Q

P.

1

よって   となり   .

ところでこの

は何?有理数?無理数?

!!

n"0

"2n + 1

2n + 2

#sn

=

"1

2

#s0 "3

4

#s1

· · ·"

2n + 1

2n + 2

#sn

· · · (1)

where sn = (!1)tn .

P = ("), Q =!!

n"0

"2n

2n + 1

#sn

.

PQ =1

2

!!

n"0

"n

n + 1

#sn

=1

2

!!

n"0

"2n + 1

2n + 2

#s2n+1 !!

n"1

"2n

2n + 1

#sn

=1

2· Q

P.

1

_人人人人人人人人_> 解けたら25$ <‾Y^Y^Y^Y^Y^Y^Y‾

  by Shallit先生

Page 34: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceとチェス

FIDEの公式ルール (50手ルール): 以下の条件を満たすとき、どちらか一方のプレーヤーの要求によりゲームはその場でドローとなる。・過去50手の間、白・黒ともにポーンが動かず、またどの駒も取られていないとき。・(自分の手番の場合は)これから指す自分の着手の結果、上の条件が満たされるとき。 スコアシートにその手をあらかじめ記入し、確かにその手を指す意思があることを示さ なければならない。

チェスには「無限手数ゲーム」を防ぐためのルールがいくつかある.

Page 35: "Mix Automatic Sequences"(LATA'13) の紹介

チェスには「無限手数ゲーム」を防ぐためのルールがいくつかある.

FIDEの公式ルール (千日手):

相手の手で同一局面が3回生じたとき、または自分の次の手で同一局面が3回生じるときに引き分けとなる。ただし自動的に引き分けになるのではなく、自分の手番の時に指摘しなければならない。公式戦では、審判員(アービター)に申し立てる必要がある。

おまけ: Thue-Morse sequenceとチェス

Page 36: "Mix Automatic Sequences"(LATA'13) の紹介

実質的には50手ルールだけがあれば無限手数ゲームは起きない(引き分け要求した場合).

千日手ルールだけの場合でも無限手数ゲームは起きない(引き分け要求した場合).

千日手ルールを「同手順が3回連続したら」に緩めた場合は?

おまけ: Thue-Morse sequenceとチェス

Page 37: "Mix Automatic Sequences"(LATA'13) の紹介

The Thue-Morse Sequence and Chess

Consider the following alternative rule: a draw occurs if the samesequence of moves occurs twice in succession and is immediatelyfollowed by the first move of a third repetition.Can an infinite game of chess occur under this rule?

The question was answered by Max Euwe, the Dutch chess master(and world champion from 1935–1937) in 1929.

Figure: Max Euwe (1901–1981)

49 / 55

可能だよ!!ue-Morse sequence を使って構成できるよ!

Max Euwe (1901-1981)

おまけ: Thue-Morse sequenceとチェス

1935-1937 年度チェス世界王者

千日手ルールを「同手順が3回連続したら」に緩めた場合は?

Page 38: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceとチェス

Chapter 1

The Thue–Morse Word

This chapter introduces the Thue-Morse word and presents several equiva-lent characterizations. We end with a novel application of the Thue-Morseword to construct magic squares.

1.1 The Thue–Morse word

Recall that a binary word is a word over the alphabet {0, 1}.

Definition 1.1. The Thue-Morse word t = t0t1t2 · · · is the binary wordt : N ! {0, 1} defined recursively by: t0 = 0; and for n " 0, t2n = tn andt2n+1 = tn, where a = 1 # a for a $ {0, 1}. (See Figure 1.1.)

t = t0 t1 t2 t3 · · · tm · · · t2m t2m+1 · · ·= 0 1 1 0 · · · a · · · a a · · · .

Figure 1.1: The Thue-Morse word t. Here a $ {0, 1}.

Example. Here are the first forty letters of the Thue–Morse word,

t = 0110100110010110100101100110100110010110 · · ·

Our first characterization of the Thue-Morse word is in terms of binaryexpansions of nonnegative integers. For every n $ N, let d2(n) denote thesum of the digits in the binary expansion of n.

Proposition 1.2. For all n $ N, we have tn = d2(n) mod 2.

83

!ue-Morse sequence

に対して, の時

OTHER SEMI-OPEN GAMES They start: 1. e2-e4 XABCDEFGH 8rsnlwqkvlntr( 7zppzppzppzpp' 6-+-+-+-+& 5+-+-+-+-% 4-+-+P+-+$ 3+-+-+-+-# 2PzPPzP-zPPzP" 1tRNvLQmKLsNR! Xabcdefgh

WHITE SAYS: These openings are not so popular because they're not so good. Whichever one you play I know how to gain an advantage.

BLACK SAYS: My opening's just as good as anything else. Because it's not so popular I have less to learn and you probably won't know very much about it.

Nb1-c3 Nb8-c6 Nc3-b1 Nc6-b8

 の時Ng1-f3 Ng8-f6 Nf3-g1 Nf6-g8

と進めれば同一手順を3回以上繰り返さずに無限手数ゲームが可能!

Page 39: "Mix Automatic Sequences"(LATA'13) の紹介

おまけ: Thue-Morse sequenceとチェス

Chapter 1

The Thue–Morse Word

This chapter introduces the Thue-Morse word and presents several equiva-lent characterizations. We end with a novel application of the Thue-Morseword to construct magic squares.

1.1 The Thue–Morse word

Recall that a binary word is a word over the alphabet {0, 1}.

Definition 1.1. The Thue-Morse word t = t0t1t2 · · · is the binary wordt : N ! {0, 1} defined recursively by: t0 = 0; and for n " 0, t2n = tn andt2n+1 = tn, where a = 1 # a for a $ {0, 1}. (See Figure 1.1.)

t = t0 t1 t2 t3 · · · tm · · · t2m t2m+1 · · ·= 0 1 1 0 · · · a · · · a a · · · .

Figure 1.1: The Thue-Morse word t. Here a $ {0, 1}.

Example. Here are the first forty letters of the Thue–Morse word,

t = 0110100110010110100101100110100110010110 · · ·

Our first characterization of the Thue-Morse word is in terms of binaryexpansions of nonnegative integers. For every n $ N, let d2(n) denote thesum of the digits in the binary expansion of n.

Proposition 1.2. For all n $ N, we have tn = d2(n) mod 2.

83

!ue-Morse sequence

に対して, の時

OTHER SEMI-OPEN GAMES They start: 1. e2-e4 XABCDEFGH 8rsnlwqkvlntr( 7zppzppzppzpp' 6-+-+-+-+& 5+-+-+-+-% 4-+-+P+-+$ 3+-+-+-+-# 2PzPPzP-zPPzP" 1tRNvLQmKLsNR! Xabcdefgh

WHITE SAYS: These openings are not so popular because they're not so good. Whichever one you play I know how to gain an advantage.

BLACK SAYS: My opening's just as good as anything else. Because it's not so popular I have less to learn and you probably won't know very much about it.

Nb1-c3 Nb8-c6 Nc3-b1 Nc6-b8

 の時Ng1-f3 Ng8-f6 Nf3-g1 Nf6-g8

と進めれば同一手順を3回以上繰り返さずに無限手数ゲームが可能!

!ue-Morse sequence はcube-free という性質を使っている(証明略).

Page 40: "Mix Automatic Sequences"(LATA'13) の紹介

遍在する Thue-Morse sequence

この章で扱った !ue-Morse sequence の紹介は主に Shallit 先生による解説スライド

“!e Ubiquitous !ue-Morse Sequence” から.https://cs.uwaterloo.ca/~shallit/Talks/green3.pdf

Page 41: "Mix Automatic Sequences"(LATA'13) の紹介

遍在する Thue-Morse sequence

この章で扱った !ue-Morse sequence の紹介は主に Shallit 先生による解説スライド

“!e Ubiquitous !ue-Morse Sequence” から.

ここからようやくAutomatic Sequences の話

https://cs.uwaterloo.ca/~shallit/Talks/green3.pdf

Page 42: "Mix Automatic Sequences"(LATA'13) の紹介

Introduction to Thue-Morse sequence

Page 43: "Mix Automatic Sequences"(LATA'13) の紹介

Automatic Sequences?無限列 “Sequence” に対するクラス

形式言語理論は有限長文字列の(無限)

集合,つまり“言語”が元々の対象

Automatic sequenceは無限長文字列に対する興味から始まった.

Page 44: "Mix Automatic Sequences"(LATA'13) の紹介

形式言語理論における言語の階層

RegularContext free

Context sensitive

Recursively enumerable

Page 45: "Mix Automatic Sequences"(LATA'13) の紹介

形式言語理論における言語の階層

Automaton

Pushdownautomaton

Linear-boundedTuring machine

Turing machine

Page 46: "Mix Automatic Sequences"(LATA'13) の紹介

形式言語理論における言語の階層

Automaton

Pushdownautomaton

Linear-boundedTuring machine

Turing machine

「言語には計算モデルが色々ある.Sequenceは?」

Page 47: "Mix Automatic Sequences"(LATA'13) の紹介

DefinitionSequenceを特徴付ける: k-morphic

A morphism is a function satisfying for all

A morphism is prolongable on if there exists a letter such that for some

In this case, the infinite sequence

is the unique infinite fixed point of starting with

Page 48: "Mix Automatic Sequences"(LATA'13) の紹介

DefinitionSequenceを特徴付ける: k-morphic

A morphism is a function satisfying for all

A morphism is prolongable on if there exists a letter such that for some

In this case, the infinite sequence

is the unique infinite fixed point of starting with

このように,ある morphism の不動点となる sequence を morphic sequence と呼ぶ.

Page 49: "Mix Automatic Sequences"(LATA'13) の紹介

DefinitionSequenceを特徴付ける: k-morphic

A morphism is k-uniform if for all

An infinite sequence is k-morphic if there exists ak-uniform morphism that has as a fixed point.

!ue-Morse sequence は 2-morphic.

となるmorphismに対し,

Page 50: "Mix Automatic Sequences"(LATA'13) の紹介

DefinitionSequenceを特徴付ける: k-automatic

An infinite sequence is k-automatic if there exists ak-DFAO such that for all the output of the automatonwhen reading the word is ,with the base-k expansion of

ホワイトボードで!DFAOとか説明が面倒なので

Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

Page 51: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceを特徴付ける: k-automatic

!ue-Morse sequence は 2-automatic.Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

Page 52: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceを特徴付ける: k-automatic

!ue-Morse sequence は 2-automatic.Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

Page 53: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceを特徴付ける: k-automatic

!ue-Morse sequence は 2-automatic.Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

Page 54: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceを特徴付ける: k-automatic

!ue-Morse sequence は 2-automatic.Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

注意: この資料ではDFAOは常に右から左に文字列を読み進める!!

Page 55: "Mix Automatic Sequences"(LATA'13) の紹介

k-automatic = k-morphic

ホワイトボードで!

!eorem (Cobham)Let . !en a sequence is k-automatic if and only if is k-morphic.

Page 56: "Mix Automatic Sequences"(LATA'13) の紹介

Automatic Sequences andZip Specificatinos (LICS’12)

Page 57: "Mix Automatic Sequences"(LATA'13) の紹介

Automatic Sequences and Zip-SpecificationsClemens Grabmayer

Utrecht University, Dept. of PhilosophyJanskerkhof 13a, 3512 BL Utrecht, The Netherlands

Email: [email protected]

Jorg EndrullisVU University Amsterdam, Dept. of Computer Science

De Boelelaan 1081a, 1081 HV Amsterdam, The NetherlandsEmail: [email protected]

Dimitri HendriksVU University Amsterdam, Dept. of Computer Science

De Boelelaan 1081a, 1081 HV Amsterdam, The NetherlandsEmail: [email protected]

Jan Willem KlopVU University Amsterdam, Dept. of Computer Science

De Boelelaan 1081a, 1081 HV Amsterdam, The NetherlandsEmail: [email protected]

Lawrence S. MossIndiana University, Dept. of Mathematics

831 East Third Street, Bloomington, IN 47405-7106 USAEmail: [email protected]

Abstract—We consider infinite sequences of symbols, alsoknown as streams, and the decidability question for equality ofstreams defined in a restricted format. (Some formats lead to un-decidable equivalence problems.) This restricted format consistsof prefixing a symbol at the head of a stream, of the streamfunction ‘zip’, and recursion variables. Here ‘zip’ interleavesthe elements of two streams alternatingly. The celebrated Thue–Morse sequence is obtained by the succinct ‘zip-specification’

M = 0 : X X = 1 : zip(X,Y) Y = 0 : zip(Y,X)

The main results are as follows. We establish decidabilityof equivalence of zip-specifications, by employing bisimilar-ity of observation graphs based on a suitably chosen coba-sis. Furthermore, our analysis, based on term rewriting andcoalgebraic techniques, reveals an intimate connection betweenzip-specifications and automatic sequences. This leads to a newand simple characterization of automatic sequences. The study ofzip-specifications is placed in a wider perspective by employingobservation graphs in a dynamic logic setting, yielding yetanother alternative characterization of automatic sequences.

By the first characterization result, zip-specifications can beperceived as a term rewriting syntax for automatic sequences.For streams � the following are equivalent: (a) � can be specifiedusing zip; (b) � is 2-automatic; and (c) � has a finite observationgraph using the cobasis hhd, even, oddi. Here even and odd aredefined by even(a : s) = a : odd(s), and odd(a : s) = even(s).The generalization to zip-k specifications (with zip-k interleavingk streams) and to k-automaticity is straightforward.

As a natural extension of the class of automatic sequences, wealso consider ‘zip-mix’ specifications that use zips of differentarities in one specification. The corresponding notion of automa-ton employs a state-dependent input-alphabet, with a numberrepresentation (n)A = dm . . . d0 where the base of digit di isdetermined by the automaton A on input di�1 . . . d0.

Finally we show that equivalence is undecidable for a simpleextension of the zip-mix format with projections analogous toeven and odd. But it remains open whether zip-mix specificationswithout the extension have a decidable equivalence problem.

Index Terms—Automatic sequences, term rewriting, coalgebra,dynamic logic.

I. INTRODUCTION

Infinite sequences of symbols, also called ‘streams’, are aplayground of common interest for logic, computer science(functional programming, formal languages, combinatorics oninfinite words), mathematics (numerations and number theory,fractals) and physics (signal processing). For logic and theo-retical computer science this interest focuses in particular onunique solvability of systems of recursion equations definingstreams, expressivity of specification formats, and productivity(does a stream specification indeed unfold to its intendedinfinite result without stagnation). In addition, there is the‘infinitary word problem’: when do two stream specificationsover a first-order signature define the same stream? And, is thatquestion decidable? If not, what is the logical complexity?

Against this general background, we can now situate theactual content of this paper. In the landscape of streams thereare some well-known families, with automatic sequences [2]as a prominent family, including members such as the Thue–Morse sequence [1]. Such sequences are defined in first-ordersignature that includes some basic stream functions such ashd (head), tl (tail), ‘:’ (prefixing a symbol to an infinitestream), even, odd; all these are familiar from any functionalprogramming language.

One stream function in particular is frequently used instream specifications. This is the zip function, that ‘zips’ theelements of two streams in alternating order, starting withthe first stream. Now there is an elegant definition of theThue–Morse sequence M using only this function zip, nextto prefixing an element, and of course recursion variables:

M = 0 : X X = 1 : zip(X,Y) Y = 0 : zip(Y,X) (1)

For general term rewrite systems, stream equality is easilyseen to be undecidable [18], just as most interesting prop-erties of streams. But by adopting some restrictions in thedefinitional format, decidability may hold.

Page 58: "Mix Automatic Sequences"(LATA'13) の紹介

Zip-k specification

DefinitionFor , the function is defined by the following rewriting rule:

!us interleaves its argument sequences:

ホワイトボードで!Specificationの説明が面倒なので

Page 59: "Mix Automatic Sequences"(LATA'13) の紹介

Zip specification and Thue-Morse sequence!ue-Morse sequence は zip-2 specified

という zip-2 specification について,開始記号Mから!ue-Morse sequenceが生成される.

Page 60: "Mix Automatic Sequences"(LATA'13) の紹介

Zip specification and Thue-Morse sequence!ue-Morse sequence は zip-2 specified

という zip-2 specification について,開始記号Mから!ue-Morse sequenceが生成される.

Page 61: "Mix Automatic Sequences"(LATA'13) の紹介

Zip specification and Thue-Morse sequence!ue-Morse sequence は zip-2 specified

という zip-2 specification について,開始記号Mから!ue-Morse sequenceが生成される.

Page 62: "Mix Automatic Sequences"(LATA'13) の紹介

Zip specification and Thue-Morse sequence!ue-Morse sequence は zip-2 specified

という zip-2 specification について,開始記号Mから!ue-Morse sequenceが生成される.

Page 63: "Mix Automatic Sequences"(LATA'13) の紹介

Zip specification and Thue-Morse sequence!ue-Morse sequence は zip-2 specified

という zip-2 specification について,開始記号Mから!ue-Morse sequenceが生成される.

Page 64: "Mix Automatic Sequences"(LATA'13) の紹介

Unziping zip-2 に対する destructor: even と odd.

Page 65: "Mix Automatic Sequences"(LATA'13) の紹介

Unziping zip-2 に対する destructor: even と odd.

これをzipに対して使うと:

のように “unzip” できる.

Page 66: "Mix Automatic Sequences"(LATA'13) の紹介

zip-k specification = k-automatic

“Automatic Sequences and Zip Specifications”  (LICS’12)での成果(簡略化して紹介).

!eoremA sequence is k-automatic if and only if iszip-k specified.

証明にはObservation-graph なるものを使う説明が面倒くさいのでホワイトボードで!

Page 67: "Mix Automatic Sequences"(LATA'13) の紹介

paperfolding: (even/odd)-observation graph of zip-spec

(even/odd)-observation graph

Fold /^odd Tyrol /^

Peaks /^

Valleys /_

even

even

odd

even, odd

even, odd

Folds = zip(Tyrol,Folds)

Tyrol = zip(Peaks,Valleys)

Peaks = ^ : Peaks

Valleys = _ : Valleys

Folds !! ^ :^ :_ :^ :^ :_ :_ :^ :^ :^ :_ :_ :^ :_ :_ :^ . . .

証明にはObservation-graph なるものを使う説明が面倒くさいのでホワイトボードで!

zip-k specification = k-automatic

Page 68: "Mix Automatic Sequences"(LATA'13) の紹介

LICS’12 の論文.

arxiv版は証明とかでページ数が多い(32p).

coalgebra とか cobasisとか bisimulation とか出てくる(困惑).

このzip-k specificationを一般化したものが次章のMix-Automatic Sequencesに繋がる!

“Automatic Sequences and Zip-Specifications”

Page 69: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences(LATA’13)

Page 70: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences

Jorg Endrullis1, Clemens Grabmayer2, and Dimitri Hendriks1

1 VU University Amsterdam, The Netherlands2 Utrecht University, The Netherlands

Abstract. Mix-automatic sequences form a proper extension of theclass of automatic sequences, and arise from a generalization of finitestate automata where the input alphabet is state-dependent. In this pa-per we compare the class of mix-automatic sequences with the class ofmorphic sequences. For every polynomial ! we construct a mix-automaticsequence whose subword complexity exceeds !. This stands in contrastto automatic and morphic sequences which are known to have at mostquadratic subword complexity. We then adapt the notion of k-kernels toobtain a characterization of mix-automatic sequences, and employ thisnotion to construct morphic sequences that are not mix-automatic.

1 Introduction

Automatic sequences [1] were introduced by Cobham [4] in 1972, and have sincebeen been studied extensively. A sequence w : N ! ! over a finite alphabet !is automatic if it can be realized by a finite automaton that, for some k " 2,takes the base-k expansion (n)k of a number n # N as input and outputs the n-thletter of w; in this case w is called k-automatic. For multiplicatively independentk and ", k-automaticity and "-automaticity are almost separated notions; e.g., ifa sequence is both 2-automatic and 3-automatic, then it is ultimately periodic.

Therefore it is natural to study also nonstandard numeration systems, andthe classes of automatic sequences they give rise to. Rigo [10] and Rigo andMaes [11] study ‘abstract numeration systems’ based on the ‘shortlex’ order onan infinite regular language, induced by an order on the alphabet. With thisconcept they precisely capture the class of morphic sequences.

We introduce dynamic radix numeration systems which are obtained as a nat-ural generalization from another variation of the standard base-k representation:the mixed radix numeration systems [8] in which the base used only depends onthe position of a digit. In dynamic radix numeration systems the base used maydepend on the input digits read so far. Sequences realized by finite automatathat take dynamic radix input we call mix-automatic.

We first consider an example of a 2-automatic sequence, the celebrated Thue–Morse sequence, and explain how it is generated by the automaton in Figure 1.The automaton has states {q0, q1}, initial state q0, input alphabet {0, 1} andoutput alphabet {a, b}. The output letter assigned to q0 is a and to q1 is b(indicated by state/output in the states of the automaton). The n-th letter ofthe sequence is the output of the automaton when reading (n)2, the base-2

A.-H. Dediu, C. Martın-Vide, and B. Truthe (Eds.): LATA 2013, LNCS 7810, pp. 262–274, 2013.c! Springer-Verlag Berlin Heidelberg 2013

Page 71: "Mix Automatic Sequences"(LATA'13) の紹介

zip-k specification はk引数のzipのみを使う. (kは固定)

「1つの specification に任意引数の zip を使えるようにしたらどうなる?」        → Zip-mix specification

Zip-k specification の一般化

zip-k specification には DFAOが対応した.  では zip-mix specificationには何が対応?

Page 72: "Mix Automatic Sequences"(LATA'13) の紹介

Zip-mix specification and mix-DFAO

ホワイトボードで!mix-DFAOとか説明が面倒なので

Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

mix-DFAOでは dynamic numeration system という特殊な記数法を使う!

Mix-Automatic Sequences 263

q0/a q1/b

0 1

1

0

Fig. 1. DFAO generating the Thue–Morse sequence abbabaabbaababba · · ·

expansion of n. For example, for input (3)2 = 11 the automaton ends in state q0with output a, and for input (4)2 = 100 in state q1 with output b.

The automaton of Figure 1 is called a deterministic finite-state automaton withoutput (DFAO). For k ! 2, a k-DFAO is an automaton over the input alphabetN<k = {0, 1, . . . , k " 1}. An infinite sequence w # !! is called k-automatic ifthere exists a k-DFAO such that for every n # N the output of the automatonwhen reading the word (n)k # N!

<k is w(n), with (n)k the base-k expansion of n.

Mix-Automatic Sequences. The class of automatic sequences is well-known tohave good closure properties; for example, it is closed under shifts (prependingletters or removing prefixes), and taking arithmetic subsequences. The class ofmix-automatic sequences extends the class of automatic sequences, has all theseclosure properties, and additionally is closed under k-shu!ing, for all k ! 2.

Mix-automatic sequences are defined via mix-DFAOs, automata that general-ize k-DFAOs by allowing that the alphabet of the symbol to be processed nextdepends on the current state. Let us consider the example of a mix-DFAO shownin Figure 2. The state q0 has two outgoing edges, reflecting the input alphabet{0, 1}, while q1 has three outgoing edges, reflecting the input alphabet {0, 1, 2}.

q0/a q1/b

0 10, 1

2

Fig. 2. An example of a mix-DFAO

Dynamic Radix Numeration Systems. Clearly, the numeration system used forthe input of mix-DFAOs cannot be the standard base-k representation. Instead,in the number representation that we let these automata operate on, the base foreach digit is determined by the lower-significance digits that have already beenread.Thus we let the automata read from the least to the most significant digit(i.e., we let the reading direction be from right to left). We write (n)M for thenumber representation of n that serves as input for the automaton M . For Mthe automaton from Figure 2, the representations of the first eight numbers are

(0)M = " (2)M = 1202 (4)M = 120202 (6)M = 131202

(1)M = 12 (3)M = 1312 (5)M = 2312 (7)M = 130312

where a subscript b (not part of the number representation) in db indicates thebase employed for d. Let us explain this at the example (17)M = 12022312.

264 J. Endrullis, C. Grabmayer, and D. Hendriks

Knowing the base for each digit, we can reconstruct the value of the representa-tion as follows: 17 = 1 ·2 ·3 ·2+0 ·3 ·2+2 ·2+1 where each digit is multiplied withthe product of the bases of the lower digits. Given just the representation 1021,the base of each of the digits is determined by the input alphabet of the state ofthe automaton reading the digit. The states q0 and q1 ofM have input alphabets{0, 1} and {0, 1, 2} and thus expect the input in base 2 and 3, respectively. Whenreading 1021 (right to left) the automaton M visits the states q0, q1, q0, q0 andq1. Annotating the input digits with the state of the automaton when readingthe digit, we obtain 1q00q02q11q0 , and taking into account the bases expected bythese states, yields 12022312.

We emphasize that, given a mix-DFAO M , every n ! N has a unique rep-resentation (n)M = dm · · · d0 (without leading zeros). This representation canbe computed as follows. Assume that we have determined the value of the dig-its di!1 · · · d0 with corresponding bases bi!1 · · · b0. The base bi of digit di isdetermined by the input alphabet of the state of the automaton after read-ing di!1 · · · d0 (right to left), and digit di is the remainder of the division ofn"

!0"j<i dj(bj!1 · · · b1 · b0) by bi.

Every mix-DFAO M gives rise to a mix-automatic sequence w ! !! bydefining for every n ! N, w(n) as the output of M when reading (n)M .

Zip-Specifications. In [6] it has been shown that k-automatic sequences are pre-cisely the class of sequences definable by zip-k specifications, that is, systems ofrecursion equations {X1 = t1, . . . , Xn = tn} with terms ti built from the syntax

t ::= Xi | a : t | zipk(t, . . . , t) (1 # i # n, a ! !)

Semantically, the term notation a : t indicates the concatenation of a letter with asequence, and the k-ary symbol zipk stands for the function of type ("!)k $ "!

that zips (or interleaves or shu!es) its k argument sequences, and is defined by

zipk(w0, . . . , wk!1)(kn+ i) = wi(n) (0 # i < k)

Operationally, zipk can be defined by the rewrite rule

zipk(x : t0, t1, . . . , tk!1) $ x : zipk(t1, . . . , tk!1, t0) (1)

The zip operation on finite words is known in the literature as perfect shu!e [2].An example of a zip-2 specification corresponding to the 2-DFAO from Fig. 1 is

M = a : Q1 Q0 = a : zip2(Q0,Q1) Q1 = b : zip2(Q1,Q0) (2)

The Thue–Morse sequence is the unique solution for the variable M in this spec-ification, or, from a rewriting perspective, it is the infinite normal form of M inthe rewrite system consisting of (1) and (2), orienting the equations from left toright. For further details we refer to [6].

The introduction of mix-automatic sequences was motivated by the charac-terization of k-automatic sequences as the class of sequences that can defined by

Page 73: "Mix Automatic Sequences"(LATA'13) の紹介

zip-mix specified = mix-automatic sequence

実はここまで “Automatic Sequences and Zip Specifications” (LICS’12)での成果.

!eoremA sequence is mix-automatic if and only if iszip-mix specified.

では,“Mix-Automatic Sequences” (LATA’13)での成果は?

Page 74: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences での成果は三つMix-automatic sequence に対して 「mix-kernelが有限」 という別の特徴づけをした(超マニアック)

Page 75: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences での成果は三つMix-automatic sequence に対して 「mix-kernelが有限」 という別の特徴づけをした(超マニアック)

任意の多項式 f に対して subword complexity が Ω(f(n)) の mix-automatic sequence となる具体的構成法を与えた.系として「morphic sequence でない mix-automatic sequence」の存在を示した.

Page 76: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences での成果は三つMix-automatic sequence に対して 「mix-kernelが有限」 という別の特徴づけをした(超マニアック)

任意の多項式 f に対して subword complexity が Ω(f(n)) の mix-automatic sequence となる具体的構成法を与えた.系として「morphic sequence でない mix-automatic sequence」の存在を示した.

「mix-automatic sequence でない morphic sequence」 の存在(構成法)を示した.

Page 77: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences での成果は三つ

任意の多項式 f に対して subword complexity が Ω(f(n)) の mix-automatic sequence となる具体的構成法を与えた.系として「morphic sequence でない mix-automatic sequence」の存在を示した.

僕が疲れてない∧皆が疲れてない∧時間がある ⇒ ホワイトボードで!

Page 78: "Mix Automatic Sequences"(LATA'13) の紹介

Mix-Automatic Sequences での成果は三つ

「mix-automatic sequence でない morphic sequence」 の存在(構成法)を示した.

僕が疲れてない∧皆が疲れてない∧時間がある ⇒ ホワイトボードで!

Page 79: "Mix Automatic Sequences"(LATA'13) の紹介

形式言語理論における言語の階層(再)

RegularContext free

Context sensitive

Recursively enumerable

Page 80: "Mix Automatic Sequences"(LATA'13) の紹介

Sequenceの階層

k-automatic sequence,

k-morphic sequencezip-k specified sequence,morphic

sequencemix

automaticsequence

Page 81: "Mix Automatic Sequences"(LATA'13) の紹介

論文で紹介されてる未解決問題

Mix-Automatic Sequences 273

sequences are generated by DFAOs with state-dependent input alphabets. Theseautomata read number representations dndn!1 · · · d0 where the base of a digitdk depends on the value of the lower-significance digits dk!1 · · · d0.

The results of this paper can be summarized as follows:

(i) A characterization of mix-automatic sequences via a generalization of theconcept of k-kernel (by which automatic sequences can be characterized).

(ii) For every polynomial ! there is a mix-automatic sequence whose subwordcomplexity exceeds !. As a consequence there are mix-automatic sequencesthat are not morphic, since morphic sequences have quadratic subwordcomplexity at most.

(iii) A morphic sequence that is not mix-automatic, showing that the class ofmorphic sequences is not contained in the class of mix-automatic sequences.

All of these concepts are very recent, and many interesting questions remain.We highlight three particularly intriguing, and challenging questions:

(1) (J.-P. Allouche) Characterize the intersection of mix-automatic and morphicsequences. (Note that at least all automatic sequences are in.)

(2) Is the following problem decidable: Given two mix-DFAOs, do they generatethe same sequence?

(3) Can Cobham’s Theorem (below) be generalized to mix-automatic sequences?

Cobham’s Theorem ([3]). Let k, " ! 2 be multiplicatively independent (i.e.,ka "= "b, for all a, b > 0), and let w # #! be both k- and "-automatic. Then w isultimately periodic.

In order to generalize this theorem to mix-automatic sequences, one could lookfor a suitable notion of multiplicative independence for base determiners. Recallthat base determiners are themselves finite automata with output.

References

1. Allouche, J.P., Shallit, J.: Automatic Sequences: Theory, Applications, Generaliza-tions. Cambridge University Press, New York (2003)

2. Berstel, J.: Transductions and Context-Free Languages. Teubner (1979)3. Cobham, A.: On the Base-Dependence of Sets of Numbers Recognizable by Finite

Automata. Mathematical Systems Theory 3(2), 186–192 (1969)4. Cobham, A.: Uniform Tag Sequences. Theory of Computing Systems 6, 164–192

(1972)5. Ehrenfeucht, A., Lee, K.P., Rozenberg, G.: Subword Complexity of Various Classes

of Deterministic Languages without Interaction. Theoretical Computer Science 1,59–75 (1975)

6. Grabmayer, C., Endrullis, J., Hendriks, D., Klop, J.W., Moss, L.S.: AutomaticSequences and Zip-Specifications. In: Proc. Symp. on Logic in Computer Science(LICS 2012), pp. 335–344. IEEE Computer Society (2012)