GATE / CS ARCHIVE

SIMILAR QUESTIONS / DISCRETE MATHEMATICS

Count injections by falling factorial

2 questions solved the same way, newest first. Back to Discrete Mathematics

1 mark · Descriptive
Report issue

Asked again GATE 1993, Q8.6 (same question)

Count injections into a larger set

Sets, Relations & Functions

Question 13(a), GATE 1997: Let F be all one-to-one functions from {1,…,n} to {1,…,m}, where m≥n≥1. How many functions belong to F?
Question 13(a), GATE 1997: Let F be all one-to-one functions from {1,…,n} to {1,…,m}, where m≥n≥1. How many functions belong to F?
Tap to enlarge
Answer & solution

Answer: m!/(m−n)! = C(m,n)n!. (no official key was published)

Choose the values of the function in domain order. There are m choices for f(1). Once it is chosen, injectivity excludes that value for f(2), leaving m−1 choices. In general f(i) has m−i+1 choices after the preceding i−1 images have been fixed. The multiplication principle gives

|F| = m(m−1)…(m−n+1) = m!/(m−n)!.

Another way is to choose the n-element image set, in C(m,n) ways, then assign its distinct members to the n labelled domain elements, in n! ways. Hence |F|=C(m,n)n!, the same result.

The distinction between a function and an image set matters: C(m,n) alone discards the order in which the n selected values are assigned to 1,…,n. For n=2,m=3, the image set {1,2} supplies both f(1)=1,f(2)=2 and f(1)=2,f(2)=1. There are six injections overall, not three. At n=1 the answer is m, and at m=n it is n!, the number of permutations, providing simple boundary checks.

Original paper, page 7

2 marks · MSQ
Report issue

Asked again GATE 1997, Q13(a) (same question)

Counting injections

Sets, Relations & Functions

Question 8.6, GATE 1993: For finite |A|=m<|B|=n,how many injective functions A→B exist?
Tap to enlarge
Select all that apply
Answer & solution

Answer: B: nP_m=n!/(n−m)! (no official key was published)

Choose distinct images successively for the m domain elements. The first has n choices, the second n−1, and so on through n−m+1. Multiplying yields n!/(n−m)!. A binomial coefficient alone would choose only the image subset and omit the m! bijections assigning its elements to the labeled domain elements. The unrestricted function count nm also permits repeated images, so it does not enforce injectivity. The formula gives one map when m=0, as required.

Original paper, page 9