Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

Consider a young boy whose happiness (H) is a function of number of movies he watches (m), the number of songs he buys to listen on his music player (s) and the number of games he buys to play on his game console (g).

(I'm not naming the music device or the game console so that the discussion can stay on the question rather than on which device is better)

His happiness H is defined as:

H = 10 m0.9 s0.2 g1.6 + K

K because he is generally happy to have you around to answer to his puzzles

Each movie costs $10, each song costs $1 and each game costs $50 and his total budget is $800.

How many of each (movies/ songs/ games) should he buy in order to maximise his happiness. Also, he doesn't want to spend more than 50% of the budget on any one of these three.

(Lets try to get a solution using logic (and some math, of course) rather than by writing some computer program)

Edited by DeeGee
Link to comment
Share on other sites

24 answers to this question

Recommended Posts

  • 0
Consider a young boy whose happiness (H) is a function of number of movies he watches (m), the number of songs he buys to listen on his music player (s) and the number of games he buys to play on his game console (g).

(I'm not naming the music device or the game console so that the discussion can stay on the question rather than on which device is better)

His happiness H is defined as:

H = 10 m0.9 s0.2 g1.6 + K

K because he is generally happy to have you around to answer to his puzzles

Each movie costs $10, each song costs $1 and each game costs $50 and his total budget is $800.

How many of each (movies/ songs/ games) should he buy in order to maximise his happiness. Also, he doesn't want to spend more than 50% of the budget on any one of these three.

(Lets try to get a solution using logic (and some math, of course) rather than by writing some computer program)

Well this seems to be pretty straight-forward... You want to maximize the amount of games and movies he buys, and since the games cost $50 a piece, and he does not want to spend more than $400 on them, he can $400 worth of games, or 8 video games. This leaves $400 left worth of entertainment left, if he were to maximize on the movies, since they return more enjoyment than songs, he should buy $390 worth of movies, or 39 movies. This would return $10 worth of songs that would buy him 10 songs. All told, his sales would come out to an H value of =10*39^.9 * 10^.2 * 8^1.6 + K

H would then equal 10 * 25 * 2 * 28 + K or 14000 +K

So his amount of maximum amount of happiness is 14000 + K

Edited by circuitdust
Link to comment
Share on other sites

  • 0
Well this seems to be pretty straight-forward... You want to maximize the amount of games and movies he buys, and since the games cost $50 a piece, and he does not want to spend more than $400 on them, he can $400 worth of games, or 8 video games. This leaves $400 left worth of entertainment left, if he were to maximize on the movies, since they return more enjoyment than songs, he should buy $390 worth of movies, or 39 movies. This would return $10 worth of songs that would buy him 10 songs. All told, his sales would come out to an H value of =10*39^.9 * 10^.2 * 8^1.6 + K

H would then equal 10 * 25 * 2 * 28 + K or 14000 +K

So his amount of maximum amount of happiness is 14000 + K

That answer isn't right...

390.9 * 100.2 * 81.6 < 380.9 * 200.2 * 81.6

because

1193.7190524423036033911127402378 < 1339.538546231129994153387183747

Link to comment
Share on other sites

  • 0
Well this seems to be pretty straight-forward... You want to maximize the amount of games and movies he buys, and since the games cost $50 a piece, and he does not want to spend more than $400 on them, he can $400 worth of games, or 8 video games. This leaves $400 left worth of entertainment left, if he were to maximize on the movies, since they return more enjoyment than songs, he should buy $390 worth of movies, or 39 movies. This would return $10 worth of songs that would buy him 10 songs. All told, his sales would come out to an H value of =10*39^.9 * 10^.2 * 8^1.6 + K

H would then equal 10 * 25 * 2 * 28 + K or 14000 +K

So his amount of maximum amount of happiness is 14000 + K

I think you did some bad math in there with rounding. 10^.2 is more like 1.6, which actually makes a material difference to the problem.

Second, trial and error debunks that product mix. Using your breakdown, i came up with H = 11937 + K. Using M=40, S=50, G=7, I find H = 13,308 + K. Not sure that's the highest solution because I haven't come up with a formula yet, but I didn't think that one was right...

Your assumption fails to take into consideration the opportunity cost of every game/movie/song. MQ (or M^.9) is considerably higher than GQ (or G^1.6) at $100 of total spend, so if you could only spend $100, you'd choose 10 movies not 2 games....At 8 games, of course, the GQ is higher than the MQ for 40 movies, but in order to keep H from being 0 you need to buy at least one song.

Back to figuring out a formula

PS - the breakdown I gave isn't the highest I calculated, just a simple example of one that's higher than 11937

Link to comment
Share on other sites

  • 0

Happiness is a function of "msg". Interesting. I thought that stuff was bad for you! Notably I tried simply using logic for a while and failed so I defaulted to a computer program. Here are some hints though if you want to see if you're right (assuming my program was written correctly :-P)

Given the strange behavior of exponents, you can't create a linear idea of happines per dollar

I did end up using all the money for my answer

My happiness total came to 13935.5864 + K

I calculated 37 Movies, 80 Songs, and 7 Games

Link to comment
Share on other sites

  • 0

I think you did some bad math in there with rounding. 10^.2 is more like 1.6, which actually makes a material difference to the problem.

Second, trial and error debunks that product mix. Using your breakdown, i came up with H = 11937 + K. Using M=40, S=50, G=7, I find H = 13,308 + K. Not sure that's the highest solution because I haven't come up with a formula yet, but I didn't think that one was right...

Your assumption fails to take into consideration the opportunity cost of every game/movie/song. MQ (or M^.9) is considerably higher than GQ (or G^1.6) at $100 of total spend, so if you could only spend $100, you'd choose 10 movies not 2 games....At 8 games, of course, the GQ is higher than the MQ for 40 movies, but in order to keep H from being 0 you need to buy at least one song.

Back to figuring out a formula

PS - the breakdown I gave isn't the highest I calculated, just a simple example of one that's higher than 11937

I have to go for now, so I wanted to post my guess

38 movies, 70 songs and 7 games for a total H of 13,899

will check back later to see the right answer

Link to comment
Share on other sites

  • 0

I'm not quite sure how you would set up the equation, but I think that "maximizing" is the key word here.

We want to optimize (find the minimum and maximum) of a function, f(x,y,z), subject to the constraint g(x,y,z) = some arbitrary letter usually 'k'. So wouldn't we use Lagrange multipliers to solve this problem?

Link to comment
Share on other sites

  • 0

Since all of the variables are exponents, you have to figure out where the sweet spot of each intersects.

The ganmes give the most bang for the buck at larger numbers, with movies being second and songs being last.

33 Movies, 70 Songs and 8 Games for a total of 15157.45 + K

Link to comment
Share on other sites

  • 0
Happiness is a function of "msg". Interesting. I thought that stuff was bad for you! Notably I tried simply using logic for a while and failed so I defaulted to a computer program. Here are some hints though if you want to see if you're right (assuming my program was written correctly :-P)

I calculated 37 Movies, 80 Songs, and 7 Games

This is not the correct answer... Looks like there is a problem in the program!

Link to comment
Share on other sites

  • 0
Since all of the variables are exponents, you have to figure out where the sweet spot of each intersects.

The ganmes give the most bang for the buck at larger numbers, with movies being second and songs being last.

33 Movies, 70 Songs and 8 Games for a total of 15157.45 + K

Agree with what you wrote about sweet spots etc but how did you arrive at the final numbers?

Link to comment
Share on other sites

  • 0
I'm not quite sure how you would set up the equation, but I think that "maximizing" is the key word here.

We want to optimize (find the minimum and maximum) of a function, f(x,y,z), subject to the constraint g(x,y,z) = some arbitrary letter usually 'k'. So wouldn't we use Lagrange multipliers to solve this problem?

close, but it's simpler than you imagine, because of the additional constraint:

s +50g + 10 m = 800

therefore, H is a function of (arbitrarily eliminating s) m and g as H(m,g) = 10 . 100.2 . m0.2 . g1.6 . (80 - 5g - m)0.2 + K

you can do a bit of partial differentiation to get:

(partial) dH/dm = (0.9 - 0.2) (H - K) = 0.7 (H - K)

(partial) dH/dg = (1.6 - 5 x 0.2) (H - K) = 0.6 (H - K)

I've (sadly) forgotten where to go from here, but would propose:

(full) dH = (partial)dH/dm . (full)dm + (partial)dH/dg . (full)dg

and solving for dH = 0,

H=K or,

0.7 + 0.6. dg/dm = 0 => g = C - 7/6. m

I'll come back when I remember how to remove C!

edit: as for the others using "bang for your buck" - you need to be careful, as the equation is not linear in any variable, so there is no such concept as "happiness per $" for each of the movies/game/music

Edited by foolonthehill
Link to comment
Share on other sites

  • 0

I have 29 Movies, 60 Songs, and 9 Games

Resulting in Happiness of 15797 + K

Since all of the variables are exponents, you have to figure out where the sweet spot of each intersects.

The ganmes give the most bang for the buck at larger numbers, with movies being second and songs being last.

33 Movies, 70 Songs and 8 Games for a total of 15157.45 + K

Link to comment
Share on other sites

  • 0
close, but it's simpler than you imagine, because of the additional constraint:

s +50g + 10 m = 800

therefore, H is a function of (arbitrarily eliminating s) m and g as H(m,g) = 10 . 100.2 . m0.2 . g1.6 . (80 - 5g - m)0.2 + K

you can do a bit of partial differentiation to get:

(partial) dH/dm = (0.9 - 0.2) (H - K) = 0.7 (H - K)

(partial) dH/dg = (1.6 - 5 x 0.2) (H - K) = 0.6 (H - K)

Sorry! Between a typo and my rather odd rushed differentiation, that's clearly very wrong - will come back when I have proper time to look at this. (and someone will have solved it the easy way...)

Link to comment
Share on other sites

  • 0

Using 8 games was easy, the difference between 7 games and 8 games was quite large, 8 games definietly gave the most bang for the buck.

As for the movies to songs ratio, that part was more of a trial and error.

I created the formula (M^.9)*(400-M*10)^.2 and charted that.

Then found the peak which was 33 Movies.

Agree with what you wrote about sweet spots etc but how did you arrive at the final numbers?
Link to comment
Share on other sites

  • 0
Since all of the variables are exponents, you have to figure out where the sweet spot of each intersects.

The ganmes give the most bang for the buck at larger numbers, with movies being second and songs being last.

33 Movies, 70 Songs and 8 Games for a total of 15157.45 + K

Terry71 is right!

1). Ignore the K and the 10 in the happiness equation. That means we must optimize m^0.9*s^0.2*g^1.6.

2). 10m+s+50g <= 800. Since we can always get to exactly $800 by increasing s, let's say 10m+s+50g=800. Therefore, s=800-10m-50g.

