Find the number of possible functions from one set to another

  • Thread starter Thread starter HaRgIlIN
  • Start date Start date
  • Tags Tags
    Functions Set
Click For Summary
SUMMARY

The discussion focuses on calculating the number of functions from one set to another, specifically using the notation ##n## for the size of the codomain and ##m## for the size of the domain. Key formulas derived include the total number of functions as ##n^m##, the number of functions excluding specific values, and combinations of these restrictions. The final expression for part (d) is established as ##n^m - 2(n-1)^m + (n-2)^m##, confirming the calculations presented are accurate.

PREREQUISITES
  • Understanding of set theory and functions
  • Familiarity with combinatorial mathematics
  • Knowledge of mathematical notation, particularly in function mapping
  • Basic algebra for manipulating expressions
NEXT STEPS
  • Study combinatorial functions and their properties
  • Explore advanced topics in set theory
  • Learn about generating functions in combinatorics
  • Investigate applications of functions in computer science
USEFUL FOR

Mathematicians, computer scientists, and students studying combinatorics or discrete mathematics will benefit from this discussion.

HaRgIlIN
Messages
2
Reaction score
0
Homework Statement
Consider ##S_m = \{1, 2, 3, . . . , m\}## and ##S_n = \{1, 2, 3, . . . , n\}## with ##m, n \geq 3##.

(a) How many functions ##f## are there from ##S_m## to ##S_n## such that ##f(x) = 1## for at least one ##x \in S_m##?

(b) How many functions ##f## are there from ##S_m## to ##S_n## such that ##f(x) \in \{1, 2\}## for at least one ##x \in S_m##?

(c) How many functions ##f## are there from ##S_m## to ##S_n## such that ##f(x) = 1## for at least one ##x \in S_m## and ##f(y) \neq 2## for any ##y \in S_m##?

(d) How many functions ##f## are there from ##S_m## to ##S_n## such that ##f(x) = 1## for at least one ##x \in S_m## and ##f(y) = 2## for at least one ##y \in S_m##?
Relevant Equations
N/A
I have tried to solve them. I would like to know if my answers are correct.

(a)
The total number of functions without any restrictions
##=n^m##

The number of functions such that ##f(x)## is never ##1##
##=(n-1)^m##

The number of functions such that ##f(x)=1## for at least one ##x\in S_m##
##=n^m-(n-1)^m##

(b)
The number of functions such that ##f(x) \notin \{1,2\}##
##=(n-2)^m##

The number of functions such that ##f(x)\in \{1,2\}## for at least one ##x\in S_m##
##=n^m-(n-2)^m##

(c)
Total number of functions such that ##f(y)\neq 2## for any ##y\in S_m##
##=(n-1)^m##

Number of functions such that ##f(x)## is never ##1## and and ##f(y)## is never ##2##
##=(n-2)^m##

Number of functions that satisfy the requirements in this part
##=(n-1)^m-(n-2)^m##

(d)
Since the answer from part (b) includes:

-The number of functions such that ##f(x)=1## for at least one ##x\in S_m## and ##f(y)\neq 2## for any ##y\in S_m##; (which is just part(c))

-The number of functions such that ##f(x)=2## for at least one ##x\in S_m## and ##f(y)\neq 1## for any ##y\in S_m##; (the number is equivalent to part(c)) and

-The number of functions such that ##f(x)=1## for at least one ##x\in S_m## and ##f(y)=2## for at least one ##y\in S_m##

Answer for part (d) is just ##[##part(b)##-2\times##part(c)##]##
Hence,
the number of functions
##=n^m-(n-2)^m-2\times[(n-1)^m-(n-2)^m]##
##=n^m-2(n-1)^m+(n-2)^m##
 
Physics news on Phys.org
All looks good.
 
haruspex said:
All looks good.

Thank you for your help.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
Replies
1
Views
2K
Replies
8
Views
2K
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
1K