Analyzing the Setup
We are exploring functions from a set A to itself, where the cardinality of the set is ∣A∣=n. Let the set be defined as A={a1,a2,…,an}.
When we define a function f:A→A, we are establishing a rule that assigns each element in the domain to an element in the codomain. This is the fundamental building block of mapping theory.
The Freedom of Choice
Total Functions
To determine the total number of functions, we consider each element in the domain as an independent agent. The first element, a1, has n possible choices in the codomain.
Since there are no restrictions, the second element, a2, also has n choices, regardless of where a1 mapped. This independence holds for all n elements in the domain.
By the Fundamental Principle of Counting, we multiply these choices together:
n×n×⋯×n (n times)=nn
Thus, the total number of possible functions from A to A is nn.
The Constraint of 'Onto'
Now, we introduce the constraint that the function must be 'onto', or surjective. This requires that every element in the codomain is covered by at least one arrow from the domain.
In a scenario where the domain and codomain have the same number of elements (n), this constraint is transformative. If every element in the codomain must be covered, we cannot allow two elements in the domain to map to the same element in the codomain.
If any two elements mapped to the same target, the Pigeonhole Principle dictates that at least one element in the codomain would be left empty. Therefore, an onto function from a finite set to itself must be a bijection, meaning it is both injective and surjective.
The Countdown to Factorial
This constraint changes our counting strategy from independent choices to a restricted selection process. The first element, a1, has n choices.
The second element, a2, is now restricted; it cannot map to the element chosen by a1. Consequently, a2 has n−1 choices.
The third element, a3, must avoid both a1 and a2, leaving it with n−2 choices. This pattern continues until the final element has only 1 choice remaining.
The total number of such bijections is given by the product:
n×(n−1)×(n−2)×⋯×1=n!
By adding the requirement that every element must be accounted for, we transition from the total freedom of nn to the strict, orderly arrangement of n!. Keep this logic in your toolkit, as it is essential for solving complex combinatorial problems in your JEE journey.