Enumeration of non-isomorphic canons
Harald Fripertinger
Abstract
In this note we describe how to apply group actions in order to enumerate
the isomorphism classes of rhythmic canons.
The notion of
a rhythmic canon was originally formalized by O. Messiaen. He proposed to study
canonical musical forms in which the imitation between the different voices
concerns only rhythmical aspects, independent from melody or harmony.
The first mathematical investigation of rhythmic canons goes back to Vuza's
papers [7,9,8,10] in which he actually introduced
even much more complicated families
of canons, the ``Regular Complementary Canons of Maximal
Category'' (in short RCMC-canons). Their definition will be given below.
Before describing rhythmic canons in cyclic time, we view them as they may
appear within a musical composition, in free linear time which has no
cyclicity. Like in a melodic canon, one has several voices that may enter one
after the other until all voices are present. As in the case of a melodic
canon, all voices are just copies of a ground voice that is suitably translated
in the time axis. For simplicity we
suppose here that all voices are extended in both directions of the time axis
ad infinitum. We further suppose that the ground voice is a periodic rhythm
that we will call the inner rhythm. Following Vuza's definition,
a periodic rhythm
is an infinite subset R of the rationals \mathbbQ (marking the
attack times, or onsets) with R = R + d for a suitable period d.
Furthermore, R is supposed to be locally finite (i.e. the intersection of
R with every time segment [a, b] (of finite length b-a ³ 0) is finite).
The period of a periodic
rhythm R is the smallest positive rational number d = d(R) satisfying R = R+ d. We also mention another important characteristic of a periodic rhythm,
its pulsation p = p(R). It is defined as the
max{ q Î \mathbbQ+ | "r Î R-R $z Î Z: r = zq} ,
in other words, it is the biggest rational q such that all distances between
the attack points of R are integer multiples of q. Obviously, the period
d is an integer multiple of the pulsation p.
Let A be the set of all rational numbers a such that the attack times of
the voices of the canon can be expressed as R+a.
Then A itself is a periodic
rhythm, called the outer rhythm of the canon, with period d(A), where
d(R) is an integer multiple of d(A).
Note that R and A may have different pulsations p(R) and
p(A). Hence, the pulsation of a canon is defined as the greatest
rational number p such that both p(R) and p(A) are integer multiples of
p.
In order to switch from linear time to circular time the fraction
n = d(R)/p must be computed. Let r denote a fixed attack time
within the inner rhythm R.
Then each attack time in any of the voices is of the
form r + t p for a suitable integer t, i.e. the whole canon is contained in
r + pZ Ì \mathbbQ. Because everything is periodic with period
d(R), we can restrict to the factor space (r + p Z) / d(R)Z
which may be identified with Z/nZ, the residue class ring of
Z modulo nZ.
From now on, we consider the whole canon within Zn: = Z/nZ
and assume that R, A, and Va denote the projections of the inner rhythm,
the outer rhythm, and the voices of a canon.
The concept of a canon used in the present paper
is described by G. Mazzola in [4]
and was presented by him to the author in the following way: A canon is
a subset K Í Zn together with a covering of K by pairwise different
subsets, the voices, Vi ¹ Æ for 1 £ i £ t, where t ³ 1 is
the number of voices of the canon,
such that for all i,j Î { 1,...,t}
- the set Vi can be obtained from Vj by a translation of Zn,
-
there is only the identity translation which maps Vi to Vi,
-
the set of differences in K generates Zn, i.e. áK-Kñ: = ák-l | k,l Î Kñ = Zn.
We prefer to write a canon K as a set of its subsets Vi.
Two canons K = { V1,..., Vt} and L = { W1,...,Ws} are called
isomorphic if s = t and
if there exists a translation T of Zn and a permutation
p in the symmetric group St
such that T(Vi) = Wp(i) for 1 £ i £ t. Then obviously
T(K) = L.
The aim of this note is to determine the number of non-isomorphic canons for
given n.
First we present the definition of canons in more details and give a
short description of group actions, which are the standard tool to describe
isomorphism classes of different objects (cf.[2,3]).
Since we are interested in the attack times modulo n, we assume that K is a
subset of Zn.
The set of translations of Zn is the cyclic group Cn generated by the
permutation sn: = (0,1,...,n-1) which maps i to i+1 mod n. Cn
acts in a natural way both on Zn and on the set of all subsets of Zn:
|
sn(i) = i+1, i Î Zn, and sn(A) = { sn(i) | i Î A} , A Í Zn. |
|
As usual we identify a subset A of Zn with its characteristic
function cA:Zn® { 0,1} given by
The set of all functions from a set X to a set Y will be indicated as
YX.
For arbitrary f Î { 0,1} Zn let [`f] denote the subset
f-1({ 1} ) of Zn, whence f = c[`f].
Sometimes it is convenient to write functions f from Zn to { 0,1} as
vectors of the form
(f(0),f(1),...,f(n-1)) using the natural order of the elements of
Zn, because then the set of all these functions
is totally ordered by the lexicographic order. For functions f,g Î { 0,1} Zn we say f < g if there exists an i Î Zn
such that f(j) = g(j) for 0 £ j < i and f(i) < g(i).
The group action of Cn on the set of all subsets of Zn described as
an action on the set of all characteristic function is the following
|
Cn×{ 0,1} Zn® { 0,1} Zn (snj,f)®f°sn-j. |
|
As the canonical representative of the orbit Cn(f) = { f°snj | 0 £ j £ n-1} we choose the function f0 Î Cn(f) such
that f0 £ g for all g Î Cn(f). Moreover, we choose [`f]0
as the canonical representative of the orbit Cn([`f]) = { snj([`f]) | 0 £ j £ n-1} .
In general, representatives of orbits Cn(f) of functions f
under the action of the cyclic group Cn are called necklaces.
-
[
-
]Lemma 1.
If f ¹ 0 denotes a function from Zn to { 0,1} , then the canonical
representative f0 of the orbit Cn(f) fulfills f0(n-1) = 1.
A function f Î { 0,1} Zn (or the corresponding vector and the set [`f]) is called acyclic if Cn(f) consists of n different objects.
The canonical representative of the orbit of an acyclic function is usually
called a Lyndon word. If f is acyclic, then all elements in the orbit
Cn(f) are acyclic as well, and we call Cn(f) an acyclic orbit.
From the first two properties of a canon we derive that all voices Vi
belong to the same orbit Cn(V1) and that each voice is acyclic.
For that reason, we can describe a canon K = { V1,...,Vt} as a pair
(L,A) where L is the Lyndon word, which is the canonical representative of
the orbit Cn(cV1), and A = { a1,...,at} is a t-subset
of Zn such that Vi = snai(L).
In other words, L describes the inner rhythm and A the outer rhythm of K.
Now we analyse in which situations a pair (L,A), as described above,
is not a canon, i.e. when it fails to fulfill the third property. Assume that
(L,A) is not a canon, then the differences K-K generate a proper subgroup
of Zn. This subgroup is isomorphic to Zn/d where d > 1 is a divisor of
n. In other words, d is a divisor of all differences k-l for all k,l Î K. We write d | r in order to express that the integer d is a divisor of the integer r. (It is not connected with division in the ring Zn.)
It is easy to prove the following
-
[
-
]Lemma 2.
Let L ¹ 0 be a Lyndon word of length n, and let A be a t-subset of
Zn. The pair (L,A) does not describe a canon in Zn if and only if
there exists an integer d > 1 such that d | n, d | k-l for all
k,l Î [`L], and d | k-l for all k,l Î A.
Consider the set S of all pairs (L,A) where L is a Lyndon word and A
is a t-subset of Zn. The group of translations of Zn acts on S
according to
|
Cn×S® S (snj,(L,A))® (L,snj(A)). |
|
If (L,A) is a canon, then the orbit Cn(L,A) = (L,Cn(A)) describes the
isomorphism class of (L,A).
In general, the canonical representative of Cn(L,A) is (L,A0) where
A0 is the canonical representative of Cn(A). From Lemma 1 we
already know that cA0(n-1) = 1 and L(n-1) = 1 if L ¹ 0.
This together with Lemma 2 proves
- [
- ]Lemma 3.
Let L ¹ 0 be a Lyndon word of length n, and let A be a t-subset of
Zn. The pair (L,A) does not describe a canon in Zn if and only if
there exists a divisor d > 1 of n such that L(i) = 1 implies i º d-1 mod d, and cA0(i) = 1 implies i º d-1 mod d, where A0 is
the canonical representative of Cn(A).
In the next part we show that functions f Î { 0,1} Zn with the
property f(i) = 1 implies i º -1 mod d (for d | n, d > 1) can be
constructed from functions in { 0,1} Zn/d.
Let yd be a function defined on { 0,1} , such that yd(0) is the
vector (0,0,...,0) consisting of d entries of 0, and
yd(1) = (0,...,0,1) is a vector consisting of d-1 entries of 0 and
1 in the last position. We write the values of yd in the form
|
yd(0) = 0d, yd(1) = 0d-11. |
|
If we apply yd to each component of a vector f Î { 0,1} Zr by
replacing each component 0 in f by 0d and each component 1 by
0d-11, we get a vector yd(f) Î { 0,1} Zrd and
|
yd({ 0,1} Zr) = { f Î { 0,1} Zrd | f(i) = 1 implies i º -1 mod d} . |
|
From Lemma 3 we conclude that (L,A) does not describe a canon if and
only if there exists a d > 1 which divides n such that both L and
cA0 are elements of yd({ 0,1} Zn/d).
Some properties of yd are collected in the next
-
[
-
]Lemma 4.
Let f,g be functions from Zr to { 0,1} . Then
- yd(f) = yd(g) if and only if f = g.
- yd(f°sr) = yd(f)°srdd.
- yd(Cr(f)) Ì Crd(yd(f)).
- f < g if and only if yd(f) < yd(g).
- f0 is the canonical representative of Cr(f) if and only if
yd(f0) is the canonical representative of Crd(yd(f)).
- yd describes a bijection between the Cr-orbits on
{ 0,1} Zr and the Crd-orbits on { 0,1} Zrd which have
non-empty intersection with yd({ 0,1} Zr), thus
|
| { Crd(A) | A Í Zrd, A ¹ Æ, d | k-l "k,l Î A} | = |
|
|
| { Cr(A) | A Í Zr, A ¹ Æ} | = :a(r). |
|
- f ¹ 0 is acyclic if and only if yd(f) is acyclic.
-
yd describes a bijection between the acyclic Cr-orbits on
{ 0,1} Zr and the acyclic Crd-orbits on { 0,1} Zrd
which have non-empty intersection with yd({ 0,1} Zr), thus
|
| { Crd(A) | A Í Zrd, A ¹ Æ, d | k-l "k,l Î A, A acyclic} | = |
|
|
| { Cr(A) | A Í Zr, A ¹ Æ, A acyclic} | = :l(r). |
|
- Both f and yd(f) have the same number of components which are
1.
Proof.
Since yd is an injective mapping from each component of f into the set
{ 0d,0d-11} , the first statement is clear.
In order to show that the
second item is true, assume that yd(f°sr)(j) = 1 for some
j Î Zrd. According to the definition of yd, this is
equivalent to j = sd-1 and (f°sr)(s-1) = 1 for some
s Î { 1,...,r} . In other words, j = sd-1 and f(s) = 1, which is
equivalent to j = sd-1 and yd(f)((s+1)d-1) = 1. This,
however, is the same as yd(f)(j+d) = 1, whence
(yd(f)°srdd)(j) = 1. If f = 0 the assertion is always true.
The third part is an immediate consequence of the second.
If f < g, then there exists i Î Zr such that f(j) = g(j) for all j < i and
f(i) < g(i), whence f(i) = 0 and g(i) = 1. For that reason, yd(f(i)) = 0d
and yd(g(i)) = 0d-11. Hence, yd(f)(j) = yd(g)(j) for j < id-1
and yd(f)(id-1) = 0 < 1 = yd(g)(id-1), and consequently
yd(f) < yd(g). If, conversely, yd(f) < yd(g), then there exists
an i Î Zrd such that yd(f)(j) = yd(g)(j) for all j < i and
yd(f)(i) < yd(g)(i), whence yd(g)(i) = 1 and i º -1 mod d.
Assume that i is of the form sd-1. Then yd(f(j)) = yd(g(j)) for
j < s, and yd(f(s)) = 0d whereas yd(g(s)) = 0d-11.
Since yd is an
injective mapping, f(j) = g(j) for j < s and f(s) = 0 < 1 = g(s), which implies
that f < g.
From the definition of the canonical representative of an orbit and from the
items 4. and 2. it follows immediately that yd(f0) < yd(f0°srj) = yd(f0)°srddj for all
j Î { 1,...,r-1} . Moreover, if n\not º 0 mod d, then
(yd(f0)°srdn)(rd-1) = yd(f0)(n-1) ¹ 1, since
n-1\not º -1 mod d. According to Lemma 2, the representative
yd(f0)°srdn cannot be the canonical representative of the
orbit Crd(yd(f0)). Hence, the canonical representative is
yd(f0).
Then 6. is a trivial consequence of 5. Similar arguments can be applied for
proving 7. and 9. Item 8. follows immediately from 7.
[¯]
In order to compute the number of all Cr-orbits on { 0,1} Zr we
apply Pólya's theory
cf. [2,3,5,6]. In the present situation we
have to compute the cycle index of the group Cr acting on Zr which is a
polynomial in z1,...,zr over \mathbbQ given by
|
C(Cr,Zr) = |
1 r
|
|
å
s | r
|
j(s) zsr/s, |
|
where j is the Euler totient function. Replacing each
indeterminate zi in C(Cr,Zr) by | { 0,1} |, which is equal to
2, we compute the number
of all Cr-orbits on { 0,1} Zr as
|
C(Cr,Zr,zi: = 2) = |
1 r
|
|
å
s | r
|
j(s)2r/s. |
|
If we replace zi by 1+zi, where z is an indeterminate over
\mathbbQ, then the number of Cr-orbits of k-sets A Í Zr is
the coefficient of zk in
|
C(Cr,Zr,zi: = 1+zi) = |
1 r
|
|
å
s | r
|
j(s)(1+zi)r/s. |
|
In conclusion (for the definition of a(r) see 6. in Lemma 4)
|
a(r) = C(Cr,Zr,zi: = 2)-1, |
|
since we don't count the orbit of the empty set. Similar methods can be
applied to enumerate the number of acyclic Cr-orbits on { 0,1} Zr
or, what is equivalent to this, to enumerate all Lyndon words of length r over
the alphabet { 0,1} . For r > 1, this number is given as (for the
definition of l(r) see 8. in Lemma 4)
|
l(r) = |
1 r
|
|
å
s | r
|
m(s)2r/s, |
|
where m is the classical Moebius function. Moreover, the number of
Lyndon words of length r over { 0,1} having r1 components 1 and
r-r1 components 0 is
|
|
1 r
|
|
å
s | gcd(r-r1,r1)
|
m(s) |
æ ç
è
|
r/s
r1/s
|
ö ÷
ø
|
. |
|
And the generating function of Lyndon words of length r over the alphabet
{ 0,1} with r1 components 1 is of the form
|
|
1 r
|
|
r-1 å
r1 = 1
|
|
æ ç
è
|
å
s | gcd(r-r1,r1)
|
m(s) |
æ ç
è
|
r/s
r1/s
|
ö ÷
ø
|
ö ÷
ø
|
yr1. |
|
In the case r = 1 there are two Lyndon words, namely f0 = (0) and f1 = (1).
The first one is the characteristic function of the empty set in Z1 so we
don't want to count it. For that reason, we must set l(1) = 1. Moreover,
it should be mentioned that f0 is the unique Lyndon word such that
yd(f0) is not a Lyndon word for d > 1.
Finally, we have to combine all these results for enumerating the isomorphism
classes of canons. Let n ³ 1 be an integer. For any divisor d ³ 1 of
n, let Mn,d be the set of all pairs (L,Cn(A)), where L is a Lyndon
word of length n over { 0,1} , (in the case n = 1 different from 0)
such that L(i) = 1 implies i º -1 mod d, and A is a non-empty subset of
Zn, such that d | k-l for all k,l Î A. Hence
|
Mn,d = |
ì í
î
|
(L,Cn(A)) | |
|
L Lyndon word, L ¹ 0, L(i) = 1Þ i º -1 mod d |
|
|
A Í Zn, A ¹ Æ, d | k-l "k,l Î A |
|
|
ü ý
þ
|
. |
|
From Lemma 4 we deduce that yd describes a bijection between Mn,d
and Mn/d,1, thus
|
| Mn,d| = | Mn/d,1| = l(n/d)a(n/d), |
|
which is the number of possibilities to choose L
and Cn(A) according to the desired properties of Mn,d.
Finally, let kn be the set of isomorphism classes of canons in Zn,
|
kn = { (L,Cn(A)) Î Mn,1 | (L,A) describes a canon} . |
|
From Lemma 3 we deduce that
|
kn = Mn,1\ |
È
[d > 1 || d | n]
|
Mn,d. |
|
-
[
-
]Theorem.
The number of isomorphism classes of canons in Zn is
|
| kn| = |
å
d | n
|
m(d)l(n/d)a(n/d). |
|
Proof.
First we prove that the set Mn,1 is the disjoint union
where
|
yd(kn/d) = { yd(L,Cn/d(A)) | (L,Cn/d(A)) Î kn/d} |
|
and
|
yd(L,Cn/d(A)) = (yd(L),Cn( |
yd(cA)
|
)). |
|
It is clear that Mn,1 contains this union. Moreover, this union is
disjoint, since for a canon K = (L,Cn/d(A)) Î kn/d we have
|
áK-Kñ = Zn/d @ áyd(K)-yd(K)ñ. |
|
Finally, we have to show that each element of Mn,1 belongs to this union.
If (L,Cn(A)) Î Mn,1, then choose the biggest d such that (L,Cn(A))
belongs to Mn,d. (I.e. (L,Cn(A)) does not belong to Mn,dd¢ for
d¢ > 1. It is always possible to find such d, since, if (L,Cn(A)) belongs
both to Mn,d1 and Mn,d2, then it also belongs to
Mn,
lcm
| \nolimits (d1,d2).)
Then there exists (L¢,Cn/d(A¢)) Î Mn/d,1 such that
L = yd(L¢) and cA0 = yd(cA0¢) for the canonical
representatives A0 and A0¢ of Cn(A) and Cn/d(A¢).
Moreover, (L¢,Cn/d(A¢)) Î kn/d
because otherwise there would be some d¢ > 1 which is a divisor of n/d such
that (L¢,Cn/d(A¢)) Î Mn/d,d¢. But then (L,Cn(A)) also belongs to
Mn,dd¢, which is a contradiction to the choice of d.
Hence,
|
| Mn,1| = |
å
d | n
|
| kn/d| = |
å
d | n
|
| kd|, |
|
and by Moebius inversion we get
|
| kn| = |
å
d | n
|
m(n/d)| Md,1| = |
å
d | n
|
m(d)| Mn/d,1| = |
å
d | n
|
m(d)| Mn,d| = |
å
d | n
|
m(d)l(n/d)a(n/d), |
|
which finishes the proof.
[¯]
If l and a are replaced by the corresponding generating
functions
|
|
l
|
(r) = |
ì ï ï í
ï ï î
|
|
|
1 r
|
|
r-1 å
r1 = 1
|
|
æ ç
è
|
å
s | gcd(r-r1,r1)
|
m(s) |
æ ç
è
|
r/s
r1/s
|
ö ÷
ø
|
ö ÷
ø
|
yr1 |
|
| |
|
| |
|
and
|
|
a
|
(r) = C(Cr,Zr,zi: = 1+zi)-1, |
|
then the coefficient of yszt in
|
|
å
d | n
|
m(d) |
l
|
(n/d) |
a
|
(n/d) |
|
gives the number of non-isomorphic canons in Zn
which consist of t voices where each voice contains exactly s attack times.
For example the numbers of isomorphism classes of canons in Zn for
1 £ n £ 10 are:
Finally, we have a closer look at the
13 isomorphism classes of canons in Z4, which can be classified according
to their number of voices and attack times per voice by
z4y3 + z4y2 + z4y + z3y3 + z3y2 + z3y + 2z2y3 + 2z2y2 + z2y + zy3 + zy2.
From this list we can read, for instance, that there are exactly three classes
of canons with 4 voices which have 1, 2, or 3 attack times per voice.
Or we see that there are five classes of canons with 2 voices, two of them
having 3 attack times per voice, two of them having 2 attack times per
voice, and only one having 1 attack time in each of its two voices.
We can even compute the canonical representative of each isomorphism class.
For instance, there are exactly three Lyndon words L1, L2, L3
of length 4 over { 0,1}
and five representatives f1,...,f5 of the C4-orbits of non empty
subsets of Z4:
The Lyndon words describe the distribution of the attack times in one voice
(i.e. the inner rhythm of the canon), the necklaces describe the distribution
of the voices over the complete period, here in this example over Z4, which
is the outer rhythm. Only L1 can be constructed as y4((1)) or
y2((0,1)) from shorter Lyndon words, so all pairs (Li,fj) for
i Î { 2,3} and j Î { 1,...,5} describe canons in Z4. Since
f1 = y4((1)) = y2((0,1)) and f3 = y2((1,1)), and (1), (0,1), and
(1,1) are necklaces of length 1 or 2 over { 0,1} , the pairs
(L1,C4(f1)) = y4((1),C1(1)) and
(L1,C4(f3)) = y2((0,1),C2(1,1)) do not belong to k4. But the
pairs (L1,fj) for j Î { 2,4,5} describe again canons in Z4.
From this example we also see how to compute complete lists of isomorphism
classes of canons in Zn for arbitrary n. There exist fast algorithms for
computing all Lyndon words and all necklaces of length n over { 0,1} .
Then each pair (Li,fj) must be tested whether there exists some d > 1 such
that (Li,fj) = (yd(L¢),yd(f¢)) for a Lyndon word L¢ and a necklace
f¢ of length n/d.
There exist more complicated definitions of canons. A pair (R,A) of inner
and outer rhythm defines a rhythmic tiling canon with voices Va for
a Î A in Zn if and only if
- the voices Va cover entirely the cyclic group Zn,
- the voices Va are pairwise disjoint.
It is obvious that
periods and pulsations can be determined in cyclic time as well.
Rhythmic tiling canons with the additional property,
3. the periods d(R) and d(A) coincide,
are called regular complementary canons of maximal category.
So far we were not dealing with that kind of canons.
Acknowledgment: The author wants to express his thanks to
Guerino Mazzola for pointing his attention to the problem of classification of
canons. He is also grateful to Moreno Andreatta, who provided very useful
historic and background information about different definitions of canons
(cf [1]).
References
- [1]
-
M. Andreatta, Th. Noll, C. Agon, and G. Assayag.
The geometrical groove: rhythmic canons between theory,
implementation and musical experiment.
In Les Actes des 8e Journées d'Informatique Musicale, Bourges
7-9 juin 2001, pages 93-97, 2001.
- [2]
-
A. Kerber.
Algebraic Combinatorics via Finite Group Actions.
B.I. Wissenschaftsverlag, Mannheim, Wien, Zürich, 1991.
ISBN 3-411-14521-8.
- [3]
-
A. Kerber.
Applied Finite Group Actions, volume 19 of Algorithms and
Combinatorics.
Springer, Berlin, Heidelberg, New York, 1999.
ISBN 3-540-65941-2.
- [4]
-
G. Mazzola.
Topos of music.
To appear.
- [5]
-
G. Pólya.
Kombinatorische Anzahlbestimmungen für
Gruppen, Graphen und chemische Verbindungen.
Acta Mathematica, 68:145 - 254, 1937.
- [6]
-
G. Pólya and R.C. Read.
Combinatorial Enumeration of Groups, Graphs and Chemical
Compounds.
Springer Verlag, New York, Berlin, Heidelberg, London, Paris, Tokyo,
1987.
ISBN 0-387-96413-4 or ISBN 3-540-96413-4.
- [7]
-
D.T. Vuza.
Supplementary sets and regular complementary unending canons (part
one).
Perspectives of New Music, 29(2):22-49, 1991.
- [8]
-
D.T. Vuza.
Supplementary sets and regular complementary unending canons (part
three).
Perspectives of New Music, 30(2):102-125, 1992.
- [9]
-
D.T. Vuza.
Supplementary sets and regular complementary unending canons (part
two).
Perspectives of New Music, 30(1):184-207, 1992.
- [10]
-
D.T. Vuza.
Supplementary sets and regular complementary unending canons (part
four).
Perspectives of New Music, 31(1):270-305, 1993.
| |
Harald Fripertinger
Institut für Mathematik
Karl Franzens Universität Graz
Heinrichstr. 36/4
A-8010 Graz, AUSTRIA
harald.fripertinger@uni-graz.at
|
| |
File translated from
TEX
by
TTH,
version 2.79. On 13 Feb 2002, 18:44.
|