Seven dwarfs are sitting at a round table.
Each has a cup, and some cups contain milk.
Each dwarf in turn pours all his milk into the other six cups, dividing it equally among them.
After the seventh dwarf has done this, they find that each cup again contains its initial quantity of milk.
How much milk does each cup contain, if there were 42 ounces of milk altogether?
Source: 1977 All Soviet Union Math Olympiad Problem
In the following table, the dwarfs are lettered a through g. Each row shows what at the end his own share consists of what fraction of the original share of a, of b etc. is present in his cup.
of a's of b's of c's of d's of e's of f's
a 70993/279936 16807/46656 2401/7776 343/1296 49/216 7/36 0
b 63217/279936 9031/46656 2401/7776 343/1296 49/216 7/36 0
c 54145/279936 7735/46656 1105/7776 343/1296 49/216 7/36 0
d 43561/279936 6223/46656 889/7776 127/1296 49/216 7/36 0
e 31213/279936 4459/46656 637/7776 91/1296 13/216 7/36 0
f 16807/279936 2401/46656 343/7776 49/1296 7/216 1/36 0
g 0 0 0 0 0 0 0
For example a has 70993/279936 of his own original contents plus 16807/46656 of b's original contents plus 2401/7776 of c's original contents, etc.
As a through f now contain equal amounts (7 ounces):
70993/279936 *a + 16807/46656 *b + 2401/7776 *c + 343/1296 * d + 49/216 * e + 7/36 * f = 7
etc.
where the variables a through f represent the original amounts they held.
Solve the six equations in six unknowns.
Table generated by:
5 dim Ofa(7),Ofb(7),Ofc(7),Ofd(7),Ofe(7),Off(7),Ofg(7)
10 Ofa(1)=1
20 Ofb(2)=1
30 Ofc(3)=1
40 Ofd(4)=1
50 Ofe(5)=1
60 Off(6)=1
70 for Gen=1 to 7
80 Splitofa=Ofa(Gen)//6
90 Splitofb=Ofb(Gen)//6
100 Splitofc=Ofc(Gen)//6
110 Splitofd=Ofd(Gen)//6
120 Splitofe=Ofe(Gen)//6
130 Splitoff=Off(Gen)//6
140 Splitofg=Ofg(Gen)//6
150 for Rcp=1 to 7
160 if Rcp<>Gen then
170 :Ofa(Rcp)=Ofa(Rcp)+Splitofa
180 :Ofb(Rcp)=Ofb(Rcp)+Splitofb
190 :Ofc(Rcp)=Ofc(Rcp)+Splitofc
200 :Ofd(Rcp)=Ofd(Rcp)+Splitofd
210 :Ofe(Rcp)=Ofe(Rcp)+Splitofe
220 :Off(Rcp)=Off(Rcp)+Splitoff
230 :Ofg(Rcp)=Ofg(Rcp)+Splitofg
240 :endif
250 next
260 Ofa(Gen)=0
270 Ofb(Gen)=0
280 Ofc(Gen)=0
290 Ofd(Gen)=0
300 Ofe(Gen)=0
310 Off(Gen)=0
320 Ofg(Gen)=0
330 print Gen
340 for I=1 to 7
350 print Ofa(I);Ofb(I);Ofc(I);Ofd(I);Ofe(I);Off(I);Ofg(I)
360 next
370 next Gen
380 for I=1 to 7
382 Tota=Tota+Ofa(I):Totb=Totb+Ofb(I):Totc=Totc+Ofc(I):Totd=Totd+Ofd(I):Tote=Tote+Ofe(I):Totf=Totf+Off(I):Totg=Totg+Ofg(I)
385 next
400 print Tota;Totb;Totc;Totd;Tote;Totf;Totg
|
Posted by Charlie
on 2013-10-23 14:55:44 |