How many ways can you arrange 7 cars in a parking lot with 7 spaces? and if you need 2 specific cars to be nearby?
1) Any of the seven cars can be put in the first place of this parking lot, in the second place – any of the remaining six cars, in the third place – any of the remaining five cars, in the 4th place – any of the remaining 4 cars, in 5 -th place – any of the remaining three cars, 6th place – any of the remaining two cars and the last – one remaining car.
Therefore, there are 7 * 6 * 5 * 4 * 3 * 2 * 1 = 42 * 20 * 6 = 42 * 120 = 5040 ways of placing 7 = mi cars in total.
Answer: 5040 ways.
2) If two specific cars occupy the first 2 places, which can be done in 2 ways, then the remaining 5 cars can be arranged in 5 * 4 * 3 * 2 * 1 = 20 * 6 = 120 ways.
If two specific cars occupy the second and third, which can also be done in 2 ways, then the remaining 5 cars can be placed in 5 * 4 * 3 * 2 * 1 = 20 * 6 = 120 ways.
Continuing these considerations, we find the required number of ways:
2 * 120 + 2 * 120 + 2 * 120 + 2 * 120 + 2 * 120 + 2 * 120 = 6 * 2 * 120 = 12 * 120 = 1440.
Answer: 1440 ways.