Counting Functions
Context: FIT1058_MOC · counts how many functions of each type exist between finite sets · uses the product rule · linked to Injection, Surjection, Bijection
Quick Revision
- 🎯 Objective: count functions by type (, ) ➔ all / injective / bijective.
- 📦 Core Components: all ➔ injections ➔ bijections .
- ⚡ Key Constraint: injections vanish if (pigeonhole); surjections need inclusion–exclusion.
📝 Core
1. The Counts
- All functions ➔ (each of inputs picks any of outputs independently).
- Injections ➔ (choices shrink; if ).
- Bijections ➔ (needs ; permutations of the set).
2. Why the Formulas
- Product rule ➔ independent choices multiply ⟹ .
- Shrinking choices ➔ each used value unavailable ⟹ falling product.
- Pigeonhole ➔ forces a collision ⟹ no injection.
3. What’s Deferred
- Surjections ➔ inclusion–exclusion / Stirling numbers of the second kind (not a simple product).
Key identities:
⚖️ Core Decision Matrix
| Type | Count | Reason |
|---|---|---|
| all functions | choices, times | |
| injections | shrinking choices; if | |
| bijections () | permutations | |
| surjections | inclusion–exclusion | not a plain product |
When It Flips: every bijection is an injection with : (consistent). Relations (, n-ary Relation) vastly outnumber functions () because they drop single-valuedness.
📊 Exam Execution Trace
Manual Execution Trace
, :
| Step / State | Type | Formula | Value |
|---|---|---|---|
| 0 (Init) | — | — | — |
| 1 | all | 9 | |
| 2 | injections | 6 | |
| 3 | bijections () | 6 |
⚠️ Common Mistakes
- 💡 Injections keep order, subsets don’t ➔ is the ordered selection; dividing by gives (Binomial Coefficient). Injections vanish when .
🧠 Active Recall
Derive the number of functions and injections from a size- to a size- set.
- Hint: Independent vs shrinking choices.
Answer
- Short answer: Functions ; injections .
- Why: Pigeonhole ➔ makes a factor , count .
Why is the number of bijections on an -set , and what are they called?
- Hint: injection count.
Answer
- Short answer: ; these are the permutations.
- Why: Falling product ➔ distinct image choices.