Solving an expression with three unknowns (Constraints?)

24 Views Asked by At

I have the volume of a cuboid, and I want to find all of the possible dimensions that would evaluate to a cuboid of that volume.

The volume is defined as xyz = 5000 where xyz ∈ Z

I feel like calculus is involved to figuring out this constraint problem.

2

There are 2 best solutions below

0
On

They have to be integers. Since the only prime factors of $5000$ are $2$ and $5$, because $$ 5000 = 2^3 \cdot 5^4, $$ you know that the only possible prime factors of $x, y, z$ are 2s and 5s (at most 3 of the first, at most four of the second). So your problem becomes

$$ x = 2^a 5^b \\ y = 2^c 5^d \\ z = 2^e 5^f $$ where $$xyz = 2^{a+c+e} 5^{b + d + f} = 2^3 5^4.$$ That can be rewritten as \begin{align} 0 &\le a+c+e \le 3 \\ 0 &\le b+d+f \le 4 \\ 0 &\le a, b, c, d, e, f \end{align} with $a, b, c, d, e, f \in \Bbb Z$.

That's a system of linear equations in a few integer unknowns. You could use some fancy linear programming, or (noting that $a, c,$ and $e$ can each be at most $3$, which $b, d,$ and $f$ can each be at most four) you can probably just enumerate things by hand.

One question is whether $(x, y, z) = (2, 5, 500)$ is a "different" set of dimensions from $(x, y, z) = (5, 2, 500)$. Certainly as dimensions they are different -- if we read them as length, width and height, then the first object has length 5 and the second has length 2, and those are different. On the other hand, the resulting objects are actually congruent -- by rotating one, you can make it exactly match the other. Whether you count these as "different" or "the same" wasn't specified in your problem, so it's tough to know the answer.

Less tricky is whether $(10, 10, 50)$ is different from $(10, 10, 50)$, i.e., are the individual "2"s and "5"s distinguishable. My guess is that the intent is almost certainly that they are NOT.

Assuming for the moment that order DOES matter, so that $(2, 5, 500)$ is different from $(5, 2, 500)$, you can think of each of $x, y, z$ as a container with a certain number of 2s and 5s in it -- perhaps imagine each "2" as a red ball and each 5 as a green ball, and each of the three factors as a cup.

You have 3 red balls to distribute -- the possibilities are (I might miss some -- double check this!)

   3 0 0
   2 1 0
   2 0 1
   1 2 0
   1 1 1
   1 0 2
   0 3 0
   0 2 1
   0 1 2
   0 0 3

There were 10 of those. We then have to distribute the 4 green balls somehow. Suppose that there are 29 ways to do so. (I have no idea of the actual count -- you'll need to build a table as I did!). Then there are $29 \cdot 10$ ways to distribute both sets of balls, and that's the number of distinct ways to write $5000$ as a product of three nonnegative integers.

0
On

The volume is: $$xyz=5000=2^3\cdot 5^4=(2^{x_1}\cdot 5^{y_1})\cdot (2^{x_2}\cdot 5^{y_2})\cdot (2^{x_3}\cdot 5^{y_3}),$$ where $x$ is length, $y$ is width and $z$ is height.

It can be formulated as the diophantine equations: $$x_1+x_2+x_3=3, 0\le x_i\le 3 \Rightarrow {3+3-1\choose 3-1}=10;\\ y_1+y_2+y_3=4, 0\le y_i\le 4 \Rightarrow {4+3-1\choose 3-1}=15.$$ Hence, there are $10\cdot 15=150$ different sized cuboids with volume $5000$ if the order is important (i.e. $(10,10,50)$ is considered different from $(10,50,10)$, implying they have different lengths, widths and heights). In case the order is not important (i.e. $(10,10,50)$ is considered the same with $(10,50,10)$ by rotation), then the answer is $\frac{150}{15}=10$.