In how many ways can you open 5 doors in a hallway with 12 initially closed doors such that no two adjacent doors are open? In how many ways can you open 5 doors in a hallway with 12 initially closed doors such that no two adjacent doors are open?
My initial answer was $83,040$ ways:
$12P5 - 6(5P2\times5P2\times5P1) = 83,040$
I multiplied $6$ to permutate the inner terms.
But I'm pretty sure this is wrong.
 A: Let's begin with the related problem of arranging seven blue and five green balls so that no two green balls are consecutive.
Arrange the seven blue balls in a row.  This creates eight spaces in which to place a green ball, six between successive blue balls and two at the ends of the row.
$$\square b \square b \square b \square b \square b \square b \square b \square$$
To ensure that no two of the green balls are adjacent, we must choose five of these eight spaces in which to place a green ball, which can be done in
$$\binom{8}{5}$$
ways.
Once the green balls have been placed, number the twelve balls from left to right.  The numbers on the green balls are the doors you should open, no two of which will be adjacent.
A: Start from $ococococo$, with $o$ an open door and $c$ a closed one.
We need to add $3$ more $c$'s to fulfil the requirements, and there are $6$ available slots (start, end, each $c$).
The number of combinations of $***|||||$ is $\binom{3+6-1}{6-1}=\binom{8}{5}$.
A: Here's another approach not already provided in the answers above.
Let $a_{n,m}$ denote the number of ways to open $m$ out of $n$ doors in such a way that no two open doors are adjacent.
There are $a_{n-2,m-1}$ acceptable ways to open the doors given that the first door is open and $a_{n-1,m}$ acceptable ways to open the doors given that the first door is closed.
This leads us to the following recurrence relation:
$$a_{n,m}=a_{n-2,m-1}+a_{n-1,m}$$ Repeatedly apply this recurrence relation to get $$a_{12,5}=a_{6,2}+3a_{5,2}+6a_{4,2}+6a_{5,3}+3a_{7,4}+a_{9,5}$$ Use the facts that $a_{n,2}={n \choose 2}-(n-1)$ and $a_{2m-1,m}=1$ to get $a_{12,5}=56$
A: Another solution: Consider the operation that takes a valid configuration of 12 doors and deletes one closed door from each of the four spaces between the 5 open doors, producing a configuration of 8 doors with 5 open. This operation has an obvious inverse and is therefore bijective, so the number of valid 12-door configurations is equal to the number of (unrestricted) 8-door configurations: $\binom85$.
