A tutorial on sequential functions

Similar documents
Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Minimal DFA. minimal DFA for L starting from any other

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Chapter 2 Finite Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Worked out examples Finite Automata

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Theory of Computation Regular Languages

CS375: Logic and Theory of Computing

Deterministic Finite Automata

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Java II Finite Automata I

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

CHAPTER 1 Regular Languages. Contents

Non-deterministic Finite Automata

Relating logic to formal languages

State Minimization for DFAs

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Lecture 9: LTL and Büchi Automata

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Let's start with an example:

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Lecture 6 Regular Grammars

1.4 Nonregular Languages

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

First Midterm Examination

NFAs continued, Closure Properties of Regular Languages

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non-deterministic Finite Automata

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

1.3 Regular Expressions

A negative answer to a question of Wilke on varieties of!-languages

CS 275 Automata and Formal Language Theory

FABER Formal Languages, Automata and Models of Computation

This lecture covers Chapter 8 of HMU: Properties of CFLs

Lexical Analysis Finite Automate

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

Formal Languages and Automata

NFAs continued, Closure Properties of Regular Languages

Radix enumeration of rational languages is almost co-sequential

Finite Automata-cont d

Deterministic Finite-State Automata

Convert the NFA into DFA

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

CMSC 330: Organization of Programming Languages

Lecture 09: Myhill-Nerode Theorem

Finite-State Automata: Recap

More general families of infinite graphs

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

Closure Properties of Regular Languages

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Designing finite automata II

How to simulate Turing machines by invertible one-dimensional cellular automata

Lecture 08: Feb. 08, 2019

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Nondeterministic Biautomata and Their Descriptional Complexity

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Fundamentals of Computer Science

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

The Value 1 Problem for Probabilistic Automata

Automata and semigroups recognizing infinite words

Harvard University Computer Science 121 Midterm October 23, 2012

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Results on Planar Near Rings

Nondeterminism and Nodeterministic Automata

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

Math 4310 Solutions to homework 1 Due 9/1/16

Formal languages, automata, and theory of computation

Automata and Languages

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Learning Moore Machines from Input-Output Traces

Chapter 3. Vector Spaces

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

FORMAL LANGAUGES & AUTOMATA

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Good-for-Games Automata versus Deterministic Automata.

Homework 3 Solutions

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CS 330 Formal Methods and Models

Myhill-Nerode Theorem

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

More on automata. Michael George. March 24 April 7, 2014

GNFA GNFA GNFA GNFA GNFA

Random subgroups of a free group

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Non-Deterministic Finite Automata

Transcription:

A tutoril on sequentil functions Jen-Éric Pin LIAFA, CNRS nd University Pris 7 30 Jnury 2006, CWI, Amsterdm

Outline (1) Sequentil functions (2) A chrcteriztion of sequentil trnsducers (3) Miniml sequentil trnsducers (4) Minimiztion of sequentil trnsducers (5) Composition of sequentil trnsducers (6) An lgebric pproch (7) The wreth product principle

Prt I Sequentil functions

Informl definitions A trnsducer (or stte mchine) is n utomton equipped with n output function. A trnsducer computes reltion on A B. A sequentil trnsducer is trnsducer whose underlying utomton is deterministic (but not necessrily complete). A sequentil trnsducer computes prtil function from A into B. A pure sequentil trnsducer computes prtil function ϕ preserving prefixes: if u is prefix of v, then ϕ(u) is prefix of ϕ(v).

An exmple of pure sequentil trnsducer 01 1 2 b 0 ε On the input b, the output is 01001. 01 b 0 ε 01 1 2 2 1 2

Pure sequentil trnsducers A pure sequentil trnsducer is 6-tuple A = (Q, A, B, i,, ) where the input function (q, ) q Q nd the output function (q, ) q B re defined on the sme domin D Q A. q q q

Extensions of the trnsition nd output functions The trnsition function is extended to Q A Q. Set q ε = q nd, if q u nd (q u) re defined, q (u) = (q u). The output function is extended to Q A B. Set q ε = ε nd, if q u nd (q u) re defined, q (u) = (q u)((q u) ). u q u (q u) q q u q u

Pure sequentil functions The function ϕ: A B defined by ϕ(u) = i u is clled the function relized by A. A function is pure sequentil if it cn be relized by some pure sequentil trnsducer.

Exmples of pure sequentil functions Replcing consecutive white spces by single one: 1 2 ε Converting upper cse to lower cse letters: b b. 1 A B b.

Coding nd decoding Consider the coding 0 b 1010 c 100 d 1011 r 11 Decoding function 1 ε 1 r 1 ε 1 d 0 0 ε 0 c 0 b

Decoding 0 b 1010 c 100 d 1011 r 11 0 1 ε 1 2 1 r 0 b 1 d 0 c 0 ε 4 1 ε 3 010101101000101101010110 brcdbr

Sequentil trnsducers: informl definition A sequentil trnsducer is trnsducer whose underlying utomton is deterministic (but not necessrily complete). There is n initil prefix nd terminl function. 11 ε 01 00 1 2 b 0 ε On the input b, the output is 110100100.

Sequentil trnsducers A sequentil trnsducer is 8-tuple A = (Q, A, B, i,,, m, ρ) where (Q, A, B, i,, ) is pure sequentil trnsducer, m B is the initil prefix nd ρ: Q B is prtil function, clled the terminl function. 11 ε 01 00 1 2 b 0 ε

Sequentil functions The function ϕ: A B defined by ϕ(u) = m(i u)ρ(i u) is clled the function relized by A. A function is sequentil if it cn be relized by some sequentil trnsducer.

Some exmples of sequentil functions The function x x + 1 (in reverse binry) 1 0 ε 0 1 1 2 1 ε 0 0 1 1 The mp ϕ : A A defined by ϕ(x) = uxv. u 1 v

Addition (in reverse binry) (0, 0) 0 (0, 1) 1 (1, 0) 1 ε (1, 1) 0 0 1 ε (0, 0) 1 1 (0, 1) 0 (1, 0) 0 (1, 1) 1 In inverse binry nottion, 22 = 2 + 4 + 16 01101 nd 13 = 1 + 4 + 8 10110. Tking s input (0, 1)(1, 0)(1, 1)(0, 1)(1, 0), the output is 110001, the inverse binry representtion of 35 = 1 + 2 + 32.

Hrdwre pplictions (Wikipedi) The circuit digrm for 4 bit TTL counter

Other exmples Multipliction by 4 00 0 0 1 1 1 Replcing ech occurrence of 011 by 100. 1 100 1 1 0 0 1 0 ε 2 1 ε 3 ε 0 0 01 01

Multipliction by 10 1 1 0 11 0 0 0 1 1 0 1 3 0 0 ε 1 1 0 0 2 01 1 1 0 0 1 0 4 001 1 1

Prt II A chrcteriztion

The geodesic metric The distnce between bbb nd bbb is 7. b b b b b

The geodesic metric (2) Denote by u v the longest common prefix of the words u nd v. Then d(u, v) = u + v 2 u v Exmple: d(bbb, bbb) = 6 + 7 2 3 = 7. One cn show tht d is metric. (1) d(u, v) = 0 iff u = v, (2) d(u, v) = d(v, u), (3) d(u, v) d(u, w) + d(w, v).

A chrcteriztion of sequentil functions A function ϕ: : A B is Lipschitz if there exists some K > 0 such tht, for ll u, v A, d(ϕ(u), ϕ(v)) Kd(u, v) Theorem (Choffrut 1979) Let ϕ : A B be function whose domin is closed under tking prefixes. TFCAE: (1) ϕ is sequentil, (2) ϕ is Lipschitz, nd ϕ 1 preserves regulr sets.

A chrcteriztion of pure sequentil functions Theorem (Ginsburg-Rose 1966) Let ϕ : A B be function whose domin is closed under tking prefixes. TFCAE: (1) ϕ is pure sequentil function, (2) ϕ is Lipschitz nd preserves prefixes, nd ϕ 1 preserves regulr sets.

Prt III Miniml sequentil trnsducers

Residuls of lnguge Let L be lnguge over A. Let u A. The (left) residul of L by u is the set u 1 L = {x A ux L}. It is esy to see tht v 1 (u 1 L) = (uv) 1 L. Let A = {, b} nd L = A ba. Then 1 1 L = L 1 L = A ba ba b 1 L = L (b) 1 L = A ba A, etc.

Miniml utomton of lnguge The miniml utomton of lnguge L is equl to A(L) = (Q, A,, i, F) where Q = {u 1 L u A }, i = L nd F = {u 1 L u L}). The trnsition function is given by (u 1 L) = 1 (u 1 L) = (u) 1 L. u 1 L (u) 1 L

Exmple of miniml utomton Let A = {, b} nd L = A ba. Then 1 L = A ba ba = L 1 b 1 L = L b 1 L 1 = A ba A = L 2 1 L 1 = L 1 1 L 2 = A = L 3 b 1 L 2 = L 1 L 3 = b 1 L 3 = L 3 b, b L L b 1 L 2 L 3 b

Residuls of sequentil function Let ϕ : A B be function nd let u A. The residul of ϕ by u is the function u 1 ϕ : A B defined by (u 1 ϕ)(x) = (ϕ u) 1 ϕ(ux) where (ϕ u) is the longest common prefix of the words ϕ(ux), for ux Dom(ϕ). In other words, u 1 ϕ cn be obtined from the function x ϕ(ux) by deleting the prefix ϕ u of ϕ(ux).

The function n 6n n x ϕ(x) 0 ε 0 1 1 011 2 01 0011 3 11 01001 4 001 00011 5 101 01111 6 011 001001 7 111 010101 8 0001 000011 n x ϕ(x) 9 1001 011011 10 0101 001111 11 1101 0100001 12 0011 0001001 13 1011 0111001 14 0111 0010101 15 1111 0101101 16 00001 0000011 17 10001 0110011

Let ε 1 ϕ = ϕ 0. Then ϕ 0 represents n 3n n x ϕ(x) 0 ε 0 1 1 011 2 01 0011 3 11 01001 4 001 00011 5 101 01111 6 011 001001 7 111 010101 8 0001 000011 n x ϕ(x) 9 1001 011011 10 0101 001111 11 1101 0100001 12 0011 0001001 13 1011 0111001 14 0111 0010101 15 1111 0101101 16 00001 0000011 17 10001 0110011

The function ϕ 0, representing n 3n n x ϕ 0 (x) 0 ε ε 1 1 11 2 01 011 3 11 1001 4 001 0011 5 101 1111 6 011 01001 7 111 10101 8 0001 00011 n x ϕ 0 (x) 9 1001 11011 10 0101 01111 11 1101 100001 12 0011 001001 13 1011 111001 14 0111 010101 15 1111 101101 16 00001 000011 17 10001 110011

Residuls of ϕ 0 Let ϕ 0, ϕ 1 nd ϕ 2 be the functions representing n 3n, n 3n + 1 nd n 3n + 2, respectively. ϕ 0 0 = 0 (0 1 ϕ 0 )(x) = 0 1 ϕ 0 (0x) = ϕ 0 (x) ϕ 0 1 = 1 (1 1 ϕ 0 )(x) = 1 1 ϕ 0 (1x) = ϕ 1 (x) Indeed, if x represents n, 1x represents 2n + 1, ϕ 0 (1x) represents 3(2n + 1) = 6n + 3 nd 1 1 ϕ 0 (1x) represents ((6n + 3) 1)/2 = 3n + 1.

The function ϕ 1, representing n 3n + 1 n x ϕ 1 (x) 0 ε ε 1 1 001 2 01 111 3 11 0101 4 001 1011 5 101 00001 6 011 11001 7 111 01101 8 0001 10011 n x ϕ 1 (x) 9 1001 00111 10 0101 100001 11 1101 010001 12 0011 101001 13 1011 000101 14 0111 110101 15 1111 011101 16 00001 100011 17 10001 001011

Residuls of ϕ 1 ϕ 1 0 = 1 (0 1 ϕ 1 )(x) = 1 1 ϕ 1 (0x) = ϕ 0 (x) Indeed, if x represents n, 0x represents 2n, ϕ 1 (0x) represents 3(2n) + 1 = 6n + 1 nd 1 1 ϕ 1 (0x) represents ((6n + 1) 1)/2 = 3n. ϕ 1 1 = 0 (1 1 ϕ 1 )(x) = 0 1 ϕ 1 (1x) = ϕ 2 (x) Indeed, if x represents n, 1x represents 2n + 1, ϕ 1 (1x) represents 3(2n + 1) + 1 = 6n + 4 nd 0 1 ϕ 1 (1x) represents (6n + 4)/2 = 3n + 2.

The function ϕ 2, representing n 3n + 2 n x ϕ 2 (x) 0 ε ε 1 1 101 2 01 0001 3 11 1101 4 001 0111 5 101 10001 6 011 00101 7 111 11101 8 0001 01011 n x ϕ 2 (x) 9 1001 10111 10 0101 000001 11 1101 110001 12 0011 011001 13 1011 100101 14 0111 001101 15 1111 111101 16 00001 010011 17 10001 101011

Residuls of ϕ 2 ϕ 2 0 = 0 (0 1 ϕ 2 )(x) = 0 1 ϕ 2 (0x) = ϕ 1 (x) Indeed, if x represents n, 0x represents 2n, ϕ 2 (0x) represents 3(2n) + 2 = 6n + 2 nd 0 1 ϕ 2 (0x) represents (6n + 2)/2 = 3n + 1. ϕ 2 1 = 1 (1 1 ϕ 2 )(x) = 1 1 ϕ 2 (1x) = ϕ 2 (x) Indeed, if x represents n, 1x represents 2n + 1, ϕ 2 (1x) represents 3(2n + 1) + 2 = 6n + 5 nd 1 1 ϕ 2 (1x) represents ((6n + 5) 1)/2 = 3n + 2.

Miniml sequentil trnsducer of function ϕ It is the sequentil trnsducer whose sttes re the residuls of ϕ nd trnsitions re of the form ψ ψ(ε) ψ ( 1 ψ)(ε) 1 ψ Recll tht ψ is the longest common prefix of the words ψ(x), for x Dom(ϕ). The initil stte is ε 1 ϕ nd the initil prefix is ϕ ε.

More formlly... It is the sequentil trnsducer A ϕ = (Q, A, B, i,,, m, ρ) defined by Q = {u 1 ϕ u A nd Dom(ϕ u) } i = ε 1 ϕ, m = ϕ ε nd, for q Q, ρ(q) = q(ε) A typicl trnsition of A ϕ : u 1 ϕ (u 1 ϕ) (u 1 ϕ)(ε) ((u) 1 ϕ)(ε) (u) 1 ϕ

The miniml sequentil function of n 6n 0 1 1 1 0 0 0 0 1 2 1 1 ε 0 1 1 0 0 01 185 = 1 + 8 + 16 + 32 + 128 nd 6 185 = 1110 = 2 + 4 + 16 + 64 + 1024. Thus ϕ(10011101) = 01101010001

Prt IV Minimizing sequentil trnsducers

The three steps of the lgorithm How to minimize sequentil trnsducer? (1) Obtin trim trnsducer (esy) (2) Normlise the trnsducer (tricky) (3) Merge equivlent sttes (stndrd)

Obtining trim trnsducer Let A = (Q, A, B, i,,, m, ρ) be sequentil trnsducer nd let F = Dom(ρ). The trnsducer A is trim if the utomton (Q, A,, q 0, F) is trim: ll sttes re ccessible from the initil stte nd one cn rech finl stte from ny stte. Algorithm: it suffices to remove the useless sttes.

Equivlent trnsducers ε b ε 2 1 3 b ε b ε 2 1 3 b ε ε b 2 1 3 b ε ε ε b 2 1 3 b ε These four sequentil trnsducers relize exctly the sme function ϕ : {, b} {, b}, with domin () b, defined, for ll n 0, by ϕ( 2n b) = (b) n.

Normlized trnsducer Let A = (Q, A, B, i,,, m, ρ) be sequentil trnsducer. For ech stte q, denote by m q the gretest common prefix of the words (q u)ρ(q u), where u rnges over the domin of the sequentil function. Equivlently, m q = ϕ q ε, where ϕ q is the sequentil function relized by the trnsducer derrived from A by tking q s initil stte nd the empty word s initil prefix. A sequentil trnsducer is normlized if, for ll sttes q, m q is the empty word.

m q = (q u)ρ(q u) ε ε 2 1 3 b ε ε 2 1 3 b ε 2 1 3 b ε ε 2 1 3 b ε (1) m 1 = ε m 2 = ε m 3 = ε (2) m 1 = ε m 2 = m 3 = ε (3) m 1 = ε m 2 = m 3 = ε (4) m 1 = m 2 = m 3 = ε

Normlising trnsducer Let A = (Q, A, B, i,,, m, ρ) be trim sequentil trnsducer. One obtins normlised trnsducer by chnging the initil prefix, the output function nd the terminl function s follows: q = m 1 q (q )m q m = mm i ρ (q) = m 1 q ρ(q)

Normlistion on n exmple ε ε b 2 1 3 b ε ε b ε 2 1 3 b ε One hs m 1 =, m 2 =, m 3 = ε. Thus m = mm 1 = ε = 1 = m 1 1 (1 )m 2 = 1 (b) = b 2 = m 1 2 (1 )m 1 = 1 (ε) = ε 1 b = m 1 1 (1 b)m 3 = 1 ()ε = ε ρ (3) = m 1 3 ρ(3) = ε 1 ε = ε

Computing the m q is not so esy... b b 1 2 ε ε b b b b 3 4 bb X 1 = bx 1 + bx 2 + bx 3 X 2 = X 1 + bx 4 X 3 = X 1 + bx 4 X 4 = bx 2 + bb

Solving the system X 1 = bx 1 + bx 2 + bx 3 X 2 = X 1 + bx 4 X 3 = X 1 + bx 4 X 4 = bx 2 + bb We work on k = A {0}. Addition is the lest common prefix opertor (u + 0 = 0 + u = u by convention). Observe tht u + u = u nd u(v 1 + v 2 ) = uv 1 + uv 2 (but (v 1 + v 2 )u = v 1 u + v 2 u does not hold in generl). Thus k is left semiring.

Choffrut s lgorithm (2003) The prefix order is prtil order on k (with u 0 by convention). One cn extend this order to k n componentwise. Proposition For ll u, v k n, the function f(x) = ux + v is incresing. The sequence f n (0) is decresing nd converges to the gretest fixpoint of f. The gretest solution of our system is exctly (m 1, m 2, m 3, m 4 ).

Exmple of Choffrut s lgorithm X 1 = bx 1 + bx 2 + bx 3 X 2 = X 1 + bx 4 X 3 = X 1 + bx 4 X 4 = bx 2 + bb The sequence f n (0) is (0, 0, 0, 0), (0, 0, 0, bb), (0, bbb, bbb, bb), (bbbb, bbb, bbb, b), (bb, ε, bbb, b), (b, ε, bb, b), (b, ε, b, b), (b, ε, b, b). Thus m 1 = b, m 2 = ε, m 3 = b, m 4 = b.

Merging sttes Two sttes re equivlent if they re equivlent in the input utomton (Q, A, i, F, ), hve the sme output functions nd the sme terminl functions: p q p q p = q ρ(p) = ρ(q)

Prt V Composition of sequentil functions

Composition of two pure sequentil trnsducers Theorem Pure sequentil functions re closed under composition. Let σ nd τ be two pure sequentil functions relized by the trnsducers A = (Q, A, B, q 0,, ) nd B = (P, B, C, p 0,, ) The wreth product of B by A is obtined by tking s input for B the output of A. It relizes τ σ.

Wreth product of two pure sequentil trnsducers The wreth product is defined by B A = (P Q, A, C, (p 0, q 0 ),, ) (p, q) = (p (q ), q ) (p, q) = p (q ) (p, q) p (q ) (p (q ), q )

Composition of two sequentil trnsducers Theorem Sequentil functions re closed under composition. Let ϕ nd ψ be two sequentil functions relized by the trnsducers A (equipped with the initil word n nd the terminl function ρ) nd B (equipped with the initil word m nd the terminl function σ). The wreth product of B by A is obtined by tking m(p 0 n) s initil word nd, s terminl function, ω(p, q) = (p ρ(q))σ(p ρ(q)).

