Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider three types of sugar priced at 10, 12 and 18 per kg be mixed to form a mixture of price 14 per kg.

Find the ratio in which three types of sugar were mixed.

The answer is 3:4:5

share|cite|improve this question
It seems to me the solution is not unique. But since 14 is midway between 10 and 18, isn't there an easy solution involving just those two, and none of the 12 sugar? – MJD May 16 '12 at 19:45
If the answer is as stated, then there must be another constraint (or two). For example, perhaps the three values must form a right triangle (probably it is not this!), and I am guessing from the elementary number theory tag the other missing constraint is that the amounts in kilograms must all be positive integers. Can you double check what other constraints exist for this problem? – bgins May 16 '12 at 22:30

You want to find $\alpha$ (amount of units of the 10/kg sugar), $\beta$ (amount of units of the units of the 12/kg sugar), and $\gamma$ (amount of units of such that $$\begin{align*} \alpha+\beta+\gamma&=1\\ \alpha&\geq 0\\ \beta&\geq 0\\ \gamma&\geq 0\\ 10\alpha + 12\beta + 18\gamma &= 14 \end{align*}$$ The system with the two equations has parametric solutions $$\begin{align*} \alpha &= 3t - 1\\ \beta &= 2-4t\\ \gamma&= t. \end{align*}$$ From $0\leq\alpha$ we obtain that $t\geq\frac{1}{3}$. From $\beta\geq 0$ we get $t\leq \frac{1}{2}$.

So in summary, each value of $t$ with $\frac{1}{3}\leq t\leq \frac{1}{2}$ will give you a possible solution. Even restricting yourself to rational values, any rational value of $t$ between $\frac{1}{3}$ and $\frac{1}{2}$ will give you a valid solution.

Added. The $3\colon 4\colon 5$ solution comes from setting $t=\frac{5}{12}$.

It's possible that for some (cultural?) reason, the proportions must be integral multiples of $12$ (e.g., if they come from measuring in an imperial system using some base 12 measure), and that all of them must be used (i.e., all quantities positive). If that is the case, it turns out that $t=\frac{5}{12}$ is the only possible solution: in order to have $t=\frac{a}{12}$, with $a$ positive, and $\frac{1}{3}\lt \frac{a}{12}\lt\frac{1}{2}$ (strict inequalities to ensure $\alpha\gt 0$ and $\beta\gt 0$), we must have $4\lt a\lt 6$, so that the only possible solution is $a=5$. But I'm reaching into unknown (or at least, unreported) territory.

share|cite|improve this answer
And note that even with the restriction to rational values, you can always scale up to get whole-number ratios; for instance, with $t=2/5$, then $\alpha=1/5, \beta=2/5$, and $\gamma=2/5$, yielding a 1:2:2 ratio of ten-dollar, twelve-dollar, and eighteen-dollar sugar as another solution. – Steven Stadnicki May 16 '12 at 20:45

I would start by assuming $w_1 , w_2$ and $w_3 $ to be the mass fractions of the 3 sugar types mixed. The total price is $$14=10w_1+12w_2+18w_3$$ Furthermore: $$w_1+w_2+w_3=1$$You have a system of 2 equations with 3 unknowns, therefore there's no unique solution to your problem.

share|cite|improve this answer
I don't get how you got the second equation. – Gigili May 16 '12 at 19:51
@chemeng answer is 3:4:5 though i dont know how – Jay May 16 '12 at 19:54
@Gigili The second equation comes from the fact that the $w_i$ are the mass fractions; they're the proportions of the total mass made up of each type, so they have to add up to 1! – Steven Stadnicki May 16 '12 at 19:55
@StevenStadnicki: Ah yes, right. Thanks. – Gigili May 16 '12 at 19:56
@jay If the book says there is a single solution, then there must be some condition in the problem that you forgot to mention. – MJD May 16 '12 at 19:59

If one naively sets this up as a system of (just one) equation in the amounts of each sugar in kilograms, $$ 10x+12y+18z=14(x+y+z), $$ one arrives at the underdetermined system $$ \left[\matrix{2&1&-2}\right] \left[\matrix{x\\y\\z}\right] =2x+y-2z=0 $$ for which we seek solutions with $x,y,z\ge0$. This is of course equivalent chemeng's and Arturo's posts with the observation that $x,y$ and $z$ represent the absolute weights of the respective component sugars, while chemeng's $w_i$ and Arturo's greek letters represent their proportions, (also called coefficients or weights). So if $s=x+y+z$ is the total amount of mixed sugar, we have the following relations: $$ \eqalign{ x+y+z&=s\\\\ \frac{x+y+z}{s}&=1&=w_1+w_2+w_3&=\alpha+\beta+\gamma\\ \frac{x}s&&=w_1&=\alpha\\\\ \frac{y}s&&=w_2&=\beta\\\\ \frac{z}s&&=w_3&=\gamma=t } $$ The solution set so far consists of all vectors in the first octant of $\mathbb{R}^3$, including bounding coordinate planes/axes (i.e. with nonnegative components), which are perpendicular to the vector $\mathbf{v}=(2,1,-2)$. These have two free variables, a length or scale parameter, and a direction along the circle perpendicular to $\mathbf{v}$. We could, for example, parametrize the solution space with $s$ and $t$ as $$ \left. \matrix{x&=&(3t-1)s\\y&=&(2-4t)s\\z&=&st} \right\} \qquad\text{for}\qquad \left\{ \matrix{s&>&0\\t&\in&\left[\tfrac13,\tfrac12\right]} \right. $$ or, with $u=6t-2\in\left[0,1\right]$, as $$ \left. \matrix{x&=&\tfrac12su\\y&=&\tfrac23s(1-u)\\z&=&\tfrac16s(u+2)} \right\} \qquad\text{for}\qquad \left\{ \matrix{s&>&0\\u&\in&\left[0,1\right]} \right. $$ If we wish to further restrict the solutions to integer values, we still have infinitely many solutions, but the smallest nonzero solutions will be $$ \begin{array}{c} (1,0,1)\\ (0,2,1)\\ \end{array} $$ which form a basis for all solutions (over $\mathbb{R}$ or $\mathbb{Z}$). We can thus also parametrize the solutions as $$ \left[\matrix{x\\y\\z}\right]= a\left[\matrix{1\\0\\1}\right]+ b\left[\matrix{0\\2\\1}\right]= \left[\matrix{a\\2b\\a+b}\right], $$ taking $a,b\ge0$ in $\mathbb{R}$ or $\mathbb{Z}$ as desired. We therefore clearly need another constraint to arrive at the $3:4:5$ ratio corresponding to $a=3,b=2$ solution, especially since another, even smaller all-positive solution, would be possible from our single constraint: $a=b=1$ with ratio $1:2:3$.

share|cite|improve this answer

To complement chemeng's answer, the system of equations gives $$w_1=3w_3-1\quad\mbox{ and }\quad w_2=2-4w_3.$$ Moreover, we also need $w_1,w_2,w_3\in[0,1]$, and so this translates into the restriction $w_3\in[1/4,1/2]\cap[1/3,2/3]=[1/3,1/2]$. Hence, you have infinitely many solutions.

share|cite|improve this answer
Are you sure it's $\frac{1}{4}\leq w_3$? From $2-4w_3\geq 0$ I get $w_3\leq\frac{1}{2}$. – Arturo Magidin May 16 '12 at 20:10
@ArturoMagidin Thank you – M Turgeon May 16 '12 at 21:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.