Probability of function being strictly crescent

158 Views Asked by At

Let $F(n,m)$ is the group of functions with domain $\{1,\dots,n\}$ and codomain $\{1,\dots,m\}$ with $n,m \in \{3,4,5,\dots\}$ and $n<m$. Chosing a function $f$ at random from $F(n,m)$:

a) What is the probability of $f(1) \le f(2)$

b) Probability of f be strictly crescent.

So, for a), it seems, as it is random and symmetrical, the probability should be 1/2

Now, I had a few difficulties when solving b). I know that $ f: A\to B$ is strictly crescent if and only if $\forall x,y \in A$ if $x<y$ then $f(x) < f(y)$.

I can also see that total possible configuration of these functions is $\frac{m!}{(m-n)!}$ so my answer should be $\frac{something}{\frac{m!}{(m-n)!}}$, but I'm having trouble finding the pattern using the strictly crescent definition.

1

There are 1 best solutions below

2
On BEST ANSWER

In (a) it isn’t symmetric: you’re contrasting $f(1)\le f(2)$ with $f(2)<f(1)$. There are actually three possibilities here: $f(1)<f(2)$, $f(1)=f(2)$, and $f(1)>f(2)$. The first and last are symmetric and have equal probabilities, but those probabilities aren’t $\frac12$: they’re half of whatever is left after we subtract from $1$ the probability that $f(1)=f(2)$. Whatever $f(1)$ is, there is one chance in $m$ that $f(2)$ is equal to it, so the probability that $f(1)=f(2)$ is $\frac1m$. That leaves a probability of $1-\frac1m=\frac{m-1}m$ that $f(1)\ne f(2)$. By symmetry $\frac{m-1}{2m}$ is the probability that $f(1)<f(2)$, the probability that $f(1)>f(2)$ being the same. The total probability that $f(1)\le f(2)$ is therefore

$$\frac1m+\frac{m-1}{2m}=\frac{m+1}{2m}\;.$$

In order for a function $f\in F(n,m)$ to be strictly increasing, it must first of all be injective (one-to-one), so its range must be an $n$-element subset of $\{1,2,\ldots,m\}$. On the other hand, suppose that $A$ is an $n$-element subset of $\{1,2,\ldots,m\}$; say $A=\{a_1,a_2,\ldots,a_n\}$, where $a_1<a_2<\ldots<a_n$. Then there is only one possible strictly increasing function from $n$ to $A$: $f(k)=a_k$ for $k=1,2,\ldots,n$. Thus, the number of strictly increasing members of $F(n,m)$ is the same as the number of $n$-element subsets of $\{1,2,\ldots,m\}$, which is $\binom{m}n$.

However, the number of functions from $\{1,2,\ldots,n\}$ to $\{1,2,\ldots,m\}$ is not $\frac{m!}{(n-m)!}$: that’s the number of injections from $\{1,2,\ldots,n\}$ to $\{1,2,\ldots,m\}$. The number of arbitrary functions from $\{1,2,\ldots,n\}$ to $\{1,2,\ldots,m\}$ is $m^n$: for each $k\in\{1,2,\ldots,n\}$ you have $m$ choices for $f(k)$. The desired probability is therefore

$$\frac{\binom{m}n}{m^n}=\frac{m!}{n!(m-n)!m^n}\;.$$

The probability that a randomly chosen injection from $F(n,m)$ is strictly increasing is

$$\frac{\binom{m}n}{\frac{m!}{(m-n)!}}=\frac{\frac{m!}{n!(m-n)!}}{\frac{m!}{(m-n)!}}=\frac1{n!}\;,$$

because no matter which $n$-element subset of $\{1,2,\ldots,m\}$ is the range of the injection, only one of the $n!$ function from $\{1,2,\ldots,n\}$ to $A$ is strictly increasing.