Mathematical problem

This is for discussions about news, politics, sports, other games, culture, philosophy etc.
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Mathematical problem

  • Quote

Post by deleted_user0 »

Please help.

You want to produce 9000 wine bottles. Each worker can produce 0.64 wine bottles per day. Every worker must be paid a fixed payment of 50 wine bottles to start working and they continue working until 9000 wine bottles are produced.

You can not produce more than 9000 wine bottles because WickedCossack wants to decrease alcoholism among community.

However, since a wine bottle is produced it increases its value by 0.7% per day. Wine bottles paid on day 1 to workers start growing value immediately.
For example: 3 days old wine bottle is worth 1.007^3 = 1.0211 (day 1) wine bottles.

You can hire as many workers as you want (but keep in mind the opportunity cost, the bottles you pay the workers would also increase their value).

How many workers do you hire to maximize your profit?
User avatar
Netherlands edeholland
ESOC Community Team
Donator 01
Posts: 5033
Joined: Feb 11, 2015
ESO: edeholland
GameRanger ID: 4053888
Clan: ESOC

Re: Mathematical problem

Post by edeholland »

What upgrades do you have on your workers?
User avatar
No Flag Jaeger
Jaeger
Posts: 4492
Joined: Feb 28, 2015

Re: Mathematical problem

Post by Jaeger »

What does the interest rate of dollar being .7% mean? Also, Iā€™m assuming the increase in value of the wine bottle is compunded?
last time i cryed was because i stood on Legoļ»æ
User avatar
Netherlands edeholland
ESOC Community Team
Donator 01
Posts: 5033
Joined: Feb 11, 2015
ESO: edeholland
GameRanger ID: 4053888
Clan: ESOC

Re: Mathematical problem

Post by edeholland »

You also need the production rate of the workers.
User avatar
No Flag Jaeger
Jaeger
Posts: 4492
Joined: Feb 28, 2015

Re: Mathematical problem

Post by Jaeger »

Ohh I just saw this is actually an aoe priblem lol
last time i cryed was because i stood on Legoļ»æ
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

Wait, give me a sec. It doesn't work like I want atm.
User avatar
No Flag Jaeger
Jaeger
Posts: 4492
Joined: Feb 28, 2015

Re: Mathematical problem

Post by Jaeger »

A while back I made a thread calculating how much res you lose if you stop making vills vs if you keep making vills. Maybe that could help.
last time i cryed was because i stood on Legoļ»æ
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

ovi12 wrote:What does the interest rate of dollar being .7% mean? Also, Iā€™m assuming the increase in value of the wine bottle is compunded?

Yes.

I concluded it's easier to explain without dollars. Simply, if you now spend 50 wine bottles hiring a worker, you have to consider the lost (opportunity cost) value in the end.
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

edeholland wrote:You also need the production rate of the workers.

It's given. 0.64 wine bottles per day per worker.
User avatar
Netherlands edeholland
ESOC Community Team
Donator 01
Posts: 5033
Joined: Feb 11, 2015
ESO: edeholland
GameRanger ID: 4053888
Clan: ESOC

Re: Mathematical problem

Post by edeholland »

This analogy is confusing. So there's 9000 resources and a boat is 50 resources? Does that take gathering rates into account?
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: Mathematical problem

Post by momuuu »

I dont get what the last paragraph means. What increases in value??
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

edeholland wrote:This analogy is confusing. So there's 9000 resources and a boat is 50 resources? Does that take gathering rates into account?

So let's say hire 1 worker. You pay 50 resources for a boat. It starts gathering 0.64 res per day. Therefore, to gather 9000 resources it takes 14 062 days to gather all the resources.

Taken "resource interest rate" into consideration your final revenue will be 0.64*1.007^1+0.64*1.007^2.+0.*1.007^3 ... +0.64*1.007^14062
However, now you have to consider the opportunity cost of hiring the boat which is 50*1.007^14062.
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: Mathematical problem

Post by momuuu »

Wait, if I understood this right you will make 9000 bottles, and a bottle's value is 1*1.07^(number of days since it was produced).

If that is right, then the answer is that you hire one worker.
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: Mathematical problem