3). To comply with the 50% rule, m<=40, g<=8, m+5g>=40.

4). Within these constraints, find the best combination of m and g to maximize m^0.9*g^1.6*[10(80-m-5g)]^0.2.

By trial and error, you get m=33, g=8, s=70.

Link to comment
Share on other sites

  • 0

using the lagrange multiplier seems to work (sorry for discounting whoever suggested that originally!)....

allowing for non-integral answers the maximum for H lies at m=26 2/3, g = 9 13/27, and s = 59 7/27 giving a value of H = 15882.7

However, this lies outside the boundary for g stated in the OP, because a maximum of 8 games can be purchased. As dHdg is strictly increasing, I would suggest that g = 8 is required.

Solving this gives 20m = 9s so that, the maximal solution is at s = 72 8/11 and m = 32 8/11. Looking at integral values either side, we have the maximum at s = 70 and m = 33 for H = 15157.45, as someone has already stated.

Edited by foolonthehill
Link to comment
Share on other sites

  • 0
Terry71 is right!

1). Ignore the K and the 10 in the happiness equation. That means we must optimize m^0.9*s^0.2*g^1.6.

2). 10m+s+50g <= 800. Since we can always get to exactly $800 by increasing s, let's say 10m+s+50g=800. Therefore, s=800-10m-50g.

