Number and types of functions between two sets
Given two set a
and b
, where a = { x, y, z }
and b = { 1, 2, 3 }
cardinality:
|a| = |b| = 3
|a⨯b| = 3⨯3 = 9
powerset
𝒫(a⨯b)
|𝒫(a)| = |𝒫(b)| = 2³ = 8
the distribution of the powerset's elements is indicated by the Pascal's triangle, where the row that encodes it, is indicated by the second number which needs to be equal to the cardinality of the base set. In our example, for the base set
a
, it is |a| = 3, hence we're interested in is 4th row of the Pascal's triangle, the one that contains the sequence(1,3,3,1)
.|𝒫(a⨯b)| = 2⁹ = 512
number of relations:
total relations: |a𝓡b| = 512 since a𝓡b ⊆ a⨯b
1 null relation, R₀ = ∅
1 total relation, R₅₁₁ = a⨯b
other relations: each element of the powerset
𝒫(a⨯b)
represents a relation betweena
andb
; we need not add 1 for the null (empty) relation since it is repr by the ∅ in the powerset,𝒫(a⨯b)
number of functions:
total nr. of functions: 2³ = 8
How many
total number of functions
a -> b
: 8identity function: 1
bijections:
injections
surjections (constants)
Last updated
Was this helpful?