Monday, March 5, 2012

elegant solution

I had mentioned, last week, that I don't like summing problems. MGRE's solution to last week's problem is simple and elegant. To wit:

Let’s number the rows top-to-bottom such that the top row is “Row 1” and the bottom row is “Row 24.”

Row 1 has 4 blocks.
Row 2 has 4 + 8(1) = 12 blocks.
Row 3 has 4 + 8 + 8 = 4 + 8(2) = 20 blocks.
Row 4 has 4 + 8 + 8 + 8 = 4 + 8(3) = 28 blocks.

We can generalize the pattern at this point. Row n has 4 + 8(n – 1) blocks. Thus, Row 24 has 4 + 8(23) = 188 blocks.

When we sum the number of blocks in Rows 1 through 24, we are summing an evenly spaced set, for which we have a formula:

Sum = Average Value × Number of Terms, where

Average Value = (first term + last term)/2 = (4 + 188)/2 = 192/2 = 96
Number of Terms = 24, which is just the number of rows.

So, the Sum = (96)(24) = 2,304.

I admit it! This is a much simpler method than mine was.


_

No comments: