## Task 1 - 190921

At an intersection, exactly 7 vehicles were lined up one behind the other. Each of these vehicles was either a passenger car or a truck. The following is known about their order:

(1) No truck stood directly in front of or behind another truck.

(2) Exactly one passenger car was immediately between two trucks.

(3) Exactly one truck was immediately between two passenger cars.

(4) Exactly three passenger cars stood immediately one behind the other.

Determine all possible orders in which these 7 vehicles could have been lined up!
We abbreviate trucks (LKW) with "L" and cars (PKW) with "P", so that, for example, "PPLP" represents a sequence of two cars, a truck, and a car.

According to (2), "LPL" must be part of the vehicle convoy. If the first "L" were not the first vehicle, then according to (1), a "P" would have to stand in front of it, and similarly behind the second "L" if it is not the last vehicle. This would result in the vehicle sequence PLPLP, which contradicts (3). Therefore, the first "L" must be the first vehicle or the second "L" must be the last vehicle, but not both at the same time.

1. Case: Suppose the first "L" is the first vehicle, so that the vehicle convoy begins with LPLP. Since according to (4) the sequence PPP must occur, it can only be in positions 4-6 or 5-7. The latter is impossible, as it would result in 4 "P" in a row at positions 4-7, which contradicts (4). Therefore, the vehicle sequence is LPLPPPL; for the same reason, a "P" cannot be in position 7.
2. Case: Suppose the second "L" is the last vehicle. Then, by similar reasoning to the first case (this time from back to front), the vehicle sequence must be LPPPLPL.

Both sequences clearly satisfy all the criteria, so they are the exact solutions sought.