I hope I can explain this problem clearly. It has been bothering me for sometime and I do not know how to solve it even with Mathematica's help. I finally stumbled upon an idea, see my answer below. The old adage, "even a bllnd squirrel finds an acorn now and then" sure fits.
Right isosceles triangle E (the large red triangle) has base = 1 and height = 1 and the base and height are parallel to the x and y axis.
Inside E there are 2 smaller isosceles right triangles. A ( the yellow triangle ) and B ( the blue triangle ), both of these smaller triangles have a base that is 1 / 2 and a height of 1 / 2 and their bases and heights are parallel to the x and y axes.
If triangles A and B are randomly placed inside E and are wholly inside E, and a random point is uniformly chosen in E, find the probability that the point lies inside the intersection of A and B using Mathematica.
My simulation which is slow but simple is
n = 10000; (* Warning slow code ahead, keep this small *)
t = Triangle[{{0, 0}, {1, 0}, {0, 1}}];
h = {1/2, 0};
g = {0, 1/2};
ans =
Table[
{r1, r2, r3, r4} = RandomReal[{0, 1}, 4];
d = Sqrt[r1] (1 - r2) h + r2 Sqrt[r1] g;
i = Sqrt[r3] (1 - r4) h + r4 Sqrt[r3] g;
t1 = Triangle[{d, d + g, d + h}];
t2 = Triangle[{i, i + h, i + g}];
p1 = Point[RandomPoint[t]];
RegionIntersection[t1, t2, p1], {n}];
(n - Count[ans, EmptyRegion[2]])/n // N
this yields a probability of about 1 / 10. The answer given by the poser of the problem is 5 / 36 so I am not even sure about my simulation anymore. I would like to see a faster simulation than mine and one that gets the right answer, or maybe clever use of the Probability command. Is this possible?
I now suggest that you view the answer 5 / 36 with suspicion as pointed out to me by Dr. belisarius.