2

How many functions from $f:A \rightarrow B$ where $A=\{a_1,a_2,\ldots,a_6 \}, B=\{1,2,3,\ldots,9 \}$ such that $f(a_{i+1})>f(a_{i}) \quad \forall \quad 1 \leq i \leq 5$ and $f(a_j) \neq j \quad \forall 1 \leq j \leq 6$

Attempt: $a_6$ can take values $7,8,9$. $a_5$ can take values $6,7,8$ so on till $a_1$ can take values $2,3,4$. I wrote down these possibilities in a vertical column, one below the other, in the same order. I noted that starting from any row, we can proceed(values permissible) only vertically upward or diagonally upward to the next row.

I couldn't think of any other idea. Although here brute Force with the above logic is feasible since the numbers and possibilities are fairly small (I got the answer doing so), but is there any other way? Preferably a more general one with set A having $n$ elements and set B having $m$ elements with the same constraints.

I couldn't spot a pattern in the above brute Force method.

user600016
  • 2,235
  • 1
    Notice that you can not put $f(a_1)=1,$ hence you go from $2.$ The question is then, by just doing $f(a_{i+1})>f(a_i)$ can you ever do $f(a_j)=j$ if you start by $2$? – Phicar Oct 27 '19 at 15:41
  • Oh yes @phicar. I am so stupid. So the answer is 9C6-8C5=28. Should I delete this question now or vote to mark it as duplicate? – user600016 Oct 27 '19 at 16:27
  • Another possibility would be that I edit the question to general number of elements for set A,B (say m,n). That would make the question more interesting. – user600016 Oct 27 '19 at 16:31
  • 1
    Well i will answer the general question. I guess you can decide if accept it or wait for someone who knows what to do if you want to identify it as duplicate. – Phicar Oct 27 '19 at 16:36

1 Answers1

3

Let $[n]=\{1,2,\cdots , n-1,n\}$ be the set of $n$ elements. Consider then the set $$\mathbb{A}_{n,m}=\{f:[n]\longrightarrow [m]:f(i)<f(i+1)\}$$ and also consider then $$\mathbb{B}_{n,m}=\{f:[n]\longrightarrow [m]:f(i)<f(i+1)\text{ and }f(i)\neq i\}.$$ Notice that $\mathbb{B}_{n,m}\subseteq \mathbb{A}_{n,m}$ and $\mathbb{A}_{n,m}=\binom{[m]}{n}=\{X\subseteq [m]:|X|=n\},$ by considering the bijection $$\varphi :\mathbb{A}_{n,m}\longrightarrow \binom{[m]}{n},$$ given by $\varphi (f)=f([n]).$
Now, by the observation made in the comments, let $f\in \mathbb{B}_{n,m}$ then we can assume that $f([n])\subseteq [m]\setminus \{1\}$ and so create a function $$\psi :\mathbb{B}_{n,m}\longrightarrow \mathbb{A}_{n,m-1}$$ given by $\psi (f)=f-1.$ Notice that this is a bijection and hence $$|\mathbb{B}_{n,m}|=|A_{n,m-1}|=\binom{m-1}{n}$$

Phicar
  • 14,827
  • Result you obtained is for $f(a_{i+1})>f(a_{i})$ $\forall 1\leq i\leq 5$ and $f(a_{j})\neq j$ $\forall$ $1\leq i \leq 6$?? – mathophile Jan 28 '22 at 08:14
  • Actually I didn't understand the solution. After Now, by the observation made in the comments, let $f\in \mathbb{B}{n,m}$ then we can assume that $f([n])\subseteq [m]\setminus {1}$ and so create a function $$\psi :\mathbb{B}{n,m}\longrightarrow \mathbb{A}{n,m-1}$$ given by $\psi (f)=f-1.$ Notice that this is a bijection and hence $$|\mathbb{B}{n,m}|=|A_{n,m-1}|=\binom{m-1}{n}$$ – mathophile Jan 28 '22 at 08:16
  • 1
    @mathophile Yes, it is general. What is what you do not understand? – Phicar Jan 28 '22 at 08:21
  • Thanks I understood the solution. But can you help me understand some term you used in solution because I am new to this kind of term. Like $\varphi (f)=f([n]).$ How do we read it. $f([n])\subseteq [m]\setminus {1}$ How do we read it. and $\psi (f)=f-1.$ How do we interpret it. Thanks again. – mathophile Jan 28 '22 at 08:40
  • @mathophile $\varphi$ takes a function $f$ and gives its image. For example $f:[2]\longrightarrow \mathbb{Z}$ given by $f(x)=x^2$, then $\varphi (f)={1^2,2^2}$. $f([n])$ means that the image of the function lies inside the interval $[2,m]$ and $\psi$ takes a function $f$ and outputs a function $g(x)=f(x)-1$. Hope it helps. – Phicar Jan 28 '22 at 08:58