Iterting sequentil functions... Iterting sequentil functions cn led to difficult problems... { 3n + 1 if n is odd Let f(n) = n/2 if n is even It is conjectured tht for ech positive integer n, there exists k such tht f k (n) = 1. The problem is still open.

Miniml trnsducer of the 3n + 1 function Let f(n) = { 3n + 1 if n is odd n/2 if n is even 0 0 1 1 1 1 0 0 ε 0 0 0 1 0 ε 1 0 2 1 3 4 5 ε ε 01 1 0 1 1 1 ε

Iterting the 3n + 1 function... 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1.

A useful result Let ϕ : A B be pure sequentil function relized by A = (Q, A, B, q 0,, ). Let L be the regulr lnguge over B recognized by the DFA B = (P, B,, p 0, F). The wreth product of B by A is the DFA B A = (P Q, A, (p 0, q 0 ), ) defined by (p, q) = (p (q ), q ). Theorem The lnguge ϕ 1 (L) is recognized by B A.

Exmple 1 Let ϕ(u) = n, where n is the number of occurrences of b in u. This function is pure sequentil: b ε ε b ε ε 1 2 3 b ε Then ϕ 1 () is the set of words contining exctly one occurrence of b.

Wreth product of the two utomt 1 2 1, 2 b 1, 3 2, 2 b 2, 3 1, 1 b 2, 1 b b b

The opertion L LA Let A = (Q, A, B, q 0, F, ) be DFA. Let B = Q A nd let σ: A B be the pure sequentil function defined by σ( 1 n ) = (q 0, 1 )(q 0 1, 2 ) (q 0 1 n 1, n ) q (q, ) q Let A nd let C = F {} B. Then σ 1 (B CB ) = LA.[Proof on blckbord!]

Exmple 2 Therefore B A recognizes LA, where B is the miniml utomton of B CB. B \ C B C 1 2 Note tht if ϕ is formul of liner temporl logic, then L(F(p Xϕ)) = A L(ϕ)

Prt VI The lgebric pproch Ide: replce utomt by monoids.

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b, c b, c b 1 2 3 Reltions:

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b, c b, c b 1 2 3 Reltions: =

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 b, c b, c b 1 2 3 Reltions: =

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 b, c b, c b 1 2 3 Reltions: = c =

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 b, c b, c b 1 2 3 Reltions: = c = b =

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 b, c b, c b 1 2 3 Reltions: = c = b = bb = b

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b cb = bc

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b cb = bc cc = c

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b cb = bc cc = c bc = b

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b cb = bc cc = c bc = b bc = c

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b cb = bc cc = c bc = b bc = c cb = bc

Trnsformtion monoid of n utomton 1 1 2 3 2 2 2 b 1 3 3 c - 2 3 b 3 3 3 bc - 3 2 c - 2 2 b, c b, c b 1 2 3 Reltions: = c = b = bb = b cb = bc cc = c bc = b bc = c cb = bc The end!

Recognizing by morphism Definition Let M be monoid nd let L be lnguge of A. Then M recognizes L if there exists monoid morphism ϕ : A M nd subset P of M such tht L = ϕ 1 (P). Proposition A lnguge is recognized by finite monoid iff it is recognized by finite deterministic utomton.

Syntctic monoid Definition (lgorithmic) The syntctic monoid of lnguge is the trnsition monoid of its miniml utomton. Definition (lgebric) The syntctic monoid of lnguge L A is the quotient monoid of A by the syntctic congruence of L: u L v iff, for ech x, y A, xvy L xuy L

Prt VII The wreth product principle The wreth product N K of two monoids N nd K is defined on the set N K K by the following product: (f 1, k 1 )(f 2, k 2 ) = (f, k 1 k 2 ) with f(k) = f 1 (k)f 2 (kk 1 ) Strubing s wreth product principle provides description of the lnguges recognized by the wreth product of two utomt (or monoids).

The wreth product principle Proposition Let M nd N be monoids. Every lnguge of A recognized by M N is finite union of lnguges of the form U σϕ 1 (V ), where ϕ : A N is monoid morphism, U is lnguge of A recognized by ϕ nd V is lnguge of BN recognized by M.

The wreth product principle 2 Theorem Let L A be lnguge recognized by n wreth product of the form (P, Q A) (Q, A). Then L is finite union of lnguges of the form W σ 1 (V ), where W A is recognized by (Q, A), σ is C-sequentil function ssocited with the ction (Q, A) nd V (Q A) is recognized by (P, Q A).

References I C. Choffrut, Contributions à l étude de quelques fmilles remrqubles de fonctions rtionnelles, Thèse de doctort, Université Pris 7, Pris (LITP), 1978. C. Choffrut, A generliztion of Ginsburg nd Rose s chrcteriztion of gsm mppings, in Automt, Lnguges nd Progrmming, H. A. Murer (éd.), pp. 88 103, Lecture Notes in Comput. Sci. vol. 71, Springer, 1979.

References II C. Choffrut, Minimizing subsequentil trnsducers: survey, Theoret. Comp. Sci. 292 (2003), 131 143. S. Ginsburg nd G. F. Rose, A chrcteriztion of mchine mppings, Cnd. J. Mth. 18 (1966), 381 388.