Considering all the permutations of the following word, what is the total number of words in which the the following condition is true? ${}$ Among all the permutations of the letters of the word " JANLOKPAL", the number of words in which "O" never lies between "J" and "N" is?
I first thought of subtracting the cases in which O does occur between J and N, and then subtracting it from total possible permutations, but I can't seem to arrive at the correct answer.
Thank you.
 A: Interpretation 1: Only JON and NOJ are disallowed
There are $9$ letters which include two doubles.
Unrestricted permutations $ = \dfrac{9!}{2!2!}= P\;say$
Now form $2$ blocks, $JON$ and $NOJ$ along with the remaining $6$ letters which have two doubles,
"bad" permutations = $2\times \frac{7!}{2!2!} = Q,\;say$
and "good" permutations = $P-Q = 88200$

Interpretation 2: O can't be anywhere between J..N or N...J
Unrestricted permutations $ = \dfrac{9!}{2!2!}= P\;say$
Put $JON/NOJ$ together and start inserting unlabelled letters one by one between interstices, then label them.(With each insertion, the number of interstices will rise by $1$), and  so "bad" words = $2\times\dfrac{4\cdot5\cdot6\cdot7\cdot8\cdot9}{2!2!}= Q,\;say$,
Finally good words $=P-Q = 60480$
A: Let's count the words which contains blocks JON or NOJ. _J_O_N_ has four spaces around it and we have to put six more letters. One letter can be filled in four ways. Now our block looks like e.g., _J_O_A_N_. We have five spots available for second letter. We go on filling, as the available spots keeps increasing by $1$.
Number of words containing JON or NOJ (keeping in mind to not overcount the two repeated letters) is
$$2 \times \frac{4\cdot5\cdot6\cdot7\cdot8\cdot9}{2!2!}$$
Subtracting this from total, desired result is
$$\frac{9!}{2!2!}-\frac{9!}{2!2!\times 3}=\frac{2}{3}\times\frac{9!}{2!2!}=60480$$

Looking at the last expression, we realize that we could have simply ignored other letters. Since from $3!$ permutations of $J,O,N$, only four were desired, the straightforward answer is
$$\frac{4}{3!}\times\frac{9!}{2!2!}=\frac{2}{3}\times\frac{9!}{2!2!}=60480$$
A: My interpretation is same as what N.F. Taussig said that all are permissible arrangements except where $O$ is somewhere between $J$ and $N$.
Here is how I counted -
Total permissible arrangements $ = \displaystyle \frac{9!}{2! \ 2!}$
We first make all bad arrangements. So we start with placing $ \_ J \_ O \_ N \_ $ . That gives us $4$ spaces and we either choose one of the places to place two $L$ together or we choose two of $4$ places for one L each. Now we have a string of $5$ letters and that gives us $6$ spaces. We now place two $A$ the same way. Then we have a string of $7$ letters and we place $K$ in one of the $8$ places and finally $P$ in one of the $9$ places.
We have same number of arrangements for $N \ O \ J$.
Lastly, we subtract from total arrangements to find number of good arrangements.
So the answer is
$\displaystyle \small \frac{9!}{2! \ 2!} - 2 \cdot \bigg[{4 \choose 1} + {4 \choose 2}\bigg] \cdot \bigg[{6 \choose 1} + {6 \choose 2}\bigg] \cdot 8 \cdot 9 = 60480$
A: We can count directly.
The word JANLOKPAL contains nine letters, of which one is a J, two are As, one is an N, two are Ls, one is an O, and one is a K.  We wish to count those permutations of the letters of the word JANLOKPAL in which the O does not appear somewhere between the J and the N.
We have nine positions to fill.  Choose two of the nine positions for the As, two of the remaining seven positions for the Ls, one of the remaining five positions for the K, one of of the remaining four positions for the P.  That leaves three positions to fill with J, N, and O.  Since the O cannot be placed between the J and the N, it must fill either the first or last of these positions, giving us two choices for placing the O.  Once we have placed the O, there are no further restrictions.  Hence, we can place the J and N in the remaining two positions in $2!$ ways.  Thus, there are
$$\binom{9}{2}\binom{7}{2} \cdot 5 \cdot 4 \cdot 2 \cdot 2! = 60,480$$
permutations of the letters of the word JANLOKPAL in which the O does not appear somewhere between the J and the N.
