Turn on thread page Beta
    • Thread Starter
    Offline

    0
    ReputationRep:
    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?
    Offline

    0
    ReputationRep:
    I think you need a third variable in the title

    sorry i mean an nxmxp cuboid
    help!!!
    im stuck
    Offline

    8
    ReputationRep:
    (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.

Updated: October 29, 2003
Poll
Black Friday: Yay or Nay?
Useful resources

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.