Let us assume the given vertices of the tetrahedron are , , , and . According to the given constraints, . Let us assume . Since the origin is the center of mass, therefore . It is trivial to show from this that .
Now, for a given value of , the following transformations will take place:
Mirroring the tetrahedron with respect to the plane: becomes , , , .
After mirroring, multiply each coordinate with a factor. The vertices become: , , and .
After the translation operation, needs to have a co-ordinate of . Therefore, the translation along positive z-axis direction applied to each point would be . After applying this translation to all the points, the coordinate of vertices becomes: , , and .
Now, we need to check if tetrahedron fits inside tetrahedron or not. The tetrahedron fits inside if and only if points , , and all are situated on the inside of tetrahedron .
Now, how can we test if a point P is inside a tetrahedron ? An approach would be to notice that if point is inside tetrahedron , then the following equation holds.
Volume( tetrahedron ) = Volume( tetrahedron )+Volume( tetrahedron ) +Volume( tetrahedron ) +Volume( tetrahedron ).
The following equation can be used for calculating the volume:
Now we have a technique to verify if for a specific value of k, the transformed tetrahedron () fits inside the original tetrahedron () or not. To find the maximum value of for which fits perfectly inside , notice that by making bigger or smaller, we can define how big or how small is. Also notice that if a transformed tetrahedron fits inside , then scaled-down versions of that tetrahedron will also fit inside . Therefore, we could run a binary search on from the values to and find the biggest value of for which fits inside .
Testing if fits inside for a specific value of is . The binary search can either be terminated when the high and low values are sufficiently close.