Computer Sciences > GATE 2025 SET-1 > Functions
g(.) is a function from A to B, f(.) is a function from B to C, and their composition defined as f(g(.)) is a mapping from A to C.
If f(.) and f(g(.)) are onto (surjective) functions, which ONE of the following is TRUE about the function g(.)?
A
g(.) must be an onto (surjective) function.
B
g(.) must be a one-to-one (injective) function.
C
g(.) must be a bijective function, that is, both one-to-one and onto.
D
g(.) is not required to be a one-to-one or onto function.

Correct : d

Explanation:
1. Understand the Functions:
• g: A → B
• f: B → C
• f(g(.)): A → C (Composition function)

2. Analyze the Constraints:
• We are given that both f and the composition f(g(.)) are onto (surjective).
• For f(g(.)) to be onto, every element in the codomain C must have at least one pre-image in the domain A. That means for every c ∈ C, there must exist an a ∈ A such that f(g(a)) = c.

3. Counter-Example to Test g(.):
Let's construct a simple counter-example to see if g(.) is strictly forced to be onto or one-to-one:
• Let Set A = {1, 2}
• Let Set B = {x, y, z}
• Let Set C = {m}

Define function g: A → B as:
    g(1) = x
    g(2) = y
• Is g(.) one-to-one? Yes (in this setup).
• Is g(.) onto? No, because element 'z' in B has no pre-image in A. Therefore, g(.) does not have to be onto (eliminating choices a and c).

Now define function f: B → C as:
    f(x) = m
    f(y) = m
    f(z) = m
• Is f(.) onto? Yes, because every element in C ({m}) is mapped to.

Now let's look at the composition function f(g(.)): A → C:
    f(g(1)) = f(x) = m
    f(g(2)) = f(y) = m
• Is f(g(.)) onto? Yes, because the only element in C ({m}) has a pre-image in A.

4. Testing for One-to-One (Injective):
Can we modify g(.) so it's not one-to-one either? Let's alter the sets slightly:
• Let Set A = {1, 2, 3}
• Let Set B = {x, y}
• Let Set C = {m}

Define g: A → B as:
    g(1) = x
    g(2) = x
    g(3) = y
• Here, g(1) = g(2) = x, so g(.) is not one-to-one (eliminating choice b).

Define f: B → C as:
    f(x) = m
    f(y) = m
• f(.) remains onto.

Composition f(g(.)): A → C:
    f(g(1)) = m, f(g(2)) = m, f(g(3)) = m
• The composition f(g(.)) remains fully onto.

5. Conclusion:
Since we successfully built valid configurations where f and f(g(.)) are onto, yet g(.) is neither one-to-one nor onto, it proves that g(.) is not required to carry either property.

Similar Questions

The following function computes the maximum value contained in an integer array p[] of size n (n >= 1) int max(int *p, int n) {     int a=0, b=n...
#123 MCQ
Consider the following C program. void f(int, short); void main() {     int i = 100;     short s = 12;     short *p = &s; &...
#144 MCQ
Consider the following function implemented in C: void printxy(int x, int y) {     int *ptr;     x = 0;     ptr = &x;...
#159 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......