All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Rameses' Pyramid (Posted on 2004-11-05)
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?

 See The Solution Submitted by SilverKnight Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution | Comment 3 of 15 |

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    95100     5 34910    90101     5 34915    85102     5 34920    80103     4 34924    76104     4 34928    72105     4 34932    68106     4 34936    64107     3 34939    61108     3 34942    58109     3 34945    55110     3 34948    52111     3 34951    49112     2 34953    47113     2 34955    45114     2 34957    43115     2 34959    41116     2 34961    39117     2 34963    37118     2 34965    35119     2 34967    33120     1 34968    32121     1 34969    31122     1 34970    30123     1 34971    29124     1 34972    28125     1 34973    27126     1 34974    26127     1 34975    25128     1 34976    24129     1 34977    23130     1 34978    22131     1 34979    21132     1 34980    20133     1 34981    19134     1 34982    18135     1 34983    17136     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             12             4             53             9             144             16            305             25            556             36            917             49            1408             64            2049             81            28510            100           38511            121           50612            144           65013            169           81914            196           101515            225           124016            256           149617            289           178518            324           210919            361           247020            400           287021            441           331122            484           379523            529           432424            576           490025            625           552526            676           620127            729           693028            784           771429            841           855530            900           945531            961           1041632            1024          1144033            1089          1252934            1156          1368535            1225          1491036            1296          1620637            1369          1757538            1444          1901939            1521          2054040            1600          2214041            1681          2382142            1764          2558543            1849          2743444            1936          2937045            2025          3139546            2116          3351147            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

 Search: Search body:
Forums (0)