Post by momuuu »

Ow, I see the problem now.
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

momuuu wrote:I dont get what the last paragraph means. What increases in value??

A wine bottle produced on day 1 is worth 1.007 (day 1) wine bottles on day 2. And on day 3 its worth 1.007*1.007.
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: Mathematical problem

Post by momuuu »

So we want to maximize the function
F = sum from n = 1 to number of days taken (number of workers * 0.64 * 1.007^n) - number of workers * 50 * 1.007^(number of days taken)

So then we want to maximize this function.. hmm
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

Maybe, I'm not really super good at math...That's why I'm asking.

I mean the cost is definitely right. But I'm not super how to write the left part. I mean it should include series like 0.64 * x * 1.007 + 0.64 * x * 1.007^2...0.64*x*1.007^t.

constraint being 0.64 * x * t < 9000

t being time and x amount of workers.
User avatar
Malaysia Aizamk
Pro Player
ESOC WarChiefs Classic 2017
Posts: 1459
Joined: Feb 26, 2015
Location: ded

Re: Mathematical problem

Post by Aizamk »

where are you getting this 1.07 figure from?
oranges.
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

Aizamk wrote:where are you getting this 1.07 figure from?

0.7%. It's my estimation of AOE resource interest rate per second (quite early game).
Basically, it's impossible to determine accurately.
User avatar
Malaysia Aizamk
Pro Player
ESOC WarChiefs Classic 2017
Posts: 1459
Joined: Feb 26, 2015
Location: ded

Re: Mathematical problem

Post by Aizamk »

somppukunkku wrote:
Aizamk wrote:where are you getting this 1.07 figure from?

0.7%. It's my estimation of AOE resource interest rate per second (quite early game).
Basically, it's impossible to determine accurately.


Ok. I'll define the problem after I've had my breakfast. Probably won't take that into account.
oranges.
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: Mathematical problem

Post by momuuu »

I think I solved it

The solution seems to be that you should let your workers slack off.
Attachments
15485509651404499601967078542315.jpg
User avatar
Malaysia Aizamk
Pro Player
ESOC WarChiefs Classic 2017
Posts: 1459
Joined: Feb 26, 2015
Location: ded

Re: Mathematical problem

Post by Aizamk »

anyone know the train time for fishing boats after EP schooners is sent?
oranges.
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

@momuuu
I can't really see a way that it's 1 if we adapt to aoe. Or I have explained the problem wrong.

@Aizamk
I assumed that you spawn them instantly. But the problem is that if you don't, then the calculations explode. And the "resource interest" rate has to be definitely included. 200w at 2 mins is one billion times more valuable than 200w at 40 mins.
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: Mathematical problem

Post by momuuu »

@deleted_user2 you may have converted to problem from aoe to mathematics incorrectly. It turns out that in the way you explained it the value of your 9000 bottles is maximized by taking as long as possible. It turns out that this summation of 1.007^1+1.007^2+... Blows the fuck up if you take very long. I did the maths, and its prefactor is slightly larger than the opportunity cost regardless of the workers.

Then its basically N*1.007^(1/N). So if you increase N you decrease the exponential. However the exponential grows much faster than the linear term, so to optimize it you should maximize the exponential. The profit goes to infinite as you approach zero employees.

Im pretty confident that is what you get when you solve this:
somppukunkku wrote:So let's say hire 1 worker. You pay 50 resources for a boat. It starts gathering 0.64 res per day. Therefore, to gather 9000 resources it takes 14 062 days to gather all the resources.

Taken "resource interest rate" into consideration your final revenue will be 0.64*1.007^1+0.64*1.007^2.+0.*1.007^3 ... +0.64*1.007^14062
However, now you have to consider the opportunity cost of hiring the boat which is 50*1.007^14062.
No Flag deleted_user0
Ninja
Posts: 13004
Joined: Apr 28, 2020

Re: Mathematical problem

Post by deleted_user0 »

@momuuu

So this basically means that if an aoe3 boom would take infinite time, you would do 0 fish boats? Or 1? (no whales) included
Do you have any idea what could be wrong with converting adapting from aoe?

Who is online

Users browsing this forum: No registered users and 7 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV