I have the following graph:

I was told the following information:
(1) the vertex A to the vertex X is described by an exponential distribution with lambda = 4;
(2) the vertex A to the vertex Y is described by an exponential distribution with lambda = 2.5;
(3) the vertex X to the vertex Y, identical to the vertex Y, to the vertex X, and it is described by an exponential distribution with lambda = 10;
(4) the vertex X to the vertex B is described by an exponential distribution with lambda = 3; and finally
(5) the vertex Y to the vertex B is described by an exponential distribution with lambda = 5.
Suppose I use the fastest path between the vertices of each simulation.
Now I want to find out the average time needed to go from vertex A to vertex B.
My R code is as follows:
AtoX <- rexp(1000, 4)
AtoY <- rexp(1000, 2.5)
XtoY <- rexp(1000, 10)
XtoB <- rexp(1000, 3)
YtoB <- rexp(1000, 5)
AYX = AtoY + XtoY
AXY = AtoX + XtoY
AXB = AtoX + XtoB
AYB = AtoY + YtoB
AXYB = AtoX + XtoY + YtoB
AYXB = AtoY + XtoY + XtoB
minAXB = min(AXB)
minAYB = min(AYB)
minAXYB = min(AXYB)
minAYXB = min(AYXB)
averageTravelTime =
mean(minAXB + minAYB + minAXYB + minAYXB)
? , .