Welcome to NRICH.

 
Finding a formula for stacking boxes


By Simon Kjhgjjasf (P2158) on Friday, March 10, 2000 - 04:36 pm:

i have found the formula for stacking squares on each other just simply in a triangle, in 2D. When i have moved into 3D and using cubes it has got a lot harder. Can you start me off on finding a formula for a pyrimid of cubes. I can take it from there, or can you tell me how i could work it out.
thank you


By Benjamin Wardhaugh (Bsw22) on Friday, March 10, 2000 - 10:09 pm:

Could you tell me a bit more about what it is you've already done? You say you've found the formula for stacking squares; do you mean a formula for the total area of a stack of squares, or something else? And how did you find your formula?


By Simon Kjhgjjasf (P2158) on Tuesday, March 14, 2000 - 05:13 pm:

i have found the formula for finding the amount of squares in the triangle from the base. This is: (base x base + base) / 2

this is just a 2D triangle. Now i am making it 3D i really can't find the formula. I found the 2D one out through trial and error.


By Anonymous on Wednesday, March 15, 2000 - 12:25 pm:

Try b(b+1)(b+2)/6 where b is the base.


By Anonymous on Wednesday, March 15, 2000 - 06:15 pm:

apparently it is:

1/6b(b+1)(2b+1)

but does anyone know how to work this out properly?


By Marion Palles-Clark (Mhp21) on Thursday, March 23, 2000 - 11:04 pm:

Hello Simon, have you been thinking about this problem any more since you posted the message?
Here are a few things for you to think about that might help you:

Do you know what the formula for finding the area of a triangle is? Well, it is b*h/2, where b is the length of the base, and h is the height. See if you can work out why this is.

Now, in your triangle of squares, the height is the same length as the base, you should easily be able to see this, and this is where the 'base x base' part of your formula comes from.

So what about the rest of the formula, why have you got (base*base+base)/2?

When you make your triangle, have you made it a right-angled one, so you have two straight edges, or have you stacked them so that each square rests on half of each of two triangles in the row below? It doesn't make any difference to the result, but it's easier to see what I'm about to tell you if you make it into a right-angled triangle.

In a 'proper' triangle, the diagonal side would be straight, but the one you have made from your squares is like a staircase. This is the bit that we have to compensate for with the 'extra bit' in the formula.

Take some more squares, and add to your triangle to make a sqaure, like this: (a 'o' is a square)
o
oo
ooo
oooo

becomes
oooo
oooo
oooo
oooo

In this example, we have base=4, and we have made the triangle into a 4x4 square. This square has area 4*4=16. If we take this square and cut it in half, along the diagonal, we get a triangle that has area 4*4/2 - half the size of the square.
But our triangle of squares is a bit bigger than this, because of the 'staircase'.

Can you see how many extra units of area the staircase contributes? There are 4 squares along the diagonal, and each of these goes half under and half over the line that the diagonal of the proper triangle would make. So we have four half units to add to the area, and four is the length of the base, so we have (base)/2 to add.

Nearly at the end now!
So, the area of the triangle is
(the area of a normal triangle) + (the half units)
= (b*b/2) + (b/2)
=(b*b+b)/2.

That is how you get the 'proper' proof of how many squares you need for the triangle.

Now see if you can work out how to do the 'proper' version of how to do it in 3D.

Let me know how far you get on your own, and I'll see if I can help if you get stuck.

Marion