Artificial intelligent assistant

In how many of the possible arrangements will both end balls be of the same colour? Suppose 6 blue balls, 4 red balls, and 2 white balls are placed in a straight line. In how many of the possible arrangements will both end balls be of the same colour? _This is a self-answered question_

Don't worry :) I worked it out

Let A = event that both end balls are the same colour

$$n(A) = \frac{10!}{4!4!2!} + \frac{10!}{6!2!2!} + \frac{10!}{6!4!} = 4620$$

$n(S) = \frac{12!}{6!4!2!} = 13860$

$P(A) = \frac{4620}{13860} = \frac{77}{281}$ = 0.2740213523

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1b8d62e33cfdacd355d9e257a4201917