An Initiative by SAARTHI IAS
Maarg Manthan · Topic 26.1

Counting the Number of Cubes in a Given Solid Arrangement

Reasoning › Non-Verbal Reasoning – Dice and Cubes · Topic 26.1

To count cubes in a solid arrangement, describe the solid as a base grid with the height (number of cubes in the stack) written in each cell, then add the heights for the total, count cells by layer, and use n cubed for a full cube. The number of cubes hidden from view in an n by n by n solid is (n - 2) cubed, and the cubes still needed to complete a larger block equal the larger volume minus the cubes present.

Share:
Counting the Number of Cubes in a Given Solid Arrangement - Reasoning - MaargX UPSC Maarg Manthan

Quick Answer

To count cubes in a solid arrangement, describe the solid as a base grid with the height (number of cubes in the stack) written in each cell, then add the heights for the total, count cells by layer, and use n cubed for a full cube. The number of cubes hidden from view in an n by n by n solid is (n – 2) cubed, and the cubes still needed to complete a larger block equal the larger volume minus the cubes present.

At a Glance

  • Total cubes Sum of all stack heights
  • Layer method Count cells with height at least 1, 2, 3 …
  • Full cube n by n by n n cubed cubes
  • Hidden cubes in n cubed (n – 2) cubed
  • Square pyramid of n layers n(n + 1)(2n + 1)/6 cubes
  • Cubes to add Target volume minus present cubes

Where Does It Fit?

This is the first topic of the Dice and Cubes macro and applies the grid counting of Counting Squares and Other Polygons Within a Complex Figure in three dimensions. The next topic, Identifying the Number of Cubes Painted on One, Two or No Sides After Cutting a Larger Cube, counts painted faces on cubes cut from a larger cube, and Cubes Formed by Joining Smaller Cubes of Different Colours extends cube counting to coloured assemblies.

How Do You Describe a Stack of Cubes With a Height Grid?

In short: imagine the solid from above, write the number of cubes in each stack in its cell, and then every question becomes arithmetic on the grid.

Take a 3 by 3 base with these heights, row by row from front to back: 3, 2, 1 / 2, 1, 1 / 1, 1, 1.

Row Column 1 Column 2 Column 3
Row 1 3 2 1
Row 2 2 1 1
Row 3 1 1 1

Counting from the height grid

  • Total cubes = sum of all heights = 3 + 2 + 1 + 2 + 1 + 1 + 1 + 1 + 1 = 13.
  • Layer counts: cells with height at least 1 = 9, at least 2 = 3, at least 3 = 1, and 9 + 3 + 1 = 13.
  • Cubes to complete a 3 by 3 by 3 block = 27 – 13 = 14.
  • Exposed faces including the bottom = 2 x (cells in the base) + sides seen from the four directions = 42.

How Do You Count Hidden and Visible Cubes?

In short: in a full n by n by n cube, only the outer shell is visible; the inner (n – 2) cubed cubes touch no outside face.

Cube size n Total cubes Hidden (n – 2) cubed On the surface
2 8 0 8
3 27 1 26
4 64 8 56
5 125 27 98
6 216 64 152
  • Visible from one viewpoint: from the top, you see one cube per occupied cell of the base.
  • Pyramids: a square pyramid with layers of 1 by 1, 2 by 2, …, n by n cubes has n(n + 1)(2n + 1)/6 cubes.
  • Cuboids: an l by b by h block has l x b x h cubes, and the hidden cubes number (l – 2)(b – 2)(h – 2).

The exact painted-face counts for the outer shell are the subject of Identifying the Number of Cubes Painted on One, Two or No Sides After Cutting a Larger Cube.

How Do You Find the Number of Cubes to Add or Remove?

In short: compare the present total with the target volume; the difference is the number of cubes to add, or to remove if the target is smaller.

  1. Find the present total by summing the heights.
  2. Find the target volume, for example n cubed for a full cube.
  3. Subtract: the difference is the number of cubes to add.
  4. Check the dimensions: the smallest cube that holds the stack has side equal to the largest of its length, breadth and height.
  5. Check support: in an arrangement stacked on a floor, every cube above rests on another cube.

Problems on assembling cubes of different colours are in Cubes Formed by Joining Smaller Cubes of Different Colours.

Solved Examples

Example 1

Question: A 3 by 3 base has stack heights 3, 2, 1 / 2, 1, 1 / 1, 1, 1. How many cubes are there in all?

  1. Add all nine heights.
  2. 3 + 2 + 1 + 2 + 1 + 1 + 1 + 1 + 1 = 13.

Answer: 13 cubes.

Example 2

Question: How many more cubes are needed to make the solid above into a 3 by 3 by 3 cube?

  1. A 3 by 3 by 3 cube has 27 cubes.
  2. 27 – 13 = 14.

Answer: 14 cubes.

Example 3

Question: How many cubes are in a square pyramid made of layers of 4 by 4, 3 by 3, 2 by 2 and 1 by 1 cubes?

  1. Add the layers: 16 + 9 + 4 + 1.
  2. Formula check: 4 x 5 x 9 / 6 = 30.

Answer: 30 cubes.

Example 4

Question: How many cubes of a 4 by 4 by 4 solid cube are not visible from outside?

  1. Hidden cubes = (4 – 2) cubed.
  2. 2 cubed = 8.

