permutations confusion! Hello this is my first post , 
I am reading a book called (probability for dummies) the answer in the book for the question below has confused me ...
Suppose you have four friends named Jim , Arun , Soma , and Eric. How many ways can you rearrange the individuals in a row so that Soma and Eric don't sit next to each other ?
The answer in the book is 
18 of the scenarios involved the two not sitting next to each other 
I know there are 4!  = 24 ways to seat the four people 
But I don't understand how the author got to 18 when 2 of them cant sit next to each other 
would really appreciate any help thank you 
 A: The book is flat wrong. The correct answer is 12.  The book says:

The book correctly observes that there are six ways to seat Eric and Soma next to one another.  For each of these six arrangements, Jim and Arun can be seated in two ways in the remaining seats.  So there are $6×2=12$ forbidden arrangements of the four friends that have Eric and Soma next to one another.
As you pointed out, there are 24 ways to seat the four in all.  Subtracting the 12 forbidden arrangements leaves 12.
These “Dummies” books are hastily produced and poorly edited.   You should try to find a better book.

Here's another way to count the 12 ways.  Let's name the four chairs $A,B,C,D$.  If Soma and Eric are not sitting next to one another, then they must be in seats $A,C$, or $A,D$, or $B, D$.  For each of these three pairs of seats, we have our choice of putting Eric on the left or Soma on the left, so there are 6 ways to seat Eric and Soma; then for each of these six arrangements of Eric and Soma we have two choices about how to seat Jim and Arun in the remaining two seats, for a total of 12 arrangements in all.
A: A classic beginning combinatorial probability problem: $n > 2$ acquaintances go to the movies.
Among the $n$ are two people, A and B, who consider themselves a couple. The $n$
are seated at random in $n$ adjacent seats in a row. What is the
probability that A and B are seated together? 
Denominator: There are $n!$ arrangements of all $n$ people. 
Numerator: Now consider permuting $n - 1$
'objects', the AB-couple plus the remaining $n - 2$ people. That's $(n-1)!$ arrangements. Take into
account arrangements AB and BA for the couple and you have $2(n-1)!$
ways for the couple to sit together.
Probability: So P(couple sits together) = $2(n-1)!/n! = 2/n.$ Notice that the formula works trivially for $n = 2,$ and easily $n = 3.$
Current problem: On this page we have $n = 4$, so the probability is $2/4 = 1/2.$ For $n = 4,$ there are equal numbers of ways for the couple to sit together or not to sit together. Which
agrees with the other answers and comments on this page, but not with the Dummies book.
