Final answer:
The probability that not all 4 cars are parked next to each other in a row of 7 parking spaces is 31/35 or approximately 0.8857.
Step-by-step explanation:
To calculate the probability that not all 4 cars are parked next to each other in a row of 7 parking spaces, we need to consider the total number of ways to park the cars and the number of unfavorable outcomes (where all 4 cars are parked next to each other).
Total ways to park the cars: There are 7 spaces and we need to choose 4 for the cars, which can be done in C(7,4) ways, using the combination formula which is C(n,k) = n! / (k! * (n - k)!). This gives us a total of 35 ways.
Ways to park all cars together: To have all 4 cars parked together, we can consider them as a block. There are 4 spaces that this block can be in (starting from space 1 to 4), so there are 4 ways this can happen.
Probability: The probability of the unfavorable outcome is the number of ways all cars are parked together divided by the total ways to park the cars. The probability that not all 4 cars are parked next to each other is the complement of this probability, which can be calculated by subtracting the probability of the unfavorable outcome from 1.
Therefore, P(not all together) = 1 - P(all together) = 1 - (4 / 35) = 31/35 or approximately 0.8857.