0
$\begingroup$

Let $W(p,q,r,s)$ be the number of permutations of the letters which satisfy the following conditions :

Condition 1 : The letters are consist of $P,Q,R,S$.

Condition 2 : The number of letter $P,Q,R,S$ is $p,q,r,s$ respectively.

Condition 3 : Any two adjacent letters are different from each other.

Condition 4 : The first letter is $P$, and the last letter is not $P$.

Then, here is my question.

Question : Can we get a closed-form expression of $W(p,q,r,s)$ for $p\ge 2$?

Remark : This question has been asked previously on math.SE without receiving any answers.

Motivation : I've just got the following closed-form expression of $W(1,q,r,s)$ :

$W(1,q,r,s)=$ $$\sum_{k=1}^{q+1}\binom{r-1}{k-1}\left\{\binom{q-1}{k}\binom{2k}{q-1+r-s}+2\binom{q}{k}\binom{2k}{q+r-s}+\binom{q+1}{k}\binom{2k}{q+1+r-s}\right\}$$

However, I'm facing difficulty for the $p\ge 2$ cases. Can anyone help?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Let $W_P(p,q,r,s)$ be the number of such words starting by $P$ and ending by $P$, and let $$ f_P(x,y,z,t)=\sum_{p,q,r,s}W_P(p,q,r,s)x^py^qz^rt^s. $$ Define $f_Q$, $f_R$, $f_S$ similarly (all words start by $P$!). Then $$ \pmatrix{f_P\\f_Q\\f_R\\f_S} = \pmatrix{0&x&x&x\\y&0&y&y\\z&z&0&z\\t&t&t&0}\pmatrix{f_P\\f_Q\\f_R\\f_S} +\pmatrix{x\\0\\0\\0}, $$ which implies $$ \pmatrix{f_P\\f_Q\\f_R\\f_S} =\pmatrix{1&-x&-x&-x\\-y&1&-y&-y\\-z&-z&1&-z\\-t&-t&-t&1}^{-1}\pmatrix{x\\0\\0\\0}. $$ Thus the generating function for your $W(p,q,r,s)$ is $$ f(x,y,z,t)=\pmatrix{0&1&1&1}\pmatrix{1&-x&-x&-x\\-y&1&-y&-y\\-z&-z&1&-z\\-t&-t&-t&1}^{-1}\pmatrix{x\\0\\0\\0}, $$ which, accorging to Maple, is $$ f(x,y,z,t)=\frac{x(y+z+t+2yz+2yt+2zt+3yzt)}{1-xy-xz-xt-yz-yt-zt-2xyz-2xyt-2xzt-2yzt-3xyzt}. $$ I doubt there is a much closer form. But you may find the expressions like yours in particular cases from here.

$\endgroup$
1
  • $\begingroup$ Thank you very much for this answer. "I doubt there is a much closer form". Hmm, I agree with you. $\endgroup$
    – mathlove
    Nov 30, 2013 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.