Question 1154710
<pre>Let the 5 children be Hugh, Louise, Richard, Ann, and Bob.
Let their initials stand for them.


There would be 5! = 5∙4∙3∙2∙1 = 120 ways if there were no restrictions.

Let's enumerate the unwanted cases where H is between L and R, and subtract
them from the 120.

There are 2 ways to arrange them with Hugh between them. We can have _L_H_R_
or _R_H_L_, where the blanks can contain 0, 1 or 2 people. 

For each of those 2 ways, there are two cases:

Case 1: A and B are not side by side.

There are 4 blanks to put A in, and 3 remaining blanks to put B in.
That's 4∙3=12 for Case 1.

Case 2: A and B are side-by-side
They can be side-by-side 2 ways, AB or BA
For either of those 2 ways, there are 4 places to put them.
That's 2∙4=8 ways for Case 2.

The total for those two cases is 12+8=20.

So the number of unwanted arrangements is 2∙(12+8)=2∙20 = 40 unwanted cases.

We subtract that from the 120 and so the answer is 120-40 = 80.

Edwin</pre>