Turn on thread page Beta
 You are Here: Home

# how many cubes in a nxm cuboid? watch

1. how many cubes can be found in an nxm cuboid. all cunbes must be taken into consideration 1x1x1, 2x2x2 etc.
similar to the fact that in a 4x3 grid there is 20 squares but this is in 3D.
anyone got any ideas?
2. I think you need a third variable in the title
3. sorry i mean an nxmxp cuboid
help!!!
im stuck
4. (Original post by Unregistered)
sorry i mean an nxmxp cuboid
help!!!
im stuck
Assume that n <= m <= p.

1-by-1-by-1 cubes: n*m*p possibilities.
2-by-2-by-2 cubes: (n-1)*(m-1)*(p-1) possibilities.
3-by-3-by-3 cubes: (n-2)*(m-2)*(p-2) possibilities.
...
n-by-n-by-n cubes: (n-(n-1))*(m-(n-1))*(p-(n-1)) possibilities.
Larger cubes: don't fit.

So the answer is: (sum over k from 0 to n-1) [(n-k)*(m-k)*(p-k)].

Which equals (ask an A-level maths student or post again):
(m*n)/6 - n^2/12 - (m*n^3)/6 + n^4/12 + (n*p)/6 + (m*n*p)/2 + (m*n^2*p)/2 - (n^3*p)/6.

For a check, suppose that n = 2, m = 3 and p = 5. There are 2*3*5 = 30 ways to put in a 1-by-1-by-1 cube, 1*2*4 = 8 ways to put in a 2-by-2-by-2 cube, so 38 possibilities in all. Also,

(m*n)/6 - n^2/12 - (m*n^3)/6 + n^4/12 + (n*p)/6 + (m*n*p)/2 + (m*n^2*p)/2 - (n^3*p)/6 = 38.

Jonny W.

Turn on thread page Beta
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: October 29, 2003
Today on TSR

### TSR Pub Quiz 2018 - Anime

The first of our week-long series of entertainment quizzes

Poll
Useful resources

## Articles:

Debate and current affairs forum guidelines

## Quick link:

Unanswered news and current affairs threads

## Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.