Marbles in a Box

Caroline and James methods for marbles in a box.doc

Click below to see four different methods for working out the number of winning lines in a $3 \times 3 \times 3$ cube.

Try to make sense of each method.
Now, try to adapt each method to work out the number of winning lines in a $4 \times 4 \times 4$ cube.

Can you adapt the methods to give a general formula for any size cube?
Check that each method gives you the same formula.

Caroline’s method
 

All winning lines must pass either:

There are $12$ edges on a cube so there are $12$ winning lines along edges.

There are $6$ faces on a cube, and $4$ winning lines that pass through the middle of each face, so there are $24$ winning lines through the middle of faces.

Finally we need to consider the winning lines that go through the centre cube:

vertex to opposite vertex: $4$
middle of edge to middle of opposite edge: $6$
middle of face to middle of opposite face: $3$

Therefore there are $49$ possible ways of getting a winning line.
 


James’ method

Winning lines can either be:

 

Considering the non-diagonal winning lines:
There are $9$ from front to back.
There are $9$ from left to right.
There are $9$ from top to bottom.

Considering the diagonal winning lines:

On each layer there are $2$ diagonal winning lines so:
There are $6$ from front to back.
There are $6$ from top to bottom.
There are $6$ from left to right.

There are $4$ lines from a vertex to a diagonally opposite vertex.

In total, there are $27+18+4=49$ winning lines.


Alison’s method
 

There are $3$ possible places where a line can start:

 

A cube has $8$ vertices, $12$ edges and $6$ faces.

From a vertex there are $7$ other vertices that you can join to in order to make a winning line.  $7 \times 8 = 56$ lines, but this counts each line from both ends, so there are $28$ 'vertex' winning lines.

From the middle of an edge there are $3$ other middles-of-edges that you can join to in order to make a winning line.  $3 \times 12 = 36$ lines, but this counts each line from both ends so there are $18$ 'middle of edge' winning lines.

From the centre of each face there is one winning line, joining to the opposite face, so there are $3$ 'centre of face' winning lines.

So in total, there are $28 + 18 + 3 = 49$ winning lines.


Grae's method

The winning lines may be counted by looking at lines:

 

On a plane there are $8$ winning lines.
In the cube, there are $3$ horizontal planes, so $8 \times 3 = 24$ winning lines.

There are also $3$ vertical planes going from left to right, but now with only $5$ new winning lines per plane, as the $3$ horizontal lines have already been counted.  So $5 \times 3 = 15$ winning lines.

On the $3$ vertical planes going from front to back, we now only have $2$ new (diagonal) winning lines per plane. So $2 \times 3 = 6$ winning lines.

Finally, there are also two diagonal planes, going from corner to corner, which only have $2$ lines each, giving $4$ winning lines.

In total, there are $24 + 15 + 6 + 4 = 49$ winning lines.




Formula
For cubes that are more than 1X1X1, you can use a formula to work out the total number of winning lines:
3n2 + 6n + 4

From Paul’s method:

Work out the total number of rods, the total number of diagonals in the layers, and add 4 for the number of corner to corner winning lines.

I did this for a 2X2X2, a 3X3X3 and a 4X4X4 cube.

This gave me:

Cube rods diagonals corner-to-corner total

2 12 12  4   28
3 27 18  4   49
4 48 24  4   76

First of all I realised that the rods are all multiples of 3 and then that they are multiples of the cube’s square. This can be written as 3n2

Then I noticed that the diagonals are simply the cube’s size multiplied by 6, written as 6n.

Finally, every one has 4 corner to corner lines.

The formula therefore is 3n2 + 6n + 4

From Alison’s method:

For a vertex, the formula will always be (7x8)2– as there are always 8 vertices on a cube, and there are always 7 directions in which it can go, with every line being repeated.

From the middle of an edge, it is (12x3x(n-2))2: the (n-2) removing corner pieces, the 3 directions and 12 edges.

For the centre square of each face, calculate (n-2)2 : removing the edges to find the square in the middle.  Then times by 6, for all the faces and divide by 2 to remove repeats.

Therefore, the whole formula is: Which can be simplified to 3n2 + 6n + 4
From Caroline’s method:

For the first stage, there is always 12 – as there are always 12 edges.

To find the remaining lines a face, there will always be 2 diagonals, and 2 times n-2 (to remove edges).  For 6 faces, we have 6x(2+2n-4).  (This can be simplified to 12n-12)

For the middle lines, we have 3 dimensions of 2 times (n-2): as these are the diagonals removing corners.  (simplified to 6n-12) We also have, for lines straight through the middle of the cube, 3 dimensions of the inner square which is (n-2)2 (simplified to 3n2 – 12n +12).  There are also always 4 corner to corner diagonals.

Therefore, we have: 12 + 12n-12 + 6n – 12 + 3n2 – 12n +12 +4  which again can be simplified to 3n2 + 6n + 4.

From Susannah and Grae’s method:

The amount of winning lines on a plane can be expressed as 2n+2 as you have n horizontal and n vertical and two diagonals.
For the first stage, you have n(2n+2)
For the second stage, you have n(n+2)  as the n horizontal have already been made.
For the third stage, you have n x 2 as the n horizontal and n vertical have already been made.
Finally, we have the 4 corner-to-corner diagonals

Therefore, our formula is n(2n+2) + n(n+2) + n x 2 +4
= 2n2+2n+n2+2n+2n+4
=3n2+6n+4



 


A solution was offered by Andrew.

Andrew has tried to explain his reasoning and break the problem down. Well done!

There are 6 distinct winning lines, which cannot be obtained one from any other by rotation or reflection.

These are arranged as follows:

A) The edge of the cube.
B) The diagonal of the face of the cube
C) The middle line of a face of the cube, this means a line that joins two points situated at the middle of two sides opposed to each other, on one face of the cube.
D) The diagonal of the middle plane of the cube
E) The middle line of the middle plane
F) The main diagonal of the cube

Another problem of interest could be to count how many lines are of each type:

A) there are 12 edges of the cube
B) there are 6 faces, and 2 diagonals of each face, consequently 12 lines
C) there are 6 faces, two middle lines for each, 12 lines
D) there are three middle planes, 6 diagonal lines
E) there are three middle planes, 3 middle lines
F) there are 4 main diagonals

There are 49 winning lines.