Certain millionaire, approaching his 100th birthday,
gave the following instructions to his accountant:
"I would like to donate exactly $100,000 to my
4 grandchildren with the following constraints:
Dana, the youngest, at least 32,000,
Anita, the oldest , at most 20,000 and
the twins Bob and Benny equal amounts between the girls' amounts .
All amounts should be in round thousands.
Zero, of course, excluded.
Please show me all possible distributions and I will make the final decision."
How many possible arrangements are there?
There are actually 357 ways. The original list included
32 23 23 22
33 23 23 21
35 22 22 21
The corrected list is:
32 31 31 6
32 30 30 8
32 29 29 10
32 28 28 12
32 27 27 14
32 26 26 16
32 25 25 18
32 24 24 20
33 32 32 3
33 31 31 5
33 30 30 7
33 29 29 9
33 28 28 11
33 27 27 13
33 26 26 15
33 25 25 17
33 24 24 19
34 32 32 2
34 31 31 4
34 30 30 6
34 29 29 8
34 28 28 10
34 27 27 12
34 26 26 14
34 25 25 16
34 24 24 18
34 23 23 20
35 32 32 1
35 31 31 3
35 30 30 5
35 29 29 7
35 28 28 9
35 27 27 11
35 26 26 13
35 25 25 15
35 24 24 17
35 23 23 19
36 31 31 2
36 30 30 4
36 29 29 6
36 28 28 8
36 27 27 10
36 26 26 12
36 25 25 14
36 24 24 16
36 23 23 18
36 22 22 20
37 31 31 1
37 30 30 3
37 29 29 5
37 28 28 7
37 27 27 9
37 26 26 11
37 25 25 13
37 24 24 15
37 23 23 17
37 22 22 19
38 30 30 2
38 29 29 4
38 28 28 6
38 27 27 8
38 26 26 10
38 25 25 12
38 24 24 14
38 23 23 16
38 22 22 18
38 21 21 20
39 30 30 1
39 29 29 3
39 28 28 5
39 27 27 7
39 26 26 9
39 25 25 11
39 24 24 13
39 23 23 15
39 22 22 17
39 21 21 19
40 29 29 2
40 28 28 4
40 27 27 6
40 26 26 8
40 25 25 10
40 24 24 12
40 23 23 14
40 22 22 16
40 21 21 18
41 29 29 1
41 28 28 3
41 27 27 5
41 26 26 7
41 25 25 9
41 24 24 11
41 23 23 13
41 22 22 15
41 21 21 17
41 20 20 19
42 28 28 2
42 27 27 4
42 26 26 6
42 25 25 8
42 24 24 10
42 23 23 12
42 22 22 14
42 21 21 16
42 20 20 18
43 28 28 1
43 27 27 3
43 26 26 5
43 25 25 7
43 24 24 9
43 23 23 11
43 22 22 13
43 21 21 15
43 20 20 17
44 27 27 2
44 26 26 4
44 25 25 6
44 24 24 8
44 23 23 10
44 22 22 12
44 21 21 14
44 20 20 16
44 19 19 18
45 27 27 1
45 26 26 3
45 25 25 5
45 24 24 7
45 23 23 9
45 22 22 11
45 21 21 13
45 20 20 15
45 19 19 17
46 26 26 2
46 25 25 4
46 24 24 6
46 23 23 8
46 22 22 10
46 21 21 12
46 20 20 14
46 19 19 16
47 26 26 1
47 25 25 3
47 24 24 5
47 23 23 7
47 22 22 9
47 21 21 11
47 20 20 13
47 19 19 15
47 18 18 17
48 25 25 2
48 24 24 4
48 23 23 6
48 22 22 8
48 21 21 10
48 20 20 12
48 19 19 14
48 18 18 16
49 25 25 1
49 24 24 3
49 23 23 5
49 22 22 7
49 21 21 9
49 20 20 11
49 19 19 13
49 18 18 15
50 24 24 2
50 23 23 4
50 22 22 6
50 21 21 8
50 20 20 10
50 19 19 12
50 18 18 14
50 17 17 16
51 24 24 1
51 23 23 3
51 22 22 5
51 21 21 7
51 20 20 9
51 19 19 11
51 18 18 13
51 17 17 15
52 23 23 2
52 22 22 4
52 21 21 6
52 20 20 8
52 19 19 10
52 18 18 12
52 17 17 14
53 23 23 1
53 22 22 3
53 21 21 5
53 20 20 7
53 19 19 9
53 18 18 11
53 17 17 13
53 16 16 15
54 22 22 2
54 21 21 4
54 20 20 6
54 19 19 8
54 18 18 10
54 17 17 12
54 16 16 14
55 22 22 1
55 21 21 3
55 20 20 5
55 19 19 7
55 18 18 9
55 17 17 11
55 16 16 13
56 21 21 2
56 20 20 4
56 19 19 6
56 18 18 8
56 17 17 10
56 16 16 12
56 15 15 14
57 21 21 1
57 20 20 3
57 19 19 5
57 18 18 7
57 17 17 9
57 16 16 11
57 15 15 13
58 20 20 2
58 19 19 4
58 18 18 6
58 17 17 8
58 16 16 10
58 15 15 12
59 20 20 1
59 19 19 3
59 18 18 5
59 17 17 7
59 16 16 9
59 15 15 11
59 14 14 13
60 19 19 2
60 18 18 4
60 17 17 6
60 16 16 8
60 15 15 10
60 14 14 12
61 19 19 1
61 18 18 3
61 17 17 5
61 16 16 7
61 15 15 9
61 14 14 11
62 18 18 2
62 17 17 4
62 16 16 6
62 15 15 8
62 14 14 10
62 13 13 12
63 18 18 1
63 17 17 3
63 16 16 5
63 15 15 7
63 14 14 9
63 13 13 11
64 17 17 2
64 16 16 4
64 15 15 6
64 14 14 8
64 13 13 10
65 17 17 1
65 16 16 3
65 15 15 5
65 14 14 7
65 13 13 9
65 12 12 11
66 16 16 2
66 15 15 4
66 14 14 6
66 13 13 8
66 12 12 10
67 16 16 1
67 15 15 3
67 14 14 5
67 13 13 7
67 12 12 9
68 15 15 2
68 14 14 4
68 13 13 6
68 12 12 8
68 11 11 10
69 15 15 1
69 14 14 3
69 13 13 5
69 12 12 7
69 11 11 9
70 14 14 2
70 13 13 4
70 12 12 6
70 11 11 8
71 14 14 1
71 13 13 3
71 12 12 5
71 11 11 7
71 10 10 9
72 13 13 2
72 12 12 4
72 11 11 6
72 10 10 8
73 13 13 1
73 12 12 3
73 11 11 5
73 10 10 7
74 12 12 2
74 11 11 4
74 10 10 6
74 9 9 8
75 12 12 1
75 11 11 3
75 10 10 5
75 9 9 7
76 11 11 2
76 10 10 4
76 9 9 6
77 11 11 1
77 10 10 3
77 9 9 5
77 8 8 7
78 10 10 2
78 9 9 4
78 8 8 6
79 10 10 1
79 9 9 3
79 8 8 5
80 9 9 2
80 8 8 4
80 7 7 6
81 9 9 1
81 8 8 3
81 7 7 5
82 8 8 2
82 7 7 4
83 8 8 1
83 7 7 3
83 6 6 5
84 7 7 2
84 6 6 4
85 7 7 1
85 6 6 3
86 6 6 2
86 5 5 4
87 6 6 1
87 5 5 3
88 5 5 2
89 5 5 1
89 4 4 3
90 4 4 2
91 4 4 1
92 3 3 2
93 3 3 1
95 2 2 1
Program (added code in bold):
clearvars,clc
ct=0;
for dana=32:97
for anita=1:(100-dana)/3
if anita>20
break
end
b=(100-dana-anita)/2;
if b==floor(b) && b>anita && b<dana
ct=ct+1;
disp([dana b b anita])
end
end
end
ct
Edited on February 13, 2024, 8:06 am
|
Posted by Charlie
on 2024-02-12 09:30:31 |