0

Let $A=\left\{1,2,3,4,5,6,7\right\}$ and $f:A \to A$.What is the number of onto functions in which atleast $3$ elements of $A$ have self-images?

I could not solve this problem,I have no concrete idea how to solve it. Please help me.Thanks.

learner_avid
  • 1,691
  • 2
    This looks like it would be easier to count the number of onto functions with at most two fixed points, then subtract from the total number of $7!$ onto functions. – hardmath Oct 05 '15 at 14:22
  • I wrote a lengthy clarification of Christian Blatter's approach. My approach to counting the $f$'s that fix exactly 3 points is more direct, as well. If you have any questions, feel free to ask. – Lynn Oct 07 '15 at 16:41

3 Answers3

7

Such an $f$ is automatically bijective, i.e., a permutation.

If $f$ has exactly three fixed points its cycle structure can be one of the following: $(1)(2)(3)(4567)$ or $(1)(2)(3)(45)(67)$. There are ${7\choose 3}$ ways to choose the three fixed points, $6$ ways to make a four-cycle of the remaining four points and three ways to pair them off to two transpositions, making a total of $35\cdot(6+3)=315$ such $f$'s.

If $f$ has exactly four fixed points its cycle structure has to be of the form $(1)(2)(3)(4)(567)$. There are ${7\choose 3}=35$ ways to choose the elements taking part in the three-cycle, and two ways to order this cycle, making a total of $70$ such $f$'s.

If $f$ has exactly five fixed points its cycle structure has to be of the form $(1)(2)(3)(4)(5)(67)$. There are ${7\choose2}=21$ such $f$'s.

There is no such $f$ with exactly six fixed points; and the identity leaves all seven points fixed.

My count gives $407$ functions fulfilling the conditions.

  • I've confirmed your count with a simple computer program that checks all $7!$ bijections for this property. – Lynn Oct 07 '15 at 15:51
3

Why does $f : A \to A$ being onto imply that it is bijective?

The first insight, here, is that since $A$ is finite, every surjection (onto function) $f : A \to A$ is a bijection (one-to-one correspondence). You can find a proof here, but it makes sense when you think about it: if you have only a bow and 7 arrows, and you must hit each of 7 targets at least once, you'll be out of arrows before you can ever hit a target twice – so all you can do is hit each target exactly once.

What are bijections on $A$?

A bijection represents some way to permute the elements of $A$. Here is one $f$ that satisfies your condition:

$$f(1) = 4 \\f(2) = 2 \\f(3) = 1 \\f(4) = 3 \\f(5) = 5 \\f(6) = 6 \\f(7) = 7$$

It has four fixed points: $f(2)=2$, $f(5)=5$, $f(6)=6$, and $f(7)=7$.

There are $7! = 1 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot 6 \cdot 7 = 5040$ permutations of $A$, or choices for a bijection $f$.

The count

We wish to count how many of those 5040 bijections satisfy the property that there are at least 3 fixed points. To do this, we split the count up into parts: we count the bijections with $n$ points, for $n \in \{3,4,5,6,7\}$, and sum up the results.

Bijections with exactly 3 fixed points

How can we "construct" a bijection with exactly 3 fixed points?

First of all, we could choose which elements to fix. We are picking 3 elements out of a set of 7, and the order doesn't matter: the [binomial coefficients] tell us there are $\binom{7}{3}$ options here.

The remaining 4 elements may not get mapped to themselves. Call them $p, q, r, s$.

  • $p$ must point to $q$, $r$, or $s$. We have 3 choices for $f(p)$.
  • $f(p)$ can either get mapped back to $p$ (that is, $f(f(p)) = p$), or point to one of the remaining two points.
    • In the first case, the remaining points must point to each other as well -- we have only one option left.
    • In the second case, there are two choices for $f(f(p))$.

In total: $$\underbrace{\binom{7}{3}}_{\text{choices for fixed points}} \text{times} \underbrace{3}_{\text{choices for $f(p)$}} \text{times} \underbrace{(1 + 2)}_{\text{choices for remaining points}} = 315.$$

Bijections with exactly 4 fixed points

This time, how can we "construct" a bijection with exactly 4 fixed points?

Again, we have $\binom{7}{4}$ choices for the 4 fixed points.

Then, we call the remaining elements $p, q, r$. Again, they have to point to each other in some way; we can't have $f(p) = p$, $f(q) = q$, or $f(r) = r$.

Surprisingly, we have only two options: the clockwise cycle $p \mapsto q \mapsto r \mapsto p$ and the counter-clockwise cycle $p \mapsto r \mapsto q \mapsto p$. We can't make any "pairs" among $\{p,q,r\}$, or else the third element would be forced to point to itself.

In total: $$\underbrace{\binom{7}{4}}_{\text{choices for fixed points}} \text{times} \underbrace{2}_{\text{choices for cycle direction}} = 70.$$

Bijections with exactly 5 fixed points

There are $\binom{7}{5} = 21$ ways to pick the 5 fixed points, and then you're forced to pair the last two points up to point at each other.

In total: $$\underbrace{\binom{7}{5}}_{\text{choices for fixed points}} = 21.$$

Bijections with exactly 6 fixed points

There are none! If six of the elements are mapped to themselves, then the final one can't not map to itself; there's nowhere else to map to.

Bijections with exactly 7 fixed points

There is, of course, exactly one such function: $f(1) = 1, f(2) = 2 \dots f(7) = 7.$

Grand total

Summing up all our previous results gives us the answer – the number bijections with at least 3 fixed points:

$$315 + 70 + 21 + 0 + 1 = 407.$$

Lynn
  • 3,338
2

We can take the number of all permutations of $\{1,\cdots,7\}$

and subtract the number of permutations with less than 3 elements with self-images.

If we let $D_n$ be the number of permutations of $\{1,\cdots,n\}$ with no fixed points

$\hspace{.4 in}$(the number of derangements of n elements), this gives

$\;\;\;7!-D_7-\dbinom{7}{1}D_6-\dbinom{7}{2}D_5=5040-1854-7(265)-21(44)=\color{red}{407}$

$\hspace{.3 in}$since there are $D_7$ permutations which leave no element fixed,

$\hspace{.3 in}\binom{7}{1}D_6$ permutations which leave exactly one element fixed, and

$\hspace{.3 in}\binom{7}{2}D_5$ permutations which leave exactly two elements fixed.


Alternatively, we could use

$\displaystyle\binom{7}{3}D_4+\binom{7}{4}D_3+\binom{7}{5}D_2+\binom{7}{6}D_1+\binom{7}{7}=35(9)+35(2)+21(1)+7(0)+1=\color{red}{407}$

user84413
  • 27,211