Show that if f is a function from S to T, where S and T are finite sets with |S| > |T |, then there are elements s1 and s2 in S such that f(s1)=f(s2), or in other words, f is not one-to-one

Let’s start this exercise with two definitions: the definition of function and the pigeonhole principle.

Definition: “Let A and B be nonempty sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write f:A→B.”

THE PIGEONHOLE PRINCIPLE: “If k is a positive integer and k + 1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects.”

Source: Discrete Mathematics and its Applications by Rosen.

From the definition of a function, we can see that every element of A must have assigned exactly one element of B.

The function f is a function from S to T. So, exactly one element of T must be assigned to each element of S.

Let the number of elements in T be the number of boxes, and the number of elements in S is the number of objects that we will place in each box. Notice that |S|>|T|, in other words, we have more objects than boxes.

By the pigeonhole principle, there is at least one box (one element of T) that has two objects (two elements of S).

It follows that there are two elements s1,s2∈S (the two elements that are in the same box), such that f(s1)=f(s2).

Related exercises: