compute the number of permutations

217 Views Asked by At

Compute the number of permutations of $\{1,2,3,4,5,6,7,8,9\}$ in which either $2,3,4$ are consecutive or $4,5$ are consecutive or $8,9,2$ are consecutive.

I know we will use some exclusion-inclusion on this one, but I'm stumped on even getting the number of permutations for 1 of the number sequences.

it will be something like

$a = 2,3,4$ pairings

$b = 4,5$ pairing

$c = 8,9,2$ pairings

$|T| = |a|+|b|+|c| - |a \cap b| - |a \cap c| - |b\cap c| + |a \cap b \cap c|$

I'm guessing that to find something like $|a\cap b|$ we look for permutations that cause a pairing $2,3,4,5$... But there's my problem. How do we find the number of permutations for a number sequence in $\{1,2,3,4,5,6,7,8,9\}$?

2

There are 2 best solutions below

0
On

You're on the right track.

Some hints.

To count $a \cap b$, for example, this is equivalent to having the sequence $2,3,4,5$ in the string, because the $4$ can't be in two places at once.

To count $a \cap b \cap c$, this is equivalent to having the string $8,9,2,3,4,5$.

Have fun!

1
On

Hint:

For example for the number of permutations where $2,3,4$ are consecutive, consider a single block $234$ along with the six remaining single items $1, 5, 6, 7, 8, 9$. There are $7!$ ways to arrange the $7$ items (one block of $3$ and six singles).