3). To comply with the 50% rule, m<=40, g<=8, m+5g>=40.

4). Within these constraints, find the best combination of m and g to maximize m^0.9*g^1.6*[10(80-m-5g)]^0.2.

By trial and error, you get m=33, g=8, s=70.

I dislike "trial and error" if more improvements can be made on it!

Foolonthehill has the right idea, but I can't follow

his differentiation. Anyway, the function he wants

to maximize (after substitution for s) is

f(m,g) = m^0.9 * g^1.6 * (80-5g-m)^0.2

The constant K doesn't matter and the powers of 10

also don't matter because maximizing 10^a * f(m,g) + K

is the same as finding an m and a g which maximize

f(m,g). So, we do both partial derivatives and

set them each to zero and solve the resulting 2

linear equations in m and g. This gives us a putative

answer. But we must also try the extreme points of

f(m,g), that is, the points where g is 8, g is 1,

m is 40, and m is 1. It turns out that the g=8

extreme point gives the highest score:

When g=8, we maximize m^0.9 * 8^1.6 * (40-m)^0.2.

Differentiating this with respect to m, we get

8^1.6 * [(.9 * m^-.1 * (40-m)^0.2) - (.2 * m^.9 * (40-m)^-0.8)].

Setting this equal to 0 and solving for m, we get m=(360/11),

