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

TypeCountReason
all functions choices, times
injectionsshrinking choices; if
bijections ()permutations
surjectionsinclusion–exclusionnot 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 / StateTypeFormulaValue
0 (Init)
1all9
2injections6
3bijections ()6

⚠️ Common Mistakes

  • 💡 Injections keep order, subsets don’t is the ordered selection; dividing by gives (Binomial Coefficient). Injections vanish when .

🧠 Active Recall