Let S = {1, 2, 3, ..., m}, m > 3. Let X_1, ..., X_n be subsets of S each of size 3. Define a function f from S to the set of natural numbers as, f(i) is the number of sets X_j that contain the element i. That is f(i) = |{j | i in X_j}|, then sum_{i=1}^{m} f(i) is: A. 3m B. 3n C. 2m + 1 D. 2n + 1
GATE 2006 · Discrete Mathematics · Functions · medium
Answer: sum_{i=1}^{m} f(i) = 3n, so the answer is Option B.
Rewrite the sum as a count of memberships: f(i) counts the sets containing i, so summing over all elements i counts every incidence (i, X_j) with i in X_j exactly once. This is the total number of element-set memberships across all n subsets.
Count the same memberships by set: The same incidences can be counted by set: each subset X_j contributes |X_j| memberships, and every X_j has size 3. Summing over the n subsets gives 3 + 3 + ... + 3 = 3n. Therefore sum_{i=1}^{m} f(i) = 3n.