[Math] Probability of visiting $4$ cities

combinationscombinatoricsprobability

On her vacations Veena visits four cities $(A, B, C\ \text{and}\ D)$ in a random
order.

What is the probability that she visits

(i) $A$ before $B$?

(ii) $A$ before $B$ and $B$ before $C$?

(iii) $A$ first and $B$ last?

(iv) $A$ either first or second?

(v) $A$ just before $B$?

The number of ways Veena can visit four cities is $4!=24$

$S = \{ABCD, ABDC, ACBD, ACDB, ADBC, ADCB\\
BACD, BADC, BDAC, BDCA, BCAD, BCDA\\
CABD, CADB, CBDA, CBAD, CDAB, CDBA\\
DABC, DACB, DBCA, DBAC, DCAB, DCBA\}$

I want to know if their is an easier way than writing all these $24$ possibilities .

I know their might be some permutation and combination way to solve it easily but I can't figure it out.

I have studied maths upto $12$th grade.

Best Answer

Let's start with part $(i)$ (the other parts will use the same idea):

If Veena is to visit $A$ before she visits $B$, then we are looking to count the number of strings using $A,B,C,D$, where $A$ precedes $B$. Such strings could have the form

$$AB__$$ $$A_B_$$ $$A__B$$ $$_AB_$$ $$_A_B$$ $$__AB$$

We didn't actually need to list these; we could have simply recognized that there are 3 possible positions for $A$ (any but the last), and that if $A$ is in position $i$ ($i = 1,2,3$), then there are $4-i$ possible positions for $B$. Therefore the number of such strings of this general form is $\sum_{i=1}^3(4-i) = 3+2+1 = 6$, which agrees with the list above.

Now all we have to do is place $C$ and $D$, and there are no restrictions on how we may do this. There are two ways to place $C$ and $D$ in the empty spaces in each string listed above, therefore we get a total of $2\cdot6 = 12$ unique strings where $A$ precedes $B$.

Thus the probability that Veena visits $A$ before she visits $B$ is $$\frac{\text{# of strings where $A$ precedes $B$}}{\text{total number of strings}} = \frac{12}{4!} = \frac{1}{2}$$

For parts $(ii)$ - $(v)$, the same general method is employed, we are just putting different restrictions on the particular types of strings we are looking for.

Related Question