1

Problem

$A = \{1, 2, 3, 4\}$
$B = \{1, 2, 3, 4, 5\}$ Find the number of mappings from A to B such that $f(i)\le f(j)$ for all $i<j$.

My approach:

The required set of functions= $\{\text{Set of total possible of functions}\}\setminus\{\text{Functions such that $f(i)>f(j)$ for $i<j$}\}$

  • (i) The number of possible functions would be $5 \times 5 \times 5 \times 5 = 625$.(There are $5$ mappings possible for each one of them.)
  • (ii)To find the number of functions such that $f(i)>f(j)$ for $i < j$, I can choose any four elements from $B$ in $C(5,4)$ ways. This will have only one decreasing order and only one arrangement is possible out of every set of elements I will choose. I will therefore have $5$ such functions.

So the required number of functions would be $625-5 = 620$ which largely differs from the answer stated by my textbook, i.e. $70$.

Please help me out.

vitamin d
  • 5,913
  • I guess that $n(f(x):f(i) > f(j))$ can be directly found by looking at the sets - you can have $\lbrace (1,1),(2,2),(3,3),(4,4)\rbrace$ and $\lbrace (1,2),(2,3),(3,4),(4,5) \rbrace$ and such functions kicked out of the set of possible functions – Spectre Jun 11 '21 at 17:26

1 Answers1

3

Your answer has a couple of things wrong with it. First, the cases you are trying to rule out are ones where $f(i)>f(j)$ for some $i<j$, not all values.


The correct answer can be most easily seen by considering a stars and bars problem. Let us think about arranging four | and four o in a line.

Example: |oo||o|o

Given this, we will construct our monotone function as follows. For each $i\in1..4$, we will take $f(i)$ to be one more than the number of $o$'s to the left of the $i$'th | in the arrangement. In our example, for instance, we have $f(1)=1$, $f(2)=3$, $f(3)=3$, $f(4)=4$.

It should be pretty clear that the function reached will be monotone for any arrangement of the characters, that each arrangement leads to a different function from $A$ to $B$, that each monotone function from $A$ to $B$ has a different arrangement of characters. Therefore, the number of monotone mappings can be more easily calculated as $\binom 84 = 70$.