# Is there general algorithms to solve such 3D cutting problems?

Suppose a cuboid $\mathbb{A}$ has $L$,$M$ and $N$ as its length, width and height respectively, where $L\ge{M}\ge{N}>0$; Now we want to cut $\mathbb{A}$ into smaller cuboids with length $x$, width $y$ and height $z$ respectively, where $x\ge{y}\ge{z}>0$, $L\ge x$, $M\ge{y}$ and $N\ge{z}$.

How to design an algorithm to obtain as many as possible smaller cuboids and give all the feasible cutting methods.

For example, when $x=y=2,z=1$, and $L=M=N=3$ an optimal solution is: at most 6 small cuboids, and typical cutting mode: