5

Given two sets $A=\{1,2,3,4\}$ and $B=\{1,2,3,4,5,6,7\}$. The question is to find the number of non decreasing functions from $A$ to $B$ such that $f(i)$ is not equal to $i$.

My attempt went as follows: The number of non decreasing functions would simply be $10C4$. I then proceeded to subtract the cases where $f(i)=i$ but ended up counting them manually.

Is there any way to remove those extra cases without manual counting? Or even a way in which the problem can be solved without doing “total - undesirable cases”?

(Edit - 10C4 instead of 10C3)

1 Answers1

4

Let's generalize this to $A=\{1,2,\dots, m\}$ and $B=\{1,2,\dots,n\}$.

The answer is for $n \geq m$

$$ \frac{n-m}{m} \binom{n+m-1}{n}. $$

Proof

A good function $f:A\to B$ with $f(m)=h$ corresponds to a lattice path from $(1,1)$ to $(m,h)$ taking North and East steps and staying weakly above the line $y=x$. This correspondence is via the graph of $f$. See picture: example lattice path

The enumeration of such paths is done in this article (Theorem 10.3.3) (Take the other line $y=x+t$ to be anything that has no effect for example $t=n+m$). The count is

$$ L_h := \sum_{k \in \mathbb Z} \binom{h+m-2}{m-k(t+1)} - \binom{h+m-2}{m-1-k(t+1)+t+1} $$

Now, because $t$ is large, the only terms that are non zero are the first for $k=0$ and the second for $k=1$. So we have

$$ L_h = \binom{h+m-2}{m-1} - \binom{h+m-2}{m-2}. $$

And the answer is given by

$$ \sum_{h=m+1}^{n} L_h = \frac{n-m}{m} \binom{n+m-1}{n}. $$

ploosu2
  • 12,367
  • Could you specify the correspondence? So the steps we're allowed to take are (1,0) and (0,1) from what I can read from the paper. If we have a step (0,1), then we have multiple values for a given value $x$ that could be chosen. If we always choose the top one of the vertical stack at a x-coordinate, then we can never have $f(1)=2$, since in that point we can only go up. If we always choose the bottom one, then we can never have $f(1)>2$, since we start in (1,2). But if we choose any vertex of the vertical stack, then we have multiple paths from which we can select the same resulting $f$. – ConnFus Nov 08 '24 at 14:03
  • 1
    @ConnFus Yes, it was falty. But somehow taking the end point to be $(m+1, n+1)$ seemed to work. Maybe it "does the summing" somehow. Well, I tried to fix it. – ploosu2 Nov 08 '24 at 15:03
  • 1
    It still works if you set the end point to be $(m+1,n)$ instead of summing over $h$: The last segment from $(m,x)$ to $(m+1,n)$ has only one freely choosable part, namely when you go right, and this part is what determines the function value $(m,h)$. So putting $(m+1,n)$ as end point does indeed sum over the paths ending in $(m,h)$. – ConnFus Nov 08 '24 at 15:24