which has closest integer 33. This has the largest score

of the 5 solutions we must try (the 4 extreme points plus

the interior solution). So, the solution is: g=8, m=33, and

s=70.

Link to comment
Share on other sites

  • 0

i didnt try to follow anyones solution but pretty sure mine is simpler

so it logically follows that to maximize this problem the derivatives would be as equal as possible (kinda)

but the derivatives arent exactly what matters its you value per dollar so

for a song you get .2s/$1

for a game you get 16g/$50

for a movie you get 9m/$10

so set them equal and since your only looking for a ratio (plug any one as 1) so to get 1 m you NEED (not get) .45s and 2.8g

so solving the equation for money you get

9 to 10 games so no go so just max that and deal with the other two

10m+s=400

10m+1/.45m=400

m=32.7272

s=72.7262

g=8

so try movie = 33 and 32 and you get your answer

Link to comment
Share on other sites

  • 0

using the lagrange multiplier seems to work (sorry for discounting whoever suggested that originally!)....

allowing for non-integral answers the maximum for H lies at m=26 2/3, g = 9 13/27, and s = 59 7/27 giving a value of H = 15882.7

However, this lies outside the boundary for g stated in the OP, because a maximum of 8 games can be purchased. As dHdg is strictly increasing, I would suggest that g = 8 is required.

Solving this gives 20m = 9s so that, the maximal solution is at s = 72 8/11 and m = 32 8/11. Looking at integral values either side, we have the maximum at s = 70 and m = 33 for H = 15157.45, as someone has already stated.

So, lagrange multiplier works after all :lol:

I solved it on paper and that's what I got. I wasn't sure if it was right though because of the non-integer solutions.

Using LaGrange Multipliers I got to this point.

9s = 20m

g = .16s

And of course you have 10m + s + 50g = 800

after this I imagine you need to include the inequality to finish it off otherwise it won't fit with the 50% or less condition.

Edited by Dunpeal
Link to comment
Share on other sites

  • 0

The order of precedence is throwing me off here, I think. If parentheses were used, would it look more like

H=10(m0.9s0.2g1.6) + K

or

H=(10m0.9)(s0.2)(g1.6) + K

I at first read it as the second way, but after reading some of the posts, I believe I am way off base.

Link to comment
Share on other sites

  • 0
The order of precedence is throwing me off here, I think. If parentheses were used, would it look more like

H=10(m0.9s0.2g1.6) + K

or

H=(10m0.9)(s0.2)(g1.6) + K

I at first read it as the second way, but after reading some of the posts, I believe I am way off base.

The precedence on happiness expression is irrelevant. The main aim here is to maximize the value of m^0.9 s^0.2 g^1.6.

The correct answer is 8 games, 33 movies and 70 songs.

This uses all of his budget and the m^0.9 s^0.2 g^1.6 = 1515.74

Link to comment
Share on other sites

  • 0
The order of precedence is throwing me off here, I think. If parentheses were used, would it look more like

H=10(m0.9s0.2g1.6) + K

or

H=(10m0.9)(s0.2)(g1.6) + K

I at first read it as the second way, but after reading some of the posts, I believe I am way off base.

it doesnt matter.....

You forgot your rules of commutivity, didn't you :)

(10x)(y)(z) = 10(xyz)

where

x=m0.9

y=s0.2

z=g1.6

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...