Sequences With Adjacent Elements Unequal
Sequences With Adjacent Elements Unequal
1. Introduction
M(Sl ..... Sk) = Z Z (-- l ) J + l M ( S l , ' " ' s i - l ' si--J' si+! ..... st)' (1.1)
i=1 j=l
where M(s~ ..... s~_l, O, si+~, ..., sk)=M(st, ..., s,_~, s,+~, ..., Sk) is proved in [2] and
[3]. The latter also mentions the circular version of the problem.
Here we derive recurrences satisfied by and an explicit expression for M ( s t ..... Sk).
We also give a combinatorial argument in order to derive a simple explicit expression
for M(s, s, s). Finally, we give a solution for the circular version of the problem.
We begin by considering the case o f three classes of elements, say l's, 2's and 3's,
and an equal number of elements in each class. The sequences made up of these objects
can be divided into those which start and end with a 1 and those which start but do
not end with a 1. If there are A (s) of the first kind and B(s) of the second kind, then
it is immediate that
M(s, s, s) = 3A (s) + 3B(s). (2.1)
Hence it will suffice to determine A (s) and B(s). Notice that ifc~ denotes a sequence
counted by A (s), then c¢ consists of s - l non-void blocks of 2's and 3's with each
block preceded and followed by a 1. If t denotes the number of these blocks which
contain an odd number of elements, then it follows that t is even, say t = 2v. Thus there
are arrangements for the odd blocks. Fix such an arrangement and note that,
since the number of 2's and 3's being distributed are equal, exactly v of the odd blocks
begin with a 2 and exactly v begin with a 3. Choose the v odd blocks which are to
begin with a 2 and place a 3 as the beginning element in the v remaining odd blocks.
This choice can be made in (2v) ways.
In order to construct all of the sequences counted by A (s), it is now only necessary
to place 2,3 or 3,2 doubletons in the s - 1 blocks between consecutive l's with the
condition that the s - 1 - 2 v even blocks must contain at least one doubleton. If we
begin by making 2 s- ~-2v choices for assigning one doubleton to each even block, then
it remains only to assign the s-(v+s-1-2v)=v+ 1 remaining doubletons to the
s - 1 partially constructed blocks. There are [4, p. 92]
v=O