Answer: 8 cubes.

Example 5

Question: How many cubes are visible from the top in the stack above, and how many are in the top layer, counting each occupied cell as one?

  1. All 9 cells are occupied, so 9 cubes are seen from the top.
  2. Cells with height at least 3: just 1.

Answer: 9 cubes are seen from the top, and 1 cube is at the third level.

Shortcuts and Tricks

  • Convert any picture of a solid into a height grid first.
  • Count layer by layer: cells with height at least 1, at least 2, at least 3.
  • Hidden cubes in a cuboid are (l – 2)(b – 2)(h – 2).
  • Use n(n + 1)(2n + 1)/6 for a stepped square pyramid.
  • Check support: no cube floats in an arrangement resting on the floor.

Common Mistakes

  • Counting only the cubes seen in the picture and forgetting hidden ones.
  • Using n squared times 6 for the cubes in a cube.
  • Forgetting that hidden cubes need (n – 2), not (n – 1).
  • Counting a stack of height 3 as 1 cube.
  • Forgetting that cubes below the top layer still count.

Practice Questions

  1. How many cubes are in a 5 by 5 by 5 cube?
  2. How many cubes of a 5 by 5 by 5 cube are not on the surface?
  3. Stack heights in a row are 4, 3, 2, 1. How many cubes?
  4. How many cubes are hidden in a 3 by 4 by 5 block?
  5. How many cubes are in a square pyramid of 5 layers (5 by 5 at the base)?
  6. How many more cubes complete a 2 by 2 by 2 cube from 5 cubes?

Answers: 1) 125; 2) 27; 3) 10; 4) 6; 5) 55; 6) 3.

Why Is This Topic Important?

  • Spatial counting You learn to see a solid as layers and stacks.
  • Exam use Cube counting appears in SSC, CAPF and railway papers.
  • Foundation It is the base for painted cube and dice problems.
  • Link Counting skills link back to Counting Squares and Other Polygons Within a Complex Figure.

What Comes Next?

The next topic is Identifying the Number of Cubes Painted on One, Two or No Sides After Cutting a Larger Cube. It counts cubes painted on one, two or no sides after a large cube is cut.

Key Terms and Formulas

  • Height grid A table of the number of cubes in each stack
  • Layer A horizontal slice of the solid
  • Hidden cube A cube with no face on the outside
  • Cuboid A box with length, breadth and height
  • Pyramid A stepped solid with shrinking layers
  • Exposed face A cube face that is not touching another cube

Study this topic together with these linked topics from other subjects.

Exam Corner

Points to Remember

  • Total cubes = sum of heights.
  • Hidden cubes = (n – 2) cubed.
  • Cube of side n has n cubed cubes.
  • Cubes to add = target minus present.
  • Pyramid of n layers: n(n + 1)(2n + 1)/6 cubes.

Do Not Confuse With

  • Visible vs hidden cubes Visible cubes are on the surface; hidden cubes are inside.
  • Cubes vs faces Count cubes by volume; count faces by area.
  • n squared vs n cubed n squared is one layer; n cubed is the whole cube.
  • (n – 2) vs (n – 1) Hidden cubes need two layers removed from each direction.

Memory Hook

Write the heights, add the layers, subtract for the gap.

GS Relevance

Cube counting is a staple of SSC CGL, CHSL, CAPF, CDS and railway non-verbal reasoning, where stacks, pyramids and hidden cubes are counted by simple arithmetic.

Frequently Asked Questions

How do you count cubes in a solid arrangement?

Describe the solid as a base grid with the number of cubes in each stack written in its cell, then add all the heights. You can also count layer by layer, adding the number of cells that have height at least 1, at least 2 and so on, which gives the same total.

How many cubes are hidden inside an n by n by n cube?

The hidden cubes are those with no face on the outside, and there are n minus 2 all cubed of them. A 3 by 3 by 3 cube has 1 hidden cube, a 4 by 4 by 4 cube has 8, and a 5 by 5 by 5 cube has 27 hidden cubes.

How many cubes are needed to complete a larger cube?

Subtract the number of cubes present from the volume of the target cube. If a stack has 13 cubes and the target is a 3 by 3 by 3 cube with 27 cubes, then 27 minus 13, which is 14 more cubes, are needed to complete it.

How many cubes are in a square pyramid of cubes?

A square pyramid with layers of 1 by 1 up to n by n cubes has n times n plus 1 times 2n plus 1 divided by 6 cubes. Four layers hold 30 cubes, which is 16 plus 9 plus 4 plus 1, and five layers hold 55 cubes.

Why must hidden cubes be counted in cube questions?

A picture only shows the surface, but a solid is made of many more cubes than appear in the drawing. Cubes behind and below others are hidden, so the stack heights or the volume formulas must be used to count them, or the answer will be too small.

PYQ Practice — Statement Analysis

1 A 4 by 4 by 4 cube has 8 hidden cubes.
True

(4 - 2) cubed is 8.

2 A 3 by 3 by 3 cube has 26 hidden cubes.
False

It has 1 hidden cube and 26 on the surface.

3 The total number of cubes in a stack is the sum of the heights.
True

Each stack of height h holds h cubes.

4 A square pyramid of 4 layers holds 30 cubes.
True

16 + 9 + 4 + 1 = 30.

Share: