Now that we have familiarized ourselves with (piecewise-constant)
signals, let us go with the flow and explore lifting
classical notions from combinatorics on words to signals.
Commutation
Two words commute iff they are powers of a common word, i.e. for u,v∈Σ∗, uv=vu holds iff u,v∈w∗ with w∈Σ∗ (proof here).
Let us provide a similar characterization of commutation over signals.
First, we consider the specific case where v has a single piece.
Let
u,v∈S(Σ) be such that
v=aδ with
δ>0. If
uv=vu, then
u=aδ′ with
δ′≥0.
Proof.
If ∣u∣=0, then the claim is trivial. Assume ∣u∣>0 and uv=vu. Let seq(u)=σ1δ1⋯σnδn. For the sake of contradiction, suppose there
exists i∈[1..n] such that σi=a. Let i be
minimal. Let α=δ1+…+δi−1 and β=α+δi. By minimality of i, we have u(τ)=a for
all τ∈(0,α], and u(τ′)=a for all τ′∈(α,β]. We make a case distinction, and obtain a
contradiction in both cases.
Case α≥δ. Since δ>0, we have α>0.
Let γ=min(δi,δ), τ=α−δ+γ and τ′=α+γ. Note that 0<τ≤α−δ+δ=α and α<τ′≤α+δi=β. Thus, we obtain the following contradiction:
a=u(τ)=u(τ′−δ)=(vu)(τ′)=(uv)(τ′)=u(τ′)=a.Case δ>α. Let γ=min(δ−α,δi) and τ=α+γ. Since τ∈(0,δ],
we have v(τ)=a. Moreover, since α<τ≤α+δi=β, we have u(τ)=a. Thus, we obtain a
contradiction:
a=v(τ)=(vu)(τ)=(uv)(τ)=u(τ)=a.
Let
u,v∈S(Σ). We have
uv=vu iff
u,v∈[[σ]] for
σ∈Σ, or
u,v∈w∗ for
w∈S(Σ).
Proof.
⇐) If u=σα and v=σβ for some
σ∈Σ and α,β∈R>0, then uv=σα+β=σβ+α=vu. If u=wi
and v=wj for some w∈S(Σ) and i,j∈N,
then uv=wi+j=wj+i=vu.
⇒) We proceed by induction on #u+#v. If u or v
is empty, then the claim is trivial. If ∣u∣=∣v∣, then we must have
u=v, and hence we are done. Assume ∣u∣>∣v∣>0 (the other case
is symmetric).
Let seq(u)=σ1δ1⋯σnδn. Since uv=vu and ∣u∣>∣v∣, we have u=vx for some x∈S(Σ). Thus, there exist α,β∈R≥0 and i∈[1..n] such that
v=σ1δ1⋯σi−1δi−1σiα, x=σiβσi+1δi+1⋯σnδn and δi=α+β.If #v=1, then we are done by Lemma 1. Thus, we may assume that
#v>1. We have
vxv=uv=vu=vvx.
By cancelling v on the left, we obtain xv=vx. Observe that
#v+#x≤i+(n−i+1)=n+1=#u+1<#u+#v.Thus, by induction, we either have seq(x)=σα
and seq(v)=σβ for some σ∈Σ and
α,β∈R>0, or x=wi and v=wj for some w∈S(Σ) and i,j∈N. The first case cannot hold
since #v>1. So, the second case holds, and we are done since
u=vx=wiwj=wi+j and v=wj.
Conjugacy
Two words u,v∈Σ∗ are said to be conjugates if u=xy
and v=yx for some x,y∈Σ∗. In other words, conjugates
are cyclic shifts of each other. For example, these five words belong
to the same conjugacy class:
{🚶🏼♀️➡️🌳🌳🌲🌳, 🌳🚶🏼♀️➡️🌳🌳🌲, 🌲🌳🚶🏼♀️➡️🌳🌳, 🌳🌲🌳🚶🏼♀️➡️🌳, 🌳🌳🌲🌳🚶🏼♀️➡️}.
We extend the notion to signals by defining u,v∈S(Σ) as conjugates if u=xy and v=yx for some
x,y∈S(Σ). Over words, the conjugacy class of w
is of size at most ∣w∣. However, over signals, the conjugacy class
of w is either a singleton if #w=1, or uncountable otherwise.
For example, here is signal a1b2c1b1 with its conjugates
b0.25a1b2c1b0.75 and b0.5a1b2c1b0.5:
Given a signal w∈S(Σ) and α∈[0,∣w∣), let
w⟨α⟩ denote the signal obtained from the
cyclic shift of w by duration α:
w⟨α⟩(τ)={w(τ−α)w(∣w∣−α+τ)if τ∈(α,∣w∣],if τ∈(0,α].It is readily seen that two signals u and v are conjugates iff v=u⟨α⟩ for some α∈[0,∣u∣).
Click for a proof.
⇒) Let x,y∈S(Σ) be such that u=xy and v=yx. Let α=∣y∣. We must prove that v=u⟨α⟩(τ). For τ∈(0,∣y∣], we have
u⟨α⟩(τ)=u(∣u∣−∣y∣+τ)=u(∣x∣+τ)=y(τ) as desired. Note that
(∣y∣,∣u∣]−∣y∣=(0,∣u∣−∣y∣]=(0,∣x∣].
Thus, for τ∈(∣y∣,∣u∣], we have u⟨α⟩(τ)=u(τ−∣y∣)=x(τ) as desired.
⇐) Let α∈[0,∣u∣) be such that v=u⟨α⟩. Let x:(0,∣u∣−α]→Σ
and y:(0,α]→Σ be the signals defined by
x(τ)=u(τ) and y(τ)=u(∣u∣−α+τ). Note
that ∣y∣=α. By definition, u=xy. We prove that v=yx. For τ∈(0,∣y∣], we have v(τ)=u⟨α⟩(τ)=u(∣u∣−∣y∣+τ)=u(∣x∣+τ)=y(τ) as desired. Observe that
(∣y∣,∣u∣]−∣y∣=(0,∣u∣−∣y∣]=(0,∣x∣]. Thus, for τ∈(∣y∣,∣u∣], we have v(τ)=u⟨α⟩(τ)=u(τ−∣y∣)=x(τ) as desired.
For example, the previous illustration depicts w, w⟨0.25⟩ and w⟨0.5⟩.
A simple fact from combinatorics on words is that u,v∈Σ∗
are conjugates iff uz=zv for some z∈Σ∗. Let us
generalize this equivalence to signals.
Let
u,v∈S(Σ). It is the case that
u and
v
are conjugates iff
uz=zv for some
z∈S(Σ).
Proof.
⇒) Let x,y∈S(Σ) be such that u=xy and v=yx. Let z=x. We are done since
uz=ux=xyx=xv=zv.⇐) Let z∈S(Σ) be such that uz=zv. If ∣u∣=0, then the claim is trivial. Thus, we may assume that
∣u∣>0. We proceed by induction on #z. If #z=0, then u=v and we are done. Suppose #z>0.
Case ∣u∣≥∣z∣. We have u=zw for some w∈S(Σ). Thus, we have zwz=uz=zv. By cancelling z
on the left, we obtain wz=v. We are done since u=zw and v=wz are conjugates.
Case ∣z∣>∣u∣ and #u=1. We have seq(u)=σδ for some σ∈Σ and δ∈R>0. Since ∣z∣>∣u∣, we can decompose z as z=σγw where w∈S(Σ) and γ≥δ is maximal. By maximality of γ, we have #w=#z−1. Moreover,
σγuw=σγσδw=σδσγw=uσγw=uz=zv=σγwv.By cancelling σγ on the left, we obtain uw=wv. Since
#w=#z−1, by induction, we conclude that u and v are
conjugates.
Case ∣z∣>∣u∣ and #u>1. We have z=uw for some w∈S(Σ) with ∣w∣>0. Let seq(z)=σ1δ1⋯σnδn. There exist α,β∈R≥0 and i∈[1..n] such that
u=σ1δ1⋯σi−1δi−1σiα, w=σiβσi+1δi+1⋯σnδn and δi=α+β.Since #z=n and 2≤#u≤i, we obtain #w≤n−i+1≤n−2+1=#z−1.
We have uuw=uz=zv=uwv. By cancelling u on the left, we
obtain uw=wv. Since #w<#z, by induction, we conclude that
u and v are conjugates.
Periodicity
Given w∈S(Σ), we say that ρ∈(0,∣w∣] is
a period of w if w(τ+ρ)=w(τ) for all τ∈(0,∣w∣−ρ]. If #w=1, then every ρ is a period of
w. Otherwise, w has a minimal period which we call the
period of w.
The period of
w∈S(Σ) is well-defined when
#w>1.
Proof.
Let P⊆(0,∣w∣] be the set of periods of w. Let ρ=infP. We must show that ρ is a period of w. Let ρ0>ρ1>⋯∈P be such that limn→∞ρn=ρ. Let seq(w)=σ1δ1⋯σkδk, where k=#w>1. Let τi=∑j=1iδj for every i∈[0..k]. We say that τ∈(0,∣w∣] lies in piece i∈[1..k] if τ∈(τi−1,τi].
We cannot have ρ=0, as otherwise we would have w(τ1)=limx→τ1+w(x).
For the sake of contradiction, suppose there exists
τ∈(0,∣w∣−ρ] such that w(τ+ρ)=w(τ). Let i∈[1..k] be such that τ lies in piece i.
Since w(τ+ρℓ)=w(τ) for all ℓ∈N, we have
x→(τ+ρ)+limw(x)=w(τ)=w(τ+ρ).
This means that τ+ρ is a “breakpoint”, i.e. τ+ρ=τj for some j∈[0..k−1].
By w(τi)=w(τ)=w(τ+ρ)=w(τj), we must have
i<j.
Let ϵ∈R>0 be small enough so that τ−ϵ
lies in piece i, and τ+ρ−ϵ lies in piece j. Let
ℓ∈N be large enough so that ρℓ−ρ≤ϵ.
Let τ′=τ+ρℓ−ϵ. Note that τ+ρ−ϵ<τ′≤τ+ρ and hence that τ′ lies in piece j.
We obtain a contradiction:
w(τ)=w(τ−ϵ)=w(τ−ϵ+ρℓ)=w(τ′)=w(τ+ρ)=w(τ).(both in piece i)(since pℓ is a period)(by definition)(both in piece j)
Consider the word w=ababa. In the notation of
M. Lothaire, we have
w=u5/2 where u=ab, since ∣w∣=5 and w repeats u with
period 2. One must be cautious with this notation since, e.g.,
(u5/2)2=(ababa)2=ababaababa=ababababab=u5.With this warning in mind, let us introduce a similar notation. Let
w be a signal. For every ϵ∈(0,1), let wϵ:(0,ϵ∣w∣]→Σ be the signal defined by
wϵ(τ)=w(τ). For every α∈R≥0,
let wα=w⌊α⌋wα−⌊α⌋. For example, this illustration depicts w=a1.5b1a2.5 and w2.5:
Let
w∈S(Σ). If
ρ is a period of
w, then
w=u∣w∣/ρ with
u=wρ/∣w∣.
Proof.
Recall that 0<ρ≤∣w∣. By definition, u is the signal u:(0,ρ]→Σ with u(τ)=w(τ). Since ρ is
a period of w, we have
w(τ)=w(τ+kρ) for every k∈N with τ+kρ≤∣w∣.Let k=⌊∣w∣/ρ⌋ and let α∈[0,ρ) be
the unique value such that ∣w∣=k⋅ρ+α. By the
above, we have w=ukuα/ρ=uk+α/ρ. We are done since k+α/ρ=(k⋅ρ+α)/ρ=∣w∣/ρ.
We define the order of a signal w with #w>1 as
ord(w)=∣w∣/ρ(w) where ρ(w) is the period of
w.
Let
w∈S(Σ) be such that
#w>1. We have
w=uord(w) with
u=w1/ord(w).
For example, consider the signal w=a1bπ−1a1. We have
∣w∣=π+1, ρ(w)=π, ord(w)=(π+1)/π. We can express w as u(π+1)/π where
u=a1bπ−1:
Primitiveness
We say that a signal w is a power if w=uk for some non-empty
signal u and integer k≥2. Otherwise, we say that w is
primitive. If #w=1, then w cannot be primitive as
σδ=(σδ/k)k for any δ>0 and
k≥2.
Let
w∈S(Σ) be such that
#w>1. There exists
a primitive signal
u∈S(Σ) and an integer
k≥1 such that
w=uk. Moreover,
u and
k are unique.
Proof.
Existence. We proceed by induction on #w. If #w=2, then we
are done as w is primitive. Indeed, if we had w=uk with k≥2, then we would either have #u=#w=1, or #u≥2 and
so #w≥4.
Suppose #w≥3. If w is primitive, then we are
done. Otherwise, we have w=vm for some non-empty signal v and
integer m≥2. We necessarily have #v≥2. In vm, the
only reductions that may occur are at the concatenation of the last
and first piece of v. Thus,
#w≥m⋅#v−(m−1)=m(#v−1)+1≥2(#v−1)+1=2#v−1>#v.By induction, there exists a primitive signal u and an integer k≥1 such that v=uk. We are done since w=vm=(uk)m=ukm.
The rest of the proof is sloppier. In particular, it uses infinite signals, which we have not introduced. So, read at your own risks!
Uniqueness. Let u,v∈S be primitive and let i,j≥1 be integers such that w=ui=vj. Let α=∣u∣ and
β=∣v∣. Since w=ui and w=vj, the numbers α and
β are periods of w, i.e.
-
wω(τ)=wω(τ+α) for any τ∈R>0,
-
wω(τ)=wω(τ+β) for any τ∈R>0.
We now make a case distinction.
Case with α/β∈Q>0. By assumption,
there exist coprime integers m,n≥1 such that α/β=m/n. Let ρ=α/m. We have α=mρ and β=nρ. By Bézout’s
identity, there
are k,ℓ∈Z such that mk+nℓ=1. By multiplying the
equation with ρ , we obtain kα+ℓβ=ρ. Without
loss of generality, we have k≥0. So, for all τ∈R>0, we have
wω(τ)=wω(τ+kα)=wω(τ+kα+ℓβ)=wω(τ+ρ).Consequently, there exists x with ∣x∣=ρ such that w=xim=xjn, u=xm and v=xn. Since u and v are primitive,
we must have m=n=1. Thus, u=v=x and hence i=j.
Case with α/β∈R>0∖Q>0. Let τ∈(0,∣w∣] be a breakpoint of w,
i.e. with w(τ)=limx→τ+w(x). It exists by
#w>1. By Kronecker’s approximation
theorem,
for all ϵ∈R>0, there exist k,ℓ∈Z such
that k>0 and ∣k(α/β)−ℓ∣<ϵ. By
multiplying by ±β, this means that for all ϵ∈R>0, there exist k,ℓ∈Z with max(k,ℓ)≥0 and
kα+ℓβ∈(0,ϵ). As wω(τ)=wω(τ+kα+ℓβ),
we obtain a contradiction:
x→τ′+limw(x)=w(τ).