📜  门| GATE-CS-2005 |第43章

📅  最后修改于: 2021-07-02 18:13:56             🧑  作者: Mango

令f:B→C和g:A→B是两个函数,令h = fo g。假设h是一个on函数。以下哪一项是TRUE?
(A) f和g都应该在函数上。
(B) f应该在上面,但g不必在上面
(C) g应该在上面,但f不必在上面
(D) f和g都不必位于答案: (B)
说明:如果对于集合Y中的每个值,在集合X中都有一个值,则将函数f:X→Y称为on-to函数。

Given that, f: B → C and g: A → B and h = f o g.  

Note that the sign o represents composition. 

h is basically f(g(x)). So h is a function from set A
to set C.

It is also given that h is an onto function which means
for every value in C there is a value in A. 

我们使用B从C映射到A。因此,对于C中的每个值,B中都必须有一个值。这意味着f必须在其上。

但是g可能会或可能不会在g上,因为B中可能有一些未映射到A的值。

例子 :

Let us consider following sets
A : {a1, a2, a3}
B : {b1, b2}
C : {c1}

And following function values
f(b1) = c1
g(a1) = b1, g(a2) = b1, g(a3) = b1

Values of h() would be,
h(a1) = c1, h(a2) = c1, h(a3) = c1

Here h is onto, therefore f is onto, but g is 
onto as b2 is not mapped to any value in A.

鉴于此,f:B→C和g:A→B且h = fo g。

这个问题的测验