Probability that at least one vertex is adjacent to three distinctly colored edges.

combinatoricscontest-mathprobability

I have attempted problem 17 from the 2020 high school Purple Comet math competition.

Question:

enter image description here

The above diagram is the graph of $K_4$. Suppose that each of the edges is randomly painted either red, white, or blue. The probability that the three edges adjacent to at least one vertex are colored with all three colors is $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find $m + n$.

What I did:

I computed the probability, $p$, that no vertex is adjacent to three edges painted all three colors. The desired probability is then $1 – p$.

To compute $p$, I used an ugly brute-force approach because I could not think of anything better to try.

enter image description here

Case 1: We color $2$ of the edges the same color and $1$ edge a different color.
We have $6$ ordered pairs of colors $(c_i, c_j)$ of which $c_i$ is used twice. For each pair we have $3$ arrangements. Hence we have $6 \cdot 3 = 18$ ways to achieve this case.

Case 2: We color all three edges the same color. There are $3$ ways of achieving this.

For each case, I brute-forced the rest of the ways the remaining three edges could be assigned while satisfying the constraint that no vertex has its adjacent edges all different colors.

This gave me $1 – p = \frac{50}{81}$ or an answer of $50 + 81 = 131$.

I feel like there should be a much nicer way to tackle this question. More generally, with combinatorics questions I frequently find myself going down the brute-force route but I don't see any ideas to evade this approach.

What hints could guide me to a more elegant solution, if one exists?

Best Answer

Let $A_k = P($vertex k is adjacent to three edges with different colors$)$.The problem asks for $P(\bigcup A_k)$, which is, by symmetry $$4P(A_1) - 6P(A_1 \cap A_2) + 4P(A_1\cap A_2\cap A_3) - P(A_1\cap A_2\cap A_3\cap A_4)$$ And notice that $A_1\cap A_2\cap A_3 = A_1\cap A_2\cap A_3\cap A_4$

Related Question