4 swimming competitors, ranked by the judges 1st - 4th, are lining up in a straight row for a photo. However, no swimmer wants to stand next to the person who ranked just above them. How many ways (if at all) can the swimmers be arranged?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If 3 or 2 is on the inside , they would have to be next to either the one they finished just behind, or the one they finished just ahead of.
Example: if 3 is the second number listed, it won't want 2 in either the first or third spot. Which leaves 1 and 4 in those spots. However, 4 can't be in one of the spots adjacent to 3. The same logic, with the numbers reversed, applies to 2. So 2 and 3 have to be on the outside.
From there it is simply a matter of slotting 1 and 4 in the middle, next to their appropriate outside counterparts, (1 next to 3,as it can't be next to 2) and noting that the sequence can also be reversed with the same results.
2413, 3142