Killer problem in functions

This topic has expert replies
Junior | Next Rank: 30 Posts
Posts: 17
Joined: Thu Jun 24, 2010 3:56 am
Thanked: 3 times

Killer problem in functions

by gtestprep » Fri Feb 11, 2011 4:56 am
The function g(x) is defined for integers x such that if x is even, g(x) = x/2 and if x is odd, g(x) = x + 5. Given that g(g(g(g(g(x))))) = 19, how many possible values for x would satisfy this equation?

A. 1
B. 5
C. 7
D. 8
E. 11
Source: — Problem Solving |

Legendary Member
Posts: 1337
Joined: Sat Dec 27, 2008 6:29 pm
Thanked: 127 times
Followed by:10 members

by Night reader » Fri Feb 11, 2011 6:00 am
gtestprep wrote:The function g(x) is defined for integers x such that if x is even, g(x) = x/2 and if x is odd, g(x) = x + 5. Given that g(g(g(g(g(x))))) = 19, how many possible values for x would satisfy this equation?

A. 1
B. 5
C. 7
D. 8
E. 11
IOM A
g(g(g(g(g(x))))) = 19; g(g(g(g(g(x))))) = 19-5-5-5-5-5=-1
g(g(g(g(g(x))))) = 19*2*2*2*2*2=19*2^5=608 [spoiler](sorry)[/spoiler]
only one value satisfes --> g(x=608)=608/2 is even AND g(x=608)=608+5 is odd

User avatar
Legendary Member
Posts: 543
Joined: Tue Jun 15, 2010 7:01 pm
Thanked: 147 times
Followed by:3 members

by anshumishra » Fri Feb 11, 2011 6:23 am
gtestprep wrote:The function g(x) is defined for integers x such that if x is even, g(x) = x/2 and if x is odd, g(x) = x + 5. Given that g(g(g(g(g(x))))) = 19, how many possible values for x would satisfy this equation?

A. 1
B. 5
C. 7
D. 8
E. 11
g(g(g(g(g(x))))) = 19

=> g(g(g(g(x)))) = 19*2 = 38 [19-5 is not possible here as 14 is not odd]
=> g(g(g(x))) = 38-5 (where the expression is odd = 33) OR 38*2(where the expression is even = 38*2) = 33 OR 76
=> g(g(x)) = 33*2 (when expr is even) OR 76-5 (when expr is odd, since 71 is odd) OR 76*2 (when expr is even)
= 66 OR 71 OR 152
Similarly,
=> g(x) = 66-5 OR 66*2 OR 71*2 OR 152-5 OR 152*2 = 61 OR 132 OR 142 OR 147 OR 304
=> x = 61*2 OR 132-5 OR 132*2 OR 142-5 OR 142*2 OR 147*2 OR 304-5 OR 304*2
= 122 OR 127 OR 264 OR 137 OR 284 OR 294 OR 299 OR 608

So, D
Last edited by anshumishra on Fri Feb 11, 2011 8:18 am, edited 2 times in total.
Thanks
Anshu

(Every mistake is a lesson learned )

Junior | Next Rank: 30 Posts
Posts: 17
Joined: Thu Jun 24, 2010 3:56 am
Thanked: 3 times

by gtestprep » Fri Feb 11, 2011 6:28 am
Night reader wrote: IOM A
g(g(g(g(g(x))))) = 19; g(g(g(g(g(x))))) = 19-5-5-5-5-5=-1
g(g(g(g(g(x))))) = 19*2*2*2*2*2=19*2^5=608 [spoiler](sorry)[/spoiler]
only one value satisfes --> g(x=608)=608/2 is even AND g(x=608)=608+5 is odd
How did you deduce that g(g(g(g(g(x))))) = 19-5-5-5-5-5=-1? It could very well be that g(g(g(g(x)))) = 38, causing g(g(g(g(g(x))))) to be 19...how do you explain that?

Junior | Next Rank: 30 Posts
Posts: 17
Joined: Thu Jun 24, 2010 3:56 am
Thanked: 3 times

by gtestprep » Fri Feb 11, 2011 6:31 am
anshumishra wrote:...Similarly,
=> g(x) = 66-5 OR 66*2 OR 71*2 OR 152-5 OR 152*2 = 61 OR 132 OR 142 OR 147 OR 304
=> x = 61*2 OR 132-5 OR 132*2 OR 142-5 OR 142*2 OR 147*2 OR 304-5 OR 304*2
= 132 OR 127 OR 264 OR 137 OR 284 OR 299 OR 608

So, C
That really helps! However, the answer is 8 and not 7 ;)

User avatar
Legendary Member
Posts: 543
Joined: Tue Jun 15, 2010 7:01 pm
Thanked: 147 times
Followed by:3 members

by anshumishra » Fri Feb 11, 2011 6:37 am
gtestprep wrote:
anshumishra wrote:...Similarly,
=> g(x) = 66-5 OR 66*2 OR 71*2 OR 152-5 OR 152*2 = 61 OR 132 OR 142 OR 147 OR 304
=> x = 61*2 OR 132-5 OR 132*2 OR 142-5 OR 142*2 OR 147*2 OR 304-5 OR 304*2
= 132 OR 127 OR 264 OR 137 OR 284 OR 299 OR 608

So, C
That really helps! However, the answer is 8 and not 7 ;)
Glad that it helped. Nice question by the way. I missed counting one number(294 = 147*2). Check the solution now :)
Thanks
Anshu

(Every mistake is a lesson learned )

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 3835
Joined: Fri Apr 02, 2010 10:00 pm
Location: Milpitas, CA
Thanked: 1854 times
Followed by:523 members
GMAT Score:770

by Anurag@Gurome » Fri Feb 11, 2011 8:02 pm
A detail method.
Let us write g(g(g(g(g(x))))) as g5(x) and g(g(g(g(x)))) as g4(x) and so on.
Or g5(x) = 19.
Note that if x is odd, g(x) = x + 5 and hence g(x) is always even for x as odd.
So if g(x) is odd, x has to be even.Or if g5(x) is odd, and since g5(x)) = g(g4(x)), g4(x) is even.
Hence, if g5(x) = 19, g(g4(x)) = 19 = [g4(x)]/2.
Or g4(x) = 38.
Or g(g3(x)) = 38.
Now, g3(x) can be both odd or even.
If g3(x) is odd, g(g3(x)) = 38 = g3(x) + 5.
Or g3(x) = 33.
Now, since g3(x) is odd and g3(x) = g(g2(x)), g2(x) is even.
Since g(g2(x)) = 33 = [g2(x)]/2.
Or g2(x) = 66.
Or g(g(x)) = 66.
If g(x) is odd, 66 = g(x) + 5. Or g(x) = 61 if g(x) is odd.
Since here 61 is odd, x has to be even.
Or g(x) = 61 = x/2.
Or x = 122 if g(x) is odd. x1 = 122
If g(x) is even g(g(x)) = 66 = g(x)/2 .
Or g(x) = 132.
Now if x is odd, g(x) = 132 = x+5.
Or x = 127, if x is odd. x2 = 127.
If x is even, g(x) = 132 = x/2.
Or x = 264, if x is even. x3 = 264.
We can summarize and say that if g3(x) is odd, there are 3 values of x.
Let us see what happens if g3(x) is even.
So, then g(g3(x)) = 38 = [g3(x)]/2.
Or g3(x) = 76.
So g(g2(x)) = 76.
If g2(x) is odd, 76 = g2(x) + 5.
Or g2(x) = 71.
Or g(g(x)) = 71.
Again, since 71 is odd, g(x) has to be even.
Or 71 = g(x)/2.
Or g(x) = 142.
If x is odd = 142 = x + 5.
Or x = 137, So x4 = 137.
If x is even, 142 = x/2.
Or x = 284. Or x5 = 284.
So we get 2 more values of x if g2(x) is odd.
If g2(x) is even 76 = g2(x)/2.
Or g2(x) = 152.
So g(g(x)) = 152.
If g(x) is odd, 152 = g(x) + 5.
Or g(x) = 147.
Since 147 is odd, x is even . Or 147 = x/2.
Or x = 294, x6 = 294.
If g(x) is even, 152 = g(x)/2.
Or g(x) = 304.
So if x is odd, 304 = x + 5.
Or x = 299, x7 = 299.
If x is even, 304 = x/2.
Or x = 608. x8 = 608.
Or there are 8 value of x.
Anurag Mairal, Ph.D., MBA
GMAT Expert, Admissions and Career Guidance
Gurome, Inc.
1-800-566-4043 (USA)

Join Our Facebook Groups
GMAT with Gurome
https://www.facebook.com/groups/272466352793633/
Admissions with Gurome
https://www.facebook.com/groups/461459690536574/
Career Advising with Gurome
https://www.facebook.com/groups/360435787349781/