reynardo: (evil)
[personal profile] reynardo
From the lesson we're presenting at school tomorrow to our small group of 9-10 year olds:

Jade the Mad Scientist wants to blow up the world. She needs to buy exactly 3 tonnes of Evil Scientist Explosive, but she's not allowed to buy it in one lot (because the governments of the world are aware of her Evil Plans). She also needs a detonator. The Countries sell in different amounts - what are the amounts she will need to buy to make her Evil Explosive?

4 countries sell the explosives, but in different amounts and with different limits.

  • Sodor sells bags of 1/4 tonne (max 6 bags)

  • Azania sells bags of 1/3 tonne (max 4 bags)

  • Duloc sells bags of 1/6 tonne (max 4 bags)

  • Guilder sells bags of 1/2 tonne (max 2 bags).

  • Each country also sells the detonators, but you can't buy a detonator from a country if you've bought explosives from them. The minions have to work out how much explosive to buy from each country, and from whom are they buying the detonator.


I'm not expecting the students to be able to say where these countries are, but I know you bunch of geeks will work them out too.

Date: 2012-09-02 03:42 am (UTC)
From: [identity profile] nefaria.livejournal.com
Bleh, the high maximums on the bags make the math too easy! I'd drop Guilder down to max 1 bag, that would require some addition of fractions to solve the problem.

Date: 2012-09-02 08:36 am (UTC)
michiexile: (ModelHouse)
From: [personal profile] michiexile
Dropping Guilder down to max 1 bag drops us from 7 solutions to 4 solutions, leaving all 3 solutions that pick the Guilder detonator intact. Dropping Sodor down to 4 bags seems a much more fun way; eliminates most of the duplicate solutions for a single detonator choice.

Date: 2012-09-02 04:11 am (UTC)
kerravonsen: Frodo staring at the Ring: "such a small thing" (such-a-small-thing)
From: [personal profile] kerravonsen
(grin)

Date: 2012-09-02 07:52 am (UTC)
From: [identity profile] mischievous-t.livejournal.com
Where were you when I was 9?!!!

Date: 2012-09-02 08:33 am (UTC)
michiexile: (ModelHouse)
From: [personal profile] michiexile
Hmmm... I know — this problem will yield to generating functions!

Let's work in standard units of 1/12 tonne. This way you need to assemble 36 units and a detonator, and your shopping possibilities can be encoded as:
S: 1+d+u^3+u^6+u^9+u^12+u^15+u^18
A: 1+d+u^4+u^8+u^12+u^16
D: 1+d+u^2+u^4+u^6+u^8
G: 1+d+u^6+u^12

Multiplying these polynomials together, we want to figure out how the term du^36 is built up.

http://www.wolframalpha.com/input/?i=%281%2Bd%2Bu%5E3%2Bu%5E6%2Bu%5E9%2Bu%5E12%2Bu%5E15%2Bu%5E18%29*%28+1%2Bd%2Bu%5E4%2Bu%5E8%2Bu%5E12%2Bu%5E16%29*%281%2Bd%2Bu%5E2%2Bu%5E4%2Bu%5E6%2Bu%5E8%29*%281%2Bd%2Bu%5E6%2Bu%5E12%29
tells us there are 7 distinct solutions.

In order to get the concrete solutions, we need a bit more trickery to make Mathematica (and thereby Wolfram|Alpha) play ball; we can rewrite the formulas for the different countries thus:
S: 1+s+u^3+u^6+u^9+u^12+u^15+u^18
A: 1+a+v^4+v^8+v^12+v^16
D: 1+d+w^2+w^4+w^6+w^8
G: 1+g+x^6+x^12

and we will be looking for appropriate terms of degree 37 in
S*A*D*G=
(1+s+u^3+u^6+u^9+u^12+u^15+u^18)*(1+a+v^4+v^8+v^12+v^16)*(1+d+w^2+w^4+w^6+w^8)*(1+g+x^6+x^12)

At this stage, Wolfram|Alpha turns out to be not quite as powerful as I needed for the computation, so I created a Sage Notebook with the computations necessary instead:
http://www.sagenb.org/home/pub/4972

In Sage, the computation takes the code:
 
R.<s,a,d,g,u,v,w,x> = QQ[]
gf = (1+s+u^3+u^6+u^9+u^12+u^15+u^18)*(1+a+v^4+v^8+v^12+v^16)*(1+d+w^2+w^4+w^6+w^8)*(1+g+x^6+x^12)
[m for m in gf.monomials() if m.total_degree()==37 and sum(m.degrees()[0:4])==1]

where the first clause in the last line selects only monomials of total degree 37 (36 units and 1 detonator), and the second extracts only those solutions that actually have a detonator.
This yields as an output all the seven solutions:
[g*u^18*v^16*w^2, g*u^18*v^12*w^6, g*u^12*v^16*w^8, d*u^18*v^12*x^6,
d*u^12*v^12*x^12, a*u^18*w^6*x^12, s*v^16*w^8*x^12]
Edited Date: 2012-09-02 08:33 am (UTC)

Date: 2012-09-02 11:06 am (UTC)
From: [identity profile] lederhosen.livejournal.com
This level of overkill makes me happy.

Date: 2012-09-02 05:38 pm (UTC)
michiexile: (Default)
From: [personal profile] michiexile
What do you mean overkill? I solved the problem, didn't I? Completely? Exhaustively? Right? Right?

Date: 2012-09-02 11:07 pm (UTC)
delphipsmith: (waka waka bang splat)
From: [personal profile] delphipsmith
::head explodes::

Date: 2012-09-02 09:27 am (UTC)
From: [identity profile] dickgloucester.livejournal.com
Hahahahahahahaha!

Date: 2012-09-02 10:56 am (UTC)
moxie_man: (Squirrel Feather)
From: [personal profile] moxie_man
Unfortunately, some of the uppity types up my way would report you for promoting terrorism with this Q.

Date: 2012-09-02 11:08 am (UTC)
From: [identity profile] lederhosen.livejournal.com
My suggested alternate was "Jade is trying to buy 3 kilograms of pseudoephedrine to make methamphetamine, but each pharmacy limits how much it will sell..."

Date: 2012-09-02 11:06 pm (UTC)
delphipsmith: (Default)
From: [personal profile] delphipsmith
LOL!

Date: 2012-09-02 10:58 am (UTC)
From: [identity profile] sly-girl.livejournal.com
No one else?

Sodor is the island where Thomas the Tank Engine lives.
Duloc is the city in Shrek.
Guilder is one of the two countries in The Princes Bride.

Don't know Azania off the top of my head.

Date: 2012-09-02 02:04 pm (UTC)
michiexile: (ModelHouse)
From: [personal profile] michiexile
According to Wikipedia:

Places

Azania - historical region in East Africa
Azania - incumbent name of former Jubaland region in Somalia
Azania - used from 2002 onwards for a microcontinent in the Mozambique Ocean that consisted of parts of modern Madagascar, East Africa, Arabia and south India.[1]
Azania - proposed renaming of South Sudan.[2]
Azania - A locality in Arcadia in Greece, named for Azan.
Azania - The name of the annual journal of The British Institute in Eastern Africa.


Fiction

Azania - A fictitious island in the Indian Ocean off the eastern coast of Africa in Evelyn Waugh's novel Black Mischief written in 1932
Azania - as alternate name for South Africa is mentioned in passing in Nobel laureate Nadine Gordimer's novel July's People
Azania - A black-ruled South Africa extending far northwards, in Bruce Sterling's Islands in the Net
Azania - A new name for South Africa, in Kim Stanley Robinson's Mars trilogy, starting with Red Mars, published in 1 January 1993
Azania - A province of Bilalistan in the books Lion's Blood and Zulu Heart by Steven Barnes
Azania - The surname of a character in Max Brooks's novel World War Z. The meaning of the name is significant in the character's history.

Date: 2012-09-02 10:01 pm (UTC)
From: [identity profile] fluidsparkles.livejournal.com
Love the Question but All i can think of NoW thanks Halo.. Is Thomas the tank Engine Promoting Terrorisim in the US so as to get them To Speak the "Queens English*.

Can I swap minds with you today?

Date: 2012-09-02 11:06 pm (UTC)
delphipsmith: (Hepburn)
From: [personal profile] delphipsmith
Homeland Security will be coming to check over your curriculum shortly...

Date: 2013-08-08 01:26 pm (UTC)
From: [identity profile] clsteele (from livejournal.com)
CHECK the curriculum?!? They'll confiscate it and we'll never hear from Reynardo or related individuals ever again!

Date: 2012-09-03 04:27 pm (UTC)
From: [identity profile] wingedkami.livejournal.com
So that's why Sodor has so many earthquakes, landslides, collapsed bridges and giant boulders rolling down hills. Someone's testing high explosives!

Profile

reynardo: (Default)
reynardo

December 2024

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 23rd, 2025 02:16 am
Powered by Dreamwidth Studios