164 Combinatorics of Compositions and Words
gives
AC
τ
A
(i|x, y)=
x
i
y
1 − x
i
y
%
1+
d
j=i+1
AC
τ
A−{i}
(j|x, y)
&
+
i−1
j=1
x
i+j
y
2
i
k=j
(1 − x
k
y)
%
1+
d
k=j+1
AC
τ
A−{j}
(k|x, y)
&
for all i =1, 2,...,d.TheresultforAC
τ
A
(x, y) then follows from (5.1). 2
Note that Theorem 5.46 can be easily generalized to A = {a
i
,a
2
,...,a
d
}
by replacing i by a
i
.
Example 5.47 The recursive formula for the generating function is not use-
ful for computing the number of compositions avoiding 12–1.Weobtained
the sequence of values by direct enumeration (using Mathematica or Maple)
as 1, 1, 2, 4, 7, 13, 23, 40, 68, 117, 195, 323, 531, 863, 1394,and2234 for
n =0, 1,...,15.
This completes the classification of all generalized patterns of length three.
We now turn our attention to the last type of pattern that we will consider.
5.4 Partially ordered patterns in compositions
Most papers on partially ordered patterns consider avoidance of these pat-
terns, but there are also some enumeration results. We start by presenting
results on the number of occurrences of a given pattern in all compositions
of n [111], and then give results on avoidance of partially ordered patterns
in compositions of n [88]. Note that in [108] and [111], the patterns under
study are called POGPs (partially ordered generalized patterns) and SPOPs
(segmented partially ordered patterns), respectively. Segmented patterns are
the same as subword patterns, so we refer to them as such, consistent with
the rest of the book. However, what is common to POGPs and SPOPs is that
they are defined on a partially ordered alphabet, and so we refer to them as
partially ordered patterns or POPs.
Definition 5.48 A partially ordered generalized pattern ξ is a word (in re-
duced form) consisting of letters from a partially ordered alphabet T (see Defi-
nition 7.44). If letters a and b are incomparable in a POP ξ, then the relative
size of the letters corresponding to a and b in a composition σ is unimpor-
tant in an occurrence of ξ in the composition σ. Letters shown with the same
number of primes are comparable to each other (for example, 1
and 3
are
comparable), while letters shown without primes are comparable to all letters
© 2010 by Taylor and Francis Group, LLC