168 Combinatorics of Compositions and Words
for τ is given by μ
τ
=(2, 1), and the content vector for ν is μ
ν
=(1, 2).
Therefore, by Lemma 5.54,
Λ
τ
(x)=
x
4
(1 − x
3
)(1 − x)
and Λ
ν
(x)=
x
5
(1 − x
3
)(1 − x
2
)
.
The number of levels followed by a rise or drop, respectively, can then be
computed as
[x
n
]
(1 − x)
2
x
4
(1 − 2x)
2
(1 − x
3
)(1 − x)
and [x
n
]
(1 − x)
2
x
5
(1 − 2x)
2
(1 − x
3
)(1 − x
2
)
.
Using Mathematica or Maple, the sequences of values for the number of oc-
currences of either 112 or 221,forn =0, 1,...,20 are found to be 0, 0, 0, 0,
1, 3, 8, 21, 51, 120, 277, 627, 1400, 3093, 6771, 14712, 31765, 68211, 145784,
310293, 658035,and0, 0, 0, 0, 0, 1, 2, 6, 15, 36, 84, 193, 434, 966, 2127,
4644, 10068, 21697, 46514, 99270, 211023, respectively.
Note that we can recover many of the results in Chapter 4, for example, the
gen
erating function for the number of rises and levels given in Example 4.6, by
using Corollary 5.57. However those results just concern individual subword
patterns. To see the full power of POPs, we will now derive the generating
function for the number of peaks.
Example 5.59 A peak is represented by the POP ξ =1
21
, with linear ex-
tensions 121, 132 and 231. These patterns have content vectors (2, 1), (1, 1, 1)
and (1, 1, 1), respectively. We obtain
τ
Λ
τ
(x)=
x
4
(1 − x
3
)(1 − x)
+2
x
6
(1 − x
3
)(1 − x
2
)(1 − x)
,
where the sum is over the linear extensions of ξ. The number of peaks may
then be computed using Maple or Mathematica as 0, 0, 0, 0, 1, 3, 10, 27, 69,
168, 397, 915, 2074, 4635, 10245, 22440, 48781, 105363, 226330, 483867,and
1030149 for n =0, 1,...,20.
In Section 4.3 we derived generating functions for patterns of length ≥ 3
according to order, number of parts and occurrences of τ. We can exploit
these results to derive generating functions for the number of occurrences of
a given pattern τ by using the technique in the proof of Corollary 4.5 (see
Exercise 5.7).
5.4.2 Avoidance of POPs
We will present results on avoidance of two particular classes of POPs in
compositions. These types of patterns were considered for permutations in
[108] and for words in [109].
© 2010 by Taylor and Francis Group, LLC