Improve company productivity with a Business Account.Sign Up

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

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
Asked:
mustish1
  • 4
  • 3
  • 2
  • +1
1 Solution
 
ozoCommented:
do you understand why (f o g)(5) = 4 ?
do you understand why (g o f)(5) = 5 ?
0
 
mustish1Author Commented:
No.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
What does the g o f and f o g notation mean?
0
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
ozoCommented:
do you know what g(5) is?
0
 
mustish1Author Commented:
No
0
 
ozoCommented:
do you know what [5/2] is?
0
 
mustish1Author Commented:
5-2
0
 
ozoCommented:
no, 5/2 = 2.5
[2.5] = 2
0
 
GwynforWebCommented:
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
 
GwynforWebCommented:
... 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.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now