Think of this problem as an extension to
A four-way division.
Six friends are gathered at a pub. They have in front of them three 12-pint tankards full of beer, and an empty 5-pint mug.
Since they are still sober, they quickly calculate that they have 36 pints for the six of them, which comes to an even 6 pints per person.
How can they divide the beer equally with the containers they have available?
Note: For the purposes of the problem, assume that the pub does not have any pint glasses, and the six friends will have to drink from the four available containers.
I make no claims that is the most efficient way, but it works.
So, we have 3 T's (12 pt tankards), 1 M (5 pt mug) and 1 2 3 4 5 6 thirsty friends.
(Also, please see pagination question at end)
Step T1 T2 T3 M 1 2 3 4 5 6
------------------------------------
0 12 12 12 0
1 12 12 7 5
2 12 12 7 0 5
3 12 12 2 5 5
4 12 12 0 5 5 2
5 12 12 5 0 5 2
6 12 7 5 5 5 2
7 12 7 10 0 5 2
8 12 2 10 5 5 2
9 12 0 10 5 5 4
10 12 5 10 0 5 4
11 7 5 10 5 5 4
12 7 10 10 0 5 4
13 2 10 10 5 5 4
14 0 10 10 5 5 6
15 0 12 10 3 5 6
16 0 12 12 1 5 6
17 0 12 12 0 6 6
18 0 7 12 5 6 6
19 5 7 12 0 6 6
20 5 2 12 5 6 6
21 5 0 12 5 6 6 2
22 5 5 12 0 6 6 2
23 5 5 7 5 6 6 2
24 5 10 7 0 6 6 2
25 5 10 2 5 6 6 2
26 5 10 0 5 6 6 4
27 5 10 5 0 6 6 4
28 12 3 5 0 6 6 4
29 7 3 5 5 6 6 4
30 7 8 5 0 6 6 4
31 2 8 5 5 6 6 4
32 0 8 5 5 6 6 6
33 0 12 5 1 6 6 6
34 0 12 5 0 6 6 6 1
35 0 7 5 5 6 6 6 1
36 5 7 5 0 6 6 6 1
37 5 2 5 5 6 6 6 1
38 5 0 5 5 6 6 6 1 2
39 5 5 5 0 6 6 6 1 2
40 5 10 0 0 6 6 6 1 2
41 3 12 0 0 6 6 6 1 2
42 3 7 0 5 6 6 6 1 2
43 3 7 5 0 6 6 6 1 2
44 3 2 5 5 6 6 6 1 2
45 3 0 5 5 6 6 6 1 4
46 3 0 10 0 6 6 6 1 4
47 12 0 1 0 6 6 6 1 4
48 7 0 1 5 6 6 6 1 4
49 7 0 0 5 6 6 6 1 4 1
50 7 0 0 0 6 6 6 6 4 1
51 2 0 0 5 6 6 6 6 4 1
52 0 0 0 5 6 6 6 6 6 1
53 0 0 0 0 6 6 6 6 6 6
Regarding pagination: I am missing the way to paginate my posts.
When I leave the formatting pulldown alone, and just cut and paste - I get a large font, larger than I'd like. When I enter things by hand (as above), I loose identically fixed-width characters and thus collimation. My experiments with "verbatim" html or changing the pull-down selection have been unsuccessful so far but I may be doing it wrong. Ideally, I would like to be able to cut and paste from another window and keep the normal 12pt font. Thanks in advance for any tips.
Edited on November 14, 2022, 2:02 pm