Let RBG be a coloured random graph with n vertices {1, 2, · · · , n}, where every pair of vertices is connected either by a red edge (with probability $r$) or by a blue edge (with probability $b$) or by a green edge (with probability $g$), such that $p + q + r = 1$.
Given that a set of three vertices {$i, j, k$} is said to form a “tri-coloured triangle” if the triangle formed by {$i, j, k$} has exactly one red edge, exactly one blue edge and exactly one green edge.
Let $N_3$ denote the number of tri-coloured triangles in the coloured random graph RBG. Calculate $E[N_3]$.
Suppose that we consider that all $n$ vertices are connected to each other by the edges, then each edge carries exactly one of three different colours - red, blue or green.
I have derived the following.
Let, for a triple of distinct vertices {$i, j, k$}, the random variable $Y_{ijk} = 1$ if {$i, j, k$} form a tri-coloured triangle, $Y_{ijk} = 0$ otherwise.
$P(Y_{ijk}) = $ $P($All edges in a triangle are tri-coloured$)$
The edges are iid $Ber(p)$, so the edges between {$i, j, k$} is a $Bin(3, p)$, where $p$ is the probability indicated in the question.
So I produce the following.
$P(Y_{ijk}) = P[Bin(3,r) \cup Bin(3,b) \cup Bin(3,g)]$
Is the above accurate? How do I proceed from here?
Much appreciation.
What you're writing as $P(Y_{ijk})$ is $P(Y_{ijk}=1)$, as $Y_{ijk}$ is a random variable, not an event. In a similar vein, $P(Y_{ijk}) = P[\operatorname{Bin}(3,r) \cup \operatorname{Bin}(3,b) \cup \operatorname{Bin}(3,g)]$ makes no sense, as you're connecting distributions as if they're events. I also don't understand what you mean by "the edges between $\{i,j,k\}$ is a $\operatorname{Bin}(3,p)$"; it sounds as if you're counting something, but I don't know exactly what – it doesn't seem to be the total count of edges between $\{i,j,k\}$ because then combining three of that wouldn't make sense. Another confusion arises because you introduce $r$, $g$, $b$ but then write an equation for $p$, $q$, $r$; then later you use $p$ again, but here it seems that it's not intended as a renamed version of one of the three probabilities but stands for any one of them.
For each triangle, there are $3!=6$ different permutations in which the $3$ colours can be distributed over the $3$ edges, and each of these has probability $rgb$. There are $\binom n3$ such triangles, so the expected number of tri-coloured triangles is $6rgb\binom n3=rgbn(n-1)(n-2)$.