x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 302

# Needs help in function

Can any one please explain that ? Thanks

Define function f, g: N -----> N by
f(x) = 2x
g(x) = [x/2]

Is f o g the same as g o f? Explain

Answer: No. For example, (f o g)(5) = 4, but (g o f)(5) = 5.
0
mustish1
• 4
• 3
• 2
• +1
1 Solution

Commented:
do you understand why (f o g)(5) = 4 ?
do you understand why (g o f)(5) = 5 ?
0

Author Commented:
No.
0

What does the g o f and f o g notation mean?
0

Commented:
do you know what g(5) is?
0

Author Commented:
No
0

Commented:
do you know what [5/2] is?
0

Author Commented:
5-2
0

Commented:
no, 5/2 = 2.5
[2.5] = 2
0

Commented:
Given f(x) and g(x)

f o g  refers to f(g(x))

g o f  refers to g(f(x))

So given

f(x) = 2x
g(x) = [x/2]

f o g = f(g(x)) =f([x/2]) = 2[x/2]

g o f = g(f(x)) =g(2x) = [2x/2] =[x]

they are not the same

f o g (5) = 2[5/2] = 2*2 = 4

g o f (5) = [5]  = 5
0

Commented:
... there is an assumption here that [x] refers to the integer part of x

eg [2.5] = 2
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.