Number of functions from a to b where {123} is in the range of (f)

  • Thread starter Thread starter Dank2
  • Start date Start date
  • Tags Tags
    Functions Range
AI Thread Summary
The discussion focuses on calculating the number of functions from set A, which has n elements, to set B={0,1,2,3}, ensuring that the range of the function includes the elements {1,2,3}. The initial approach suggests selecting three elements from the range, leading to the formula n*(n-1)*(n-2) for combinations. For the remaining elements, the total number of choices is represented as 4^(n-3). The final count of distinct functions is derived from combining these calculations while considering the inclusion-exclusion principle to avoid double counting. The conclusion emphasizes that the total number of valid functions is n*(n-1)*(n-2) * 4^(n-3).
Dank2
Messages
213
Reaction score
4

Homework Statement


A has n elements.
B={0,1,2,3}
{1,2,3}⊆range(f)

Homework Equations

The Attempt at a Solution


So in each function we must choose those 3 numbers in the range.
So let's first choose all the diffrent possiblites to choose those 3:
n*(n-1)*(n-2)

now for the remaining elemnts, we should have 4n-3

So totally we should have n*(n-1)*(n-2) * 4n-3 diffrent functions.
 
Physics news on Phys.org
You can't separate them like that. You would e.g. count (1,2,3,3) twice, once with the first 3 "chosen" and once with the second one.
You can use inclusion-exclusion: How many functions are there in total? How many without 3? How many without 2? Without 1? How many did you subtract twice now?
 
Back
Top