StringTools - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Combinatorics on Words : StringTools/ThueMorse

StringTools

  

ThueMorse

  

generate a Thue-Morse string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ThueMorse( n, a, b )

Parameters

n

-

non-negative integer; specifies that ThueMorse must return then nth Thue-Morse string

a

-

character; (optional) first symbol to use

b

-

character; (optional) second symbol to use

Description

• 

The ThueMorse(n, a, b) command generates the length-n prefix of the (infinite) Thue-Morse string, with initial values a and b. The arguments after the first are optional, and default to the strings 0 and 1, respectively.

• 

The Thue-Morse string is the infinite string defined to be the fixed point of the iterated semigroup morphism 0>01,1>10 on the free semigroup generated by 0,1.

• 

A recursive definition of the Thue-Morse sequence is as follows. t0=0, t2n=tn, t1+2n=1tn.

Examples

withStringTools:

seqThueMorsen,n=0..5

,0,01,011,0110,01101

(1)

ThueMorse5,a,b

abbab

(2)

ThueMorse100

0110100110010110100101100110100110010110011010010110100110010110100101100110100101101001100101100110

(3)

See Also

string

StringTools

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam