Finding expected minimum absolute difference $E(\min_{1 \leq i \leq m} |x - y_i|)$ I have faced a statistical problem in a computational biology question. I will explain it in statistical language.
Let's say we have the results of rolling one red die, $x$, and $m$ black dice $y_1,\ldots,y_m$. These two types of dice are physical identical and both have $N$ faces. The question is finding the average expected minimum absolute differences of values between the red and black ones.
$E(\min_{1 \leq i \leq m}|m-y_i|)$ where $x$ and $y$s are discrete and uniformly distributed.
My main difficultly is mainly on $E(\min)$ of $M$ random variables. Is there any R function or package regarding such a computation?
Update:
Here is my simulation in R:
nx = 1 # number of red dice , x
ny = 4 # number of black dices, y
N = 7 # number of faces in dices

itr = 14000 # iteration 
dis.vec = rep(0,itr)
for (cnt in 1:itr)
{
pool = rep(0, N)
xz = sample(c(1:N),nx)
yz = sample(c(1:N),ny)
dis.vec[cnt] = min(abs(yz - xz)) #calculate the minimum
}
print(mean(dis.vec)) #average!

 A: Let us assume each die has $s$ sides. If I am understanding you correctly, the computation should be as follows:
$$E[min_{y = y_1,..,y_m} (x - y)] = E[x] - E[max_{y = y_1,..,y_m}(y)]$$
$$ = \frac{s+1}{2} - \sum^s_{k=1} kP(max_{y = y_1,..,y_m}(y) = k)$$
$$ = \frac{s+1}{2} - \sum^s_{k=1} P(max_{y = y_1,..,y_m}(y) \geq k)$$
So now we see that
$$P(max_{y = y_1,..,y_m}(y) \geq k) = 1 - P(max_{y = y_1,..,y_m}(y) < k)$$
$$ = 1 - P(y_1 < k,...,y_m < k)$$
$$ = 1 - \prod_{j=1}^m P(y_j < k) = 1 - (\frac{k-1}{s})^m $$
Giving a final answer of 
$$E[min_{y = y_1,..,y_m} (x - y)] = \frac{s+1}{2} - \sum^s_{k=1}1 - (\frac{k-1}{s})^m $$
$$ = \frac{1-s}{2} + \frac{1}{s^m}\sum^{s-1}_{k=1}k^m $$
A: Here is my solution to the updated problem of computing E(min_j(|x−y_j|).
Let us assume each die has $s$ sides.
$$E[\min_{y = 1,..,m} |x - y_j|] = \sum^s_{k=1} kP(\min_{y = 1,..,m} |x - y_j| = k)$$
$$ = \sum^s_{k=1} P(\min_{y = 1,..,m} |x - y_j| \geq k)$$
$$ = \sum^s_{k=1} \prod_{j=1}^m P(|x - y_j| \geq k)$$
$$ = \sum^s_{k=1} \prod_{j=1}^m \sum_{i=1}^s P(|i - y_j| \geq k)P(x = i)$$
$$ = \sum^s_{k=1} \prod_{j=1}^m \sum_{i=1}^s P(|i - y_j| \geq k)P(x = i)$$
$$ = \sum^s_{k=1} \lgroup \sum_{i=1}^s (\frac{s-i-k+1}{s}\pmb{1}_{i+k\leq s} + \frac{i-k}{s}\pmb{1}_{i-k \geq 1})\frac{1}{s}\rgroup^m$$
