354 Combinatorics of Compositions and Words
Exercise 8.12 This exercise explores the surprising result that the average
size of the last part of a Carlitz composition of n does not depend on n.
(1) Write a program in Maple or Mathematica to recursively create the Car-
litz compositions of n.
(2) Use this program to compute the probability distribution for the random
variable X
L
(n), the last part of a random Carlitz composition. That is,
compute P (X
L
(n)=k) for k =1, 2,...,n by directly enumerating the
Carlitz compositions according to the last part.
(3) Use Definition 8.6 and the probabilities computed in Part (2) to compute
the average size of the last part. Compare the expectation that you have
computed to the approximation given in Theorem 8.49.
Exercise 8.13
∗
In Exercises 6.9 and 6.10 we gave the generating functions
for the number of k-ary smooth and k-ary smooth cyclic words of length n.
Compute the asymptotic behavior for the number of k-ary smooth and k-ary
smooth cyclic words of length n as n →∞.
Exercise 8.14
∗
In Exercise 6.13 we gave the generating function for the num-
ber of smooth partition words of [n]. Show that the number of smooth partition
words of [n] with exactly k blocks is asymptotically given by
4
k +1
cos
2
π
2(k +1)
1+2cos
π
k +1
n−1
as n →∞.
Exercise 8.15
∗
A strong record in a word w
1
···w
n
is an element w
i
such
that w
i
>w
j
for all j =1, 2,...,i−1(that is, w
i
is strictly larger than all the
letters to the left of it).Aweak record is an element w
i
such that w
i
≥ w
j
for all j =1, 2,...,i − 1(that is, w
i
is greater than or equal to the letters
to the left of it). Furthermore, the position i is called the position of the
strong record (weak record). We denote the sum of the positions of all strong
(respectively, weak) records in a word w by srec(w)(respectively, wrec(w)).
Prodinger [165] originally studied the number of strong and weak records in
samples of geometrically distributed random variables. More recently, he gave
results on the expected value of the sum of the positions of strong records in
random geometrically distributed words of length n [166]. Prove that
(1) the average sum of the positions of the strong records E(X
srec
(n)) in
compositions of n has the asymptotic expansion
E(X
srec
(n)) =
n
4log2
1+δ (log
2
n)
+ o(n);
© 2010 by Taylor and Francis Group, LLC