Solved

Needs help in function

Posted on 2011-09-11
10
298 Views
Last Modified: 2012-06-22
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
Comment
Question by:mustish1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 36520090
do you understand why (f o g)(5) = 4 ?
do you understand why (g o f)(5) = 5 ?
0
 

Author Comment

by:mustish1
ID: 36520097
No.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 36520182
What does the g o f and f o g notation mean?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 84

Expert Comment

by:ozo
ID: 36520191
do you know what g(5) is?
0
 

Author Comment

by:mustish1
ID: 36520198
No
0
 
LVL 84

Expert Comment

by:ozo
ID: 36520260
do you know what [5/2] is?
0
 

Author Comment

by:mustish1
ID: 36520271
5-2
0
 
LVL 84

Expert Comment

by:ozo
ID: 36520282
no, 5/2 = 2.5
[2.5] = 2
0
 
LVL 31

Accepted Solution

by:
GwynforWeb earned 500 total points
ID: 36520356
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
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 36520939
... there is an assumption here that [x] refers to the integer part of x

eg [2.5] = 2
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction On a scale of 1 to 10, how would you rate our Product? Many of us have answered that question time and time again. But only a few of us have had the pleasure of receiving a stack of the filled out surveys and being asked to do somethi…
We are taking giant steps in technological advances in the field of wireless telephony. At just 10 years since the advent of smartphones, it is crucial to examine the benefits and disadvantages that have been report to us.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question