Bijections in the Pigeonhole Model: When Can a Function Be Both One-to-One and Onto?
Let be the set of pigeons with and let be the set of boxes (pigeonholes) with . A function is:
- keyword if implies .
- keyword if for every there exists with .
- keyword.
For finite sets, a function can be both one-to-one and onto (i.e., keyword exists) iff the sets have the same cardinality: .
This directly answers the multiple-choice options: only case (ii) works.
Bijections, Injective and Surjective Functions (Intro to Functions)
Key finite-set facts (cardinality constraints)
For a function with and :
-
Injective (–) is possible only if the domain is no larger than the codomain:
If , then by the pigeonhole principle you cannot assign distinct pigeons to only boxes without two pigeons landing in the same box. -
Surjective () is possible only if the domain is at least as large as the codomain:
If , then there are not enough pigeons to cover all boxes. -
Therefore, bijective (both – and onto) requires both inequalities simultaneously:
- injective requires
- surjective requires
Together these imply .
A compact way to state the result:
- keyword. So the function is one-to-one and onto exactly when .
Choose the correct option (proof by contradictions using injective/surjective requirements)
- 1Step 1
Model the assignment of pigeons to boxes as a function where and .
- 2Step 2
If , then injectivity fails because you would need distinct images inside a codomain of only boxes.
- 3Step 3
If , then surjectivity fails because you cannot cover boxes using only pigeons.
- 4Step 4
To be both injective and surjective, both and must hold, hence .
- 5Step 5
Option (ii) .
Pro Tip
For finite sets, bijection is governed purely by cardinality: can be one-to-one and onto only when the counts match ().
Common mistake
Thinking that could still be onto by “reusing” boxes is correct for surjectivity only if boxes are fewer or equal; but the direction is strict: onto requires at least as many pigeons as boxes ().
Feasibility of being one-to-one and onto (bijective)
For a function from m pigeons to n boxes (finite sets).
How the logic narrows the cases
Need injective
Step AInjective requires (otherwise pigeonhole collisions are forced)."
Need surjective
Step BSurjective requires (otherwise some boxes remain empty)."
Both together
Step COnly satisfies both simultaneously."
Answer & quick explanations
Bijection in the Pigeonhole Setting
Knowledge Check
Let pigeons and boxes. For a function to be both one-to-one and onto (bijective), which case must hold?
Explore Related Topics
Algorithm Property for Clear, Unambiguous Steps: Definiteness
The course clarifies that definiteness is the algorithm property requiring every step to be precise and have exactly one interpretation, distinguishing it from finiteness, effectiveness, and generality.
- Definiteness: each instruction is specified so precisely that only one meaning is possible.
- Finiteness concerns termination, effectiveness concerns executability, and generality concerns applicability to all valid inputs.
- Example: “repeat 3 times” is definite, while “repeat several times” is not.
- Exam tip: associate words like “clear,” “precise,” or “unambiguous” with definiteness.
- Algorithm quality can be expressed as .
Maximum number of edges in a bipartite graph: why $\lfloor n^2/4\rfloor$ is optimal
Object-Based Logical Models: Logical, View, or Physical Level?