# Is my answer to this combinatorics question correct? Counting the number of functions where $F(a) = F(b)$?

Let $A = \{a, b, c, d, e, f\}$ and $B = \{1, 2, 3, 4, 5\}$. How many functions $F$ from $A$ to $B$ are there such that $F(a) = F(b)$.

I looked at it like this:

If $F(a)$ and $F(b)$ are equal, that means a and b must map to the same value in $B$. So that basically means they're considered one entity, and $A = \{ab, c, d, e, f\}$ so the new size is $5$.

Matching, there would be $5$ choices for $ab$, $5$ choices for $c$, for $d$, for $e$, for $f$, so $5^5$ is the answer.

Is that right?

(Also, why is it not $6^5$? For a function, could it not match with none of them? Would $c$ not have the option of matching with $1, 2, 3, 4, 5$ or none of them ($6$ options)?)

-
Re your last paragraph: functions are left-total relations: every element of the domain ($A$) has an image in the codomain ($B$). Otherwise they are called partial functions. –  alancalvitti Feb 11 '13 at 14:43

You can formulate it in this way also, choose a no. from B (say $n$)such that $F(a)=F(b)=n$.
This n can be selected in $5$ ways, each of the other others can go to any of the five choices so the total no. of such functions will be $5^5$ .
Your calculation is correct, since in most contexts function is understood to mean total function, i.e., one whose domain is the entire specified set (here $A$). The number of partial functions $F$ from $A$ to $B$ (i.e., functions from subsets of $A$ to $B$) with the property that $F(a)=F(b)$, however, is indeed $6^5$, the sixth choice being (as you suggested) this element is not in the domain of $F$.