📅  最后修改于: 2020-12-22 02:43:26             🧑  作者: Mango
考虑函数f:A→B和g:B→C。f与g的组合是从A到C的函数,由(gof)(x)= g [f(x)]定义,由gof定义。
要查找f和g的成分,请首先在f下找到x的图像,然后在g下找到f(x)的图像。
范例1:
Let X = {1, 2, 3}
Y = {a, b}
Z = {5, 6, 7}.
如图所示,考虑函数f = {((1,a),(2,a),(3,b)}}和g = {(a,5),(b,7)}。找到gof的组成。
解决方案:合成函数gof如图所示:
(gof) (1) = g [f (1)] = g (a) = 5, (gof) (2) = g [f (2)] = g (a) = 5
(gof) (3) = g [f (3)] = g (b) = 7.
示例2:考虑f,g和h,所有整数函数,分别为f(n)= n 2 ,g(n)= n +1和h(n)= n-1。
确定(i) hofog (ii) gofoh (iii) fogoh。
解:
(i) hofog (n) = n + 1,
hofog (n + 1) = (n+1)2
h [(n+1)2 ] = (n+1)2 - 1 = n2 + 1 + 2n - 1 = n2 + 2n.
(ii) gofoh (n) = n - 1, gof (n - 1) = (n-1)2
g [(n-1)2 ] = (n-1)2 + 1 = n2 + 1 - 2n + 1 = n2 - 2n + 2.
(iii) fogoh (n) = n - 1
fog (n - 1) = (n - 1) + 1
f (n) = n2.
注意: