*Originally posted by smaia*

**5 teams with 2 cars each will compete in a race.
**

The cars are arranged in two columns in such a way each car in the right column has a car of a different team in the same row of the left column.

How many different configurations are possible?

OK, working my way through this, assuming each car is distinct. Perhaps next post I'll treat both team cars as indistinguishable.

For the purpose of analysis, I number each pair of cars (1-5), and which car on that team it is (1 or 2). They are numbered before pairing off.

I then map how the cars are "linked". What I mean by that is this. Car 1-1 is paired with another car. I then look to see who his partner is paired with, and who that person is paired with, and so on and so forth.

Now there are two possibilities here. Either I get a chain of all 5 teams, or I have 3 teams linked, and the other two are paired with each other's partners.

An example of the first. would be

*1-1 with 2-2, 2-1 with 3-2, 3-1 with 4-1, 4-2 with 5-2, 5-1 with 1-2*
An example of the second..

*1-1 with 2-1, 2-2 with 3-1, 3-2 with 1-2, 4-1 with 5-1, 4-2 with 5-2*
So now I look at how many ways you can pair off the cars.

**Chain of 5**
I count 24*16 = 384 ways of pairing cars in this manner.

*(4! * 2^4)*
**Chain of 3 + Swapped Partners**
There are 10 combination of 2 teams who can be the ones to "swap", and 2 ways they can swap partners.

For the remaining 3, we-ll start with the lowest-numbered pair, and examine it as with the chain of 5, which gives 2! * 2^2 or 8 pairings

Multiply these together for 20*8 or 160 potential pairings of the 5 vehicles.

Combine the two cases and you have 384+160 or 544 possible sets of pairings which meet the qualifications.

**Front to Rear and Right to Left**
Once all cars are paired off, the pairs are randomly picked to take a row at the starting line, with one of the two picked to be the left car.

This results in 5! * 2^5 potential arrangements for each set of pairings.

*3840 ways to arrange the cars*
This means there are 544 * 3,840 possible arrangements of 5 teams of 2 into 5 rows of two cars where no car is to the side of his racing partner.

If my math is correct, this equals 2,088,960 distinctly different possible arrangements.