Expectation of overlapping triangles Let E denotes a triangle PQR with PQ = QR = 2 unit and
angle Q = 90 degree . L , M and N are mid-points of PQ , QR and RP respectively . Let A denotes triangle PLN , B denotes triangle LQM , C denotes triangle NMR and X  denotes triangle LMN . 
If A , B and C can move freely inside  E but must keep parallel with E in moving . 
Find  the  expected  area  of  the  overlapped  portion  of  A  and  B .
 A: Let's use a coordinate system in which the coordinates of $P$, $Q$, and $R$
are (respectively) $(0,0)$, $(2,0)$, and $(2,2)$.
Now let $\triangle A(s,t)$ be a triangle congruent to 
triangle $\triangle PLN$, 
with its three sides parallel to the sides of $\triangle PQR$
but "moved" so that its vertices are at coordinates
$(s,t)$, $(s+1,t)$, and $(s+1,t+1)$;
and let $\triangle B(u,v)$ be a triangle congruent to 
triangle $\triangle LQM$,
with its three sides parallel to the sides of $\triangle PQR$
but "moved" so that its vertices are at coordinates
$(u,v)$, $(u+1,v)$, and $(u+1,v+1)$.
To place triangles $\triangle A(s,t)$ and $\triangle B(u,v)$ at random
locations, we have to specify what random distribution they should follow.
Notice that $(s,t)$ and $(u,v)$ must each be somewhere inside or on the
original location of triangle $\triangle A$; for any measurable subregion
of that triangle, let the probability that $(s,t)$ lies within that subregion
be proportional to the area of the subregion, and similarly for $(u,v)$.
To find possible values for $s$ and $t$, you can first take $0\leq s \leq 1$
and then take $0 \leq t \leq s$.
Likewise, for $u$ and $v$ you can first take $0\leq u \leq 1$
and then take $0 \leq v \leq u$.
So if $f(s,t,u,v)$ is the area of the overlapping portions of triangles
$\triangle A(s,t)$ and $\triangle B(u,v)$, the expected area of the
overlapping portions of the triangles is
$$
E(f(s,t,u,v)) =
\frac{\displaystyle\int_{s=0}^1 \displaystyle\int_{t=0}^s
      \displaystyle\int_{u=0}^1 \displaystyle\int_{v=0}^u      
      f(s,t,u,v) \, dv\, du\, dt\, ds}
     {\displaystyle\int_{s=0}^1 \displaystyle\int_{t=0}^s
      \displaystyle\int_{u=0}^1 \displaystyle\int_{v=0}^u
      1 \, dv\, du\, dt\, ds}. 
$$
In order to write this in a different way,
let $V$ be the set of all coordinates $(s,t,u,v)$ such that 
$0\leq s\leq 1$, $0\leq t\leq s$, $0\leq u\leq 1$, and $0\leq v\leq u$, 
and let $\mu$ be a suitable measure function over $(s,t,u,v)$-space.
In particular, this means 
$$\mu(V) =
 \int_{s=0}^1 \int_{t=0}^s \int_{u=0}^1 \int_{v=0}^u 1 \,dv\,du\,dt\,ds
 = \frac14,$$
that is, $\mu(V)$ gives the four-dimensional "volume" of $V$.
Let $\newcommand{X}{\mathbf X} \X$ 
be a random set of coordinates within $V$. 
Then the expected area of the overlapping portions of the triangles
can be written $E(f(\X))$, and
$$
E(f(\X)) = \frac{\displaystyle\int_{\X\in V} f(\X) \, d\mu(V)}{\mu(V)}.
$$
The advantage of writing the expected value this way 
(aside from a shorter formula) is that this integral, which
integrates a bounded function over a finite region,
is sufficiently "nice" that we can relatively freely choose the
order in which we "add up" the $f(\X)\, d\mu(V)$ values.
We are not obliged to choose one of the variables $s,t,u$, and $v$
for each of four nested integrals.
Now consider the different ways in which $\triangle A(s,t)$ and 
$\triangle B(u,v)$ can overlap.
It is possible for the two triangles to be identical,
or for at least one side of $\triangle A(s,t)$ to be collinear with
one side of $\triangle B(u,v)$, but those cases have zero probability.
With probability $1$, one of the vertices of either
$\triangle A(s,t)$ or $\triangle B(u,v)$ will lie inside the other triangle;
so $V$ can be partitioned in six parts, each part obtained by choosing one
of the two triangles, then choosing one of the three vertices of that triangles to lie inside the other triangle.
Consider just the portion of $V$ in which the lower-left vertex of $\triangle B(u,v)$ lies within $\triangle A(s,t)$.
Give the name $V_1$ to this part of $V$.
Now let $p = 1 + s - u$. Then $p$ is the length of either 
leg of the right triangle formed by the overlapping portions of
$\triangle A(s,t)$ and $\triangle B(u,v)$;
that is, the area of overlap is $\frac 12 p^2$.
By considering all possible pairs of triangles with a given value of $p$,
it should be clear that these are just the pairs of triangles
for which the coordinates $(s,t)$ satisfy $0 \leq s \leq p$
and $0 \leq t \leq s$.
Moreover, if we let $q = v - t$, then we can integrate over all of
$V_1$ by letting $0\leq p \leq 1$, $0\leq q\leq 1-p$,
$0 \leq s \leq p$, and $0 \leq t \leq s$:
\begin{align}
\int_{\X\in V_1} f(\X) \,d\mu(V_1)
 &= \int_{p=0}^1 \int_{s=0}^p \int_{t=0}^s \int_{q=0}^{1-p} 
     \frac12 p^2 \,dq\,dt\,ds\,dp \\
 &= \int_{p=0}^1 \int_{s=0}^p \int_{t=0}^s
     (1-p) \frac12 p^2 \,dt\,ds\,dp \\
 &= \int_{p=0}^1 \left(\frac12 p^2\right) (1-p) \frac12 p^2 \,dp \\
 &= \frac14 \int_{p=0}^1 (p^4 - p^5) \,dp \\
 &= \frac14 \left(\frac15 - \frac16\right) = \frac{1}{120}. \\
\end{align}
We will get the same value by integrating over each of the other five
subregions of $V$. This is obvious for the three subregions in which an
acute-angled vertex of one triangle lies inside the other triangle;
for the two subregions in which a right-angled vertex of one triangle is
inside the other triangle, we can either apply an
area-preserving linear transformation to the plane so that
$\triangle PQR$ is mapped to an equilateral triangle, in which case the
complete symmetry of all six subregions of the partition is obvious,
or we can consider the partition in which the right-angled vertex of
$\triangle B(u,v)$ is inside $\triangle A(s,t)$ and
assign $p$ and $q$ so that the integral of $f(\X)$ works out the same
as the calculation for $V_1$.
Either way, we find that
$$
\int_{\X\in V} f(\X) \,d\mu(V) = 6 \int_{\X\in V_1} f(\X) \,d\mu(V_1)
=\frac{1}{20}
$$
and therefore
$$
E(f(\X)) = \frac{1/20}{1/4} = \frac15.
$$
