Find the number of rearrangements of the string 12345 in which none of the sequences 12, 23, 34, 45, and 51 occur.

375 Views Asked by At

So I posted a similar problem before, so please don't try to close this problem. Anyway I think I did this problem correctly, but I just want to make sure if I'm understanding what this question is asking me solve. So below I have my attempt at this problem:

Let $A_{12}$ denote where 12 occurs, $A_{23}$ denote where 23 occurs, $A_{34}$ denote where 34 occurs, $A_{45}$ denote where 45 occurs, $A_{51}$ denote where 51 occurs. Also let $|U|=5!$ where there are no restrictions to the string. By gluing numbers together (i.e. 1245, 5123) and using inclusion/exclusion we get

$$\begin{aligned} |A_{12}&\cup A_{23}\cup A_{34}\cup A_{45}\cup A_{51}|\\ &= |A_{12}|+|A_{23}|+|A_{34}|+|A_{45}|+|A_{51}|\\ &\qquad-(A_{12}A_{23}+A_{12}A_{34}+A_{12}A_{45}+A_{12}A_{51}+A_{23}A_{34}\\ &\qquad\qquad+A_{23}A_{45}+A_{23}A_{51}+A_{34}A_{45}+A_{34}A_{51}+A_{45}A_{51})\\ &\qquad+(A_{12}A_{23}A_{34}+\cdots+A_{34}A_{45}A_{51})\\ &\qquad-(A_{12}A_{23}A_{34}A_{45}+\cdots+A_{23}A_{34}A_{45}A_{51})\\ &\qquad+A_{12}A_{23}A_{34}A_{45}A_{51}\\ &=\ 5(4!)-10(3!)+10(2!)-5(1!)+0\\ &=\ 75 \end{aligned}$$

Then $|U|-|A_{12}\cup A_{23}\cup A_{34}\cup A_{45}\cup A_{51}|=120-75=45$

Please help me. Thank you!

1

There are 1 best solutions below

2
On BEST ANSWER

Good work! Your calculation is correct.

The $\color{blue}{45}$ admissible strings are \begin{array}{ccccccccc} 13254&13524&13542&14253&14325&14352&15243&15324&15432\\ 21354&21435&21543&24135&24153&24315&25314&25413&25431\\ 31425&31524&31542&32154&32415&32541&35214&35241&35421\\ 41325&41352&41532&42135&42153&42531&43152&43215&43521\\ 52143&52413&52431&53142&53214&53241&54132&54213&54321\\ \end{array}