Calling All Mathematicians

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Calling All Mathematicians

Post by dandymcgee »

I'm presenting this problem as a creative story in order to attempt to hold your interest long enough to find a solution, but the real problem being solved is significantly more important than it appears:

Problem A:

You own two islands, both of which are prime vacationing destinations: Palm Island and Rock Island. Palm Island is nicknamed "Itchy" Island due to an out-of-control mosquito population. Rock Island is nicknamed "Crawling" Island due to its out-of-control ant population. Aside from the number of mosquitoes or ants living on each island at any given time, there are no other factors that affect the number of tourists who leave.

The number of visitors who leave "Itchy" Island each day is equivalent to the mosquito population times 0.03.
The number of visitors who leave "Crawling" Island each day is equivalent to the ant population times 0.05.

The mosquito population on "Itchy" Island is currently 28,000.
The ant population on "Crawling" Island is currently 17,000.

It costs $1.00 to kill each mosquito or ant (they're tough!). You have $2000 budgeted for pest control.

How much of the $2000 should be spent killing mosquitoes on "Itchy" Island and how much should be spent killing ants on "Crawling" Island in order to keep the most tourists tomorrow?
Edit: Without showing favoritism to any one island over the others (number of tourists leaving each island should be as close as possible).

Problem B:

You buy a new island, Seal "Buzz" Island, which is infested with bees.
The number of visitors who leave "Buzz" Island each day is equivalent to the bee population times 0.08 (especially high due to allergies).
The bee population on "Buzz" Island is currently 14,000.
It also costs $1.00 to kill each bee. You have $5000 budgeted for pest control.

How much of the $5000 should be spent killing mosquitoes, ants, and bees on each of the three islands in order to keep the most tourists tomorrow?
Edit: Without showing favoritism to any one island over the others (number of tourists leaving each island should be as close as possible).

Problem C:

You own n islands, each of which has an out-of-control population of some pest.
The number of visitors who leave each island each day is the population times {V1, V2, V3, ...} (ex. 0.04, 0.08, 0.12)
The population of pests on each island is {P1, P2, P3, ...} (ex. 115,000, 100,000, 85,000)
It costs $1.00 to kill each pest. You have $B (ex. $10,000) budgeted for pest control.

Derive a general solution for finding the amount which should be spent on island n, Sn, in order to keep the most tourists.
Edit: Without showing favoritism to any one island over the others (number of tourists leaving each island should be as close as possible).

Guidelines:
  1. Any formula which provides the right answer in every case will be deemed correct.
  2. Any answer which does not include a general solution will be considered incomplete.
  3. All tools, references, knowledge, etc. are fair game.
  4. The answer does not have to be 100% original work, but must cite any sources used.
  5. After some solutions have been posted, I will share my own and explain the real-world (read: boring) motivation behind this problem
Reward:
If you provide a working general solution, and you so desire, I will make you a custom rank for your forum profile.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
X Abstract X
Chaos Rift Regular
Chaos Rift Regular
Posts: 173
Joined: Thu Feb 11, 2010 9:46 pm

Re: Calling All Mathematicians

Post by X Abstract X »

If I'm understanding this correctly, the solution is to always spend $0 on pest control because as the number of pests increases, so does the number of tourists. This doesn't make sense :roll:
User avatar
Nokurn
Chaos Rift Regular
Chaos Rift Regular
Posts: 164
Joined: Mon Jan 31, 2011 12:08 pm
Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
Programming Language of Choice: Proper C++
Location: Southern California
Contact:

Re: Calling All Mathematicians

Post by Nokurn »

X Abstract X wrote:If I'm understanding this correctly, the solution is to always spend $0 on pest control because as the number of pests increases, so does the number of tourists. This doesn't make sense :roll:
In a way, you are correct. However, before dismissing dandymcgee's problem (or wording), I would first assume that the budget must be used in its entirety.

I am going to work on this more later, but this is what I have so far (for a general solution):
Image
where D is the number of visitors on a day, V is the ratio of visitors to pests, P is the pest population, B is the budget, and E is the percentage of the budget spent on extermination such that
Image
is satisfied. This gives a general term
Image
for island i. The problem, then, is to optimize D in E with V, P, and B held constant, as constrained by the second equation.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Calling All Mathematicians

Post by dandymcgee »

X Abstract X wrote:If I'm understanding this correctly, the solution is to always spend $0 on pest control because as the number of pests increases, so does the number of tourists. This doesn't make sense :roll:
I edited this post quite a few times before finally posting, but I knew I'd still mess it up somehow. I've changed "The number of visitors who visit each day" to "The number of visitors who leave each day" in numerous places to fix the story. Obviously, more pests = bad. Good catch.
Nokurn wrote:I am going to work on this more later, but this is what I have so far (for a general solution)
Have you been able to find working solutions to A and B using your method?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
notafan
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 1
Joined: Wed Jun 19, 2013 3:27 pm

Re: Calling All Mathematicians

Post by notafan »

I'm no mathematician, but the answer to A given your conditions is that it is *always* better to kill ants instead of killing mosquitoes.

2000 = x + y, where x = mosquitoes killed, y = ants killed

total mosquitoes (m) = 28,000-x
total ants (a) = 17,000-y

amount of visitors leaving from itchy isle (vi) = m*0.03 ---> (28,000-x)*0.03
amount of visitors leaving from crawl isle (vc) = a*0.05 ---> (17,000-y)*0.05

total amount of leaving visitors (z) = vi + vc

z = (28,000-x)*0.03 + (17,000-y)*0.05

Plugging in for y given y = 2000 - x (derived from the first equation)

z = (28,000-x)*0.03 + (17,000-(2000-x))*0.05

With some simplification...

z = 1590 + 0.02x, for 0 <= x <= 2000

Keeping the most tourists is equivalent to having a minimal number of tourists leave. z is a line with a positive slope, so the minimum value must be given by the bottom range of the domain, in this case x = 0.

Which gives z = 1590 as the minimum number of tourists to leave which is gotten by killing 0 mosquitoes (remember, x is the number of mosquitoes killed) and killing 2000 ants.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Calling All Mathematicians

Post by dandymcgee »

Reading through the problem as it is written again, I see I still haven't properly defined the problem I was trying to express.

In terms of the infested island story I was basically trying to make the number of visitors who left each island equivalent (ie. to prevent my financially-inept manager from blaming me for favoring one island over the other), rather than minimizing the total number of visitors who left both islands combined.

Since I didn't state this in problem, your solution would be correct. It turns out this problem is just as difficult to state as it was for me to attempt to solve.

I've edited the original problem once more, but I honestly don't expect anyone to try to solve it. I'll leave this here in case anyone still wants to make an attempt at solving the "new" (i.e. corrected) problem.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply