Slicing a cube

Geometry Level 4

Consider a 10 × 10 × 10 10\times 10\times 10 cube in the 3D Cartesian space that has a vertex at ( 0 , 0 , 0 ) (0, 0, 0) and consists of 1 0 3 10^3 unit cubes.

Now, consider the plane passing through the three vertices ( 10 , 0 , 0 ) , ( 0 , 10 , 0 ) , ( 0 , 0 , 10 ) (10,0,0), (0,10,0), (0,0,10) of the large cube.

How many of the 1000 unit cubes intersect this plane?

Details and Assumptions

Each cube is closed, i.e, contains the boundary. In particular, the set of cubes is the following

{ { ( x , y , z ) R 3 a x a + 1 , b y b + 1 , c z c + 1 } a , b , c { 0 , 1 , 2 , 9 } } \{ \{ (x, y, z) \in \mathbb{R}^3 \mid a \leq x \leq a + 1, b \leq y \leq b + 1, c \leq z \leq c + 1 \} \mid a, b, c \in \{0, 1, 2, \cdots 9\} \}

and the question is how many of the elements in this set intersect the plane given by { ( x , y , z ) R 3 x + y + z = 10 } \{ (x, y, z) \in \mathbb{R}^3 \mid x + y + z = 10\}


The answer is 199.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

David Vreken
Aug 18, 2018

The following picture shows a plane (in red) passing through the vertices ( 10 , 0 , 0 ) (10, 0, 0) , ( 0 , 10 , 0 ) (0, 10, 0) , and ( 0 , 0 , 10 ) (0, 0, 10) of a 10 × 10 × 10 10 \times 10 \times 10 cube:

If the 10 × 10 × 10 10 \times 10 \times 10 cube is broken up into 100 unit cubes as indicated in the problem, then the plane would intersect top front vertex of the following unit cubes:

These include the unit cubes ( 7 , 0 , 0 ) , ( 6 , 1 , 0 ) , ( 5 , 2 , 0 ) , . . . ( 0 , 7 , 0 ) (7, 0, 0), (6, 1, 0), (5, 2, 0), ... (0, 7, 0) ; ( 6 , 0 , 1 ) , ( 5 , 1 , 1 ) , ( 4 , 2 , 1 ) , . . . ( 0 , 6 , 1 ) (6, 0, 1), (5, 1, 1), (4, 2, 1), ... (0, 6, 1) ; ( 5 , 0 , 2 ) , ( 4 , 1 , 2 ) , ( 3 , 2 , 2 ) (5, 0, 2), (4, 1, 2), (3, 2, 2) ; ... ( 0 , 5 , 2 ) (0, 5, 2) , and so on until ( 0 , 0 , 7 ) (0, 0, 7) . (Algebraically, these are all the unit cubes in which x a + y a + z a = 7 x_a + y_a + z_a = 7 , since each of these unit cubes contain the coordinates ( x a + 1 , y a + 1 , z a + 1 ) (x_a + 1, y_a + 1, z_a + 1) , and these coordinates are on the plane x + y + z = 10 x + y + z = 10 because ( x a + 1 ) + ( y a + 1 ) + ( z a + 1 ) = x a + y a + z a + 3 = 7 + 3 = 10 (x_a + 1) + (y_a + 1) + (z_a + 1) = x_a + y_a + z_a + 3 = 7 + 3 = 10 .) There are 8 + 7 + . . . + 1 = 8 ( 8 + 1 ) 2 = 36 8 + 7 + ... + 1 = \frac{8(8 + 1)}{2} = 36 of them.

The plane would also intersect the unit cubes directly in front of those, which are as follows:

These include the unit cubes ( 8 , 0 , 0 ) , ( 7 , 1 , 0 ) , ( 6 , 2 , 0 ) , . . . ( 0 , 8 , 0 ) (8, 0, 0), (7, 1, 0), (6, 2, 0), ... (0, 8, 0) ; ( 7 , 0 , 1 ) , ( 6 , 1 , 1 ) , ( 5 , 2 , 1 ) , . . . ( 0 , 7 , 1 ) (7, 0, 1), (6, 1, 1), (5, 2, 1), ... (0, 7, 1) ; ( 6 , 0 , 2 ) , ( 5 , 1 , 2 ) , ( 4 , 2 , 2 ) (6, 0, 2), (5, 1, 2), (4, 2, 2) ; ... ( 0 , 6 , 2 ) (0, 6, 2) , and so on until ( 0 , 0 , 8 ) (0, 0, 8) . (Algebraically, these are all the unit cubes in which x a + y a + z a = 8 x_a + y_a + z_a = 8 , since each of these unit cubes contain the coordinates ( x a + 2 3 , y a + 2 3 , z a + 2 3 ) (x_a + \frac{2}{3}, y_a + \frac{2}{3}, z_a + \frac{2}{3}) , and these coordinates are on the plane x + y + z = 10 x + y + z = 10 because ( x a + 2 3 ) + ( y a + 2 3 ) + ( z a + 2 3 ) = x a + y a + z a + 2 = 8 + 2 = 10 (x_a + \frac{2}{3}) + (y_a + \frac{2}{3}) + (z_a + \frac{2}{3}) = x_a + y_a + z_a + 2 = 8 + 2 = 10 .) There are 9 + 8 + 7 + . . . + 1 = 9 ( 9 + 1 ) 2 = 45 9 + 8 + 7 + ... + 1 = \frac{9(9 + 1)}{2} = 45 of them.

The plane would also intersect the unit cubes directly in front of those, which are as follows:

These include the unit cubes ( 9 , 0 , 0 ) , ( 8 , 1 , 0 ) , ( 7 , 2 , 0 ) , . . . ( 0 , 9 , 0 ) (9, 0, 0), (8, 1, 0), (7, 2, 0), ... (0, 9, 0) ; ( 8 , 0 , 1 ) , ( 7 , 1 , 1 ) , ( 6 , 2 , 1 ) , . . . ( 0 , 8 , 1 ) (8, 0, 1), (7, 1, 1), (6, 2, 1), ... (0, 8, 1) ; ( 7 , 0 , 2 ) , ( 6 , 1 , 2 ) , ( 5 , 2 , 2 ) (7, 0, 2), (6, 1, 2), (5, 2, 2) ; ... ( 0 , 7 , 2 ) (0, 7, 2) , and so on until ( 0 , 0 , 9 ) (0, 0, 9) . (Algebraically, these are all the unit cubes in which x a + y a + z a = 9 x_a + y_a + z_a = 9 , since each of these unit cubes contain the coordinates ( x a + 1 3 , y a + 1 3 , z a + 1 3 ) (x_a + \frac{1}{3}, y_a + \frac{1}{3}, z_a + \frac{1}{3}) , and these coordinates are on the plane x + y + z = 10 x + y + z = 10 because ( x a + 1 3 ) + ( y a + 1 3 ) + ( z a + 1 3 ) = x a + y a + z a + 2 = 8 + 1 = 10 (x_a + \frac{1}{3}) + (y_a + \frac{1}{3}) + (z_a + \frac{1}{3}) = x_a + y_a + z_a + 2 = 8 + 1 = 10 .) There are 10 + 9 + 8 + . . . + 1 = 10 ( 10 + 1 ) 2 = 55 10 + 9 + 8 + ... + 1 = \frac{10(10 + 1)}{2} = 55 of them.

The plane would also intersect the bottom back vertex of the unit cubes directly in front of those, which are as follows:

These include the unit cubes ( 10 , 0 , 0 ) , ( 9 , 1 , 0 ) , ( 8 , 2 , 0 ) , . . . ( 0 , 10 , 0 ) (10, 0, 0), (9, 1, 0), (8, 2, 0), ... (0, 10, 0) ; ( 9 , 0 , 1 ) , ( 8 , 1 , 1 ) , ( 7 , 2 , 1 ) , . . . ( 0 , 9 , 1 ) (9, 0, 1), (8, 1, 1), (7, 2, 1), ... (0, 9, 1) ; ( 8 , 0 , 2 ) , ( 7 , 1 , 2 ) , ( 6 , 2 , 2 ) (8, 0, 2), (7, 1, 2), (6, 2, 2) ; ... ( 0 , 8 , 2 ) (0, 8, 2) , and so on until ( 0 , 0 , 10 ) (0, 0, 10) . (Algebraically, these are all the unit cubes in which x a + y a + z a = 10 x_a + y_a + z_a = 10 .) There are 9 + 10 + 9 + 8 + 7 + . . . + 2 = 9 + 10 ( 10 + 1 ) 2 1 = 63 9 + 10 + 9 + 8 + 7 + ... + 2 = 9 + \frac{10(10 + 1)}{2} - 1 = 63 of them.

Therefore, there are a total of 36 + 45 + 55 + 63 = 199 36 + 45 + 55 + 63 = \boxed{199} unit cubes that intersect the plane x + y + z = 10 x + y + z = 10 .

Thanks for the solution!

Agnishom Chattopadhyay - 2 years, 9 months ago

I had been checking this with the Z3 SMT Solver with the SBV package . I am getting 199 solutions. Here is my code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import Data.SBV
import Control.Monad

checkCube a b c = do
  [x, y, z] <- mapM sReal ["x", "y", "z"]
  constrain $ x + y + z .== 10
  constrain $ x `inRange` (fromIntegral a, (fromIntegral a) + 1)
  constrain $ y `inRange` (fromIntegral b, (fromIntegral b) + 1)
  constrain $ z `inRange` (fromIntegral c, (fromIntegral c) + 1)

countCubes = filterM (\(x, y, z) -> isSatisfiable $ checkCube x y z) $ [ (x, y, z) | x <- [0..9], y <- [0..9], z <- [0..9]]

main :: IO ()
main = (length <$> countCubes) >>= print

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...