Number of permutations

Printable View

• Aug 18th 2011, 08:24 AM
alexmahone
Number of permutations
In how many ways can the elements of [n] be permuted so that the sum of every two consecutive elements in the permutation is odd?

[n] is the set of integers from 1 to n.

My attempt:

If n is even:
$n\frac{n}{2}\left(\frac{n}{2} - 1\right)\left(\frac{n}{2}-1\right)\left(\frac{n}{2}-2\right)\left(\frac{n}{2}-2\right)...=2\left(\frac{n}{2}!\right)^2$

If n is odd, we must start with an odd element:
$\left(\frac{n+1}{2}\right)\left(\frac{n-1}{2}\right)\left(\frac{n-1}{2}\right)\left(\frac{n-3}{2}\right)\left(\frac{n-3}{2}\right)...$ $=\left(\frac{n+1}{2}\right)\left(\frac{n-1}{2}!\right)^2$

Is this right?
• Aug 18th 2011, 12:39 PM
Plato
Re: Number of permutations
Quote:

Originally Posted by alexmahone
In how many ways can the elements of [n] be permuted so that the sum of every two consecutive elements in the permutation is odd?
[n] is the set of integers from 1 to n.

My attempt:
If n is even:
$n\frac{n}{2}\left(\frac{n}{2} - 1\right)\left(\frac{n}{2}-1\right)\left(\frac{n}{2}-2\right)\left(\frac{n}{2}-2\right)...=2\left(\frac{n}{2}!\right)^2$

If n is odd, we must start with an odd element:

I agree with you as far as that goes.
But in is odd it should be: because start with an odd and alternate
$\left[ {\left( {\frac{{n + 1}}{2}} \right)!} \right] \cdot \left[ {\left( {\frac{{n - 1}}{2}} \right)!} \right]$
• Aug 18th 2011, 12:52 PM
alexmahone
Re: Number of permutations
Quote:

Originally Posted by Plato
I agree with you as far as that goes.
But in is odd it should be: because start with an odd and alternate
$\left[ {\left( {\frac{{n + 1}}{2}} \right)!} \right] \cdot \left[ {\left( {\frac{{n - 1}}{2}} \right)!} \right]$

Actually, that's exactly what I got. But there was a problem with the latex (which I've now fixed).

$\left(\frac{n+1}{2}\right)\left(\frac{n-1}{2}!\right)^2 = \left(\frac{n+1}{2}!\right)\left(\frac{n-1}{2}!\right)$