Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Needs help in function

Posted on 2011-09-11
10
Medium Priority
?
300 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
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 85

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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 85

Expert Comment

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

Author Comment

by:mustish1
ID: 36520198
No
0
 
LVL 85

Expert Comment

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

Author Comment

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

Expert Comment

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

Accepted Solution

by:
GwynforWeb earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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…
Suggested Courses

876 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