A classic:
Rameses wishes to build a great pyramid for his interment.
The structure will have a square base and be solidly composed of cubical stone blocks. Each level of the pyramid contains one block fewer per side as the pyramid rises.
Rameses has available an initial work force of 35,000 slaves. Each morning the available labor pool is divided into work crews of 17 slaves each. Any remainder that cannot form a full crew gets the day off but are available the following day. Each crew can lay one block of the pyramid each day.
Unfortunately, the heat of the desert sun causes the death of one member of each crew each day. Work ceases on the project when it can be determined that there will be insufficient slaves available to raise the pyramid one more level. Each stone block measures 3 meters per side.
How many days will it take to construct Rameses' pyramid? How tall will it be? How many of the original slaves survive the construction?
If you continue until you have as many blocks as possible, you would stop when there are fewer than 17 slaves left, so there would be 16 left at the end. One block is laid for every slave killed, so 35,000 - 16 = 34,984 blocks could be laid. The number of days is harder. At the end, we have to see how high the pyramid will be with 34,984 blocks, see how many are really needed, and adjust the slave count to that.
An approximation to the number of days could be made by stating that n = 35000 e^(-t/17), so that dn/dt = -n/17, and solving for n = 1, which would come out to 129.7... days, rounded to 130 days. But the number of crews is not a continuous function, and the approximation is 6 days off, based on the following computer-generated result:
On the first day there are 2058 crews, laying 2058 blocks, leaving 32,942 workers for the next day. The second day there are 1937 crews, bringing the total number of blocks laid thus far to 3995 and leaving 31,005 workers for the next day. This continues as in the following table:
1 2058 2058 32942
2 1937 3995 31005
3 1823 5818 29182
4 1716 7534 27466
5 1615 9149 25851
6 1520 10669 24331
7 1431 12100 22900
8 1347 13447 21553
9 1267 14714 20286
10 1193 15907 19093
11 1123 17030 17970
12 1057 18087 16913
13 994 19081 15919
14 936 20017 14983
15 881 20898 14102
16 829 21727 13273
17 780 22507 12493
18 734 23241 11759
19 691 23932 11068
20 651 24583 10417
21 612 25195 9805
22 576 25771 9229
23 542 26313 8687
24 511 26824 8176
25 480 27304 7696
26 452 27756 7244
27 426 28182 6818
28 401 28583 6417
29 377 28960 6040
30 355 29315 5685
31 334 29649 5351
32 314 29963 5037
33 296 30259 4741
34 278 30537 4463
35 262 30799 4201
36 247 31046 3954
37 232 31278 3722
38 218 31496 3504
39 206 31702 3298
40 194 31896 3104
41 182 32078 2922
42 171 32249 2751
43 161 32410 2590
44 152 32562 2438
45 143 32705 2295
46 135 32840 2160
47 127 32967 2033
48 119 33086 1914
49 112 33198 1802
50 106 33304 1696
51 99 33403 1597
52 93 33496 1504
53 88 33584 1416
54 83 33667 1333
55 78 33745 1255
56 73 33818 1182
57 69 33887 1113
58 65 33952 1048
59 61 34013 987
60 58 34071 929
61 54 34125 875
62 51 34176 824
63 48 34224 776
64 45 34269 731
65 43 34312 688
66 40 34352 648
67 38 34390 610
68 35 34425 575
69 33 34458 542
70 31 34489 511
71 30 34519 481
72 28 34547 453
73 26 34573 427
74 25 34598 402
75 23 34621 379
76 22 34643 357
77 21 34664 336
78 19 34683 317
79 18 34701 299
80 17 34718 282
81 16 34734 266
82 15 34749 251
83 14 34763 237
84 13 34776 224
85 13 34789 211
86 12 34801 199
87 11 34812 188
88 11 34823 177
89 10 34833 167
90 9 34842 158
91 9 34851 149
92 8 34859 141
93 8 34867 133
94 7 34874 126
95 7 34881 119
96 7 34888 112
97 6 34894 106
98 6 34900 100
99 5 34905 95
100 5 34910 90
101 5 34915 85
102 5 34920 80
103 4 34924 76
104 4 34928 72
105 4 34932 68
106 4 34936 64
107 3 34939 61
108 3 34942 58
109 3 34945 55
110 3 34948 52
111 3 34951 49
112 2 34953 47
113 2 34955 45
114 2 34957 43
115 2 34959 41
116 2 34961 39
117 2 34963 37
118 2 34965 35
119 2 34967 33
120 1 34968 32
121 1 34969 31
122 1 34970 30
123 1 34971 29
124 1 34972 28
125 1 34973 27
126 1 34974 26
127 1 34975 25
128 1 34976 24
129 1 34977 23
130 1 34978 22
131 1 34979 21
132 1 34980 20
133 1 34981 19
134 1 34982 18
135 1 34983 17
136 1 34984 16
So at the end of the 136th day, 34,984 blocks will have been laid, with 16 slaves remaining. This assumes we lay all 34,984 possible.
This sequence was produced by
n = 35000
OPEN "ramsespr.txt" FOR OUTPUT AS #2
DO
day = day + 1
crews = INT(n / 17)
blocks = blocks + crews
n = n - crews
PRINT #2, USING "### ##### ##### #####"; day; crews; blocks; n
LOOP UNTIL n < 17
For the height of the pyramid (and a shortening of the time and number of slaves used):
The top level has 1 block; the second level has 4; the third, 9; etc. -- the square numbers.
A table, counting rows from the top of blocks used in each row, and total blocks at that level and higher shows:
1 1 1
2 4 5
3 9 14
4 16 30
5 25 55
6 36 91
7 49 140
8 64 204
9 81 285
10 100 385
11 121 506
12 144 650
13 169 819
14 196 1015
15 225 1240
16 256 1496
17 289 1785
18 324 2109
19 361 2470
20 400 2870
21 441 3311
22 484 3795
23 529 4324
24 576 4900
25 625 5525
26 676 6201
27 729 6930
28 784 7714
29 841 8555
30 900 9455
31 961 10416
32 1024 11440
33 1089 12529
34 1156 13685
35 1225 14910
36 1296 16206
37 1369 17575
38 1444 19019
39 1521 20540
40 1600 22140
41 1681 23821
42 1764 25585
43 1849 27434
44 1936 29370
45 2025 31395
46 2116 33511
47 2209 35720
so only 33,511 blocks will actually be needed, so actually, 35,000 - 33,511 = 1,489 slaves can be spared death. From the above table, we can see that this can be reached on the 53rd day by sending out only 15 crews that day, instead of the 88 available.
The pyramid will be 46 courses high and so is 46*3 = 138 meters high.
|
Posted by Charlie
on 2004-11-05 09:32:20 |